
  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { width: 100%; height: 100%; overflow: hidden; background: #070b28; }
  body {
    font-family: "Trebuchet MS", "Comic Sans MS", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
    user-select: none; -webkit-user-select: none; touch-action: none;
  }
  #game { position: fixed; inset: 0; display: block; touch-action: none; cursor: none; }

  /* ---------- HUD ---------- */
  #hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
  /* one big button showing the CURRENT weapon; tapping it opens the picker */
  #curWeapon {
    pointer-events: auto; cursor: pointer;
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    min-width: 132px; min-height: 74px; padding: 8px 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    border: 2px solid rgba(130,140,210,0.45); border-radius: 20px;
    color: #cfd6ff; font-family: inherit;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  }
  #curWeapon .emo { font-size: 34px; line-height: 1.1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
  #curWeapon .lbl { font-size: 12px; font-weight: 700; letter-spacing: 1px; }
  #curWeapon:active { transform: translateX(-50%) translateY(2px); }
  #curWeapon.active {
    border-color: #ffca6b;
    background: linear-gradient(180deg, rgba(84,66,32,0.95), rgba(46,33,24,0.95));
    color: #ffe6b0;
    box-shadow: 0 6px 22px rgba(255,170,60,0.35), 0 3px 10px rgba(0,0,0,0.5);
  }
  .wbtn {
    pointer-events: auto; cursor: pointer;
    min-width: 84px; min-height: 72px; padding: 8px 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    border: 2px solid rgba(130,140,210,0.45); border-radius: 18px;
    color: #cfd6ff; font-family: inherit;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  }
  .wbtn .emo { font-size: 30px; line-height: 1.1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
  .wbtn .lbl { font-size: 11px; font-weight: 700; letter-spacing: 1px; }
  .wbtn:hover { transform: translateY(-2px); }
  .wbtn.active {
    border-color: #ffca6b;
    background: linear-gradient(180deg, rgba(84,66,32,0.95), rgba(46,33,24,0.95));
    color: #ffe6b0;
    transform: translateY(-3px) scale(1.07);
    box-shadow: 0 6px 22px rgba(255,170,60,0.35), 0 3px 10px rgba(0,0,0,0.5);
  }
  #muteBtn, #bellBtn {
    pointer-events: auto; cursor: pointer;
    position: absolute; top: 12px;
    width: 56px; height: 56px; font-size: 26px;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    border: 2px solid rgba(130,140,210,0.45); border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
  }
  #muteBtn { right: 14px; }
  #bellBtn { right: 82px; font-size: 24px; }
  #bellBtn:active { transform: translateY(2px); }
  /* v4: ⛅ weather button — one tap advances to the next weather */
  #weatherBtn {
    pointer-events: auto; cursor: pointer;
    position: absolute; top: 12px; right: 150px;
    width: 56px; height: 56px; font-size: 26px;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    border: 2px solid rgba(130,140,210,0.45); border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
  }
  #weatherBtn:active { transform: translateY(2px); }
  /* v3.2: 🔄 NEW GAME — visible from PLAY onward (normal play, mid-destruction,
     finale fireworks, keep-playing); hidden only on the title screen */
  #newGameBtn {
    pointer-events: auto; cursor: pointer;
    position: absolute; top: 12px; left: 14px;
    width: 56px; height: 56px;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    border: 2px solid rgba(130,140,210,0.45); border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    color: #cfd6ff; font-family: inherit;
  }
  #newGameBtn .emo { font-size: 23px; line-height: 1.1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
  #newGameBtn .lbl { font-size: 8px; font-weight: 700; letter-spacing: .5px; }
  #newGameBtn:active { transform: translateY(2px); }
  #newGameBtn.hidden { display: none; }
  #hint {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    color: rgba(230,235,255,0.75); font-size: 14px; font-weight: 700; letter-spacing: .5px;
    background: rgba(10,14,40,0.45); padding: 6px 16px; border-radius: 999px;
    transition: opacity 1.2s ease; white-space: nowrap;
  }
  #hint.fade { opacity: 0; }

  /* ---------- Overlays ---------- */
  .overlay {
    position: fixed; inset: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,9,28,0.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  }
  .overlay.hidden { display: none; }
  .panel {
    text-align: center; padding: 44px 58px 40px; max-width: min(92vw, 640px);
    background: linear-gradient(180deg, #232c5e 0%, #121637 100%);
    border: 3px solid rgba(255,190,90,0.55); border-radius: 30px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.12);
  }
  .panel h1 {
    font-weight: 900; line-height: 1.02; margin-bottom: 10px;
    background: linear-gradient(180deg, #fff3c4 15%, #ffc95e 55%, #ff7a3d 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 0 rgba(120,40,10,0.55)) drop-shadow(0 8px 18px rgba(0,0,0,0.5));
  }
  .panel h1 .t1 { font-size: clamp(28px, 5.5vw, 54px); letter-spacing: 10px; }
  .panel h1 .t2 { font-size: clamp(52px, 11vw, 108px); letter-spacing: 2px; }
  .panel p {
    color: #c9d2f5; font-size: clamp(15px, 2.6vw, 20px); font-weight: 700; line-height: 1.55;
    margin-bottom: 28px; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  }
  .bigbtn {
    cursor: pointer; font-family: inherit;
    font-size: clamp(26px, 5vw, 38px); font-weight: 900; letter-spacing: 2px;
    color: #fff; text-shadow: 0 2px 0 rgba(140,50,10,0.6);
    padding: 18px 64px; border: none; border-radius: 999px;
    background: linear-gradient(180deg, #ffc95e 0%, #ff8a3d 55%, #f4582a 100%);
    box-shadow: 0 8px 0 #a33415, 0 14px 34px rgba(255,110,40,0.45);
    transition: transform .1s ease, box-shadow .1s ease;
  }
  .bigbtn:hover { transform: translateY(-2px) scale(1.03); }
  .bigbtn:active { transform: translateY(4px); box-shadow: 0 3px 0 #a33415, 0 6px 16px rgba(255,110,40,0.35); }
  .btnrow { display: flex; flex-direction: column; gap: 18px; align-items: center; }
  .bigbtn.blue {
    background: linear-gradient(180deg, #6ec9ff 0%, #3f8fe0 55%, #2a5fc4 100%);
    box-shadow: 0 8px 0 #1c3f8a, 0 14px 34px rgba(70,140,255,0.45);
    text-shadow: 0 2px 0 rgba(15,45,110,0.6);
  }
  .bigbtn.blue:active { box-shadow: 0 3px 0 #1c3f8a, 0 6px 16px rgba(70,140,255,0.35); }
  /* ---------- weapon picker ---------- */
  .pickerPanel { max-width: min(94vw, 800px); padding: 26px 30px 22px; }
  .pickerTitle {
    font-weight: 900; letter-spacing: 4px; font-size: clamp(20px, 4vw, 30px);
    background: linear-gradient(180deg, #fff3c4 15%, #ffc95e 60%, #ff7a3d 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 0 rgba(120,40,10,0.5));
  }
  #pickerGrid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 12px; margin: 16px 0 14px;
  }
  .wcard { min-width: 118px; min-height: 100px; padding: 10px 8px; }
  .wcard .emo { font-size: 40px; }
  .wcard .lbl { font-size: 11px; }
  #pickerClose {
    cursor: pointer; font-family: inherit; font-size: 20px; font-weight: 900;
    color: #fff; padding: 12px 38px; border: none; border-radius: 999px;
    background: linear-gradient(180deg, #7d86c8 0%, #4a5390 60%, #38406e 100%);
    box-shadow: 0 5px 0 #232a4e, 0 10px 22px rgba(0,0,0,0.4);
    letter-spacing: 2px;
  }
  #pickerClose:active { transform: translateY(3px); box-shadow: 0 2px 0 #232a4e; }
  @media (max-width: 700px) {
    .wbtn { min-width: 66px; min-height: 60px; padding: 6px 8px; }
    .wbtn .emo { font-size: 24px; }
    .wbtn .lbl { font-size: 9px; }
    #curWeapon { min-width: 110px; min-height: 62px; }
    #curWeapon .emo { font-size: 28px; }
    #pickerGrid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .wcard { min-width: 96px; min-height: 84px; }
    .wcard .emo { font-size: 30px; }
    #hint { display: none; }
  }
  /* ---------- v4.4 Big Ben chimes: right-edge square column ---------- */
  /* 60 px kid-sized squares (bigbenchimes-proven), icons only, nothing to read */
  .cpad {
    position: absolute; top: 76px; right: 14px;
    display: flex; flex-direction: column; gap: 6px;
  }
  .csq {
    pointer-events: auto; cursor: pointer;
    position: relative;
    width: 60px; height: 60px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    border: 2px solid rgba(130,140,210,0.45); border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    color: #cfd6ff; font-family: inherit; font-size: 32px; line-height: 1;
    transition: transform .12s ease, border-color .12s ease, filter .15s ease;
  }
  .csq:active { transform: scale(0.92); filter: brightness(1.3); }
  /* auto-quarter toggle: green ring + dot when ON */
  #chimeAutoBtn.on {
    border-color: #35e06a;
    background: linear-gradient(180deg, rgba(46,110,72,0.92), rgba(24,54,38,0.92));
  }
  #chimeAutoBtn .dot {
    position: absolute; top: 6px; right: 6px; width: 13px; height: 13px;
    border-radius: 50%; background: rgba(255,255,255,0.35);
    box-shadow: 0 0 0 1.5px rgba(9,13,32,0.6);
  }
  #chimeAutoBtn.on .dot { background: #35e06a; }
  /* STOP: the one loud, solid, unmistakable square */
  #chimeStopBtn {
    background: linear-gradient(180deg, #d9553f, #a33415);
    border-color: rgba(32,24,9,0.8);
  }
  #chimeStopBtn.pressed { animation: stoppulse .35s ease; }
  @keyframes stoppulse {
    0% { transform: scale(0.9); }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); }
  }
  /* ---------- v4.4 digital clock: live local time, kid-readable ---------- */
  #chimeClock {
    position: absolute; top: 76px; left: 14px;
    padding: 4px 14px; border-radius: 999px;
    background: linear-gradient(180deg, #f7ecd4, #e8d9b4);
    border: 3px solid rgba(255,202,107,0.85);
    box-shadow: 0 4px 14px rgba(0,0,0,0.45), inset 0 0 0 1.5px rgba(32,24,9,0.35);
    color: #201809; font-weight: 900; font-size: 21px; line-height: 1.3;
    font-variant-numeric: tabular-nums; letter-spacing: .06em;
    pointer-events: none;
  }
  /* armed badge: chosen hour while the picker plays */
  #chimeArmed {
    position: absolute; top: 128px; left: 14px;
    padding: 3px 14px; border-radius: 999px;
    background: rgba(10,14,40,0.72);
    border: 2px solid rgba(255,202,107,0.85);
    color: #ffe6b0; font-weight: 900; font-size: 20px; line-height: 1.3;
    font-variant-numeric: tabular-nums;
    opacity: 0; pointer-events: none; transition: opacity .18s ease;
  }
  #chimeArmed.show { opacity: 1; }
  /* bong counter: big centre number, teaches counting */
  #chimeCount {
    position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%);
    font-weight: 900; font-size: clamp(90px, 26vw, 170px);
    color: rgba(255,230,176,0.95);
    text-shadow: 0 6px 30px rgba(9,13,32,0.9), 0 0 4px rgba(9,13,32,0.8);
    opacity: 0; pointer-events: none; transition: opacity .18s ease;
  }
  #chimeCount.show { opacity: 1; }
  /* ---------- v4.4 hour picker overlay: translucent, world shows through */
  .chimePanel {
    text-align: center; padding: 18px 20px 16px; max-width: min(94vw, 440px);
    background: linear-gradient(180deg, rgba(35,44,94,0.94), rgba(18,22,55,0.94));
    border: 3px solid rgba(255,190,90,0.55); border-radius: 30px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.65);
    position: relative;
  }
  .cpickTitle {
    max-width: calc(100% - 88px); margin: 0 auto;
    font-weight: 900; letter-spacing: 1px; font-size: clamp(14px, 4vw, 20px);
    background: linear-gradient(180deg, #fff3c4 15%, #ffc95e 60%, #ff7a3d 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 0 rgba(120,40,10,0.5));
  }
  #chimeGrid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin: 14px 0;
  }
  .cnum {
    pointer-events: auto; cursor: pointer; font-family: inherit;
    min-width: 64px; min-height: 64px; padding: 4px;
    border-radius: 18px; border: 2.5px solid rgba(255,202,107,0.7);
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    color: #ffe6b0; font-weight: 900; font-size: 28px; line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: transform .08s ease, background .15s ease, border-color .15s ease;
  }
  .cnum:active { transform: scale(0.93); }
  .cnum.sel {
    background: linear-gradient(180deg, #ffc95e, #f4a93a);
    border-color: #fff3c4; color: #201809;
    box-shadow: 0 0 0 3px rgba(247,236,212,0.5), 0 6px 18px rgba(0,0,0,0.5);
  }
  .cbtnRound {
    pointer-events: auto; cursor: pointer; font-family: inherit;
    position: absolute; top: 12px; z-index: 1;
    width: 52px; height: 52px; border-radius: 50%;
    border: 2.5px solid rgba(255,202,107,0.85); font-size: 24px; line-height: 1;
    background: linear-gradient(180deg, rgba(38,46,92,0.92), rgba(18,23,54,0.92));
    display: flex; align-items: center; justify-content: center;
  }
  #chimePickClose { right: 12px; }
  #chimePickStop {
    left: 12px;
    background: linear-gradient(180deg, #d9553f, #a33415);
    border-color: rgba(32,24,9,0.8);
  }
  #chimePickPlay {
    pointer-events: auto; cursor: pointer; font-family: inherit;
    min-width: min(70vw, 300px); min-height: 62px;
    border-radius: 999px; border: 3px solid rgba(32,24,9,0.8);
    background: linear-gradient(180deg, #57b878, #2e9e4f);
    color: #fff; font-weight: 900; font-size: 30px; letter-spacing: 2px;
    opacity: 0.45; transition: opacity .15s ease, transform .08s ease;
  }
  #chimePickPlay.ready { opacity: 1; }
  #chimePickPlay.ready:active { transform: scale(0.96); }
  @media (max-width: 700px) {
    .cpad { top: 72px; right: 10px; }
    #chimeClock { top: 72px; left: 10px; font-size: 18px; }
    #chimeArmed { top: 122px; left: 10px; font-size: 18px; }
  }
  /* short viewports (phone LANDSCAPE): the column cannot fit 8 squares —
     the proven right-edge pattern adapts to a 2x4 grid so STOP never falls
     below the fold (bigbenchimes ships the same landscape adaptation) */
  @media (max-height: 620px) {
    .cpad {
      top: 76px; right: 14px;
      display: grid;
      grid-template-columns: repeat(2, 60px);
      gap: 6px;
    }
  }

/* Belltide: quiet brass, navy and warm paper around the original colorful world. */
button:focus-visible{outline:3px solid #c7f2de;outline-offset:3px}.panel{background:linear-gradient(150deg,#263d48,#132435);border-color:#dab77b}.panel h1 .t1{letter-spacing:.16em;font-size:clamp(25px,5vw,45px)}.panel h1 .t2{font-size:clamp(38px,8vw,72px);letter-spacing:-.03em}.panel .title-note{font-size:13px;font-weight:500;color:#c9d6d3;line-height:1.6;margin-bottom:24px}#guideBtn{position:absolute;left:14px;top:165px;pointer-events:auto;width:42px;height:42px;border-radius:50%;background:#1c3445e8;color:#ffe4b2;border:1px solid #b99862;font-size:23px;font-weight:800;cursor:pointer}.guidePanel{max-height:88dvh;overflow:auto;touch-action:pan-y;max-width:660px;padding:24px 30px}.guidePanel h2{color:#ffe4b2;font-size:25px;margin-bottom:18px}.guidePanel p{font-size:15px;font-weight:450;text-align:left;line-height:1.55;margin-bottom:15px}.guidePanel p.credits{font-size:11px;color:#bbcdc9}.guidePanel button{padding:13px 22px;background:#c3eed8;color:#122b2d;border:0;border-radius:12px;font-weight:750;cursor:pointer}#cameraViews{pointer-events:auto;position:absolute;bottom:22px;left:50%;transform:translateX(-50%);display:flex;gap:5px;background:#102638dc;padding:5px;border:1px solid #bda47788;border-radius:15px;white-space:nowrap}#cameraViews button{font:inherit;font-size:13px;font-weight:650;padding:9px 15px;background:transparent;color:#d4e3e5;border:0;border-radius:10px;cursor:pointer}#cameraViews button[aria-pressed=true]{background:#c2e9d5;color:#193539}#cityStatus{position:absolute;bottom:24px;left:14px;color:#ffe0a7;background:#122736cc;border:1px solid #bda47755;border-radius:12px;padding:9px 13px;font-size:12px;font-weight:700;pointer-events:none}#hint{bottom:80px;max-width:calc(100vw - 24px);white-space:normal;text-align:center;font-size:12px}.pickerTitle{color:#ffdda4}.wcard{border-radius:18px}#title .panel{max-width:min(92vw,650px)}
@media(max-width:600px){#title .panel{padding:28px 22px}.panel p{font-size:15px}.bigbtn{padding:14px 48px;font-size:27px}#curWeapon{top:12px;min-width:114px;min-height:68px;padding:7px 13px}#curWeapon .emo{font-size:28px}#curWeapon .lbl{font-size:10px}#newGameBtn{top:12px;left:10px;width:50px;height:50px}#muteBtn{top:12px;right:10px;width:44px;height:44px}#weatherBtn{top:66px;right:10px;width:44px;height:44px}#bellBtn{top:120px;right:10px;width:44px;height:44px}#guideBtn{left:14px;top:74px;width:42px;height:42px}#chimeClock,#chimeArmed,#chimeCount,.cpad{display:none}#cameraViews{bottom:max(22px,env(safe-area-inset-bottom));}#cameraViews button{padding:10px 14px;font-size:12px}#cityStatus{bottom:83px;left:50%;transform:translateX(-50%);font-size:11px;padding:6px 10px;white-space:nowrap}#hint{display:none}.guidePanel{padding:20px}.guidePanel p{font-size:13px}.pickerPanel{max-height:90dvh;overflow:auto;touch-action:pan-y;padding:20px 14px}#pickerGrid{grid-template-columns:repeat(3,1fr);gap:7px}.wcard{min-width:0;min-height:66px;padding:6px}.wcard .emo{font-size:25px}.wcard .lbl{font-size:9px}}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}
