/* Layout: the sea fills the screen, the lighthouse sits in the middle; HUD in the corners, cards float over the water */
:root {
  color-scheme: dark;
  --sea: #050a16;
  --glass: rgba(8, 14, 28, .7);
  --line: rgba(255, 236, 200, .18);
  --ink: #fbf3e4;
  --ink-dim: rgba(251, 243, 228, .7);
  --lamp: #ffcf7a;
  --oil: #f2a541;
  --stone: #e9e2d4;
  --blaze: #ff9a4a;
  --glassgem: #8fe6d8;
  --display: "Young Serif", Georgia, serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; background: var(--sea); color: var(--ink); font: 500 14px/1.45 var(--body); -webkit-user-select: none; user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
canvas { display: block; }
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
kbd { font: 700 10px/1 var(--body); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; background: rgba(255,255,255,.06); }

/* HUD */
.hud { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; }
body.playing .hud { opacity: 1; }
.hud .ui { pointer-events: auto; }
/* the defence tray: what the light has fished out tonight, dragged from here onto the sea */
body.dragging, body.dragging * { cursor: grabbing !important; }
.tl { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); display: grid; gap: 7px; justify-items: start; }
.tr { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); display: grid; gap: 8px; justify-items: end; }
.pill { display: flex; align-items: center; gap: 9px; padding: 7px 13px 7px 11px; border-radius: 999px; font: 700 14px/1 var(--body); font-variant-numeric: tabular-nums; }
.lbl { font: 700 10px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); width: 44px; }
.bar { width: clamp(90px, 22vw, 150px); height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: inherit; }
.pill .num { min-width: 3ch; text-align: right; font: 700 12.5px/1 var(--body); color: var(--stone); }
@keyframes glowp { 50% { box-shadow: 0 0 0 3px var(--blaze), 0 0 34px rgba(255,154,74,.8); } }
@keyframes blink { 50% { box-shadow: 0 0 0 6px rgba(242,165,65,.12); } }
#powers { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 10px; border-radius: 999px; font: 700 12px/1 var(--body); font-variant-numeric: tabular-nums; border: 1px solid; }
#scorepill { font-size: 16px; }
.moon { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset -4px -1px 0 0 #e8e2ff; }
#mute { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
#mute svg { width: 16px; height: 16px; }
body.muted .snd-on, body:not(.muted) .snd-off { display: none; }
#toast { position: absolute; left: 50%; bottom: calc(210px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 8px 16px; border-radius: 18px; font-size: 13.5px; opacity: 0; transition: opacity .4s; width: max-content; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; }
#banner { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -50%); text-align: center; opacity: 0; transition: opacity .6s, transform .6s; pointer-events: none; width: min(600px, calc(100vw - 32px)); }
#banner.show { opacity: 1; transform: translate(-50%, -60%); }
#banner canvas { display: block; width: 92px; height: 92px; margin: 0 auto 2px; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--bc, #ffbe5a) 60%, transparent)); } /* tonight's new sea animal over the night's title */
#banner canvas[hidden] { display: none; }
#banner b { display: block; font: 400 clamp(30px, 7vw, 48px)/1.05 var(--display); color: var(--bc, var(--lamp)); text-shadow: 0 0 26px color-mix(in srgb, var(--bc, #ffbe5a) 55%, transparent), 0 2px 10px rgba(0,0,0,.6); }
#banner span { font-size: 15px; color: var(--bc, var(--ink)); text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.round { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 3px; cursor: pointer; font: 700 13px/1.1 var(--body); text-align: center; touch-action: none; overflow: hidden; }
.round span, .round kbd { position: relative; }
#bossbar { position: absolute; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: min(380px, calc(100vw - 32px)); display: grid; gap: 6px; text-align: center; font: 400 16px/1 var(--display); color: #ffb8a8; text-shadow: 0 1px 8px #000; }
#bossbar .bb { height: 9px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; border: 1px solid rgba(255,120,100,.45); }
#bossfill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #7a0f2a, #ff4a3a 70%, #ffb08a); transition: width .15s; }
#bossbar small { font: 700 10px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
@media (max-width: 900px) { #bossbar { top: calc(132px + env(safe-area-inset-top, 0px)); } }
@media (max-width: 900px) { .hud:has(#bossbar:not([hidden])) #banner { top: 38%; } }
.help { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: var(--ink-dim); display: flex; gap: 4px 12px; flex-wrap: wrap; max-width: calc(100vw - 240px); }
body.touch .desk-only, body:not(.touch) .touch-only { display: none !important; }
body.touch #buildbtn { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
body:not(.touch) .help { left: calc(116px + env(safe-area-inset-left, 0px)); max-width: calc(100vw - 340px); }
html { -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; } /* no pull-to-refresh on phones (the browser reads it on html, the page's own scroller) */
body { -webkit-touch-callout: none; }
#pausebtn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
#pausebtn svg { width: 14px; height: 14px; }
#pause .card { width: min(360px, 100%); }
.stack { display: grid; gap: 8px; width: 100%; }
.stack button { width: 100%; }
/* phones held sideways: everything a little smaller so the sea stays visible */
@media (max-height: 500px) {
  .round { width: 66px; height: 66px; font-size: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  body.touch #buildbtn { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .tl, .tr { gap: 4px; top: calc(6px + env(safe-area-inset-top, 0px)); }
  .pill { padding: 4px 10px 4px 9px; font-size: 12px; gap: 7px; }
  #scorepill { font-size: 13px; }
  .bar { height: 6px; }
  #mute, #pausebtn { width: 30px; height: 30px; }
  #toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; }
  #banner { top: 30%; }
  #banner b { font-size: 28px; }
  #banner span { font-size: 13px; }
  #bossbar { top: calc(8px + env(safe-area-inset-top, 0px)); width: min(300px, calc(100vw - 420px)); }
  .card { padding: 16px 18px 14px; gap: 8px; }
  body .card h1 { font-size: 34px; }
  body .card h2 { font-size: 24px; }
  body #bigscore { font-size: 28px; }
  body #stars { font-size: 20px; }
  body .stats b { font-size: 18px; }
  body #intro canvas { width: 72px; height: 72px; }
  body .stack { gap: 6px; }
  body .stack .go, body .stack .ghost { padding: 9px 16px; }
}
.tcol { display: contents; }
/* ── the ring dial (Android app): the thumb slides around the ring, the knob never leaves it ── */
#dial { position: absolute; bottom: calc(var(--e) + env(safe-area-inset-bottom, 0px)); width: var(--dz); height: var(--dz); border-radius: 50%; touch-action: none; display: none; }
body.dial #dial { display: block; }
body.dial:not(.dial-right) #dial { left: calc(var(--e) + env(safe-area-inset-left, 0px)); }
body.dial.dial-right #dial { right: calc(var(--e) + env(safe-area-inset-right, 0px)); }
#dial > i { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - var(--rw)), #000 calc(100% - var(--rw) + 1px)); mask: radial-gradient(circle closest-side, transparent calc(100% - var(--rw)), #000 calc(100% - var(--rw) + 1px)); }
#dial .dbase { background: rgba(8, 14, 28, .62); box-shadow: inset 0 0 0 1.5px rgba(255, 207, 122, .32); }
#dial .dticks { background: repeating-conic-gradient(rgba(255, 220, 160, .38) 0 1.6deg, transparent 1.6deg 30deg); }
#dial .dbeam { background: conic-gradient(from calc(var(--b, 0deg) - 22deg), rgba(255, 207, 122, .55) 0 44deg, transparent 44deg); }
#dial .dhub { position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed rgba(255, 236, 200, .16); pointer-events: none; }
#dial .dknob { position: absolute; left: 50%; top: 50%; width: calc(var(--rw) + 16px); height: calc(var(--rw) + 16px); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 38% 35%, #fffaf0, #ffd98a 45%, #c98a3a); box-shadow: 0 0 16px rgba(255, 200, 110, .7), 0 2px 6px rgba(0, 0, 0, .5); transition: box-shadow .15s; }
#dial.held .dknob { box-shadow: 0 0 26px rgba(255, 220, 140, 1), 0 2px 6px rgba(0, 0, 0, .5); }
body.dial { --bs: 64px; --g: 10px; --dz: 140px; --e: 14px; --rw: 24px; }
@media (max-height: 500px) { body.dial { --bs: 56px; --g: 8px; --dz: 118px; --e: 10px; --rw: 21px; } body.dial .round { font-size: 10px; letter-spacing: -.01em; } }
body.dial .round { width: var(--bs); height: var(--bs); font-size: 12px; }
body.dial #buildbtn { bottom: calc(var(--e) + var(--dz) + var(--g) + env(safe-area-inset-bottom, 0px)); }
body.dial:not(.dial-right) #buildbtn { left: calc(var(--e) + env(safe-area-inset-left, 0px)); right: auto; }
body.dial.dial-right #buildbtn { right: calc(var(--e) + env(safe-area-inset-right, 0px)); left: auto; }
body.dial #toast { bottom: calc(var(--e) + var(--dz) + var(--bs) + 2 * var(--g) + 8px + env(safe-area-inset-bottom, 0px)); }
/* the Battle tab: one column (the rank with the sea glass and stars, the maps, the levels, Light the lamp, then the system buttons
   and relics); no level description panel (user's rule) */
@media (min-width: 760px), (max-height: 500px) and (min-width: 600px) {
  body #title .card { width: min(600px, 100%); }
}
@media (max-height: 500px) and (min-width: 600px) {
  .lvl { aspect-ratio: 1 / .72; }
  .linfo { padding: 10px 12px; }
}
body:not(.building) #buildbar { display: none; }
.coin { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3c4, #e0a93a 55%, #8a5a14); box-shadow: 0 0 8px rgba(240,190,90,.5); }
.go.sm, .ghost.sm { padding: 9px 14px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.lens.bp { grid-template-columns: 44px minmax(0, 1fr); }
.lens.bp > canvas { grid-column: 1; grid-row: 1 / span 3; }
.lens.bp i { font-style: normal; color: rgba(251,243,228,.5); }

/* cards */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; padding-block: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); overflow-y: auto; }
.card { width: min(480px, 100%); padding: 24px 22px 20px; border-radius: 18px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.card h1 { margin: 0; font: 400 clamp(36px, 10vw, 56px)/1 var(--display); color: var(--lamp); text-shadow: 0 0 30px rgba(255,190,90,.45); text-wrap: balance; }
.card h2 { margin: 0; font: 400 clamp(26px, 6vw, 36px)/1.1 var(--display); color: var(--lamp); }
.kicker { margin: 0; font: 700 11px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); }
.card p { margin: 0; color: var(--ink-dim); max-width: 40ch; }
.go { appearance: none; border: 0; cursor: pointer; padding: 13px 26px; border-radius: 999px; background: var(--lamp); color: #2a1a05; font: 700 16px/1 var(--body); box-shadow: 0 0 30px rgba(255,190,90,.35); }
.go:hover { transform: translateY(-1px); }
.ghost { appearance: none; cursor: pointer; padding: 11px 18px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font: 700 14px/1 var(--body); }
.ghost:hover { border-color: var(--lamp); }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.gem { display: inline-flex; align-items: center; gap: 7px; font: 700 14px/1 var(--body); color: var(--glassgem); font-variant-numeric: tabular-nums; }
.gem::before { content: ""; width: 10px; height: 10px; transform: rotate(45deg); border-radius: 2px; background: var(--glassgem); box-shadow: 0 0 10px var(--glassgem); }
#title .card { width: min(560px, 100%); }
.worlds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
.wtab { appearance: none; cursor: pointer; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); display: grid; gap: 2px; min-width: 0; }
.wtab b { font: 400 14px/1.1 var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtab small { font-size: 10.5px; color: var(--ink-dim); letter-spacing: .06em; }
.wtab.sel { border-color: var(--wc, var(--lamp)); background: rgba(255,255,255,.08); }
.wtab:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 520px) { .wtab b { font-size: 12.5px; white-space: normal; } .wtab small { font-size: 9.5px; } }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; width: 100%; }
.lvl { appearance: none; cursor: pointer; aspect-ratio: 1 / .92; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0; padding: 4px 2px; position: relative; }
.lvl b { font: 400 clamp(16px, 4.6vw, 22px)/1 var(--display); color: var(--ink); }
.lvl .st { font-size: 10px; letter-spacing: 1px; color: rgba(255,255,255,.2); }
.lvl .st i { font-style: normal; color: var(--wc, var(--lamp)); }
.lvl .tag { position: absolute; top: 3px; right: 5px; font-size: 10px; line-height: 1; }
.lvl.sel { border-color: var(--wc, var(--lamp)); background: color-mix(in srgb, var(--wc, var(--lamp)) 14%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--wc, var(--lamp)) 22%, transparent); }
.lvl.boss { border-color: rgba(255,120,100,.45); background: linear-gradient(160deg, rgba(130,20,30,.38), rgba(255,255,255,.03)); }
.lvl.boss.sel { border-color: #ff8a70; }
.lvl.next:not(.sel) { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { border-color: color-mix(in srgb, var(--wc, var(--lamp)) 60%, transparent); } }
.lvl:disabled { cursor: not-allowed; opacity: .32; }
/* level 0, Prism Night (prelude.js): a rainbow edge in the nine dyes, a little rainbow under the 0 */
.lvl.pre { --rbw: linear-gradient(135deg, #e1e5eb, #a9d8ef, #e0bf58, #f0896a, #2c9d78, #c97b48, #c94a63, #8e6aba, #5f78d0); border: 1.5px solid transparent; background: linear-gradient(rgba(16,22,36,.9), rgba(16,22,36,.9)) padding-box, var(--rbw) border-box; }
.lvl.pre .rb { width: 62%; height: 4px; border-radius: 3px; background: linear-gradient(90deg, #e1e5eb, #a9d8ef, #e0bf58, #f0896a, #2c9d78, #c97b48, #c94a63, #8e6aba, #5f78d0); opacity: .85; }
.lvl.pre.sel { background: linear-gradient(rgba(40,44,64,.88), rgba(40,44,64,.88)) padding-box, var(--rbw) border-box; box-shadow: 0 0 18px rgba(190,170,255,.35); }
.lvl.pre.next:not(.sel) { animation: prenudge 1.6s ease-in-out infinite; }
@keyframes prenudge { 50% { box-shadow: 0 0 18px rgba(200,190,255,.5); } }
.linfo { width: 100%; text-align: left; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.linfo h3 { margin: 0; font: 400 19px/1.15 var(--display); color: var(--wc, var(--lamp)); }
.linfo p { margin: 0; font-size: 13px; color: var(--ink-dim); max-width: none; }
.linfo .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font: 700 11px/1 var(--body); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim); white-space: nowrap; }
.badge.new { border-color: color-mix(in srgb, var(--wc, var(--lamp)) 55%, transparent); color: var(--wc, var(--lamp)); }
.badge.rew { border-color: rgba(143,230,216,.5); color: var(--glassgem); }
#waverow { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.wb { position: relative; width: clamp(110px, 24vw, 200px); height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); }
#wavefill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #6a8f4a, #b9d77a); transition: width .4s; }
.wb .flag { position: absolute; top: -9px; width: 2px; height: 20px; background: rgba(255,255,255,.55); transform: translateX(-1px); }
.wb .flag::after { content: ""; position: absolute; left: 2px; top: 0; border-left: 9px solid #e0533f; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.wb .flag.done::after { border-left-color: #8a8f99; }
.prepcols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; }
@media (max-width: 760px) { .prepcols { grid-template-columns: minmax(0, 1fr); } }
.kit h4 { margin: 6px 0 0; font: 700 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); }
.kit h4:first-child { margin-top: 0; }
.kit .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.kit .chip { font: 700 11.5px/1 var(--body); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.kit .chip.zero { opacity: .45; }
.kit .kp { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-dim); }
.kit .kp b { color: var(--ink); font-weight: 600; }
.kit .warn { color: #ffb8a8; font-size: 12.5px; }
.kit .good { color: var(--glassgem); font-size: 12.5px; }
#intro .card { width: min(440px, 100%); }
#intro canvas { width: 120px; height: 120px; }
#intro .tip { color: var(--ink); font-size: 14px; max-width: 38ch; }
.reward { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(143,230,216,.4); background: rgba(143,230,216,.07); width: 100%; }
.reward canvas { flex: none; }
.reward .ric { font-size: 30px; width: 44px; text-align: center; flex: none; }
.reward b { display: block; font: 400 17px/1.15 var(--display); color: var(--glassgem); }
.reward span { font-size: 12.5px; color: var(--ink-dim); }
.relics { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-dim); }
.relic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px dashed var(--line); font: 700 14px/1 var(--body); color: rgba(255,255,255,.3); }
.relic.on { border-style: solid; border-color: rgba(255,207,122,.5); background: rgba(255,207,122,.08); font-size: 16px; }
.relicnew { color: var(--lamp) !important; font-weight: 700; }
#victory { place-items: end center; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
#victory .card { animation: rise 1.6s ease-out both; background: rgba(24,16,10,.55); width: min(560px, 100%); }
#victory h1 { font-size: clamp(28px, 6.5vw, 46px); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@media (min-width: 900px) { #victory { place-items: center end; padding-right: 40px; } #victory .card { width: 420px; } }
@media (max-width: 520px) { #victory .card > p:not(.kicker) { display: none; } #victory .stats { gap: 6px 14px; } #victory .stats b { font-size: 20px; } }
.ninfo { font-size: 13px; color: var(--ink-dim); min-height: 3em; max-width: 46ch; }
#stars { font-size: 30px; letter-spacing: 6px; color: rgba(255,255,255,.2); }
#stars .on { color: var(--lamp); text-shadow: 0 0 14px rgba(255,190,110,.7); }
.stats { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-dim); flex-wrap: wrap; justify-content: center; }
.stats b { display: block; font: 400 24px/1.1 var(--display); color: var(--ink); }
#bigscore { font: 400 44px/1 var(--display); color: var(--ink); }
#best { font-size: 13px; color: var(--ink-dim); }
#best.new { color: var(--lamp); font-weight: 700; }

/* the Lamp, Lenses, Relics, Oaths and Bestiary tabs (one #shop card, one .pane at a time) */
#shop .card { width: min(820px, 100%); text-align: left; justify-items: stretch; }
.shophead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec { font: 700 11px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); margin-top: 4px; }
.ups, .lenses { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.upg { padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); display: grid; gap: 6px; min-width: 0; align-content: start; }
.upg b, .lens b { font: 400 16px/1.1 var(--display); color: var(--ink); }
.upg span, .lens span { font-size: 12.5px; color: var(--ink-dim); }
/* the Settings tab: Mute all, then a switch for every kind of sound (greyed out while all is muted) */
.sndmute, .snd { appearance: none; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--line); color: var(--ink); cursor: pointer; font: inherit; }
.sndmute { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.06); }
.sndmute svg { width: 30px; height: 30px; flex: none; color: var(--lamp); }
.sndmute.on { background: rgba(255,110,90,.12); border-color: rgba(255,120,100,.5); }
.sndmute.on svg { color: #ff8a78; }
.sndmute .txt, .snd .txt { display: grid; gap: 4px; flex: 1; min-width: 0; }
.sndmute b { font: 400 19px/1.1 var(--display); }
.snd b { font: 400 16px/1.1 var(--display); color: var(--ink); }
.sndmute .txt span, .snd .txt span { font-size: 12.5px; color: var(--ink-dim); }
.snds { display: grid; grid-template-columns: 1fr; gap: 8px; }
.snd { padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
.snd .sw { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .18s; }
.snd .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #cfd6e2; transition: transform .18s, background .18s; }
.snd[aria-checked="true"] .sw { background: var(--lamp); box-shadow: 0 0 12px rgba(255,190,90,.35); }
.snd[aria-checked="true"] .sw::after { transform: translateX(18px); background: #fff; }
.snds.dim .snd { opacity: .4; cursor: default; }
.pips { display: flex; gap: 4px; }
.pips i { width: 18px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); }
.pips i.on { background: var(--lamp); }
.buy { appearance: none; cursor: pointer; justify-self: start; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--glassgem); background: rgba(143,230,216,.08); color: var(--glassgem); font: 700 12.5px/1 var(--body); }
.buy:disabled { opacity: .35; cursor: not-allowed; }
.buy.eq { border-color: var(--lamp); color: var(--lamp); background: rgba(255,207,122,.1); }
.lens { padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 10px; align-items: start; align-content: start; min-width: 0; }
.lens > :not(.sw) { grid-column: 2; }
.lens.cur { border-color: var(--lamp); }
.sw { width: 34px; height: 34px; border-radius: 50%; grid-row: 1 / span 3; }

/* the harbour store: sea defences, bought one by one */
@media (max-width: 520px) { .storeitems { grid-template-columns: minmax(0, 1fr); } }

/* the map's tabs: Battle (the levels), The Lamp, Lenses, Relics, Oaths, Bestiary; a sideways swipe steps through them.
   The bar scrolls sideways when it does not fit; from the pause menu the same tabs show without Battle (body.pauseshop) */
#tabs { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 999px; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
#tabs::-webkit-scrollbar { display: none; }
body:not(.onmap) #tabs { display: none; }
#tabs button { appearance: none; border: 0; background: none; cursor: pointer; flex: none; white-space: nowrap; padding: 12px clamp(10px, 2.4vw, 22px); border-radius: 999px; font: 700 clamp(14px, 3.6vw, 18px)/1 var(--body); letter-spacing: .01em; color: var(--ink-dim); }
#tabs button:hover:not(.on) { color: var(--ink); }
#tabs button.on { background: var(--lamp); color: #2a1a05; box-shadow: 0 0 18px rgba(255,190,90,.35); }
#tabs button { position: relative; }
#tabs .badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--glassgem); color: #062a24; font: 800 11px/17px var(--body); font-style: normal; text-align: center; box-shadow: 0 0 8px rgba(143,230,216,.6); pointer-events: none; } /* how many things the sea glass in hand can buy (Lamp, Lenses) */
body.onmap .overlay, body.pauseshop #shop { padding-top: calc(88px + env(safe-area-inset-top, 0px)); }
body.onmap #title, body.onmap #shop, body.pauseshop #shop { place-items: start center; align-content: start; }
#title, #shop { touch-action: pan-y; overscroll-behavior: contain; } /* sideways moves reach the swipe handler, up and down still scroll (and never pull the page) */
.card.slide-l { animation: slidel .22s ease-out; }
.card.slide-r { animation: slider .22s ease-out; }
@keyframes slidel { from { opacity: .2; transform: translateX(48px); } }
@keyframes slider { from { opacity: .2; transform: translateX(-48px); } }
/* the swipe arrow: a pill at the screen's edge on the side of the tab a swipe goes to, gold once letting go will switch */
#swipeHint { position: fixed; top: 50%; display: none; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; pointer-events: none; background: rgba(12,18,32,.82); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ink); font: 700 15px/1 var(--body); box-shadow: 0 6px 24px rgba(0,0,0,.45); transition: background .12s, color .12s, box-shadow .12s; }
#swipeHint.on { display: flex; }
#swipeHint.r { right: max(10px, env(safe-area-inset-right, 0px)); }
#swipeHint.l { left: max(10px, env(safe-area-inset-left, 0px)); }
#swipeHint b { font: 400 34px/0.7 var(--display); margin-top: -4px; }
#swipeHint.armed { background: var(--lamp); border-color: var(--lamp); color: #2a1a05; box-shadow: 0 0 26px rgba(255,190,90,.55); }
body:not(.onmap):not(.pauseshop) #swipeHint { display: none; }
.pane { display: grid; gap: 10px; }
.pane > p { max-width: none; }
#title .thead { grid-column: 1 / -1; width: 100%; text-align: left; }
#title .thead h1 { font-size: clamp(30px, 7vw, 40px); }
#title .thead .kicker { text-align: left; max-width: none; margin-bottom: 4px; }
body.onmap .mapback { display: none; }
@media (max-width: 480px) { #tabs { gap: 1px; padding: 5px; } #tabs button { padding: 12px 7px; font-size: 14px; } #tabs button:has(.badge:not([hidden])) { padding-right: 17px; } #tabs .badge { min-width: 15px; height: 15px; font-size: 10px; line-height: 15px; padding: 0 3px; top: 3px; } } /* all five fit on a 360 px phone; narrower ones scroll the bar */
@media (max-height: 500px) { #tabs { top: calc(4px + env(safe-area-inset-top, 0px)); padding: 4px; } #tabs button { padding: 9px 14px; font-size: 15px; } body.onmap .overlay, body.pauseshop #shop { padding-top: calc(60px + env(safe-area-inset-top, 0px)); } }

/* choice cards (keeper's oaths) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.up { appearance: none; text-align: left; cursor: pointer; border-radius: 14px; padding: 16px 14px 14px; display: grid; gap: 8px; align-content: start; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: transform .15s, border-color .15s, background .15s; min-width: 0; }
.up:hover, .up:focus-visible { transform: translateY(-3px); border-color: var(--lamp); background: rgba(255,207,122,.08); }
.up .ic { font-size: 26px; line-height: 1; }
.up b { font: 400 19px/1.15 var(--display); color: var(--lamp); }
.up span { font-size: 13px; color: var(--ink-dim); }
.up kbd { justify-self: start; }
.up .lv { font-size: 11px; letter-spacing: .1em; color: var(--ink-dim); text-transform: uppercase; }
@media (max-width: 620px) { .cards { grid-template-columns: minmax(0, 1fr); } .up { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; } .up .ic { grid-row: span 3; } .nights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .bar { width: 64px; } .lbl { width: 38px; } .pill { padding: 6px 10px 6px 9px; gap: 7px; } }

/* the keeper's rank: renown bar on the map, the night's renown on the dawn card, the rank-up card */
.rankbox { width: 100%; display: grid; gap: 5px; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255,207,122,.28); background: rgba(255,207,122,.05); text-align: left; }
.rb-top { display: flex; align-items: center; gap: 9px; }
.rb-top b { font: 400 16px/1.1 var(--display); color: var(--lamp); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-xp { font: 700 11.5px/1 var(--body); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.rankbox small, .xpbox small { font-size: 11.5px; color: var(--ink-dim); }
.rankbox .ghost.sm { justify-self: start; padding: 7px 12px; font-size: 12.5px; }
.rb-stats { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-dim); } /* sea glass and stars, under the renown bar */
.rb-stats .st { color: var(--lamp); }
.rbadge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font: 400 30px/1 var(--display); color: #2a1a05; background: radial-gradient(circle at 35% 30%, #fff6dc, var(--lamp) 55%, #c98a3a); box-shadow: 0 0 26px rgba(255,190,90,.55); }
.rbadge.sm { width: 26px; height: 26px; font-size: 14px; box-shadow: 0 0 10px rgba(255,190,90,.45); flex: none; }
.xpbar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #c98a3a, var(--lamp) 70%, #fff2c4); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.xpbox { width: 100%; display: grid; gap: 6px; text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255,207,122,.3); background: rgba(255,207,122,.05); }
.xprow { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.xprow b { font: 400 16px/1.1 var(--display); color: var(--lamp); }
.xprow span { font: 700 13px/1 var(--body); color: var(--lamp); white-space: nowrap; }
.xpbox ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 12px; color: var(--ink-dim); max-height: 104px; overflow-y: auto; }
.xpbox li { display: flex; justify-content: space-between; gap: 8px; }
.xpbox li em { font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; }
.rkup { color: #fff4d6; text-shadow: 0 0 12px rgba(255,200,110,.8); }
#rankup { background: rgba(2,5,12,.55); }
#rankup .card { width: min(540px, 100%); animation: rise .5s ease-out both; }
.rulist { display: grid; gap: 8px; width: 100%; text-align: left; }
.perk { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.perk .ic { font-size: 22px; width: 30px; text-align: center; flex: none; }
.perk b { display: block; font: 400 16px/1.15 var(--display); color: var(--ink); }
.perk span { font-size: 12.5px; color: var(--ink-dim); }
#ruOath { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { #ruOath { grid-template-columns: minmax(0, 1fr); } }
/* the briefing before a night */
.dyes { display: grid; gap: 4px; margin-bottom: 6px; }
.dyes .sec { font: 700 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.dyebar { display: flex; height: 20px; border-radius: 7px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.dyebar i { font: 700 10.5px/20px var(--body); font-style: normal; text-align: center; overflow: hidden; white-space: nowrap; min-width: 4px; }
.dyes small { font-size: 11.5px; color: var(--ink-dim); line-height: 1.5; }
.roster { display: flex; flex-wrap: wrap; gap: 5px; }
.rc { font: 700 11.5px/1 var(--body); padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--ink); display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.rc em { font-style: normal; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 5px; border-radius: 6px; }
.rc .t-new { background: var(--wc, var(--lamp)); color: #2a1a05; }
.rc .t-trick { background: rgba(255,96,72,.25); color: #ffb8a8; }
.elites { font-size: 12px; color: #ffd76e; display: flex; flex-wrap: wrap; gap: 3px 10px; }
.elites em { font-style: normal; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #2a1a05; background: #ffd76e; border-radius: 6px; padding: 1px 4px; }
.rec { font-size: 12px; color: var(--ink-dim); }
.rec.low { color: #ffb8a8; }
.tipline { font-size: 12px; color: var(--glassgem); }
.feats { display: grid; gap: 3px; font-size: 12px; color: var(--ink-dim); }
.feats .on { color: var(--glassgem); }
.feats .sec { margin: 0; }
.lvl .fd { font-size: 9px; line-height: 1; letter-spacing: 1px; color: rgba(255,255,255,.16); }
.lvl .fd i { font-style: normal; color: var(--glassgem); }
.tides { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--ink-dim); }
.tide { appearance: none; cursor: pointer; font: 700 11.5px/1 var(--body); padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink-dim); }
.tide.on { border-color: #7fb8ff; color: #cfe4ff; background: rgba(110,160,255,.16); }
.lock { font-size: 12px; color: var(--ink-dim); }
.beast { grid-template-columns: 48px minmax(0, 1fr); }
.lens.beast > canvas { grid-column: 1; grid-row: 1 / span 4; width: 48px; height: 48px; }
/* how many more defences can be placed tonight */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── from level 0 to level 1, the first time (journey in prelude.js, JOURNEY_T s): nine colour curtains rise, sink back into the deep
   from the deepest to Foam, the last Mist one melts into a rising moon, and the slogan turns from the rainbow to moonlight ── */
#journey { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden; background: rgba(5,9,22,0); cursor: pointer; transition: opacity 1.2s ease; }
#journey.run { animation: jbg .7s ease forwards; }
#journey.out { opacity: 0; pointer-events: none; }
@keyframes jbg { to { background: rgba(5,9,22,.97); } }
.jbands { position: absolute; inset: 0; display: flex; mix-blend-mode: screen; filter: blur(5px); }
.jbands i { flex: 1; transform: scaleY(0); transform-origin: 50% 100%; opacity: .75; background: linear-gradient(to top, var(--c) 0%, color-mix(in srgb, var(--c) 55%, transparent) 42%, transparent 88%); }
#journey.run .jbands i { animation: jrise 1s cubic-bezier(.2,.8,.3,1) calc(.3s + var(--k) * .08s) forwards, jsink 1.1s cubic-bezier(.6,0,.8,.4) calc(2.6s + (8 - var(--k)) * .16s) forwards; }
#journey.run .jbands i:first-child { animation: jrise 1s cubic-bezier(.2,.8,.3,1) .3s forwards, jmelt .9s ease 4.3s forwards; }
@keyframes jrise { to { transform: scaleY(1); } }
@keyframes jsink { from { transform: scaleY(1); } to { transform: scaleY(1) translateY(105%); opacity: 0; } }
@keyframes jmelt { from { transform: scaleY(1); } to { transform: scaleY(.15); opacity: 0; } }
.jstars { position: absolute; inset: 0; opacity: 0; background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 27% 9%, #fff, transparent), radial-gradient(1.5px 1.5px at 41% 27%, #dfe8ff, transparent), radial-gradient(1px 1px at 63% 12%, #fff, transparent),
  radial-gradient(2px 2px at 78% 22%, #fff, transparent), radial-gradient(1px 1px at 88% 8%, #dfe8ff, transparent), radial-gradient(1.5px 1.5px at 8% 41%, #fff, transparent), radial-gradient(1px 1px at 93% 38%, #fff, transparent),
  radial-gradient(1px 1px at 20% 62%, #dfe8ff, transparent), radial-gradient(1.5px 1.5px at 84% 64%, #fff, transparent), radial-gradient(1px 1px at 55% 78%, #fff, transparent), radial-gradient(1px 1px at 33% 86%, #dfe8ff, transparent); }
#journey.run .jstars { animation: jfade 1.4s ease 4.4s forwards, jtwinkle 2.4s ease-in-out 5.8s infinite alternate; }
@keyframes jtwinkle { to { opacity: .45; } }
.jmoon { position: absolute; left: 50%; top: 13%; width: min(30vw, 150px); aspect-ratio: 1; margin-left: max(-15vw, -75px); opacity: 0; transform: translateY(45vh) scale(.6); }
.jmoon::before { content: ''; position: absolute; inset: -90%; border-radius: 50%; background: radial-gradient(circle, rgba(225,232,245,.42) 0%, rgba(210,218,232,.16) 32%, rgba(196,202,211,.05) 50%, transparent 70%); } /* its light, drawn as a soft disc (a big box-shadow showed as a square on phones) */
.jmoon::after { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 64% 60%, rgba(150,160,175,.45) 0 9%, transparent 10%), radial-gradient(circle at 35% 66%, rgba(150,160,175,.35) 0 6%, transparent 7%), radial-gradient(circle at 46% 32%, rgba(150,160,175,.3) 0 5%, transparent 6%), radial-gradient(circle at 38% 36%, #ffffff 0%, #eef2f8 35%, #c4cad3 72%, #9aa3b0 100%); }
#journey.run .jmoon { animation: jmoon 1.6s cubic-bezier(.2,.8,.3,1) 4.2s forwards; }
@keyframes jmoon { to { opacity: 1; transform: none; } }
.jtext { position: relative; display: grid; width: min(680px, calc(100vw - 40px)); margin-top: min(26vh, 220px); text-align: center; }
.ja, .jb { grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; }
.jtext p, .jtext h2 { margin: 0; opacity: 0; }
.j1 { font: 400 clamp(24px, 5.4vw, 38px)/1.15 var(--display); background: linear-gradient(90deg, #e1e5eb, #a9d8ef, #e0bf58, #f0896a, #3fd8a2, #e8913f, #ff5c7a, #a875ff, #4a78ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-wrap: balance; }
.j2 { font-size: clamp(15px, 3.6vw, 18px); color: var(--ink-dim); letter-spacing: .02em; }
.j3 { font: 400 clamp(36px, 9vw, 64px)/1.05 var(--display); color: #eef2f8; text-shadow: 0 0 28px rgba(220,230,245,.55), 0 0 70px rgba(196,202,211,.3); text-wrap: balance; }
.j4 { font: 700 clamp(11px, 2.8vw, 13px)/1.4 var(--body); letter-spacing: .18em; text-transform: uppercase; color: #c4cad3; }
#journey.run .j1 { animation: jup .9s ease .6s forwards; }
#journey.run .j2 { animation: jup .9s ease 2.6s forwards; }
#journey.run .ja { animation: jout .7s ease 4.4s forwards; }
#journey.run .j3 { animation: jtitle 1.3s cubic-bezier(.2,.8,.3,1) 5s forwards; }
#journey.run .j4 { animation: jup .9s ease 5.9s forwards; }
@keyframes jup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes jout { to { opacity: 0; transform: translateY(-8px); filter: blur(3px); } }
@keyframes jtitle { from { opacity: 0; letter-spacing: .35em; filter: blur(8px); } to { opacity: 1; letter-spacing: 0; filter: none; } }
@keyframes jfade { to { opacity: 1; } }
.jskip { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(251,243,228,.4); opacity: 0; }
#journey.run .jskip { animation: jfade .6s ease 1.2s forwards; }
@media (max-height: 520px) { .jmoon { top: 6%; width: 90px; margin-left: -45px; } .jtext { margin-top: 110px; } }
/* an animal smacks into the tower (quake in draw.js): the whole screen, the sea and the HUD, shakes; harder for the big animals */
body.quake #c, body.quake .hud { animation: quake .34s cubic-bezier(.36,.07,.19,.97); }
body.quake2 #c, body.quake2 .hud { animation: quake2 .46s cubic-bezier(.36,.07,.19,.97); }
@keyframes quake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-6px, 3px); } 40%, 60% { transform: translate(6px, -3px); } }
@keyframes quake2 { 10%, 90% { transform: translate(-3px, 2px) rotate(-.2deg); } 20%, 80% { transform: translate(7px, -4px) rotate(.3deg); } 30%, 50%, 70% { transform: translate(-11px, 5px) rotate(-.4deg); } 40%, 60% { transform: translate(11px, -5px) rotate(.4deg); } }
@media (prefers-reduced-motion: reduce) { body.quake #c, body.quake .hud, body.quake2 #c, body.quake2 .hud { animation-duration: .15s; } }
.help { display: none; } /* the desk help row ("Click points the beam ..."): no long text in a night (user's rule) */
/* the Settings tab's language row (one button per file in js/lang, i18n.js) */
.langs { display: flex; flex-wrap: wrap; gap: 6px; }
.lang { appearance: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); font: 700 13.5px/1 var(--body); }
.lang.on { border-color: var(--lamp); background: rgba(255,207,122,.16); color: var(--lamp); }
/* the end-of-night card, compact (user's rule): tighter spacing, no renown list, no tip line */
#end .card { gap: 8px; padding: 18px 18px 16px; }
#end .card h1 { font-size: clamp(28px, 7vw, 40px); }
#end .xpbox { padding: 8px 12px; gap: 5px; }
#end .reward { padding: 8px 12px; }
.lens.gearc { grid-template-columns: 64px minmax(0, 1fr); } .lens.gearc > canvas { width: 64px; height: 64px; grid-column: 1 !important; grid-row: 1 / span 3; align-self: center; } /* the Gears tab: a gear's picture beside its name and line */
