:root {
  --bg: #070c0b;
  --bg-2: #0c1614;
  --ink: #e8efe7;
  --muted: #93a79c;
  --faint: #5d6f66;
  --moss: #a9c7a2;
  --lantern: #f3cf8a;
  --amber: #ffa860;
  --ember: #b8704a;
  --card: rgba(12, 20, 18, 0.74);
  --line: rgba(220, 240, 225, 0.10);
  --line-2: rgba(220, 240, 225, 0.18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", ui-sans-serif, -apple-system, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 0%, #0d1917 0%, var(--bg) 55%, #030605 100%);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- layers ---------- */
#globe, #field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#globe { transition: opacity 2.4s var(--ease); }
#field { opacity: 0; pointer-events: none; transition: opacity 2.4s var(--ease); }
#veil {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(100% 80% at 50% 45%, transparent 50%, rgba(3, 6, 5, .7) 100%);
}
/* no blur here: a filter on a full-screen WebGL canvas is re-run every frame */
body[data-screen="welcome"] #globe { opacity: .55; }
body[data-screen="sit"] #globe,
body[data-screen="close"] #globe { opacity: 0; }
body[data-screen="sit"] #field { opacity: 1; }
body[data-screen="practice"] #globe { opacity: .35; }

#ui { position: fixed; inset: 0; pointer-events: none; }
.screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity .8s var(--ease), visibility 0s linear .8s;
}
body[data-screen="welcome"] #screen-welcome,
body[data-screen="home"] #screen-home,
body[data-screen="sit"] #screen-sit,
body[data-screen="close"] #screen-close,
body[data-screen="practice"] #screen-practice {
  opacity: 1; visibility: visible; transition: opacity .8s var(--ease);
}
.screen > * { pointer-events: auto; }

/* ---------- type ---------- */
.wordmark {
  display: inline-flex; align-items: center; gap: .42em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  font-variation-settings: "opsz" 144;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--ink);
}
.wordmark.big { font-size: 44px; margin-bottom: 14px; }
/* the mark: a lantern at the centre of a bell's ripple, inside the world */
.mark { width: 1.2em; height: 1.2em; flex: none; overflow: visible; }
.mark circle { fill: none; stroke: currentColor; }
.mark-ring { stroke-opacity: .5; stroke-width: 1.1; }
.mark-ripple { stroke-opacity: .22; stroke-width: 1; transform-origin: 16px 16px; animation: mark-ripple 6s var(--ease) infinite; }
.mark-core { fill: var(--lantern) !important; stroke: none !important; filter: drop-shadow(0 0 3px var(--lantern)); }
@keyframes mark-ripple {
  0%   { transform: scale(.35); stroke-opacity: .45; }
  70%  { stroke-opacity: 0; }
  100% { transform: scale(1.6); stroke-opacity: 0; }
}
.wordmark-sub {
  align-self: flex-end;
  margin-left: .35em; padding-bottom: .1em;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}
@media (max-width: 900px) { .wordmark-sub { display: none; } }
@media (prefers-reduced-motion: reduce) { .mark-ripple { animation: none; transform: none; } }
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.warm { color: var(--lantern); }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 20px 16px;
  transition: opacity .8s var(--ease);
}
body[data-screen="welcome"] .topbar,
body[data-screen="sit"] .topbar,
body[data-screen="close"] .topbar { opacity: 0; pointer-events: none; }
.topbar-right { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 13px; color: var(--ink); white-space: nowrap;
  transition: border-color .2s;
}
.pill:hover { border-color: var(--line-2); }
.pill-ico { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.me-dot { width: 7px; height: 7px; border-radius: 50%; background: #e6f5e4; box-shadow: 0 0 8px #e6f5e4; }

/* ---------- cards + buttons ---------- */
.card {
  width: min(440px, 100%);
  background: var(--card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .45);
}
.welcome { text-align: center; width: min(760px, 100%); padding: 28px 28px 22px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.welcome .wordmark.big { font-size: 38px; margin-bottom: 8px; }
.lede { color: var(--muted); margin-bottom: 22px; font-size: 15px; }

/* ---------- location chooser ---------- */
.where-q { font-size: 13px; font-weight: 600; text-align: left; margin-bottom: 10px; }
.finder { display: flex; gap: 8px; margin-bottom: 10px; }
.search { position: relative; flex: 1; }
.search input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); color: var(--ink);
  border: 1px solid var(--line-2); font: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); cursor: pointer; }
.search input:focus-visible { outline: 2px solid var(--moss); outline-offset: 1px; }
.suggest {
  position: absolute; z-index: 3; left: 0; right: 0; top: calc(100% + 6px);
  list-style: none; text-align: left;
  background: #0f1a17; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 4px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
}
.suggest li { padding: 9px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.suggest .sg-flag { flex: none; }
.suggest .sg-name { flex: none; }
.suggest .sg-where { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.suggest li[aria-selected="true"], .suggest li:hover { background: rgba(169, 199, 162, .12); }
.suggest .empty { color: var(--muted); cursor: default; }
.suggest .empty:hover { background: none; }
.locate { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.locate span { font-size: 16px; line-height: 1; }

.map-wrap {
  position: relative;
  border: 1px solid var(--line); border-radius: 16px;
  background: radial-gradient(120% 120% at 50% 40%, rgba(169, 199, 162, .05), rgba(0, 0, 0, .25));
  overflow: hidden;
  touch-action: none;
}
#picker { display: block; width: 100%; cursor: zoom-in; }
#picker:focus-visible { outline: 2px solid var(--moss); outline-offset: -2px; border-radius: 16px; }
.map-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); white-space: nowrap; pointer-events: none;
  background: rgba(7, 12, 11, .7); padding: 4px 10px; border-radius: 999px;
  transition: opacity .4s var(--ease);
}
.map-out {
  position: absolute; right: 8px; top: 8px;
  font-size: 12px; color: var(--ink);
  background: rgba(7, 12, 11, .8); border: 1px solid var(--line-2);
  padding: 5px 11px; border-radius: 999px;
}
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; text-align: left;
}
.choice-text { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; min-width: 0; }
.choice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); align-self: center; flex: none; }
.choice.has .choice-dot { background: var(--lantern); box-shadow: 0 0 8px var(--lantern); }
.choice:not(.has) #choice-label { color: var(--muted); }
.choice-coords { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.choice-actions { display: flex; gap: 8px; flex: none; }
.btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 520px) {
  .welcome { padding: 22px 16px 18px; }
  .choice { flex-direction: column; align-items: stretch; }
  .choice-actions .btn { flex: 1; }
}
.fine { color: var(--faint); font-size: 12px; margin-top: 16px; }

.btn {
  display: block; width: 100%;
  padding: 14px 18px; border-radius: 14px;
  font-size: 15px; font-weight: 500;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.btn.primary { background: var(--ink); color: #0a1210; }
.btn.primary:hover { background: #fff; }
.btn.primary:active { transform: scale(.99); }
.btn.ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }
.btn.slim { width: auto; padding: 11px 18px; white-space: nowrap; }

select {
  width: 100%;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); color: var(--ink);
  border: 1px solid var(--line-2);
  font: inherit; font-size: 14px;
  appearance: none;
}
select option { background: var(--bg-2); }

/* ---------- home sheet ---------- */
#screen-home { align-items: flex-end; }
.sheet {
  width: min(420px, 100%);
  margin-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--card);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 22px 16px;
}
.bell-row { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 4px; }
.bell-time { font-family: var(--serif); font-weight: 300; font-size: 46px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bell-in { color: var(--muted); font-size: 14px; }
.bell-in span { color: var(--ink); font-variant-numeric: tabular-nums; }
.waiting { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.waiting span { color: var(--lantern); font-weight: 500; font-variant-numeric: tabular-nums; }
.lengths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.len {
  min-height: 44px; padding: 10px 0; border-radius: 12px;
  border: 1px solid var(--line-2);
  font-size: 14px; color: var(--muted);
  transition: all .2s var(--ease);
}
.len[aria-checked="true"] { color: var(--ink); border-color: var(--moss); background: rgba(169, 199, 162, .10); }
.now-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.now-line span:not(.swatch) { font-variant-numeric: tabular-nums; }

/* seated: fold toggle (phones only) */
.seat-head { display: flex; align-items: center; justify-content: space-between; min-height: 18px; }
.fold {
  display: none; width: 36px; height: 36px; margin: -10px -8px -10px 0;
  align-items: center; justify-content: center; border-radius: 50%; color: var(--muted);
}
.fold:hover { color: var(--ink); }
.fold svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }

/* phones: the sheet docks to the bottom edge */
@media (max-width: 520px) {
  #screen-home { padding: 0; }
  .sheet {
    width: 100%; margin: 0;
    border-radius: 22px 22px 0 0; border-bottom: 0;
    padding: 18px 18px calc(12px + env(safe-area-inset-bottom));
  }
  .bell-time { font-size: 40px; }
  .waiting { margin-bottom: 14px; }
  .lengths { margin-bottom: 10px; }
  .room { margin: 12px 0 0; }
  .room-list { max-height: 112px; }
  .now-line { margin-top: 12px; }

  .fold { display: inline-flex; }
  .sheet.folded { cursor: pointer; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .sheet.folded .fold svg { transform: rotate(180deg); }
  .sheet.folded #seat-more,
  .sheet.folded .room,
  .sheet.folded .now-line { display: none; }
  .sheet.folded .bell-row { margin-bottom: 0; align-items: center; }
  .sheet.folded .bell-time { font-size: 30px; }
}
@media (max-width: 520px) and (max-height: 700px) {
  .sheet { padding-top: 14px; }
  .bell-time { font-size: 34px; }
  .waiting { margin-bottom: 10px; }
  #sheet .btn { padding-top: 12px; padding-bottom: 12px; }
  .room-list { max-height: 84px; }
  .room-note { display: none; }
  .now-line { margin-top: 10px; padding-top: 10px; }
}

.legend {
  position: absolute; left: 20px; top: 76px;
  padding: 12px 16px 13px 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.legend .eyebrow { font-size: 10px; color: var(--faint); margin-bottom: 9px; }
.legend ul { list-style: none; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 11px; font-size: 12px; line-height: 1.2; color: var(--faint); }
.legend b { font-weight: 500; color: var(--muted); }
.legend .swatch { width: 9px; height: 9px; }
.swatch { position: relative; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.swatch.waiting { margin: 0; background: radial-gradient(circle at 38% 35%, #fff6df, var(--lantern) 60%); box-shadow: 0 0 8px 1px rgba(243, 207, 138, .55); }
.swatch.sitting { background: radial-gradient(circle at 38% 35%, #ffd9b4, var(--amber) 60%); box-shadow: 0 0 9px 1px rgba(255, 168, 96, .6); animation: breathe 5s ease-in-out infinite; }
.swatch.ember { background: var(--ember); opacity: .65; box-shadow: 0 0 4px rgba(184, 112, 74, .4); }
/* lanterns wait: a soft ring around them, like a seat kept */
.swatch.waiting::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(243, 207, 138, .28);
}
@keyframes breathe { 50% { box-shadow: 0 0 14px 3px rgba(255, 168, 96, .35); } }
@media (prefers-reduced-motion: reduce) { .swatch.sitting { animation: none; } }

/* ---------- waiting room ---------- */
.room { margin: 4px 0 14px; }
.room-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.room-head .eyebrow { margin: 0; }
.toggle.share { padding: 4px 10px; font-size: 12px; }
.room-list {
  list-style: none; display: grid; gap: 2px;
  max-height: 132px; overflow-y: auto; scrollbar-width: thin;
}
.room-list li {
  display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 8px;
  padding: 5px 2px; font-size: 13px; border-bottom: 1px solid var(--line);
}
.room-list .rf { font-size: 16px; }
.room-list .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-list .rw { color: var(--lantern); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.room-list .rd { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 8ch; text-align: right; }
.room-list li.you .rn { color: var(--moss); }
.room-note { margin: 8px 0 0; }

/* ---------- sitting ---------- */
#screen-sit { flex-direction: column; cursor: default; }
.sit-settle, .sit-cue { position: absolute; text-align: center; transition: opacity 2s var(--ease); }
.settle-line, .sit-cue { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 5vw, 38px); }
.settle-sub { color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.sit-cue { opacity: 0; pointer-events: none; }
.sit-cue.show { opacity: .85; }
body[data-phase="sitting"] .sit-settle { opacity: 0; pointer-events: none; }

.sit-controls {
  position: absolute; bottom: max(32px, env(safe-area-inset-bottom)); left: 16px; right: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity .9s var(--ease);
}
.sit-controls.show { opacity: 1; pointer-events: auto; }
.sit-meta { color: var(--muted); font-size: 13px; }
.sit-remaining { font-family: var(--serif); font-weight: 300; font-size: 44px; font-variant-numeric: tabular-nums; }
.sit-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.toggle {
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13px; color: var(--muted);
  transition: all .2s;
}
.toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--moss); }
.toggle.subtle:hover { color: var(--ink); }
.sit-hint {
  position: absolute; bottom: max(28px, env(safe-area-inset-bottom));
  font-size: 12px; color: var(--faint);
  transition: opacity 2s var(--ease);
}
.sit-hint.gone { opacity: 0; }
body[data-phase="settle"] .sit-hint { opacity: 0; }

/* ---------- closing ---------- */
.close { text-align: center; }
.close-title { font-family: var(--serif); font-weight: 300; font-size: 40px; margin: 6px 0 4px; }
.close-with { color: var(--muted); margin-bottom: 24px; }
.q { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.words { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 26px; }
.word {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 14px; transition: all .2s;
}
.word:hover { border-color: var(--moss); }
.mood { list-style: none; display: grid; gap: 7px; margin-bottom: 26px; text-align: left; }
.mood li { display: grid; grid-template-columns: 76px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.mood li.mine { color: var(--ink); }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar i { display: block; width: 0; height: 100%; background: var(--ember); border-radius: 3px; transition: width 1.2s var(--ease); }
.mood li.mine .bar i { background: var(--lantern); }
.mood .n { text-align: right; font-variant-numeric: tabular-nums; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row .btn { font-size: 14px; padding: 12px 10px; }

/* ---------- practice ---------- */
/* Three tabs, each fits the screen on its own — no scrolling. The panes share
   one grid cell, so the card keeps the height of the tallest and never jumps. */
.practice {
  width: min(780px, 100%);
  max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: none;
  padding: 20px 24px 22px;
}
.practice-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.practice h2 { font-family: var(--serif); font-weight: 300; font-size: 26px; white-space: nowrap; }
.practice h3 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 18px 0 4px; letter-spacing: .02em; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); flex: none; margin-left: auto; }
.icon-btn:hover { color: var(--ink); }

.tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .02);
}
.tabs button {
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted);
  transition: color .2s, background .3s var(--ease);
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); background: rgba(169, 199, 162, .14); }

.panes { display: grid; }
.pane {
  grid-area: 1 / 1; min-width: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.pane.on { opacity: 1; visibility: visible; transition: opacity .5s var(--ease) .05s; }

/* days */
.days { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; }
.stat .big { font-family: var(--serif); font-weight: 300; font-size: 24px; }
.stat .lbl { font-size: 11px; color: var(--muted); }
.month-name { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: 10px; color: var(--faint); text-align: center; }
.cal .day {
  width: 100%; max-width: 34px; justify-self: center;
  aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--faint);
  border: 1px solid transparent;
}
.cal .day.today { border-color: var(--line-2); color: var(--muted); }
.cal .day.sat { color: #1a120a; font-weight: 600; }
.cal .day.future { opacity: .35; }
.history { list-style: none; }
.history li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.history li:last-child { border-bottom: none; }
.history .h-when { color: var(--muted); white-space: nowrap; }
.history .empty { color: var(--muted); font-style: italic; }

/* daily bell */
#pane-bell { display: flex; align-items: center; justify-content: center; }
.keep { max-width: 420px; padding: 20px 0 28px; text-align: center; }
.keep-lede { font-family: var(--serif); font-weight: 300; font-size: 20px; line-height: 1.4; margin-bottom: 22px; }
.keep-row { display: flex; gap: 8px; }
.keep-status { font-size: 13px; color: var(--muted); margin-top: 14px; min-height: 20px; }
.keep-status b { color: var(--lantern); font-weight: 500; }
.keep-status button { color: var(--muted); text-decoration: underline; font-size: 12px; margin-left: 6px; }

/* ---------- the walk ---------- */
.art-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease); }
.art-layer.in { opacity: 1; }
.art-layer svg { display: block; width: 100%; height: 100%; }

/* closing: where this sitting took you */
.close { max-height: calc(100dvh - 32px); overflow-y: auto; }
.walk-note {
  position: relative; height: 150px; overflow: hidden;
  margin: -32px -28px 22px; border-radius: 23px 23px 0 0;
}
.walk-note-art { position: absolute; inset: 0; transform: scale(1.06); transition: transform 9s var(--ease); }
.walk-note.show .walk-note-art { transform: scale(1); }
.walk-note::after, .walk-view::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 45%, rgba(7, 12, 11, .78));
}
.walk-note-cap, .walk-cap {
  position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 1.4s var(--ease) .6s, transform 1.4s var(--ease) .6s;
}
.walk-note.show .walk-note-cap, .walk-view.show .walk-cap { opacity: 1; transform: none; }
.walk-note-name, .walk-name { font-family: var(--serif); font-weight: 300; font-size: 22px; line-height: 1.2; }

/* practice: the walk */
.walk-view {
  position: relative; height: clamp(150px, 30vh, 240px); overflow: hidden;
  border-radius: 16px; border: 1px solid var(--line);
  background: var(--bg-2);
}
.walk-art { position: absolute; inset: 0; transition: filter 1.2s var(--ease); }
/* places still ahead are shown a little quieter, like a view through haze */
.walk-view.ahead .walk-art { filter: saturate(.55) brightness(.82); }
.walk-cap { left: 18px; bottom: 14px; }
.walk-nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: var(--ink);
  background: rgba(7, 12, 11, .45); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: .75; transition: opacity .2s, background .2s;
}
.walk-nav:hover { opacity: 1; background: rgba(7, 12, 11, .7); }
.walk-nav:disabled { opacity: 0; pointer-events: none; }
.walk-nav.prev { left: 10px; }
.walk-nav.next { right: 10px; }

.walk-body { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; margin-top: 14px; align-items: start; }
.walk-text { display: flex; flex-direction: column; min-width: 0; }
.walk-line { font-size: 14px; color: var(--ink); margin: 2px 0 4px; }
.walk-meta { font-size: 12px; color: var(--muted); min-height: 18px; }
.walk-foot { display: flex; gap: 6px; margin-top: 14px; }
.walk-foot .toggle { padding: 6px 12px; font-size: 12px; }
.walk-foot .toggle:hover { color: var(--ink); border-color: var(--moss); }
.walk-foot .toggle:disabled { opacity: .4; cursor: default; border-color: var(--line-2); color: var(--muted); }
.walk-status { font-size: 12px; color: var(--faint); margin-top: 10px; }
.walk-map-wrap {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 120% at 50% 40%, rgba(169, 199, 162, .05), rgba(0, 0, 0, .25));
}
#walk-map { display: block; width: 100%; aspect-ratio: 360 / 132; cursor: pointer; }

@media (max-width: 700px) {
  .practice { padding: 16px 16px 18px; }
  .practice-head { flex-wrap: wrap; row-gap: 12px; }
  .practice h2 { font-size: 24px; }
  .tabs { order: 3; width: 100%; }
  .tabs button { flex: 1; }
  .walk-body { grid-template-columns: 1fr; gap: 12px; }
  .walk-map-wrap { order: -1; }
  .walk-foot { margin-top: 10px; }
  .days { grid-template-columns: 1fr; gap: 18px; }
  .days .month { order: -1; }
  .keep { padding-top: 20px; }
}

/* ---------- imprint / privacy ---------- */
.legal {
  position: fixed; left: 20px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5;
  display: flex; gap: 14px; font-size: 11px;
  transition: opacity .8s var(--ease);
}
.legal a { color: var(--faint); text-decoration: none; }
.legal a:hover, .legal a:focus-visible { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
body[data-screen="sit"] .legal,
body[data-screen="close"] .legal { opacity: 0; visibility: hidden; }

/* ---------- debug strip + toast ---------- */
.debug[hidden] { display: none; }
.debug {
  position: fixed; right: 16px; bottom: 12px; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--faint);
}
.debug button, .debug a { color: var(--muted); text-decoration: underline; font-size: 11px; }
body[data-screen="sit"] .debug { opacity: .25; }
@media (max-width: 760px) {
  .debug { left: 16px; flex-wrap: wrap; right: 16px; top: max(56px, calc(env(safe-area-inset-top) + 48px)); bottom: auto; justify-content: flex-end; }
  .legend { display: none; }
  #screen-welcome { padding-top: 72px; align-items: flex-start; }
  #screen-practice { padding-top: 104px; align-items: flex-start; }
  .practice { max-height: calc(100dvh - 144px); }
  .legal { left: 0; right: 0; justify-content: center; bottom: max(8px, env(safe-area-inset-bottom)); }
  .welcome { max-height: calc(100dvh - 112px); }
  #screen-home .sheet { margin-bottom: max(30px, calc(env(safe-area-inset-bottom) + 22px)); }
}

#toast {
  position: fixed; left: 50%; top: 22px; z-index: 20;
  transform: translate(-50%, -12px);
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; padding: 12px 18px; font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  max-width: calc(100% - 32px);
}
#toast[data-show] { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01s !important; }
}

.text-btn { min-height: 44px; color: var(--moss); text-decoration: underline; text-underline-offset: 3px; }

/* Account controls inherit the practice palette and type. */
.account-dialog {
  margin: auto; padding: 28px; width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto;
  color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 16px; font: 14px/1.6 var(--sans);
}
.account-dialog::backdrop { background: rgba(3, 6, 5, .82); }
.account-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.account-heading h2 { font: 300 28px/1.2 var(--serif); }
#account-status { color: var(--moss); margin-top: 16px; }
.account-explanation { margin: 12px 0 20px; }
.account-actions { display: flex; flex-direction: column; gap: 10px; }
.account-dialog .muted { margin-top: 10px; }
.account-dialog details { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-dialog summary { cursor: pointer; }
.account-dialog label { display: block; margin: 16px 0 6px; color: var(--muted); font-size: 13px; }
.account-dialog input { width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; }
.account-dialog input:focus-visible, .account-dialog summary:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }
.account-dialog input + button { margin-top: 12px; }
.account-dialog .text-btn { display: inline-block; min-height: 44px; margin-right: 16px; }
.account-dialog button:disabled { opacity: .55; cursor: wait; }
.account-feedback { margin-top: 16px; color: var(--lantern); overflow-wrap: anywhere; }
#account-merge-area { margin-top: 24px; }
#account-merge-area button { margin-top: 12px; }
@media (max-width: 480px) {
  /* phones: place gets the room, practice + account shrink to icons */
  .topbar { gap: 10px; padding: max(12px, env(safe-area-inset-top)) 12px 12px; }
  .topbar .wordmark { font-size: 20px; flex: none; }
  .topbar-right { flex: 1; min-width: 0; justify-content: flex-end; gap: 6px; }
  .topbar .pill { min-height: 38px; }
  .place-pill { min-width: 0; padding: 7px 12px; }
  #place-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .icon-pill { flex: none; width: 38px; padding: 0; justify-content: center; }
  .icon-pill .pill-ico { display: block; }
  .icon-pill .pill-label { display: none; }
  #screen-practice { padding-top: 70px; }
  .practice { max-height: calc(100dvh - 86px); }
  .account-dialog { padding: 22px; }
}
