/* Ridgebow: styles. The battle HUD is positioned from js/layout.js;
   this file styles its look and lays out the menu screens. */
:root {
  --ink: #1d1726; --ink2: #2a2136; --ink3: #3a2f4a; --line: #51436a;
  --text: #f6f0e6; --dim: #b9aecb; --gold: #f2c14e; --green: #3ddc55; --red: #ef4b4b; --ember: #ff9a3c;
  --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); overflow: hidden; overscroll-behavior: none;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
body { position: fixed; inset: 0; }
#safe-probe { position: fixed; left: 0; top: 0; visibility: hidden; pointer-events: none;
  padding: var(--sat) var(--sar) var(--sab) var(--sal); }
#app { position: absolute; inset: 0; overflow: hidden; }
button { font: inherit; color: inherit; border: 0; margin: 0; cursor: pointer; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

#field { position: absolute; display: block; touch-action: none; background: #62bdf0; }
#mini { position: absolute; display: none; touch-action: none; }

/* ---------- inline icons ---------- */
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; background: no-repeat center / contain; flex: none; }
.i-coin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.5' fill='%23f2c14e' stroke='%23815a12' stroke-width='1.6'/%3E%3Ccircle cx='10' cy='10' r='4.6' fill='none' stroke='%23815a12' stroke-width='1.4'/%3E%3C/svg%3E"); }
.i-star { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.6 5.4 5.9.8-4.3 4.1 1.1 5.9L10 15l-5.3 2.8 1.1-5.9L1.5 7.8l5.9-.8z' fill='%23ffd84a' stroke='%23815a12' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-star0 { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.6 5.4 5.9.8-4.3 4.1 1.1 5.9L10 15l-5.3 2.8 1.1-5.9L1.5 7.8l5.9-.8z' fill='%23463a58' stroke='%2364557d' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-ember { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1c1 4 6 6 6 11a6 6 0 0 1-12 0c0-3 2-4 2.500-6.500C8 7 9 5 10 1z' fill='%23ff9a3c' stroke='%237a3208' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M10 9c.7 2 2.600 2.700 2.600 4.800a2.600 2.600 0 0 1-5.200 0C7.400 12 9.300 11 10 9z' fill='%23fff0a8'/%3E%3C/svg%3E"); }
.i-moon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M14 2a8.500 8.500 0 1 0 4 12A7 7 0 0 1 14 2z' fill='%23dcd2ff' stroke='%234a3f72' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-pause { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='4' y='3' width='4.500' height='14' rx='1.200' fill='%23f6f0e6'/%3E%3Crect x='11.500' y='3' width='4.500' height='14' rx='1.200' fill='%23f6f0e6'/%3E%3C/svg%3E"); }
.i-gear { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 6.200a3.800 3.800 0 1 0 0 7.600 3.800 3.800 0 0 0 0-7.600zM8.600 1h2.800l.5 2.300 1.600.7 2-1.300 2 2-1.300 2 .7 1.600 2.300.5v2.800l-2.300.5-.7 1.600 1.300 2-2 2-2-1.300-1.600.7-.5 2.300H8.600l-.5-2.300-1.600-.7-2 1.300-2-2 1.300-2-.7-1.600L.8 11.400V8.600l2.300-.5.7-1.600-1.300-2 2-2 2 1.300 1.600-.7z' fill='%23f6f0e6' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.i-crown { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 15V5l4.500 4L10 3l3.500 6L18 5v10z' fill='%23f2c14e' stroke='%23815a12' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-lock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 9V6.500a4 4 0 0 1 8 0V9' fill='none' stroke='%23d8cfe6' stroke-width='2'/%3E%3Crect x='4' y='9' width='12' height='9' rx='2' fill='%23d8cfe6'/%3E%3C/svg%3E"); }

/* ---------- battle HUD ---------- */
.battle { position: absolute; display: none; }
#app[data-state="battle"] .battle { display: block; }
#hud-top { background: linear-gradient(#2e2440, #221a30); border-bottom: 2px solid #120d1a; align-items: center; gap: 2%; padding: 0 1.2%; white-space: nowrap; }
#app[data-state="battle"] #hud-top { display: flex; }
#app[data-state="battle"] #hud-top.two-rows { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr 1fr; align-items: center; gap: 0 10px; padding: 2px 8px; }
#hud-top.two-rows .h-ember { grid-column: 1; grid-row: 1; }
#hud-top.two-rows .h-right { grid-column: 2; grid-row: 1 / span 2; flex-wrap: wrap; justify-content: flex-end; align-content: center; gap: 3px 6px; max-width: 46vw; }
#hud-top.two-rows .h-gold { flex: 1 0 100%; justify-content: flex-end; }
#hud-top.two-rows .h-right .hbtn { height: 1.9em; }
#hud-top.two-rows .h-mid { grid-column: 1; grid-row: 2; justify-content: flex-start; }
.h-ember { display: flex; align-items: center; gap: .4em; flex: 1 1 30%; min-width: 0; }
.h-ember .meter { flex: 1 1 auto; height: .8em; min-width: 30px; background: #120d1a; border-radius: 99px; overflow: hidden; border: 1px solid #5a3a22; }
.h-ember .meter i { display: block; height: 100%; width: 0; background: linear-gradient(#ffc56b, #ff8a2c); }
.h-ember b { font-variant-numeric: tabular-nums; min-width: 5.2em; }
.h-mid { display: flex; gap: .7em; align-items: center; justify-content: center; flex: 1 1 34%; min-width: 0; color: var(--dim); }
#stage-label { overflow: hidden; text-overflow: ellipsis; }
#clock { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
#clock.night { color: #ff8f8f; }
.h-right { display: flex; gap: .5em; align-items: center; justify-content: flex-end; flex: 1 1 30%; }
.h-gold { display: flex; align-items: center; gap: .3em; font-variant-numeric: tabular-nums; }
.h-gold small { color: var(--gold); font-weight: 700; }
.hbtn { background: var(--ink3); border: 2px solid var(--line); border-radius: 8px; min-width: 2.7em; height: 2.1em; padding: 0 .5em; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.hbtn:active { background: var(--line); }
#btn-speed.fast { background: #7a4a12; border-color: var(--gold); color: #fff3c4; }

#dock { background: linear-gradient(#2a2136, #1a1424); border-top: 2px solid #120d1a; }
#aim { background: #15101d; border: 2px solid var(--line); border-radius: 12px; touch-action: none; overflow: hidden; cursor: ns-resize; }
#aim canvas { width: 100%; height: 100%; display: block; }
#cards { display: none !important; }
.card { position: absolute; display: none; background: linear-gradient(#f4e7c6, #d9c491); border: 2px solid #5b4324; border-radius: 9px; padding: 0; overflow: hidden; color: #2a1c0c; touch-action: manipulation; }
#app[data-state="battle"] .card { display: block; }
.card canvas { position: absolute; left: 50%; top: 2%; transform: translateX(-50%); pointer-events: none; }
.card .cost { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: #2a1c0c; color: #ffd98a; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: .2em; font-variant-numeric: tabular-nums; }
.card .cost .ico { font-size: .9em; }
.card .cool { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(22, 14, 30, .72); pointer-events: none; }
.card .key { position: absolute; left: 3px; top: 1px; font-size: .62em; font-weight: 800; color: #6b5330; }
.card.poor canvas { filter: grayscale(.8); opacity: .7; }
.card.poor .cost { color: #c98f8f; }
.card.locked { background: #2b2336; border-color: #3d3350; }
.card.locked canvas { filter: brightness(0); opacity: .35; }
.card.locked .cost { background: #1c1626; color: #7d7190; }
.card.ready { box-shadow: 0 0 0 2px #fff7c2 inset; }
.card:active { transform: translateY(1px); }
.ctl { border-radius: 12px; border: 2px solid #5b4324; font-weight: 800; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .15em; line-height: 1.1; padding: 2px; text-align: center; }
#app[data-state="battle"] .ctl { display: flex; }
#btn-fire { background: linear-gradient(#5a4a66, #3a2f4a); color: #d8cfe6; border-color: var(--line); }
#btn-fire.on { background: linear-gradient(#ff8a5c, #c8402f); color: #fff; border-color: #6b1a10; box-shadow: 0 0 14px rgba(255, 120, 80, .6); }
#btn-fire svg { width: 46%; height: auto; max-height: 50%; }
#btn-stoke { background: linear-gradient(#ffc56b, #e07a1c); color: #3a1c04; }
#btn-stoke.poor { background: linear-gradient(#6b5a48, #4a3d32); color: #c9b8a0; border-color: #3a2f26; }
#btn-stoke.max { background: linear-gradient(#fff0a8, #ffc56b); }
#btn-stoke small, #btn-fire small { font-weight: 700; font-size: .72em; opacity: .9; }
#btn-stoke .ico { font-size: 1.5em; }
#banner { pointer-events: none; text-align: center; font-weight: 800; color: #fff; background: rgba(29, 23, 38, .86); border: 2px solid var(--gold); border-radius: 99px; opacity: 0; transition: opacity .25s; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 12px; font-size: 14px; }
#banner.show { opacity: 1; }
#banner.bad { border-color: var(--red); }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; display: none; padding: var(--sat) var(--sar) var(--sab) var(--sal); }
#app[data-state="title"] #s-title, #app[data-state="map"] #s-map, #app[data-state="shop"] #s-shop, #app[data-state="result"] #s-result, .screen.open { display: flex; }
.screen.solid { background: radial-gradient(120% 90% at 50% 0%, #3a2f52, #1d1726 70%); flex-direction: column; }
.screen.dim { background: rgba(14, 10, 20, .72); align-items: center; justify-content: center; z-index: 5; }
.modal { z-index: 9; }

#s-title { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.title-box { background: rgba(29, 23, 38, .78); border: 3px solid var(--gold); border-radius: 22px; padding: clamp(14px, 3.5vmin, 34px) clamp(22px, 6vmin, 60px); display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 1.6vmin, 14px); box-shadow: 0 10px 40px rgba(0, 0, 0, .45); max-width: 92vw; }
.logo-bow { width: clamp(90px, 24vmin, 190px); height: auto; }
.logo { margin: 0; font-size: clamp(34px, 11vmin, 96px); letter-spacing: .06em; font-weight: 900; color: #fff6dc; text-shadow: 0 .05em 0 #c8402f, 0 .1em 0 #6b1a10, 0 .16em .2em rgba(0, 0, 0, .5); line-height: 1; }
.tag { margin: 0; color: var(--gold); font-weight: 700; font-size: clamp(13px, 2.6vmin, 22px); }
.foot { position: absolute; bottom: calc(8px + var(--sab)); left: 0; right: 0; margin: 0; font-size: 12px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px #000; }

.big, .mid, .plain { border-radius: 12px; font-weight: 800; padding: .55em 1.2em; min-height: 44px; }
.big { background: linear-gradient(#ffd66b, #f0a52c); color: #3a1c04; border: 2px solid #7a4a12; font-size: clamp(17px, 3.2vmin, 26px); min-width: 9em; box-shadow: 0 4px 0 #7a4a12; }
.big:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a4a12; }
.mid { background: var(--ink3); border: 2px solid var(--line); font-size: clamp(14px, 2.4vmin, 19px); }
.mid:active { background: var(--line); }
.plain { background: transparent; border: 2px solid transparent; color: var(--dim); font-size: clamp(14px, 2.3vmin, 18px); padding: .4em .7em; }
.plain.icon { font-size: 22px; padding: .3em .5em; }
.danger { color: #ffb3b3; }
.mid.danger { border-color: #8a3a3a; }
button:disabled { opacity: .45; cursor: default; }

.topbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(18, 13, 26, .6); border-bottom: 2px solid #120d1a; flex: none; flex-wrap: wrap; }
.wallet { display: flex; gap: 14px; margin-left: auto; font-weight: 800; font-size: clamp(15px, 2.6vmin, 20px); font-variant-numeric: tabular-nums; }
.wallet span { display: inline-flex; align-items: center; gap: 5px; }
.scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px clamp(10px, 3vw, 40px); touch-action: pan-y; }
.tabs { display: flex; gap: 4px; }
.tab { background: var(--ink2); border: 2px solid var(--line); border-radius: 10px 10px 0 0; padding: .45em 1em; font-weight: 800; color: var(--dim); min-height: 40px; }
.tab.on { background: var(--gold); color: #3a1c04; border-color: #7a4a12; }

/* map */
.region { margin: 0 auto 14px; max-width: 980px; border-radius: 16px; padding: 10px 12px 12px; border: 2px solid rgba(255, 255, 255, .12); }
.region h3 { margin: 0 0 8px; font-size: clamp(15px, 2.6vmin, 20px); display: flex; justify-content: space-between; align-items: baseline; }
.region h3 small { font-weight: 600; opacity: .8; font-size: .75em; }
.region.r0 { background: linear-gradient(135deg, #4d8f3e, #2f6a3a); } .region.r1 { background: linear-gradient(135deg, #3d6f6a, #2a4660); }
.region.r2 { background: linear-gradient(135deg, #5a7460, #3a5050); } .region.r3 { background: linear-gradient(135deg, #7a3f4e, #3a2848); }
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(52px, 9vmin, 84px), 1fr)); gap: 8px; }
.node { position: relative; aspect-ratio: 1; border-radius: 14px; background: rgba(20, 14, 26, .55); border: 2px solid rgba(255, 255, 255, .25); font-weight: 900; font-size: clamp(17px, 3.4vmin, 26px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.node .st { display: flex; gap: 1px; font-size: .5em; }
.node.sel { border-color: #fff; background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.node.next { border-color: var(--gold); animation: pulse 1.4s infinite; }
.node.locked { opacity: .45; }
.node .crown { position: absolute; top: -9px; right: -6px; font-size: .8em; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(242, 193, 78, .45); } }
#stage-panel { flex: none; display: flex; gap: 12px; align-items: center; padding: 10px clamp(10px, 3vw, 40px) calc(10px); background: rgba(18, 13, 26, .85); border-top: 2px solid var(--gold); }
#stage-panel .info { flex: 1 1 auto; min-width: 0; }
#stage-panel h2 { margin: 0; font-size: clamp(16px, 3vmin, 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#stage-panel p { margin: 2px 0 0; color: var(--dim); font-size: clamp(12px, 2.1vmin, 16px); }
#stage-panel .foes { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
#stage-panel .foes canvas { width: clamp(26px, 5vmin, 40px); height: clamp(26px, 5vmin, 40px); background: rgba(255, 255, 255, .1); border-radius: 8px; }

/* workshop */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; max-width: 1300px; margin: 0 auto; }
.item { background: var(--ink2); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.item.locked { opacity: .92; border-style: dashed; }
.item canvas.pt { width: 72px; height: 72px; background: linear-gradient(#9fd6f5, #d6f0d0); border-radius: 12px; border: 2px solid #120d1a; grid-row: span 2; }
.item.locked canvas.pt { filter: grayscale(1) brightness(.6); }
.item h4 { margin: 0; font-size: 17px; display: flex; justify-content: space-between; gap: 8px; }
.item h4 small { color: var(--gold); font-weight: 800; white-space: nowrap; }
.item p { margin: 0; color: var(--dim); font-size: 13px; line-height: 1.3; }
.item .stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.item .stats span { background: #15101d; border-radius: 6px; padding: 2px 7px; }
.item .stats em { color: var(--green); font-style: normal; font-weight: 700; }
.item .buy { grid-column: 1 / -1; background: linear-gradient(#ffd66b, #f0a52c); color: #3a1c04; border: 2px solid #7a4a12; border-radius: 10px; font-weight: 800; min-height: 44px; padding: 4px 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; }
.item .buy:disabled { background: #3a2f4a; color: var(--dim); border-color: var(--line); opacity: 1; }
.item .buy.promo:not(:disabled) { background: linear-gradient(#b9f5a0, #4fc24a); border-color: #1f6a22; }
.pips { display: flex; gap: 3px; margin-top: 3px; } .pips i { width: 9px; height: 9px; border-radius: 3px; background: #15101d; border: 1px solid var(--line); } .pips i.on { background: var(--gold); border-color: #7a4a12; }

/* panels: result, pause, settings */
.panel { background: var(--ink2); border: 3px solid var(--gold); border-radius: 20px; padding: clamp(14px, 3vmin, 26px); width: min(92vw, 430px); max-height: 94%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; text-align: center; box-shadow: 0 12px 50px rgba(0, 0, 0, .6); }
.panel h2 { margin: 0; font-size: clamp(22px, 5vmin, 36px); }
.panel h2.win { color: var(--gold); } .panel h2.lose { color: #ff9a9a; }
.panel .note { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.35; }
.stars { display: flex; justify-content: center; gap: 10px; font-size: clamp(34px, 9vmin, 56px); }
.stars .ico { transform: scale(0); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1); } .stars .ico.in { transform: scale(1); }
.goals { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--dim); display: grid; gap: 2px; }
.goals li.ok { color: #c9ffb8; } .goals li::before { content: "· "; } .goals li.ok::before { content: "✓ "; }
.tally { display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; text-align: left; font-size: 15px; background: #15101d; border-radius: 12px; padding: 10px 14px; font-variant-numeric: tabular-nums; }
.tally b { text-align: right; } .tally .sum { border-top: 1px solid var(--line); padding-top: 4px; font-weight: 800; color: var(--gold); }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; } .row > * { flex: 1 1 auto; }
.toggles { display: grid; gap: 8px; text-align: left; }
.toggle { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; background: #15101d; border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; min-height: 48px; width: 100%; text-align: left; }
.toggle b { font-size: 15px; } .toggle small { grid-column: 1; color: var(--dim); font-size: 12.5px; line-height: 1.25; }
.toggle .sw { grid-row: 1 / span 2; grid-column: 2; width: 46px; height: 26px; border-radius: 99px; background: #3a2f4a; position: relative; transition: background .15s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #b9aecb; transition: left .15s, background .15s; }
.toggle.on .sw { background: #2f8a3a; } .toggle.on .sw::after { left: 23px; background: #fff; }

@media (max-height: 430px) {
  .panel { gap: 6px; padding: 10px 14px; width: min(94vw, 560px); } .panel h2 { font-size: 22px; }
  .stars { font-size: 30px; } .big, .mid { min-height: 40px; padding: .3em 1em; }
  .panel { gap: 5px; } .goals { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; font-size: 13px; }
  .tally { padding: 6px 12px; font-size: 14px; gap: 1px 14px; } .panel .note { font-size: 13px; }
  .topbar { padding: 3px 8px; } .region { padding: 6px 10px 8px; margin-bottom: 8px; }
  #stage-panel { padding-top: 6px; padding-bottom: 6px; }
  .title-box { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 10px 22px; gap: 4px 16px; }
  .title-box .logo { font-size: 44px; } .title-box .tag { flex-basis: 100%; } .logo-bow { width: 80px; }
}
@media (prefers-reduced-motion: reduce) { .node.next { animation: none; } .stars .ico { transition: none; } }
/* short landscape phones: pause and settings use two columns so nothing is cut off */
@media (max-height: 430px) {
  #m-pause .panel, #m-settings .panel { width: min(96vw, 760px); display: grid; grid-template-columns: 1fr 1.3fr; align-items: start; gap: 6px 12px; }
  #m-pause .panel h2, #m-settings .panel h2 { grid-column: 1 / -1; }
  #m-pause .toggles, #m-settings .toggles { grid-column: 2; grid-row: 2 / span 3; gap: 6px; }
  #m-pause .panel > button, #m-settings .panel > button, #m-settings .note { grid-column: 1; }
  .toggle { padding: 5px 10px; min-height: 44px; }
}
