/* 入迷 ZoMe — prototype stylesheet. Ink, fog and one ice-blue. */
:root {
  --ink: #12161a;          /* ground of dark chapters: the sea under the fog */
  --ink-2: #181d22;        /* one step up */
  --ink-3: #222930;
  --fog: #e9ecea;          /* mineral white ground */
  --fog-2: #dde2df;
  --fog-3: #cfd6d3;
  --on-ink: #eef1f0;
  --on-ink-soft: #a3adb5;
  --on-fog: #12161a;
  --on-fog-soft: #4a545b;
  --ice: #9bd6ff;          /* the app's ice blue, on dark */
  --ice-mid: #4fa6ea;
  --ice-dim: #35618a;
  --ice-deep: #1d659f;     /* ice for light grounds (contrast) */
  --serif: "Source Serif 4", "ZoMe Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Noto Sans SC", sans-serif;
  --m: clamp(20px, 4.4vw, 64px);           /* outer margin */
  --gap: clamp(16px, 2vw, 32px);
  --max: 1480px;
  --s-small: 0.875rem;                     /* 14 */
  --s-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);  /* 17–19 */
  --s-lead: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);      /* 20–24 */
  --s-head: clamp(2rem, 1.2rem + 2.8vw, 3.5rem);        /* 32–56 */
  --s-display: clamp(2.6rem, 1rem + 4.6vw, 5.25rem);       /* 42–96 */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius-screen: 22%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; font-family: var(--serif); font-size: var(--s-body); line-height: 1.6; color: var(--on-ink); background: var(--ink); font-kerning: normal; -webkit-font-smoothing: antialiased; }
body.doc { background: var(--fog); color: var(--on-fog); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ice-mid); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ice); color: var(--ink); }

.skip { position: absolute; left: var(--m); top: -60px; z-index: 50; background: var(--on-fog); color: var(--fog); padding: 10px 16px; border-radius: 4px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- type roles */
.display .line { display: block; white-space: nowrap; }
.display { font-size: var(--s-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; }
.display .line { display: block; overflow: hidden; padding-bottom: .06em; }
.display .line > span { display: inline-block; }
.head { font-size: var(--s-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.head--sub { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); }
.lead { font-size: var(--s-lead); line-height: 1.5; max-width: 34em; text-wrap: pretty; }
.body { font-size: var(--s-body); max-width: 36em; }
.meta { font-size: var(--s-small); line-height: 1.5; color: var(--on-ink-soft); }
.demo-tag { font-family: var(--ui); font-size: var(--s-small); color: var(--on-ink-soft); }
figcaption { font-family: var(--ui); font-size: var(--s-small); line-height: 1.45; color: var(--on-ink-soft); margin-top: 12px; }

/* ---------------------------------------------------------------- buttons & links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--on-fog); color: var(--fog); font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background-color .2s; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { cursor: not-allowed; background: var(--fog-3); color: var(--on-fog-soft); transform: none; }
.btn--quiet { background: var(--on-fog); color: var(--fog); }
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .3em; transition: text-underline-offset .2s, color .2s; }

/* ---------------------------------------------------------------- top bar */
.bar { position: absolute; z-index: 20; inset: 0 0 auto 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 20px var(--m); color: var(--on-fog); }
.doc .bar { position: relative; }
.mark { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.0625rem; text-decoration: none; }
.mark img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav ul { display: flex; justify-content: center; gap: clamp(14px, 2.2vw, 36px); }
.bar nav a, .lang { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-size: 1rem; text-decoration: none; transition: opacity .2s; }
.bar nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.lang { font-weight: 600; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: max(100svh, 760px); color: var(--on-fog); overflow: hidden; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 0 var(--m); align-content: start; }
.hero-photo, .hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; object-position: 50% 62%; transform-origin: 50% 70%; will-change: transform; }
.hero-copy { position: relative; grid-column: 1 / span 7; padding-top: clamp(130px, 19vh, 200px); }
.hero-lead { margin-top: 32px; max-width: 26em; color: var(--on-fog); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.hero-meta { margin-top: 16px; color: var(--on-fog-soft); }
.hero-watch { position: relative; grid-column: 8 / span 4; justify-self: center; align-self: start; margin-top: clamp(150px, 21vh, 210px); width: min(100%, 396px); perspective: 900px; }
.hero-watch figcaption { color: var(--on-ink-soft); }
.screen { position: relative; aspect-ratio: 396 / 484; border-radius: 19% / 15.5%; overflow: hidden; background: #000; }
.screen img { width: 100%; height: 100%; }
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .3s var(--ease); }

/* ---------------------------------------------------------------- shared section frame */
section { position: relative; }
.day, .month, .stones, .data, .end { padding: clamp(96px, 12vw, 180px) var(--m) 0; }
.day > *, .month > *, .stones > *, .data > *, .end > * { max-width: var(--max); margin-inline: auto; }

/* ---------------------------------------------------------------- day */
.day { background: var(--ink); padding-top: clamp(72px, 9vw, 140px); }
.day-head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: end; }
.day-head .head { grid-column: 1 / span 5; }
.day-head .lead { grid-column: 7 / span 6; color: var(--on-ink); }
.day-stage { margin-top: clamp(48px, 6vw, 88px); }
.track { position: relative; height: 128px; margin-top: 16px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.track-line { position: absolute; left: 0; right: 0; top: 64px; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--ink-3); transform-origin: 0 50%; }
.track-segs { position: absolute; inset: 0; }
.seg { position: absolute; top: 32px; height: 64px; left: var(--a); width: max(var(--w), 12px); min-width: 12px; padding: 0; border: 0; background: none; cursor: pointer; }
.seg::after { content: ""; position: absolute; inset: 0 -16px; }           /* 44px+ hit area for the short period */
.seg-body { position: absolute; left: 0; right: 0; top: 50%; height: 16px; margin-top: -8px; border-radius: 999px; background: var(--ice-dim); transition: height .25s var(--ease), margin .25s var(--ease), background-color .25s; }
.seg--unknown .seg-body { background: none; height: 6px; margin-top: -3px; border-radius: 0; border-top: 3px dotted var(--on-ink-soft); }
.seg.is-on .seg-body { height: 28px; margin-top: -14px; background: var(--ice); }
.seg--unknown.is-on .seg-body { height: 6px; margin-top: -3px; background: none; border-top: 3px dotted var(--on-ink); }
.thumb { position: absolute; top: 0; left: 0; width: 44px; height: 44px; margin-left: -22px; display: grid; place-items: center; cursor: grab; transform: translateX(var(--px, 0px)); transition: transform .3s var(--ease); touch-action: none; }
.thumb.dragging { transition: none; cursor: grabbing; }
.thumb svg { width: 22px; height: 30px; fill: var(--ice); }
.thumb.is-unknown svg { fill: var(--on-ink-soft); }
.hours { position: absolute; left: 0; right: 0; top: 104px; height: 20px; }
.hr { position: absolute; left: var(--a); transform: translateX(-50%); font-family: var(--ui); font-size: var(--s-small); color: var(--on-ink-soft); font-variant-numeric: tabular-nums; }
.hr:first-child { transform: none; }
.day-controls { display: flex; gap: 12px; margin-top: 20px; }
.step { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink-3); color: var(--on-ink); font-size: 1rem; cursor: pointer; transition: background-color .2s, transform .2s var(--ease); }
.step svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step:active { transform: scale(.97); }
.step[disabled] { opacity: .45; cursor: default; }

.day-body { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: start; margin-top: clamp(56px, 6vw, 96px); padding-bottom: clamp(96px, 10vw, 160px); }
.readout { grid-column: 1 / span 5; }
.ro-state { font-family: var(--ui); font-size: 15px; color: var(--ice); }
.ro-state.is-unknown { color: var(--on-ink-soft); }
.ro-time { margin-top: 8px; font-size: clamp(3rem, 1.6rem + 3.6vw, 5.25rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums lining-nums; }
.ro-dur { margin-top: 14px; font-size: var(--s-lead); }
.ro-desc { margin-top: 24px; max-width: 30em; }
.ro-emoji { margin-top: 20px; display: flex; gap: 10px; align-items: center; color: var(--on-ink-soft); }
.ro-emoji .emo { font-size: 28px; line-height: 1; }
.ro-cum { margin-top: 20px; padding: 14px 18px; display: inline-block; border-radius: 12px; background: var(--ink-2); font-family: var(--ui); font-size: 15px; }
.ro-swap { animation: ro-in .32s var(--ease); }
@keyframes ro-in { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dial-fig { grid-column: 6 / span 3; position: relative; }
.dial { width: 100%; height: auto; }
.dial .ring { fill: none; stroke: var(--ink-3); stroke-width: 2; }
.dial .tick { fill: #4b545c; }
.dial .tick--big { fill: var(--on-ink-soft); }
.dial-num { fill: var(--on-ink-soft); font-family: var(--ui); font-size: 12px; text-anchor: middle; }
.dial .arc { fill: none; stroke: var(--ice-dim); stroke-width: 12; stroke-linecap: round; transition: stroke .25s, stroke-width .25s var(--ease); }
.dial .arc--unknown { stroke: var(--on-ink-soft); stroke-width: 4; stroke-dasharray: 1 7; }
.dial .arc.is-on { stroke: var(--ice); stroke-width: 20; }
.dial .arc--unknown.is-on { stroke: var(--on-ink); stroke-width: 6; }
.dial-dot { fill: var(--on-ink); transition: cx .3s var(--ease), cy .3s var(--ease); }
.dial-center { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; display: grid; place-content: center; text-align: center; pointer-events: none; }
.dial-center span:first-child { font-size: 1.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dial-center span:last-child { font-family: var(--ui); font-size: 14px; color: var(--on-ink-soft); }
.shot--timeline { grid-column: 9 / span 4; justify-self: end; width: min(100%, 360px); }

/* ---------------------------------------------------------------- month */
.month { background: var(--ink-2); padding-bottom: clamp(96px, 10vw, 160px); }
.month-head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); }
.month-head .head { grid-column: 1 / span 6; }
.month-head .lead { grid-column: 1 / span 6; margin-top: 20px; }
.month-body { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: start; margin-top: clamp(40px, 5vw, 72px); }
.month-cal { grid-column: 1 / span 6; }
.cal { margin-top: 12px; }
.cal-title { font-size: var(--s-lead); font-weight: 600; margin-bottom: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px 6px; font-family: var(--ui); }
.cal-wd { text-align: center; font-size: var(--s-small); color: var(--on-ink-soft); padding-bottom: 6px; }
.cal-day { position: relative; aspect-ratio: 1; width: 100%; max-width: 76px; justify-self: center; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--on-ink-soft); font-size: clamp(15px, 1.3vw, 19px); font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .2s var(--ease), background-color .2s; }
.cal-day.has-data { color: var(--on-ink); }
.cal-day .cal-n { position: relative; z-index: 1; font-weight: 600; }
.pool { position: absolute; inset: 6%; border-radius: 50%; overflow: hidden; background: var(--ink-3); }
.pool .water, .bigpool .water { position: absolute; inset: 0; background: var(--ice-mid); transform: translateY(calc(100% - var(--p) * 1%)); transition: transform .8s var(--ease); }
.cal-day[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--on-ink) inset; } /* taste-skill-ignore: selected-date ring copied from the app calendar */
.cal-day[aria-pressed="true"]:not(.has-data) { color: var(--on-ink); }
.cal-day:active { transform: scale(.94); }
.cal-emo { position: absolute; right: -2px; bottom: -2px; font-size: 18px; line-height: 1; z-index: 2; }
.month-side { grid-column: 7 / span 3; padding-top: 56px; }
.bigpool { position: relative; width: min(100%, 220px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--ink-3); }
.bigpool-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bigpool.is-empty .water { transform: translateY(100%); }
.ms-date { margin-top: 28px; font-family: var(--ui); font-size: 15px; color: var(--on-ink-soft); }
.ms-dur { margin-top: 6px; font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.ms-level { margin-top: 10px; font-family: var(--ui); font-size: 15px; color: var(--on-ink); }
.ms-note { margin-top: 18px; display: flex; gap: 10px; align-items: flex-start; color: var(--on-ink-soft); max-width: 22em; }
.ms-note .emo { font-size: 24px; line-height: 1.2; }
.ms-link { margin-top: 12px; color: var(--ice); }
.ms-link[hidden] { display: none; }
.shot--cal { grid-column: 10 / span 3; justify-self: end; width: min(100%, 320px); margin-top: 56px; }

/* ---------------------------------------------------------------- stones (light chapter) */
.stones { background: var(--fog); color: var(--on-fog); padding-bottom: clamp(96px, 10vw, 160px); }
.stones .demo-tag, .stones figcaption, .data figcaption { color: var(--on-fog-soft); }
.drops-block { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: start; }
.drops-text { grid-column: 1 / span 4; }
.drops-text .lead { margin-top: 24px; }
.drops-demo { grid-column: 5 / span 5; padding: 28px clamp(20px, 2.4vw, 36px) 32px; border-radius: 20px; background: var(--fog-2); }
.drops-label { display: block; margin-top: 14px; font-size: 1.0625rem; font-weight: 600; }
.drops-io { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.drops-io input { flex: 1; }
.drops-min { min-width: 7.5em; font-family: var(--ui); font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 44px; background: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--fog-3); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--fog-3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--ice-deep); border: 0; transition: transform .2s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--ice-deep); border: 0; }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
.drops-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 6px; margin-top: 22px; }
.drop { width: 100%; max-width: 22px; height: auto; justify-self: center; fill: var(--fog-3); transition: fill .25s, transform .3s var(--ease); }
.drop.is-full { fill: var(--ice-deep); }
.drop.is-new { animation: drip .45s var(--ease); }
@keyframes drip { from { transform: translateY(-10px) scale(.7); } to { transform: none; } }
.drops-out { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.drops-out [data-dr="count"] { font-size: clamp(2.25rem, 1.6rem + 1.8vw, 3.25rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.drops-rem { font-family: var(--ui); font-size: 15px; color: var(--on-fog-soft); }
.drops-balance { margin-top: 16px; font-size: 1rem; color: var(--on-fog); }
.shot--stones { grid-column: 10 / span 3; justify-self: end; width: min(100%, 300px); }

.cairn-block { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: start; margin-top: clamp(96px, 10vw, 160px); }
.cairn-stage { grid-column: 1 / span 7; position: relative; }
.cairn-field { position: relative; margin-top: 12px; height: clamp(440px, 44vw, 600px); border-radius: 20px; background: var(--fog-2); overflow: hidden; }
.cairn-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14%; background: var(--fog-3); pointer-events: none; }  /* shore */
.stone { position: absolute; z-index: 1; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); width: calc(var(--w) * 1%); padding: 0; border: 0; background: none; transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px)); cursor: grab; touch-action: none; border-radius: 50%; transition: transform .25s var(--ease); }
.stone img { width: 100%; height: auto; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.stone.dragging { z-index: 5; cursor: grabbing; transition: none; transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px)) scale(1.04); }
.stone.settle { animation: settle .32s var(--ease); }
@keyframes settle { 0% { transform: translate(-50%, -50%) translateY(-6px); } 60% { transform: translate(-50%, -50%) translateY(2px); } 100% { transform: translate(-50%, -50%); } }
.stone:focus-visible { outline-offset: 6px; border-radius: 50%; }
.cairn-status { margin-top: 14px; font-family: var(--ui); font-size: 15px; color: var(--on-fog); }
.cairn-text { grid-column: 9 / span 4; }
.cairn-text .lead { margin-top: 22px; }
.cairn-text .body { margin-top: 18px; color: var(--on-fog-soft); }
.cairn-text .btn { margin-top: 26px; }
.shot--cairn { margin-top: 40px; width: min(100%, 260px); }
.shot--doc { grid-column: 9 / span 4; justify-self: end; align-self: end; width: min(100%, 300px); }
.shot--doc figcaption { color: var(--on-fog-soft); }

/* ---------------------------------------------------------------- data (light) */
.data { background: var(--fog); color: var(--on-fog); padding-top: 0; padding-bottom: clamp(96px, 10vw, 160px); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); max-width: none; }
.data > * { max-width: none; margin-inline: 0; }
.data-photo { grid-column: 1 / span 7; }
.data-photo img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; object-position: 70% 50%; border-radius: 4px; }
.data-text { grid-column: 9 / span 4; }
.facts { margin-top: 36px; display: grid; gap: 26px; }
.fact dt { font-weight: 600; font-size: 1.125rem; }
.fact dd { margin-top: 6px; color: var(--on-fog); font-size: 1rem; line-height: 1.6; }
.entries { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: clamp(64px, 7vw, 112px); }
.entry { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 24px; padding: clamp(28px, 3vw, 44px); border-radius: 20px; background: var(--fog-2); text-decoration: none; transition: background-color .25s, transform .25s var(--ease); }
.entry-t { grid-column: 1; font-size: var(--s-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.entry-d { grid-column: 1; color: var(--on-fog); }
.entry svg { grid-column: 2; grid-row: 1 / span 2; width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.entry:active { transform: scale(.99); }

/* ---------------------------------------------------------------- end */
.end { background: var(--ink); padding-bottom: clamp(56px, 6vw, 96px); }
.track--compact { height: 40px; margin-top: 0; }
.track--compact .track-line { top: 20px; }
.track--compact .seg { top: 0; height: 40px; pointer-events: none; }
.track--compact .seg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 14px; margin-top: -7px; border-radius: 999px; background: var(--ice-dim); }
.track--compact .seg--unknown::before { height: 6px; margin-top: -3px; border-radius: 0; background: none; border-top: 3px dotted var(--on-ink-soft); }
.track--compact .seg.is-lit::before { background: var(--ice); height: 22px; margin-top: -11px; }
.track--compact .seg.is-dim::before { background: var(--ink-3); }
.track--compact .seg--unknown.is-dim::before { background: none; border-top-color: #3a434b; }
.end-line { margin-top: clamp(48px, 5vw, 80px); font-size: var(--s-head); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.end-line > span { display: block; }
.nw { white-space: nowrap; }
.end-line > span + span { color: var(--ice); }
.end-meta { margin-top: 20px; }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; margin-top: 36px; }
.end .btn { background: var(--on-ink); color: var(--ink); }

/* ---------------------------------------------------------------- footer */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 12px 24px; padding: clamp(40px, 5vw, 72px) var(--m) 32px; background: var(--ink); color: var(--on-ink-soft); font-size: 15px; }
.doc .foot { background: var(--fog); color: var(--on-fog-soft); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--on-ink); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.doc .foot-links a { color: var(--on-fog); }
.foot-meta { justify-self: end; }
.foot-credits { grid-column: 1 / -1; font-size: var(--s-small); max-width: 60ch; }

/* ---------------------------------------------------------------- doc pages */
.doc-hero { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: clamp(56px, 8vw, 120px) var(--m) 0; max-width: calc(var(--max) + 2 * var(--m)); margin: 0 auto; }
.doc-hero-text { grid-column: 1 / span 7; }
.display--doc { font-size: clamp(3rem, 1.4rem + 6vw, 7rem); }
.doc-hero .lead { margin-top: 28px; }
.doc-hero .meta { margin-top: 18px; color: var(--on-fog-soft); max-width: 40em; }
.doc-hero .track--compact { grid-column: 1 / -1; margin-top: clamp(48px, 6vw, 88px); }
.doc .track-line { background: var(--fog-3); }
.doc .track--compact .seg::before { background: var(--ice-deep); }
.doc .track--compact .seg--unknown::before { background: none; border-top-color: var(--on-fog-soft); }
.doc-summary { grid-column: 9 / span 4; align-self: end; font-size: var(--s-lead); line-height: 1.5; }

.faq { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: clamp(56px, 6vw, 96px) var(--m) 0; max-width: calc(var(--max) + 2 * var(--m)); margin: 0 auto; align-items: start; }
.faq-left { grid-column: 1 / span 5; }
.faq-h { font-size: var(--s-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.search { margin-top: 28px; }
.search label { display: block; font-weight: 600; margin-bottom: 10px; }
.search-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 8px 0 16px; border-radius: 14px; background: var(--fog-2); transition: background-color .2s; }
.search-row:focus-within { background: #d4dbd8; }
.search-row svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--on-fog-soft); stroke-width: 1.8; stroke-linecap: round; }
.search-row input { flex: 1; min-width: 0; height: 52px; border: 0; background: none; font: inherit; font-size: 1.0625rem; color: var(--on-fog); outline: none; }
.search-row input::placeholder { color: #6a747b; }
.search-row input::-webkit-search-cancel-button { display: none; }
.search-clear { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--fog); cursor: pointer; font-size: 15px; }
.search-status { margin-top: 12px; font-family: var(--ui); font-size: 14px; color: var(--on-fog-soft); }
.qs { margin-top: 24px; display: grid; gap: 4px; }
.q h3 { font-size: 1.125rem; font-weight: 400; }
.q-btn { width: 100%; display: flex; gap: 14px; align-items: flex-start; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--on-fog-soft); cursor: pointer; line-height: 1.45; transition: background-color .2s, color .2s; }
.q-dot { flex: none; width: 9px; height: 9px; margin-top: .55em; border-radius: 50%; background: var(--fog-3); transition: background-color .2s, transform .2s var(--ease); }
.q.is-on .q-btn { color: var(--on-fog); font-weight: 600; }
.q.is-on .q-dot { background: var(--ice-deep); transform: scale(1.25); }
.q-a { padding: 4px 12px 18px 35px; }
.q-a p { max-width: 36em; }
.js .q-a { display: none; }
.js .faq-pane { display: block; }
.faq-pane { display: none; grid-column: 7 / span 6; position: sticky; top: 48px; padding-top: 92px; }
.pane-q { font-family: var(--ui); font-size: 15px; color: var(--ice-deep); }
.pane-a { margin-top: 14px; font-size: var(--s-lead); line-height: 1.5; max-width: 26em; }
.pane-swap { animation: ro-in .25s var(--ease); }
.search-empty { margin-top: 16px; padding: 18px 20px; border-radius: 14px; background: var(--fog-2); }
.pending { margin-top: 12px; font-family: var(--ui); font-size: 15px; color: var(--on-fog-soft); }
.contact { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: clamp(96px, 10vw, 160px) var(--m) 0; max-width: calc(var(--max) + 2 * var(--m)); margin: 0 auto; }
.contact .head { grid-column: 1 / span 5; }
.contact-body { grid-column: 7 / span 6; }
.contact-body .btn { margin-top: 28px; }

.policy { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); padding: clamp(64px, 7vw, 112px) var(--m) 0; max-width: calc(var(--max) + 2 * var(--m)); margin: 0 auto; align-items: start; }
.toc { grid-column: 1 / span 4; position: sticky; top: 32px; }
.toc-h { font-weight: 600; font-size: 1.125rem; }
.toc ol { margin-top: 14px; display: grid; gap: 2px; counter-reset: none; }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 10px; text-decoration: none; color: var(--on-fog-soft); line-height: 1.35; transition: background-color .2s, color .2s; }
.toc a { position: relative; }
.toc a.is-on { background: var(--fog-2); color: var(--on-fog); font-weight: 600; }
.toc a.is-on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: var(--ice-deep); }
.toc-now { margin-top: 18px; font-family: var(--ui); font-size: 14px; color: var(--on-fog-soft); }
.toc-now strong { color: var(--on-fog); font-weight: 600; }
.pol-body { grid-column: 6 / span 7; }
.pol { padding-bottom: 56px; scroll-margin-top: 24px; }
.pol h2 { font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.pol p { margin-top: 14px; max-width: 38em; }
.pol.is-target h2 { animation: target 1s var(--ease); }
@keyframes target { 0% { color: var(--ice-deep); transform: translateX(8px); } 100% { color: inherit; transform: none; } }

/* ---------------------------------------------------------------- motion layer */
.js.motion .display .line > span { transform: translateY(105%); }
.js.motion.ready .display .line > span { transform: none; transition: transform .95s var(--ease); }
.js.motion.ready .display .line:nth-child(2) > span { transition-delay: .11s; }
.js.motion .hero-lead, .js.motion .hero-actions, .js.motion .hero-meta, .js.motion .hero-watch { opacity: 0; transform: translateY(18px); }
.js.motion.ready .hero-lead, .js.motion.ready .hero-actions, .js.motion.ready .hero-meta, .js.motion.ready .hero-watch { opacity: 1; transform: none; transition: opacity .8s var(--ease) .5s, transform .9s var(--ease) .5s; }
.js.motion.ready .hero-watch { transition-delay: .3s; }
.js.motion .reveal:not(.in) { opacity: 0; transform: translateY(26px); }
.js.motion .reveal { transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js.motion .rise > *:not(.in-done) { }
.js.motion .head.pre, .js.motion .lead.pre { opacity: 0; transform: translateY(20px); }
.js.motion .head.pre.in, .js.motion .lead.pre.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .8s var(--ease); }
.js.motion .lead.pre.in { transition-delay: .08s; }
.js.motion .track:not(.in) .track-line { transform: scaleX(0); }
.js.motion .track .track-line { transition: transform 1.1s var(--ease); }
.js.motion .track:not(.in) .seg { opacity: 0; }
.js.motion .track .seg { transition: opacity .6s var(--ease); }
.js.motion .track.in .seg { opacity: 1; }
.js.motion .track.in .seg:nth-child(2) { transition-delay: .5s; }
.js.motion .track.in .seg:nth-child(3) { transition-delay: .6s; }
.js.motion .track.in .seg:nth-child(4) { transition-delay: .7s; }
.js.motion .track.in .seg:nth-child(5) { transition-delay: .8s; }
.js.motion .track.in .seg:first-child { transition-delay: .4s; }
.data-photo img { transition: transform 1.4s var(--ease); }
.js.motion .data-photo:not(.in) img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .tilt { transform: none !important; }
}

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  .bar nav { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .hero-copy { grid-column: 1 / span 7; }
  .hero-watch { grid-column: 8 / span 5; }
  .day-head .head, .day-head .lead { grid-column: 1 / -1; }
  .day-head .lead { margin-top: 20px; }
  .readout { grid-column: 1 / -1; }
  .dial-fig { grid-column: 1 / span 6; margin-top: 56px; max-width: 340px; }
  .shot--timeline { grid-column: 7 / span 6; margin-top: 56px; }
  .month-head .head, .month-head .lead { grid-column: 1 / -1; }
  .month-cal { grid-column: 1 / -1; }
  .month-side { grid-column: 1 / span 6; padding-top: 48px; }
  .shot--cal { grid-column: 7 / span 6; margin-top: 48px; width: min(100%, 300px); }
  .drops-text { grid-column: 1 / -1; }
  .drops-demo { grid-column: 1 / span 7; margin-top: 40px; }
  .shot--stones { grid-column: 8 / span 5; margin-top: 40px; }
  .cairn-stage { grid-column: 1 / -1; }
  .cairn-text { grid-column: 1 / -1; margin-top: 48px; display: grid; grid-template-columns: 1fr 240px; column-gap: var(--gap); }
  .cairn-text > *:not(.shot--cairn) { grid-column: 1; }
  .shot--cairn { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
  .data-photo { grid-column: 1 / -1; }
  .data-text { grid-column: 1 / -1; margin-top: 56px; }
  .facts { grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
  .doc-hero-text { grid-column: 1 / -1; }
  .doc-summary { grid-column: 1 / span 9; margin-top: 40px; }
  .faq-left { grid-column: 1 / span 6; }
  .faq-pane { grid-column: 7 / span 6; }
  .contact .head, .contact-body { grid-column: 1 / -1; }
  .contact-body { margin-top: 24px; }
  .toc { grid-column: 1 / span 4; }
  .pol-body { grid-column: 5 / span 8; }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 760px) {
  .end-line { font-size: 1.625rem; }
  :root { --gap: 14px; }
  .bar { padding-top: 14px; padding-bottom: 14px; }
  .mark span { font-size: 1rem; }
  .hero { min-height: auto; padding-bottom: 72px; }
  .hero-photo img { object-position: 50% 50%; }
  .hero-copy { grid-column: 1 / -1; padding-top: 96px; }
  .display { font-size: clamp(2.25rem, 10.4vw, 3.25rem); }
  .hero-lead { margin-top: 20px; font-size: 1.125rem; }
  .hero-actions { margin-top: 24px; gap: 4px 20px; }
  .hero-watch { grid-column: 3 / -1; justify-self: end; width: min(72vw, 300px); margin-top: 28px; }
  .hero-meta { margin-top: 14px; }
  .day, .month, .stones, .end { padding-top: 88px; }
  .track { height: 120px; margin-left: calc(-1 * var(--m)); margin-right: calc(-1 * var(--m)); padding: 0 var(--m); }
  .track-line, .track-segs, .hours { left: var(--m); right: var(--m); }
  .hr:nth-child(even) { display: none; }
  .day-controls { justify-content: space-between; }
  .step { flex: 1; justify-content: center; }
  .ro-time { font-size: 3rem; }
  .dial-fig { grid-column: 1 / -1; max-width: 300px; margin-inline: auto; margin-top: 48px; }
  .shot--timeline { grid-column: 1 / -1; justify-self: center; width: min(86%, 320px); margin-top: 40px; }
  .day-body { padding-bottom: 88px; }
  .month { padding-bottom: 88px; }
  .cal-grid { gap: 6px 2px; }
  .cal-emo { font-size: 14px; }
  .month-side { order: -1; grid-column: 1 / -1; padding-top: 0; margin-bottom: 28px; display: grid; grid-template-columns: 132px 1fr; column-gap: 20px; align-items: center; }
  .month-side .bigpool { grid-row: 1 / span 3; width: 132px; }
  .bigpool-n { font-size: 2.6rem; }
  .ms-date { margin-top: 0; }
  .ms-note, .ms-link { grid-column: 1 / -1; }
  .shot--cal { grid-column: 1 / -1; justify-self: center; width: min(86%, 320px); margin-top: 40px; }
  .stones { padding-bottom: 88px; }
  .drops-demo { grid-column: 1 / -1; margin-left: calc(-1 * var(--m) + 8px); margin-right: calc(-1 * var(--m) + 8px); }
  .drops-grid { gap: 8px 4px; }
  .shot--stones { grid-column: 1 / -1; justify-self: center; width: min(86%, 320px); }
  .cairn-block { margin-top: 88px; }
  .cairn-field { height: 420px; }
  .cairn-text { display: block; }
  .shot--cairn { width: min(86%, 300px); margin: 40px auto 0; }
  .data { padding-bottom: 88px; }
  .data-photo { margin-left: calc(-1 * var(--m)); margin-right: calc(-1 * var(--m)); }
  .data-photo img { border-radius: 0; aspect-ratio: 4 / 3; }
  .data-photo figcaption { padding: 0 var(--m); }
  .facts { grid-template-columns: 1fr; }
  .entries { grid-template-columns: 1fr; margin-top: 56px; }
  .foot { grid-template-columns: 1fr; gap: 8px; padding-top: 56px; }
  .foot-meta { justify-self: start; }
  .faq-left, .faq-pane { grid-column: 1 / -1; }
  .js .faq-pane { display: none; }
  .js .q.is-on .q-a { display: block; }
  .doc-summary { grid-column: 1 / -1; }
  .shot--doc { grid-column: 1 / -1; justify-self: start; width: min(64%, 240px); margin-top: 36px; }
  .toc { grid-column: 1 / -1; position: static; }
  .toc-now { display: none; }
  .pol-body { grid-column: 1 / -1; margin-top: 48px; }
  .contact { padding-top: 88px; }
}

/* hover only where a real pointer hovers, so taps on phones do not leave a stuck highlight */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover svg { transform: translateY(2px); }
  .textlink:hover { text-underline-offset: .45em; }
  .bar nav a:hover, .lang:hover { text-decoration: underline; text-underline-offset: .35em; }
  .seg:hover .seg-body { background: var(--ice-mid); }
  .seg--unknown:hover .seg-body { background: none; border-top-color: var(--on-ink); }
  .step:hover { background: #2c343c; }
  .cal-day:hover { background: var(--ink-3); }
  .entry:hover { background: var(--fog-3); }
  .entry:hover svg { transform: translateX(6px); }
  .foot-links a:hover { text-decoration: underline; text-underline-offset: .35em; }
  .search-clear:hover { background: #fff; }
  .q-btn:hover { background: var(--fog-2); color: var(--on-fog); }
  .toc a:hover { background: var(--fog-2); color: var(--on-fog); }
}
