@font-face { font-family: "Space Mono"; font-weight: 400; font-display: swap; src: url("fonts/SpaceMono-Regular.ttf") format("truetype"); }
@font-face { font-family: "Space Mono"; font-weight: 700; font-display: swap; src: url("fonts/SpaceMono-Bold.ttf") format("truetype"); }
/* POLANA: the diorama fills the screen, a paper panel sits at the bottom.
   Two backgrounds (the paper and the card on it), one accent for actions (forest green),
   amber only for time running, plum only on the PLUS badge.
   Type: 13 small, 16 text, 19 heading, 26 title, 52 the clock.
   Corners: 14 the panels, 10 what sits in them, 4 the small marks, round for tags. */

:root {
  --paper: #f7f1e3;
  --paper-2: #ece3cd;
  --line: #ddd0b3;
  --card: #fffdf7;
  --ink: #2b2620;
  --ink-2: #4a4438;
  --muted: #6f6556;        /* 5:1 on the paper */
  --green: #3f6b3a;
  --green-dark: #2c4d29;
  --green-ink: #2c4d29;    /* green text */
  --on-green: #f7f1e3;
  --amber: #d98a3a;
  --plum: #6a4a7a;
  --cream: #f7f1e3;        /* text that is always light (over the sky and the breath) */
  --veil: rgba(247, 241, 227, .55);
  --shade: 0 6px 20px rgba(30, 20, 30, .18);
  --r-panel: 14px; --r: 10px; --r-s: 4px;
  color-scheme: light;
}
/* the dark look (the default): night paper, the same green and amber */
:root[data-theme="dark"] {
  --paper: #211c25;
  --paper-2: #2f2834;
  --line: #463c4c;
  --card: #2a2430;
  --ink: #f1e9d8;
  --ink-2: #cfc4b2;
  --muted: #ab9f90;
  --green: #4f8247;
  --green-dark: #355a30;
  --green-ink: #a3d293;
  --plum: #8a66a0;
  --veil: rgba(33, 28, 37, .6);
  --shade: 0 6px 20px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; touch-action: manipulation; overscroll-behavior: none; }   /* no double-tap zoom of the page */
button, input, a { touch-action: manipulation; }
body {
  background: linear-gradient(#c77c90, #deb188);   /* the launch screen's colours, so nothing flashes */
  font: 16px/1.45 "Space Mono", ui-monospace, monospace;
  color: var(--ink);
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
#scene {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%;
  image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated;   /* whichever the browser knows: never smoothed */
  touch-action: none; cursor: grab;
}
#scene:active { cursor: grabbing; }

/* ------------------------------------------------ the top bar: paper pills over the sky */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
}
.pill {
  pointer-events: auto; border: 0; border-radius: 999px; padding: 6px 12px; white-space: nowrap;
  background: var(--paper); color: var(--ink); font-size: 13px; line-height: 1.2; box-shadow: var(--shade);
}
.pill.quiet { opacity: .7; }
.brand-pill { display: flex; align-items: baseline; gap: 8px; }
.brand { font-weight: 700; letter-spacing: .12em; }        /* the name is the logo */
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
.top-btns { display: flex; gap: 6px; }
.lock { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: var(--r-s); background: var(--plum); color: #fff; vertical-align: 1px; }
#season[hidden], #demoBtn[hidden] { display: none; }

/* ------------------------------------------------ the panel */
.panel {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 2;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 24px));
  background: var(--paper); border-radius: var(--r-panel);
  padding: 14px 16px 12px;
  text-align: center;
  box-shadow: inset 0 -4px 0 var(--paper-2), var(--shade);
}
.place-line { display: none; margin: 0 auto 2px; border: 0; background: none; padding: 2px 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
body[data-phase="idle"] .place-line { display: block; }
.place-line::after { content: " ›"; }
.next { margin: 0; font-size: 16px; font-weight: 700; color: var(--muted); min-height: 1.45em; display: flex; justify-content: center; align-items: center; gap: 6px; }
body[data-phase="idle"] .next { font-size: 19px; color: var(--ink); margin: 2px 0 10px; }
.next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-thumb { width: 26px; height: 26px; image-rendering: pixelated; margin: -6px 0; }
.next-thumb[hidden] { display: none; }
.time {
  display: block; width: 100%; background: none; border: 0; padding: 0; margin: 2px 0 8px;
  font-size: 52px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.time[hidden] { display: none; }
.bar { display: flex; gap: 2px; margin: 0 auto 12px; max-width: 320px; height: 8px; }
.bar[hidden] { display: none; }
.bar i { flex: 1; background: var(--paper-2); border-radius: 2px; }
.bar i.on { background: var(--amber); }
.bar i.half { background: linear-gradient(90deg, var(--amber) 50%, var(--paper-2) 50%); }
.bar[data-phase="break"] i.on { background: var(--green); }
.bar[data-phase="drift"] i.on { background: #a9b0b8; }

/* what to build: four cards of equal height */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; padding-top: 8px; }
.cards[hidden], .tags[hidden] { display: none; }
.cards .card {
  position: relative; border: 2px solid var(--line); background: var(--card); border-radius: var(--r);
  padding: 4px 2px 6px; display: grid; grid-template-rows: 46px 2.7em auto; justify-items: center; align-items: center;
}
.cards .card img { width: 46px; height: 46px; image-rendering: pixelated; }
.cards .card b { font-size: 13px; line-height: 1.3; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cards .card span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cards .card[aria-pressed="true"] { border-color: var(--green); }
.cards .card[aria-pressed="true"] span { color: var(--green-ink); font-weight: 700; }
.cards .card:disabled { opacity: .45; cursor: default; }
.cards .card em { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 13px; line-height: 1.4; font-weight: 700; background: var(--green); color: var(--on-green); border-radius: var(--r-s); padding: 0 5px; white-space: nowrap; }

/* tags: what the time is for (also every one-of-a-few choice) */
.tags { display: flex; gap: 5px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 2px 2px; margin: 0 -4px 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 16px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 16px), transparent); }
.tags::-webkit-scrollbar { display: none; }
.tag { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }

.task-link { display: block; margin: 0 auto 10px; color: var(--muted); }
.task-link[hidden], .task[hidden] { display: none; }
.task {
  display: block; width: 100%; margin: 0 0 10px; font: inherit; font-size: 16px; text-align: center;
  background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r); padding: 8px 10px;
  -webkit-user-select: text; user-select: text;
}
.task::placeholder { color: var(--muted); }
#setup[hidden] { display: none; }

/* ------------------------------------------------ buttons: the main one, the second one, a link */
.row { display: flex; justify-content: center; gap: 8px; }
.btn {
  border: 1px solid var(--line); border-radius: var(--r); padding: 11px 16px; font-size: 16px; font-weight: 700;
  background: var(--card); color: var(--ink); box-shadow: inset 0 -3px 0 var(--paper-2);
}
.btn.main { border-color: var(--green); background: var(--green); color: var(--on-green); box-shadow: inset 0 -4px 0 var(--green-dark); min-width: 150px; }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: .6; }
#setup + .row .btn.main { flex: 1; max-width: 320px; }
.link { border: 0; background: none; padding: 2px 0; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.meta { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* under the clock: the thought link, how it went */
.aside { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 0; margin: -4px 0 10px; }
.aside:empty { display: none; }

@media (max-height: 700px) {
  .time { font-size: 42px; }
  .cards .card { grid-template-rows: 40px 2.7em auto; }
  .cards .card img { width: 40px; height: 40px; }
  .panel { padding: 10px 12px; }
}

/* ------------------------------------------------ the first time, and the tour (the same card) */
.intro {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2;
  width: min(420px, calc(100% - 24px)); background: var(--paper); border-radius: var(--r-panel); padding: 20px 20px 16px;
  display: grid; justify-items: stretch; text-align: left;
  box-shadow: inset 0 -4px 0 var(--paper-2), var(--shade);
}
.intro[hidden] { display: none; }
.intro h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; padding-right: 56px; }
.intro p { font-size: 16px; line-height: 1.5; margin: 0 0 14px; color: var(--muted); max-width: 65ch; }
.intro .btn.main { width: 100%; }
.intro-skip { position: absolute; top: 14px; right: 18px; color: var(--muted); }
.intro-skip[hidden], #introLater[hidden] { display: none; }
#introLater { justify-self: center; margin-top: 8px; color: var(--muted); }
.intro-lang { position: absolute; bottom: 14px; left: 20px; color: var(--muted); }
.intro-lang[hidden] { display: none; }
.intro-extra { display: flex; gap: 5px; flex-wrap: nowrap; margin: -4px 0 14px; }
.intro-extra:empty { display: none; }
.intro-extra .tag { font-size: 16px; padding: 6px 12px; }
.intro-extra.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; margin: -2px 0 14px; }
.intro-extra.sizes div { display: grid; justify-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 2px; }
.intro-extra.sizes img { width: 44px; height: 44px; image-rendering: pixelated; }
.intro-extra.sizes span { font-size: 13px; font-weight: 700; color: var(--green-ink); }
.dots { justify-self: center; display: flex; gap: 6px; margin-top: 12px; }
.dots i { width: 6px; height: 6px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--green); width: 16px; }
body[data-phase="intro"] .panel, body[data-phase="intro"] .top { display: none; }
body[data-phase="tour"] .panel, body[data-phase="tour"] .top { display: none; }
.tour h1 { margin-top: 2px; padding-right: 0; }
.tour .row { width: 100%; }
.tour .row .btn { flex: 1; }
.tour .btn.main { width: auto; }
#tourClose { justify-self: center; margin-top: 10px; color: var(--muted); }

/* ------------------------------------------------ sheets: stats, menu, settings, places, thoughts */
.sheet { position: fixed; inset: 0; z-index: 5; background: rgba(25, 18, 30, .55); display: grid; place-items: end center; padding: 12px; }
.sheet[hidden] { display: none; }
.sheet .card { background: var(--paper); width: min(420px, 100%); border-radius: var(--r-panel); padding: 18px; display: grid; gap: 10px; text-align: left; justify-items: stretch; }
.sheet h2 { margin: 0; font-size: 19px; line-height: 1.3; }
.sheet h3 { margin: 10px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet .btn.main { width: 100%; }
.sheet .link { justify-self: center; }
.sheet .row .btn { flex: 1; }
.sheet-text { margin: 0; font-size: 16px; color: var(--muted); }
.snd-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 56vh; overflow-y: auto; }
.snd { display: grid; gap: 4px; border-radius: 12px; padding: 4px; background: rgba(0, 0, 0, .04); }
.snd.on { background: color-mix(in srgb, var(--green) 18%, transparent); }
.snd-name { font: inherit; font-size: 15px; text-align: left; padding: 10px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.snd.on .snd-name { font-weight: 700; }
.snd input[type=range] { width: calc(100% - 12px); margin: 0 6px 6px; accent-color: var(--green); }
.badge { justify-self: start; font-size: 13px; font-weight: 700; color: #fff; background: var(--plum); border-radius: var(--r-s); padding: 1px 8px; }
.stats-card, #settingsSheet .card { max-height: calc(100vh - 40px); overflow-y: auto; }
.totals { display: grid; gap: 0; }
.totals b { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.totals span { font-size: 13px; color: var(--muted); }
.totals p { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 110px; }
.chart div { display: grid; grid-template-rows: 1fr auto; height: 100%; justify-items: center; gap: 4px; }
.chart .col { width: 100%; display: flex; flex-direction: column-reverse; border-radius: var(--r-s); overflow: hidden; background: var(--paper-2); align-self: end; }
.chart .col i { display: block; }
.chart span { font-size: 13px; color: var(--muted); }
.locked { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); min-height: 150px; }
.locked-body { padding: 10px; filter: blur(5px); opacity: .7; pointer-events: none; font-size: 13px; display: grid; gap: 6px; }
.locked-body .rowline { display: flex; justify-content: space-between; }
.locked.open .locked-body { filter: none; opacity: 1; pointer-events: auto; }
.locked-cover { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 12px; background: var(--veil); }
.locked-cover[hidden] { display: none; }
.locked-cover p { margin: 0; font-size: 13px; max-width: 30ch; }
.locked-cover .badge { justify-self: center; }
.locked-cover .btn.main { width: auto; min-width: 0; }
.log { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 13px; }
.log li { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--paper-2); }
.log li span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.log li b { font-variant-numeric: tabular-nums; }

.top-sheet { place-items: start center; padding-top: max(70px, calc(env(safe-area-inset-top) + 56px)); }
.top-sheet .row .btn { flex: 1; }
.thoughts { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; font-size: 16px; }
.thoughts li { padding: 8px 0; border-bottom: 1px solid var(--paper-2); }
.thoughts li.empty { color: var(--muted); border: 0; }
.thoughts label { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.thoughts input { width: 20px; height: 20px; accent-color: var(--green); margin: 2px 0 0; }
.thoughts input:checked + span { text-decoration: line-through; color: var(--muted); }

.menu { display: grid; gap: 6px; }
.menu-item { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r); padding: 11px 14px; }
.menu-item b { font-size: 16px; }
.menu-item span { font-size: 13px; color: var(--muted); }
.menu-item:active { transform: translateY(1px); }

.settings { display: grid; gap: 4px; }
.settings h3 { margin-top: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--paper-2); font-size: 15px; }
.set-row span { flex: 1; }
.set-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); }
.set-seg { display: flex; gap: 4px; }
.set-time { font: inherit; color: var(--ink); font-size: 16px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 3px 6px; background: var(--card); }
.set-pick { justify-self: start; margin: 2px 0 6px; }
.tag-edit { display: grid; grid-template-columns: 22px 1fr 28px; gap: 8px; align-items: center; }
.tag-edit .dot { width: 20px; height: 20px; border: 0; border-radius: var(--r-s); padding: 0; }
.tag-edit input { font: inherit; color: var(--ink); font-size: 16px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 5px 8px; background: var(--card); -webkit-user-select: text; user-select: text; }
.tag-edit .link { font-size: 20px; text-decoration: none; color: var(--muted); }
.settings > .link { justify-self: start; margin-top: 4px; }

/* places: the arrival card and the list */
.arrive { justify-items: start; padding: 24px 20px 20px; }
.arrive-region { font-size: 13px; color: var(--muted); }
.arrive-name { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 0; }
.arrive .btn.main { margin-top: 6px; }
.places { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 64vh; overflow-y: auto; }
.places li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.places .num { font-weight: 700; color: var(--muted); }
.places b { display: block; font-size: 16px; }
.places em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.places p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.places .state { font-size: 13px; font-weight: 700; color: var(--green-ink); white-space: nowrap; }
.places li.now { border-color: var(--green); }
.places li.later { opacity: .55; }
.places li.later p { color: var(--muted); }

/* ------------------------------------------------ three breaths before a session */
.breath { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; align-content: center; gap: 18px; background: rgba(20, 16, 24, .82); }
.breath[hidden] { display: none; }
.breath-ring { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(247, 241, 227, .95) 0 38%, rgba(227, 236, 217, .6) 39% 60%, rgba(227, 236, 217, 0) 72%); transform: scale(.5); }
.breath-word { margin: 0; color: var(--cream); font-size: 19px; font-weight: 700; }
.breath-next { margin: -8px 0 0; color: var(--cream); font-size: 13px; opacity: .85; }
.breath .link { color: var(--cream); }
.breath-row { width: min(320px, calc(100% - 48px)); }
.breath-row .btn { flex: 1; }
.breath-row[hidden], #breathSkip[hidden] { display: none; }

/* ------------------------------------------------ the practice: a note at the top says what to tap */
.coach {
  position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); top: max(14px, env(safe-area-inset-top));
  width: min(420px, calc(100% - 32px)); background: var(--paper); border-radius: var(--r-panel); padding: 12px 16px;
  box-shadow: inset 0 -4px 0 var(--paper-2), var(--shade);
}
.coach[hidden] { display: none; }
.coach-step { font-size: 13px; color: var(--muted); font-weight: 700; }
.coach p { margin: 4px 0 8px; font-size: 16px; line-height: 1.5; }
.coach-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.coach-row .btn.main { min-width: 0; padding-left: 22px; padding-right: 22px; }
.coach-row .btn[hidden], .coach-row .link[hidden] { display: none; }
body.learning .top { visibility: hidden; }
body.learning .panel button:not(.coach-target):not(.time), body.learning .panel .task-link { opacity: .32; pointer-events: none; }
body.learning .panel .time { pointer-events: none; }
/* what to tap: a steady outline that settles in twice */
.coach-target { position: relative; z-index: 1; outline: 2px solid var(--green-ink); outline-offset: 3px; animation: coachIn .7s ease-out 2; }
@keyframes coachIn { from { outline-offset: 9px; outline-color: transparent; } to { outline-offset: 3px; } }

/* ------------------------------------------------ a tip the first time something shows up, once */
.tip {
  position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); top: max(56px, calc(env(safe-area-inset-top) + 46px));
  width: min(400px, calc(100% - 32px)); background: var(--paper); border-radius: var(--r-panel); padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: inset 0 -3px 0 var(--paper-2), var(--shade);
  animation: fadeIn .3s ease-out;
}
.tip[hidden] { display: none; }
.tip p { margin: 0; flex: 1; font-size: 15px; line-height: 1.45; }
.tip .link { font-weight: 700; color: var(--green-ink); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------ the globe: choose where to go */
.globe { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.globe[hidden] { display: none; }
.globe > * { pointer-events: auto; }
.globe-head {
  position: absolute; left: 16px; right: 16px; top: max(16px, env(safe-area-inset-top)); color: var(--cream);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}
.globe-head h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.globe-head p { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(247, 241, 227, .85); max-width: 34ch; }
.globe-head .link { color: var(--cream); }
.globe-head .link[hidden] { display: none; }
.globe-card {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 32px)); background: var(--paper); border-radius: var(--r-panel); padding: 16px 18px;
  box-shadow: inset 0 -4px 0 var(--paper-2), var(--shade); display: grid; gap: 6px;
}
.globe-card h2 { margin: 0; font-size: 19px; line-height: 1.3; }
.globe-card h2:empty, .globe-card .arrive-region:empty { display: none; }
.globe-card p { margin: 0 0 6px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.globe-card.empty p { margin: 0; text-align: center; }
.globe-card .btn.main { width: 100%; }
.globe-card .btn[hidden] { display: none; }
.globe-card .btn:disabled { background: var(--paper-2); border-color: var(--line); color: var(--muted); box-shadow: inset 0 -4px 0 var(--line); }
body[data-phase="globe"] .panel, body[data-phase="globe"] .top { display: none; }

/* ------------------------------------------------ POLANA+: a full screen, the free version one tap away */
.paywall { position: fixed; inset: 0; z-index: 7; overflow-y: auto; display: flex; flex-direction: column;
  background: linear-gradient(rgba(20, 16, 24, .72), var(--paper) 46%); color: var(--ink);
  padding: max(20px, env(safe-area-inset-top)) 20px 0; animation: fadeIn .3s ease-out; }
:root[data-theme="light"] .paywall { background: linear-gradient(rgba(247, 241, 227, .55), var(--paper) 46%); }
.paywall[hidden] { display: none; }
.pw-x { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 1; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1; box-shadow: var(--shade); }
.pw-body { width: min(420px, 100%); margin: 0 auto; display: grid; justify-items: start; text-align: left; gap: 10px; padding-top: 20vh; flex: 1; }
.pw-body h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.pw-sub { margin: 0 0 6px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.pw-table { width: 100%; border-collapse: collapse; font-size: 15px; text-align: left; }
.pw-table th { font-size: 13px; color: var(--muted); padding: 8px 0; text-align: center; width: 58px; }
.pw-table th:first-child { width: auto; }
.pw-table td { padding: 10px 0; border-top: 1px solid var(--line); }
.pw-table td + td { text-align: center; color: var(--muted); }
.pw-table .pw-plus { background: color-mix(in srgb, var(--plum) 20%, transparent); color: var(--ink); font-weight: 700; }
.pw-table th.pw-plus { border-radius: var(--r) var(--r) 0 0; }
.pw-table tr:last-child .pw-plus { border-radius: 0 0 var(--r) var(--r); }
.pw-foot { position: sticky; bottom: 0; margin: 18px -20px 0; padding: 14px 20px max(14px, env(safe-area-inset-bottom));
  display: grid; justify-items: center; gap: 8px; background: var(--paper); box-shadow: 0 -10px 20px var(--paper); }
.pw-foot > * { max-width: 420px; }
.pw-foot .btn.main { width: 100%; }
.pw-price { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.pw-free { font-size: 16px; padding: 6px 0; }
.pw-links { display: flex; gap: 18px; }
.pw-links .link { color: var(--muted); }

/* ------------------------------------------------ the demo panel (testing only) */
.demo {
  position: fixed; top: max(52px, calc(env(safe-area-inset-top) + 42px)); left: 50%; transform: translateX(-50%); z-index: 4;
  width: min(380px, calc(100% - 24px)); background: var(--paper); border-radius: var(--r-panel); padding: 8px 10px 10px;
  box-shadow: var(--shade); font-size: 13px;
}
.demo[hidden] { display: none; }
.demo-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.demo-row b { letter-spacing: .12em; }
.demo-row button { border: 0; background: none; font-size: 15px; padding: 2px 6px; }
.demo input[type=range] { width: 100%; margin: 2px 0 8px; accent-color: var(--green); }
.demo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.demo-grid button { font-size: 13px; border: 0; border-radius: var(--r-s); padding: 7px 2px; background: var(--card); box-shadow: inset 0 -2px 0 var(--line); }
.demo-grid button:active { transform: translateY(1px); }

/* ------------------------------------------------ recording, ?shot=icon / splash / reel: only the glade */
body.recording .panel, body.recording .top, body.recording .demo, body.recording .sheet, body.recording .intro { display: none !important; }
body.shot .top, body.shot .panel, body.shot .intro, body.shot .demo, body.shot .sheet { display: none !important; }
body.shot #globe .globe-head, body.shot #globe .globe-card { visibility: hidden; }
.reel-cap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 9%; z-index: 4; display: grid; justify-items: center; gap: 4px;
  background: var(--paper); border-radius: var(--r-panel); padding: 14px 26px 16px; box-shadow: inset 0 -4px 0 var(--paper-2), var(--shade); white-space: nowrap; }
.reel-cap[hidden], .reel-end[hidden] { display: none; }
.reel-cap span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.reel-cap b { font-size: 26px; line-height: 1.2; }
.reel-end { position: fixed; inset: 0; z-index: 4; pointer-events: none; color: var(--cream); text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.reel-end b { position: absolute; left: 0; right: 0; top: 9%; font-size: 52px; letter-spacing: .12em; }
.reel-end span { position: absolute; left: 24px; right: 24px; bottom: 15%; font-size: 17px; line-height: 1.5; }
.reel-end em { position: absolute; left: 0; right: 0; bottom: 9%; font-style: normal; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(247, 241, 227, .75); }
.reel-veil { position: fixed; inset: 0; z-index: 5; background: #fbf6ea; opacity: 0; pointer-events: none; }

/* less motion when the phone asks for it (the breathing ring keeps its slow pace, it is the point) */
@media (prefers-reduced-motion: reduce) {
  *:not(.breath-ring), *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* what the time is for and the first step: one line until you open it */
.setup-line { display: block; margin: 0 auto 10px; color: var(--muted); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.setup-line[hidden], #more[hidden] { display: none; }
.setup-line i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.set-note { display: block; font-size: 13px; color: var(--muted); }

/* a thought for later: room for a few lines */
.task.note { text-align: left; min-height: 7.5em; resize: none; line-height: 1.45; }
.thoughts li span { white-space: pre-wrap; overflow-wrap: anywhere; }

/* the goal of the session: the first thing under the sizes */
.task-link { color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.setup-line { margin-bottom: 8px; }
