/* Lake Breath v2 — one living scene, one hero object, chrome that recedes.
   The WebGL lake IS the interface; DOM floats above it as light and glass.
   Two voices: Fraunces (soft, wonk-less) for the few big serif moments,
   InterVariable for everything else. Dark-luminous, grain-finished,
   spring-eased. No pills-everywhere, no cards-grid, no chrome bands. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 300 600; font-display: swap;
  src: url('../assets/fonts/fraunces-normal-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic; font-weight: 300 600; font-display: swap;
  src: url('../assets/fonts/fraunces-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'InterVariable';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../assets/fonts/inter-normal-latin.woff2') format('woff2');
}

:root {
  --ink: oklch(96% 0.012 85);            /* warm near-white */
  --ink-soft: oklch(96% 0.012 85 / .68);
  --ink-faint: oklch(96% 0.012 85 / .42);
  --ground: oklch(15% 0.02 250);         /* only seen if WebGL dies */
  --gold: oklch(82% 0.13 75);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'InterVariable', system-ui, -apple-system, sans-serif;

  /* baked spring easings (damped oscillator sampled into linear()) */
  --spring: linear(0, 0.0088, 0.0345, 0.0755, 0.1295, 0.1948, 0.2694, 0.3508,
    0.4369, 0.5254, 0.6138, 0.7, 0.7815, 0.8565, 0.9232, 0.9802, 1.0264,
    1.0613, 1.0847, 1.0968, 1.0983, 1.0902, 1.0738, 1.0507, 1.0226, 0.9915,
    0.9784, 0.9832, 0.994, 1.0021, 1.0043, 1.0019, 0.999, 0.9982, 1);
  --settle: cubic-bezier(0.23, 1, 0.32, 1);

  /* glass recipe — used at most twice on screen */
  --glass-bg: rgba(10, 14, 20, .34);
  --glass-edge: rgba(255, 255, 255, .16);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ------------------------------------------------------ the scene stack */

#lake, #petals {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block;
}
#petals { pointer-events: none; }
.grain {
  position: fixed; inset: -32px; pointer-events: none; z-index: 3;
  background: url('../assets/grain.png');
  opacity: .5; mix-blend-mode: overlay;
}
/* CSS-gradient fallback sky if WebGL context creation fails */
body[data-gl="off"] #lake { display: none; }
body[data-gl="off"] {
  background: linear-gradient(oklch(28% 0.06 260), oklch(45% 0.05 250) 55%,
    oklch(22% 0.04 240) 56%, oklch(12% 0.03 245));
}

/* ------------------------------------------------------------- chrome */

.ui { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column;
  padding: max(18px, env(safe-area-inset-top))
           max(22px, env(safe-area-inset-right))
           calc(18px + env(safe-area-inset-bottom))
           max(22px, env(safe-area-inset-left));
}
/* quiet scrims: stable contrast for text over a bright, moving scene */
.ui::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
  background: linear-gradient(transparent, rgba(5, 8, 12, .38) 70%);
  pointer-events: none;
}
.ui::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 90px;
  background: linear-gradient(rgba(5, 8, 12, .30), transparent);
  pointer-events: none;
}
.ui > * { position: relative; z-index: 1; }
.chrome { transition: opacity 1.2s var(--settle); }
body[data-quiet="true"] .chrome { opacity: 0; pointer-events: none; }

.topline { display: flex; justify-content: space-between; align-items: baseline; }
.wordmark {
  font-family: var(--sans); font-size: .82rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}
.toplinks { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 16px; }
.tbtn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--sans); font-size: .88rem; color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.tbtn:hover, .tbtn:focus-visible { color: var(--ink); }
.tbtn:focus-visible { outline: none; border-bottom-color: var(--gold); }

/* --------------------------------------------------------- home layer */

.home-lower {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 14px;
  transition: opacity .9s var(--settle), transform .9s var(--settle);
}
body[data-view="session"] .home-lower,
body[data-view="end"] .home-lower { opacity: 0; pointer-events: none; transform: translateY(14px); }

.greeting {
  font-family: var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 380;
  font-size: clamp(2.1rem, 8.5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 11ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.undergreeting {
  font-size: .95rem; color: var(--ink-soft); min-height: 1.5em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}
.undergreeting b { color: var(--gold); font-weight: 550; }
/* The three phrases stay together. Tapping them opens the Field Notes
   entry that explains what they ask of a day. */
.mantra {
  display: block; appearance: none; background: none; border: 0; padding: 0;
  text-align: left; cursor: pointer;
  font-family: var(--serif); font-style: italic;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 340; font-size: 1rem; color: var(--ink-faint);
  margin-top: -6px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}
.mantra:hover { color: var(--ink-soft); }
.mantra:focus-visible {
  outline: none; color: var(--ink-soft);
  box-shadow: 0 1.5px 0 0 var(--gold);
}

/* The key is deliberately small. The forecast itself is the scene. */
.forecast-key {
  font-size: .75rem; color: var(--ink-faint); max-width: 44ch;
  margin-top: -6px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}

.begin-row { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.begin {
  font-family: var(--sans); font-size: 1.06rem; font-weight: 550;
  color: var(--ink); cursor: pointer;
  background: var(--glass-bg);
  border: 1px solid var(--glass-edge);
  border-top-color: rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 22px;
  padding: 16px 34px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  transition: transform .5s var(--spring), border-color .3s;
}
.begin:active { transform: scale(.965); }
.begin:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
/* the practice picker: plain words, no pills. The whole menu is visible
   because a hidden menu is a menu nobody uses. */
.practice-picks {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 4px 14px; max-width: 34ch;
}
.practice-controls { display: flex; align-items: flex-start; gap: 14px; }
.practice-pick {
  background: none; border: 0; cursor: pointer; padding: 2px 0;
  font-family: var(--sans); font-size: .86rem; color: var(--ink-faint);
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.practice-pick:hover { color: var(--ink-soft); }
.practice-pick:focus-visible { outline: none; color: var(--ink-soft); border-bottom-color: var(--gold); }
.practice-pick[aria-pressed="true"] { color: var(--gold); }
.duration-control {
  flex: none; cursor: pointer;
  font-family: var(--sans); font-size: .84rem; font-weight: 550;
  color: var(--ink); background: rgba(7, 11, 17, .38);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px;
  padding: 5px 10px; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .16);
}
.duration-control:hover, .duration-control:focus-visible { border-color: var(--gold); outline: none; }

.safety {
  font-size: .72rem; line-height: 1.5; color: var(--ink-faint);
  max-width: 42ch; margin-top: 6px;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* ------------------------------------------------------------ session */

.session-layer {
  position: fixed; inset: 0; z-index: 6; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  opacity: 0; transition: opacity 1s var(--settle);
}
body[data-view="session"] .session-layer { opacity: 1; }

.phase-word {
  margin-top: 13vh;
  font-family: var(--serif); font-style: italic;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 350;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  min-height: 1.35em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .4);
  transition: opacity 1.4s var(--settle);
}
.phase-sub {
  font-size: .95rem; color: var(--ink-soft); min-height: 1.5em;
  max-width: 30ch; text-align: center;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
.session-options {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  margin-top: 8px; max-width: 34ch;
}
.session-instruction {
  font-size: .82rem; line-height: 1.4; color: var(--ink-soft);
  text-align: center; text-shadow: 0 1px 12px rgba(0,0,0,.55);
}
.session-steady {
  pointer-events: auto; cursor: pointer;
  background: rgba(7, 11, 17, .42); color: var(--ink-soft);
  border: 1px solid rgba(255,255,255,.18); border-radius: 14px;
  padding: 4px 10px; font-family: var(--sans); font-size: .76rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.session-steady:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 2px; }
.tap-line {
  margin-top: 7px; min-height: 1.35em;
  font-size: .78rem; color: var(--gold); text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 12px rgba(0,0,0,.55);
}
.remaining {
  margin-top: 6px;
  font-size: .8rem; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.presence-live {
  font-size: .85rem; color: var(--gold); min-height: 1.4em; margin-top: 4px;
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
}
.still-meter {
  margin-top: 8px; font-size: .85rem; color: var(--ink-soft); min-height: 1.4em;
  font-variant-numeric: tabular-nums;
}
.drift-line {
  margin-top: 2px; font-size: .78rem; color: var(--ink-faint); min-height: 1.3em;
  font-variant-numeric: tabular-nums;
}
/* Steady: the target ring is drawn at screen centre, so the counters step
   down below it. Nothing may sit inside the ring. */
body[data-practice="still"] .still-meter { margin-top: 24vh; }
.stop {
  margin-top: auto; pointer-events: auto;
  background: rgba(5, 9, 14, .50); border: 1px solid rgba(255,255,255,.20); cursor: pointer;
  font-family: var(--sans); font-size: .9rem; color: rgba(255,255,255,.88);
  padding: 9px 22px; border-radius: 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 22px rgba(0,0,0,.22);
  transition: color .3s, background .3s, border-color .3s;
}
.stop:hover, .stop:focus-visible {
  color: var(--ink); background: rgba(5, 9, 14, .66);
  border-color: rgba(255,255,255,.34); outline: none;
}

/* the invisible-but-native iOS tick control (no box, no dashes). It sits
   under the Stop button in stacking order so Stop always wins the tap. */
.thumb-switch {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; pointer-events: auto; z-index: 1;
}
.stop { position: relative; z-index: 2; }
.thumb-switch input { opacity: 0.02; transform: scale(3); }
body:not([data-view="session"]) .thumb-switch { display: none; }
.thumb-switch:focus-within { box-shadow: inset 0 0 0 2px var(--gold); border-radius: 24px; }

/* --------------------------------------------------------------- end */

.end-layer {
  position: fixed; inset: 0; z-index: 6; pointer-events: none;
  display: flex; flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 22px calc(26px + env(safe-area-inset-bottom));
  overflow-y: auto; /* short screens and large text must still reach Done */
  opacity: 0; transition: opacity .8s var(--settle);
}
.end-layer .end-big { margin-top: auto; } /* bottom-packed, but scrollable */
body[data-view="end"] .end-layer { opacity: 1; pointer-events: auto; }
.end-big {
  font-family: var(--serif);
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 380; font-size: clamp(1.9rem, 7.6vw, 2.6rem);
  line-height: 1.1; letter-spacing: -0.01em; max-width: 14ch;
  text-shadow: 0 2px 26px rgba(0,0,0,.4);
}
.end-sub { margin-top: 8px; color: var(--ink-soft); font-size: .98rem; max-width: 34ch; }
.end-grow { margin-top: 4px; color: var(--gold); font-size: .9rem; min-height: 1.4em; }
.plaque {
  margin-top: 16px; max-width: 38ch;
  font-family: var(--serif); font-style: italic; font-weight: 340;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-size: 1.02rem; line-height: 1.5; color: var(--ink-soft);
}
.plaque a { color: var(--ink-faint); font-family: var(--sans); font-style: normal; font-size: .8rem; text-decoration: none; border-bottom: 1px solid var(--ink-faint); margin-left: 6px; }

.wall { margin-top: 18px; max-width: 46ch; }
.wall-label { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 550; }
.wall ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.wall li { display: flex; gap: 10px; align-items: baseline; font-size: .93rem; color: var(--ink-soft); }
.wall li .when { margin-left: auto; font-size: .74rem; color: var(--ink-faint); white-space: nowrap; }
.send-note {
  margin-top: 10px; background: none; border: 0; cursor: pointer; padding: 2px 0;
  font-size: .88rem; color: var(--gold); font-family: var(--sans);
}
.note-sent { font-size: .85rem; color: var(--ink-soft); min-height: 1.4em; margin-top: 4px; }

.end-actions { display: flex; gap: 26px; margin-top: 22px; align-items: baseline; }
.end-actions .primary {
  font-family: var(--sans); font-size: 1rem; font-weight: 550; color: var(--ink);
  background: var(--glass-bg); border: 1px solid var(--glass-edge);
  border-top-color: rgba(255,255,255,.28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 18px; padding: 12px 28px; cursor: pointer;
  transition: transform .5s var(--spring);
}
.end-actions .primary:active { transform: scale(.965); }
.felt-worse { margin-top: 14px; background: none; border: 0; cursor: pointer; padding: 2px 0;
  font-size: .8rem; color: var(--ink-faint); font-family: var(--sans); }

/* staggered entrance for the receipt */
.end-layer > * { opacity: 0; transform: translateY(16px); }
body[data-view="end"] .end-layer > * {
  animation: rise .9s var(--spring) forwards;
}
body[data-view="end"] .end-layer > *:nth-child(1) { animation-delay: .15s; }
body[data-view="end"] .end-layer > *:nth-child(2) { animation-delay: .25s; }
body[data-view="end"] .end-layer > *:nth-child(3) { animation-delay: .33s; }
body[data-view="end"] .end-layer > *:nth-child(4) { animation-delay: .45s; }
body[data-view="end"] .end-layer > *:nth-child(5) { animation-delay: .58s; }
body[data-view="end"] .end-layer > *:nth-child(6) { animation-delay: .70s; }
body[data-view="end"] .end-layer > *:nth-child(7) { animation-delay: .80s; }
body[data-view="end"] .end-layer > *:nth-child(8) { animation-delay: .88s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------- sheets */

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 560px; margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-edge); border-bottom: 0;
  border-top-color: rgba(255,255,255,.24);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-radius: 26px 26px 0 0;
  padding: 20px 24px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(105%);
  transition: transform .55s var(--spring);
  max-height: 78dvh; overflow-y: auto;
}
.sheet[data-open="true"] { transform: translateY(0); }
.sheet h2 {
  font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 400; font-size: 1.4rem; margin-bottom: 4px;
}
.sheet .close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-faint); font-size: 1rem; font-family: var(--sans); padding: 6px;
}

/* practice sheet rows */
.practice-row {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--sans); color: var(--ink);
}
.practice-row:first-of-type { border-top: 0; margin-top: 8px; }
.practice-row .name {
  font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-size: 1.15rem; font-weight: 420;
}
.practice-row[aria-pressed="true"] .name { color: var(--gold); }
.practice-row .tag { font-size: .85rem; color: var(--ink-soft); }
/* Every practice's minute dial: a scroll-snapped row of numbers, the centred one
   being the choice. The mask fades the ends so it reads as a wheel that
   continues past the edges rather than a list that stops. */
.minute-dial {
  margin: 12px 0 4px;
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  outline: none;
}
.minute-dial::-webkit-scrollbar { display: none; }
.minute-dial:focus-visible { border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--gold); }
.dial-track { display: flex; padding-inline: calc(50% - 1.6rem); }
.dial-min {
  flex: none; width: 3.2rem; text-align: center;
  scroll-snap-align: center;
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: 1.05rem; line-height: 2.4rem; color: var(--ink-faint);
  transition: color .25s var(--settle), font-size .25s var(--settle);
  cursor: pointer;
}
.dial-min[data-on="true"] {
  color: var(--gold); font-size: 1.7rem; font-weight: 550;
}
.dial-min[data-on="true"]::after {
  content: 'min'; display: block; margin-top: -8px;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 400;
}

/* note sheet: people write their own words now */
.note-row {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 11px 0; border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--sans); font-size: .95rem; color: var(--ink-soft);
}
.note-row:hover { color: var(--ink); }
.note-text {
  width: 100%; margin-top: 12px; resize: none;
  background: rgba(255, 255, 255, .06); color: var(--ink);
  border: 1px solid var(--glass-edge); border-radius: 14px;
  padding: 12px 14px; font-family: var(--sans); font-size: 1rem; line-height: 1.45;
  -webkit-user-select: text; user-select: text;
}
.note-text::placeholder { color: var(--ink-faint); }
.note-text:focus-visible { outline: none; border-color: var(--gold); }
.note-send {
  margin-top: 12px; cursor: pointer;
  font-family: var(--sans); font-size: 1rem; font-weight: 550; color: var(--ink);
  background: var(--glass-bg); border: 1px solid var(--glass-edge);
  border-top-color: rgba(255, 255, 255, .28);
  border-radius: 18px; padding: 12px 28px;
  transition: transform .5s var(--spring);
}
.note-send:active { transform: scale(.965); }
.note-send[disabled] { opacity: .5; }
.note-sub { margin-top: 10px; font-size: .8rem; color: var(--ink-faint); max-width: 40ch; }

/* good news from the neighborhood: the plaque's slot, in the sans voice */
.goodnews { margin-top: 16px; max-width: 44ch; display: flex; flex-direction: column; gap: 3px; }
.goodnews[hidden] { display: none; }
.gn-label {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 550;
}
.gn-title {
  font-size: .96rem; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink-faint); align-self: flex-start;
}
.gn-title:hover { border-bottom-color: var(--gold); }
.gn-why { font-size: .82rem; color: var(--ink-faint); }

/* shore sheet */
.shore-days { display: flex; gap: 7px; margin: 12px 0 4px; }
.shore-days .d {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
}
.shore-days .d[data-practiced="true"] {
  border: 0;
  background: radial-gradient(circle at 35% 30%, oklch(88% 0.06 230), oklch(55% 0.10 250));
}
.shore-days .d[data-today="true"] { outline: 1.5px solid var(--gold); outline-offset: 2px; }
.shore-stats { display: flex; gap: 34px; margin: 16px 0 4px; }
.shore-stats div b {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: 1.6rem; font-variant-numeric: tabular-nums;
}
.shore-stats div span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.shore-line { margin-top: 12px; font-size: .93rem; color: var(--ink-soft); }
.shore-line b { color: var(--gold); font-weight: 550; }
.shore-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: baseline; }
.shore-foot a { color: var(--ink-faint); font-size: .78rem; text-decoration: none; }
.reset { background: none; border: 0; cursor: pointer; font-family: var(--sans);
  font-size: .78rem; color: var(--ink-faint); padding: 0; }

/* field notes panel */
.bench {
  position: fixed; inset: 0; z-index: 22; overflow-y: auto;
  background: rgba(6, 9, 14, .82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: max(20px, env(safe-area-inset-top)) 24px 60px;
  opacity: 0; pointer-events: none; transition: opacity .5s var(--settle);
}
.bench[data-open="true"] { opacity: 1; pointer-events: auto; }
.bench-inner { max-width: 60ch; margin: 0 auto; }
.bench h2 {
  font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 400; font-size: 1.6rem;
}
.bench h3 {
  font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 450; font-size: 1.12rem; margin: 26px 0 6px;
}
.bench p { color: var(--ink-soft); font-size: .95rem; }
.bench .from-builder { border-left: 2px solid var(--gold); padding-left: 14px; margin-top: 18px; }
.bench .close-row { display: flex; justify-content: space-between; align-items: baseline; }

/* the first-run guide: the bench's grammar, one screen, one button */
.guide {
  position: fixed; inset: 0; z-index: 24; overflow-y: auto;
  background: rgba(6, 9, 14, .84);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: max(24px, env(safe-area-inset-top)) 26px calc(40px + env(safe-area-inset-bottom));
  display: flex; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity .7s var(--settle);
}
.guide[data-open="true"] { opacity: 1; pointer-events: auto; }
.guide-inner { max-width: 40ch; margin: 0 auto; width: 100%; }
.guide h2 {
  font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 400; font-size: 1.7rem; letter-spacing: -0.01em;
}
.guide-step {
  color: var(--ink-soft); font-size: .95rem; margin-top: 14px;
}
.guide-phrases {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--serif); font-style: italic;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  font-weight: 340; font-size: 1.25rem; color: var(--ink);
  letter-spacing: .01em;
}
.guide .primary {
  margin-top: 26px;
  font-family: var(--sans); font-size: 1rem; font-weight: 550; color: var(--ink);
  background: var(--glass-bg); border: 1px solid var(--glass-edge);
  border-top-color: rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 20px; padding: 14px 30px; cursor: pointer;
  transition: transform .5s var(--spring);
}
.guide .primary:active { transform: scale(.965); }
.guide-link { margin-top: 4px; color: var(--gold); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px); z-index: 40;
  background: var(--glass-bg); border: 1px solid var(--glass-edge);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: 16px; padding: 10px 18px;
  font-size: .88rem; color: var(--ink); max-width: 84vw; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--settle), transform .5s var(--spring);
}
.toast[data-show="true"] { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .sheet, .toast, .begin, .end-actions .primary { transition-duration: .01s; }
  .end-layer > * { animation-duration: .01s !important; }
}

@media (max-width: 520px) {
  .topline { align-items: flex-start; gap: 12px; }
  .toplinks { max-width: 68%; }
  .practice-controls { width: 100%; }
  .practice-picks { flex: 1; }
}
