/* ==========================================================================
   Grace Studio hub — one stylesheet for the home page and every app page.
   Sections: 1 tokens · 2 base · 3 nav · 4 buttons/badges · 5 home hero · 6 story moments
             7 scenes · 8 phone · 9 works/about/footer · 10 app page · 11 demo · 12 motion
   ========================================================================== */

/* ── 1 · tokens ───────────────────────────────────────────────────────────── */
@property --bg    { syntax: "<color>"; inherits: true; initial-value: #F3EFE9; }
@property --fg    { syntax: "<color>"; inherits: true; initial-value: #14202F; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #586373; }
@property --brand { syntax: "<color>"; inherits: true; initial-value: #003366; }
@property --line  { syntax: "<color>"; inherits: true; initial-value: #D3D9E2; }

:root {
  --navy: #003366; --navy-d: #0A1B38; --steel: #4F7297; --sky: #B5C8DC; --mist: #DCE6F0;
  --brick: #B44B33; --teal: #1F7A7A; --plum: #6A4C7C; --sun: #E3B95F;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang TC",
          "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", "Heiti TC", Helvetica, Arial, sans-serif;
  --latin: "Helvetica Neue", Helvetica, "Inter", Arial, sans-serif;
  --round: "Huninn", "jf-openhuninn-2.1", "jf-openhuninn", "Yuanti TC", "Yuanti SC", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --wk: "LXGW WenKai TC", "Kaiti TC", "STKaiti", "BiauKai", "DFKai-SB", "Noto Serif CJK TC", serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --nav-h: 60px; --sub-h: 56px; --wrap: 1180px;
  --btn-bg: var(--navy); --btn-fg: #fff;
  --g1: #003366; --g2: #4F7297; --g3: #B5C8DC;
  --paper: color-mix(in srgb, var(--fg) 5%, var(--bg));
  --card: color-mix(in srgb, var(--fg) 4.5%, var(--bg));
  --line-strong: color-mix(in srgb, var(--fg) 30%, transparent);
  --logo-gap: var(--bg);
}

/* light theme — the sky changes with the hour */
html[data-theme="light"][data-phase="dawn"]      { --bg: #EDF0F6; --fg: #121C2B; --muted: #566377; --brand: #003366; --line: rgba(0, 51, 102, .15); }
html[data-theme="light"][data-phase="morning"]   { --bg: #E3EDF8; --fg: #121C2B; --muted: #4F6079; --brand: #003366; --line: rgba(0, 51, 102, .16); }
html[data-theme="light"][data-phase="noon"]      { --bg: #FBFCFE; --fg: #121C2B; --muted: #566075; --brand: #003366; --line: rgba(0, 51, 102, .13); }
html[data-theme="light"][data-phase="afternoon"] { --bg: #EAF0F7; --fg: #121C2B; --muted: #4F6079; --brand: #003366; --line: rgba(0, 51, 102, .16); }
html[data-theme="light"][data-phase="dusk"]      { --bg: #D5D2E3; --fg: #171B38; --muted: #4A4F72; --brand: #1B2D66; --line: rgba(27, 45, 102, .22); }
html[data-theme="light"][data-phase="night"]     { --bg: #0A1B38; --fg: #F2F5FA; --muted: #A9B8CD; --brand: #FFFFFF; --line: rgba(255, 255, 255, .22);
                                                   --g1: #FFFFFF; --g2: #8FB0DB; --g3: #4F7297; }
/* dark theme — a night version of the same day, still moving from cool dawn to deep night */
html[data-theme="dark"] { --fg: #EEF2F8; --muted: #9DABC0; --brand: #E6EDF7; --line: rgba(230, 237, 247, .17);
                          --btn-bg: #E6EDF7; --btn-fg: #0A1B38; --g1: #E6EDF7; --g2: #8FB0DB; --g3: #4F7297; --sun: #E9C46A; }
html[data-theme="dark"][data-phase="dawn"]      { --bg: #16213A; }
html[data-theme="dark"][data-phase="morning"]   { --bg: #172A47; }
html[data-theme="dark"][data-phase="noon"]      { --bg: #1B3252; }
html[data-theme="dark"][data-phase="afternoon"] { --bg: #162744; }
html[data-theme="dark"][data-phase="dusk"]      { --bg: #231F44; }
html[data-theme="dark"][data-phase="night"]     { --bg: #060D1D; }
html[data-theme="dark"] .phone__screen > img, html[data-theme="dark"] .work__peek img { filter: brightness(.88) contrast(1.02); }

/* the sky colour fades on its own fixed layer (see .sky below): fading inherited custom properties re-styled the whole page on every frame */

/* ── 2 · base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.75;
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--steel) 80%, #fff); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 999px; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }
.wk, .wk-name { font-family: var(--wk); }
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal--delay { transition-delay: .14s; }
.sec-title { font-size: clamp(34px, 5.4vw, 64px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.sec-lead { color: var(--muted); font-size: clamp(17px, 1.8vw, 20px); max-width: 38em; margin-top: 18px; }

/* ── 3 · nav ──────────────────────────────────────────────────────────────── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
       background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
       border-bottom: 1px solid transparent; transition: border-color .4s; }
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__in { height: 100%; width: min(var(--wrap), 100% - 40px); margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand); }
.logo-mark { height: 30px; width: auto; flex: none; }
.brand__word { font-family: var(--latin); font-size: 17px; letter-spacing: .26em; line-height: 1; display: inline-flex; }
.brand__word .light { font-weight: 300; }
.brand__word .bold { font-weight: 800; }
.brand--sm .logo-mark { height: 24px; }
.brand--sm .brand__word { font-size: 14px; }
.nav__links { margin-left: auto; display: flex; gap: 26px; font-size: 14.5px; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .25s; }
.nav__links a:hover { color: var(--fg); }
.nav__tools { display: flex; gap: 6px; margin-left: 4px; }
.tool { height: 36px; min-width: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--fg); display: inline-grid; place-items: center; transition: background .25s; }
.tool:hover { background: var(--card); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tool svg .half { fill: currentColor; }
.tool--theme { padding: 0; }
@media (max-width: 720px) { .nav__links { display: none; } .nav__tools { margin-left: auto; } .brand__word { font-size: 14px; } .logo-mark { height: 26px; } }
@media (max-width: 360px) { .brand__word { display: none; } }

/* ── 4 · buttons / badges / links ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3em; padding: .72em 1.5em; border-radius: 999px; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .3s var(--ease), background .25s, box-shadow .3s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn--ghost:hover { background: var(--card); }
.btn--light { background: #fff; color: var(--navy-d); }
.btn--line { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--line:hover { background: rgba(255, 255, 255, .1); }
.btn--sm { padding: .5em 1.15em; font-size: 14px; }
.btn--lg { padding: .85em 1.8em; font-size: 17px; }
.btn.is-disabled, .btn:disabled { opacity: .62; cursor: not-allowed; transform: none; }
.btn small { font-size: .74em; font-weight: 500; margin-left: .75em; padding-left: .75em; border-left: 1px solid currentColor; opacity: .85; }
.badge { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; padding: 3px 11px; border-radius: 999px; line-height: 1.5; white-space: nowrap; }
.badge--live { background: var(--btn-bg); color: var(--btn-fg); }
.badge--soon { border: 1.5px dashed var(--line-strong); color: var(--muted); transform: rotate(-1.5deg); }
.link-arrow { display: inline-block; margin-top: 22px; font-weight: 600; text-decoration: none; color: var(--brand); border-bottom: 1.5px solid currentColor; padding-bottom: 2px; transition: letter-spacing .3s var(--ease); }
.link-arrow:hover { letter-spacing: .04em; }
.appicon { display: inline-grid; place-items: center; position: relative; flex: none; overflow: hidden; border-radius: 23%; background: var(--navy); box-shadow: 0 0 0 1px rgba(0, 51, 102, .12), 0 6px 16px -6px rgba(10, 27, 56, .45); }
.appicon img { width: 100%; height: 100%; display: block; }
.appicon--xs { width: 28px; height: 28px; } .appicon--md { width: 52px; height: 52px; } .appicon--lg { width: 72px; height: 72px; } .appicon--xl { width: 112px; height: 112px; }
.appicon--glyph svg { position: absolute; inset: 14%; width: 72%; height: 72%; fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 7; }
.appicon--glyph b { position: relative; color: #fff; font-weight: 400; font-size: 52%; line-height: 1; }
.appicon--xs b { font-size: 56%; }

/* ── 5 · home hero ────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; padding: calc(var(--nav-h) + 40px) 0 110px; }
.hero__sun { position: absolute; left: 50%; bottom: -46vmin; width: 108vmin; height: 108vmin; border-radius: 50%; pointer-events: none;
             background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--sun) 80%, transparent) 0, color-mix(in srgb, var(--sun) 34%, transparent) 38%, transparent 68%);
             transform: translate(-50%, calc(var(--hy, 0) * -1px)); opacity: var(--ho, 1); animation: rise 3.2s var(--ease) both; }
@keyframes rise { from { transform: translate(-50%, 40vmin); opacity: 0; } }
.hero__in { position: relative; z-index: 1; width: min(1240px, 100% - 40px); margin: 0 auto; }
.hero__eyebrow { font-family: var(--latin); font-weight: 600; font-size: 13px; letter-spacing: .4em; text-indent: .4em; color: var(--muted); margin-bottom: 28px; animation: up 1.2s var(--ease) .1s both; }
.hero__title { font-size: clamp(29px, 7.4vw, 108px); line-height: 1.12; letter-spacing: -.035em; font-weight: 700; color: var(--fg); text-wrap: balance; }
.hero__title .hl { display: block; animation: up 1.4s var(--ease) both; }
.hero__title .hl:nth-child(1) { animation-delay: .35s; } .hero__title .hl:nth-child(2) { animation-delay: .65s; }
.hero__lead { margin: clamp(22px, 3vw, 36px) auto 0; color: var(--muted); font-size: clamp(18px, 2.2vw, 26px); max-width: 24em; animation: up 1.4s var(--ease) 1.1s both; }
@keyframes up { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }
.hero__actions { margin-top: clamp(40px, 7vw, 76px); display: flex; flex-direction: column; align-items: center; gap: 20px; animation: up 1.4s var(--ease) 1.5s both; }
.hero__cue { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; color: var(--fg); font-size: 15px; letter-spacing: .08em; }
.cue-line { width: 1.5px; height: 54px; background: currentColor; position: relative; overflow: hidden; border-radius: 2px; opacity: .3; }
.cue-line::after { content: ""; position: absolute; inset: 0; background: currentColor; transform: translateY(-100%); animation: cue 2.4s var(--ease) infinite; opacity: 3; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
.hero__skip { color: var(--muted); text-decoration: none; font-size: 14px; }
.hero__skip:hover { color: var(--fg); }

/* ── 6 · chapters: a pinned stage, one sentence at a time ─────────────────── */
.chap { position: relative; height: calc(100svh + (var(--k) + 1) * 46svh); }
.chap__pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.chap__stage { width: min(var(--wrap), 100% - 48px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding-top: var(--nav-h); }
.chap--flip .chap__text { order: 2; }
.chap__text { position: relative; display: grid; align-content: center; min-height: 60svh; padding-top: 44px; }
.chap__text > * { grid-area: 1 / 1; }
.chap__text > .chap__time { grid-area: auto; position: absolute; top: 0; left: 0; align-self: start; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); margin-bottom: 0; }
.chap__clock { font-family: var(--latin); font-weight: 300; font-size: 20px; letter-spacing: .06em; color: var(--fg); font-variant-numeric: tabular-nums; }
.chap__rule { width: 28px; height: 1.5px; background: var(--line-strong); }
.chap__label { letter-spacing: .14em; font-weight: 600; }
.story { display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 26px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.line { font-size: clamp(28px, 4.5vw, 58px); line-height: 1.22; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; max-width: 14em;
        transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease), color .8s; }
html.js .chap:not(.is-flat) .line { opacity: 0; transform: translateY(34px); filter: blur(8px); }
html.js .chap:not(.is-flat) .line.on { opacity: 1; transform: none; filter: none; }
html.js .chap:not(.is-flat) .line.past { opacity: .32; }
.line:last-child { color: var(--brand); }
.turn { transition: opacity 1s var(--ease) .15s, transform 1s var(--ease) .15s; }
html.js .chap:not(.is-flat) .turn { opacity: 0; transform: translateY(36px); pointer-events: none; }
html.js .chap:not(.is-flat).is-turn .story { opacity: 0; transform: translateY(-30px); filter: blur(6px); pointer-events: none; }
html.js .chap:not(.is-flat).is-turn .turn { opacity: 1; transform: none; pointer-events: auto; }
.turn__pre { font-size: 15px; letter-spacing: .16em; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.moment__app { display: flex; align-items: center; gap: 14px; }
.moment__appmeta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.appname { font-weight: 700; font-size: 20px; line-height: 1.2; }
.turn__title { margin-top: 22px; font-size: clamp(28px, 3.9vw, 48px); line-height: 1.2; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.turn__body { margin-top: 20px; color: var(--muted); font-size: clamp(16px, 1.55vw, 18.5px); line-height: 1.85; max-width: 30em; }
.chap__visual { min-width: 0; position: relative; display: grid; place-items: center; min-height: 40svh; }
.chap__visual > * { grid-area: 1 / 1; }
.chap__ghost { font-family: var(--latin); font-weight: 200; font-size: clamp(76px, 15vw, 210px); line-height: 1; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity 1s var(--ease), transform 1.4s var(--ease); }
html.js .chap:not(.is-flat).is-turn .chap__ghost { opacity: 0; transform: scale(.9); }
.chap__vis { display: grid; place-items: center; width: 100%; }
html.js .chap:not(.is-flat) .chap__vis { opacity: 0; transform: translateY(40px) scale(.94); transition: opacity 1.1s var(--ease) .25s, transform 1.4s var(--ease) .25s; }
html.js .chap:not(.is-flat).is-turn .chap__vis { opacity: 1; transform: none; }
.scene-wrap { width: min(100%, 520px); }
.chap .phone--lg { --w: min(300px, 24vw, 34svh * .46 + 130px); }
.timechip { position: fixed; left: 50%; bottom: 22px; z-index: 90; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
            display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px; font-size: 14px; color: var(--fg);
            background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
            border: 1px solid var(--line); transition: opacity .5s, transform .5s var(--ease); }
.timechip.on { opacity: 1; transform: translate(-50%, 0); }
.timechip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.timechip__clock { font-family: var(--latin); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.timechip__label { color: var(--muted); }
.closing { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px 24px; }
.closing__in { max-width: 720px; }
.closing__mark { width: 64px; height: auto; margin: 0 auto 40px; display: block; fill: none; stroke: var(--brand); stroke-width: 6; opacity: .8; }
.closing__title { font-size: clamp(40px, 7.4vw, 92px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.closing__body { margin-top: 28px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.9; }
/* no script, or the visitor asked for less motion: the chapters become ordinary sections */
.chap.is-flat, html:not(.js) .chap { height: auto; }
.chap.is-flat .chap__pin, html:not(.js) .chap__pin { position: static; height: auto; padding: 90px 0; }
.chap.is-flat .chap__text > *, html:not(.js) .chap__text > * { grid-area: auto; }
.chap.is-flat .chap__text, html:not(.js) .chap__text { display: flex; flex-direction: column; gap: 28px; min-height: 0; }
.chap.is-flat .chap__text > .chap__time, html:not(.js) .chap__text > .chap__time { position: static; }
.chap.is-flat .chap__ghost, html:not(.js) .chap__ghost { display: none; }
@media (max-width: 860px) {
  .chap__stage { grid-template-columns: minmax(0, 1fr); gap: 0; align-content: center; padding-top: calc(var(--nav-h) + 8px); }
  .chap--flip .chap__text { order: 0; }
  .chap__visual { order: -1; min-height: 38svh; max-height: 40svh; }
  .chap__text { min-height: 40svh; }
  .chap__text > .chap__time { top: -3svh; transition: opacity .6s; } .chap.is-turn .chap__time { opacity: 0; } .timechip { display: none; }
  .chap .phone--lg { --w: min(150px, 19svh); }
  .scene-wrap { width: min(86%, 340px); }
  .line { font-size: clamp(26px, 7.4vw, 36px); }
  .turn__title { font-size: clamp(24px, 6.4vw, 32px); margin-top: 14px; }
  .turn__body { margin-top: 12px; font-size: 15px; line-height: 1.7; }
  .chap__ghost { font-size: clamp(52px, 17vw, 110px); }
  .chap.is-flat .chap__time, html:not(.js) .chap__time { position: static; }
  .chap.is-flat .chap__visual { max-height: none; }
}

/* ── 7 · scenes ───────────────────────────────────────────────────────────── */
.scene { display: block; width: 100%; height: auto; overflow: visible; }
.scene * { animation-play-state: paused; }
.scene.in-view * { animation-play-state: running; }
.scene .sc-line { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* window / Tend */
.sc-beam { fill: var(--sun); opacity: 0; transition: opacity 1.6s ease .3s; }
.in-view .sc-beam { opacity: .22; }
.sc-sun { fill: var(--sun); }
.sc-rays line { stroke: var(--sun); stroke-width: 3; stroke-linecap: round; }
.sc-rays { animation: spin 50s linear infinite; }
.sc-track { fill: none; stroke: var(--line); stroke-width: 5; }
.sc-ring { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: 150.8; transition: stroke-dashoffset 1.8s var(--ease) var(--d, 0ms); }
.in-view .sc-ring { stroke-dashoffset: var(--o); }
.sc-dot { fill: var(--brand); }
/* groups / Kumi */
.sc-dotg { transform: translate(var(--sx), var(--sy)); transition: transform 1.5s cubic-bezier(.6, 0, .2, 1) var(--d, 0ms); }
.in-view .sc-dotg { transform: translate(var(--gx), var(--gy)); }
.sc-dotg.g1 { fill: var(--g1); } .sc-dotg.g2 { fill: var(--g2); } .sc-dotg.g3 { fill: var(--g3); }
.sc-group { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 7 8; opacity: 0; transition: opacity 1.2s ease var(--d, 0ms); }
.in-view .sc-group { opacity: .65; }
/* route / TAN */
.sc-route { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 1 11; stroke-linecap: round; }
.sc-route-draw { fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s cubic-bezier(.5, 0, .2, 1) .2s; }
.in-view .sc-route-draw { stroke-dashoffset: 0; }
.sc-pin { fill: var(--bg); stroke: var(--brand); stroke-width: 3.5; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .7s cubic-bezier(.3, 1.6, .5, 1) var(--d, 0ms); }
.in-view .sc-pin { transform: scale(1); }
.sc-flag { opacity: 0; transition: opacity .8s ease var(--d, 0ms); }
.in-view .sc-flag { opacity: 1; }
.sc-flagfill { fill: var(--brick); }
.sc-paper { fill: var(--paper); stroke: var(--brand); stroke-width: 3; stroke-linejoin: round; }
.sc-receipt { opacity: 0; transform: translate(58px, 64px); transition: opacity .9s ease .1s, transform 1.1s var(--ease) .1s; }
.in-view .sc-receipt { opacity: 1; transform: translate(58px, 44px); }
.sc-total { stroke-width: 4; }
.sc-coin { fill: var(--sun); stroke: var(--brand); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1) var(--d, 0ms); }
.in-view .sc-coin { transform: scale(1); }
/* ticket / Park games */
.sc-perf { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.sc-glyph { font-size: 28px; fill: var(--brand); font-family: var(--font); font-weight: 300; }
.sc-bar { fill: var(--brand); }
.sc-ticket { transform-box: fill-box; transform-origin: center; transform: rotate(-4deg); transition: transform 1.2s var(--ease); }
.in-view .sc-ticket { transform: rotate(3deg); }
.sc-shake { transform-box: fill-box; transform-origin: center; animation: shake 2.6s ease-in-out infinite; }
@keyframes shake { 0%, 55%, 100% { transform: rotate(0); } 10% { transform: rotate(-12deg); } 20% { transform: rotate(10deg); } 30% { transform: rotate(-8deg); } 40% { transform: rotate(6deg); } }
.sc-wave { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; animation: wave 2.6s ease-in-out infinite; }
@keyframes wave { 0%, 55%, 100% { opacity: 0; } 12%, 40% { opacity: .75; } }
.sc-q { fill: none; stroke: var(--brand); stroke-width: 2.5; opacity: .45; animation: queue 3s ease-in-out infinite var(--d, 0ms); }
.sc-q--me { fill: var(--brand); opacity: 1; animation: none; }
@keyframes queue { 0%, 100% { opacity: .25; } 50% { opacity: .75; } }
/* hourglass / Countdown */
.sc-hexline { fill: none; stroke: var(--line); stroke-width: 1.5; }
.sc-moon { fill: var(--brand); opacity: .92; }
.sc-star { fill: var(--brand); animation: twinkle 4.2s ease-in-out infinite var(--d, 0ms); }
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: .95; } }
.sc-sand { fill: var(--sky); transform-box: fill-box; }
.sc-sand--top { transform-origin: 50% 100%; animation: sandTop 10s linear infinite; }
.sc-sand--bot { transform-origin: 50% 100%; animation: sandBot 10s linear infinite; }
@keyframes sandTop { from { transform: scaleY(1); } to { transform: scaleY(.04); } }
@keyframes sandBot { from { transform: scaleY(.04); } to { transform: scaleY(1); } }
.sc-thread { fill: none; stroke: var(--sky); stroke-width: 2.5; stroke-dasharray: 3 7; animation: flow .9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -10; } }

/* ── 8 · phone frame ──────────────────────────────────────────────────────── */
.phone { --w: 300px; position: relative; width: var(--w); padding: calc(var(--w) * .034); border-radius: calc(var(--w) * .16);
         background: linear-gradient(160deg, #1b222c, #0b0f15); flex: none;
         box-shadow: 0 0 0 1.5px #2b3441 inset, 0 0 0 1px rgba(255, 255, 255, .04), 0 50px 80px -34px rgba(10, 27, 56, .55), 0 18px 30px -16px rgba(10, 27, 56, .35); }
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; background: #1a212b; border-radius: 2px; }
.phone::before { left: -3px; top: 17%; height: 7%; box-shadow: 0 calc(var(--w) * .2) 0 #1a212b; }
.phone::after { right: -3px; top: 24%; height: 12%; }
.phone__screen { position: relative; aspect-ratio: 780 / 1688; border-radius: calc(var(--w) * .127); overflow: hidden; background: #fff; isolation: isolate; }
.phone__screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.phone__screen > img.is-active { opacity: 1; }
.phone--lg { --w: min(320px, 74vw); } .phone--md { --w: min(236px, 62vw); }

/* ── 9 · works / about / footer ───────────────────────────────────────────── */
.works { padding: clamp(80px, 12vw, 150px) 0; }
.works__in, .about__in { width: min(var(--wrap), 100% - 48px); margin: 0 auto; }
.works__grid { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work { display: flex; }
.work--feature { grid-column: span 2; grid-row: span 2; }
.work__card { position: relative; flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 30px; text-decoration: none; color: inherit; overflow: hidden;
              border: 1px solid var(--line); background: var(--card); transition: transform .6s var(--ease), box-shadow .6s var(--ease); min-height: 230px; }
div.work__card { border-style: dashed; border-color: var(--line-strong); background: transparent; }
a.work__card:hover { transform: translateY(-5px); box-shadow: 0 28px 50px -30px rgba(10, 27, 56, .5); }
.work__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.work__name { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.work--feature .work__name { font-size: clamp(36px, 4.4vw, 54px); }
.work__tag { color: var(--muted); max-width: 18em; }
.work--feature .work__tag { font-size: 19px; max-width: 12em; }
.work__go { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--brand); }
.work__peek { position: absolute; right: 7%; bottom: -26%; width: min(42%, 270px); transform: rotate(5deg); transition: transform .8s var(--ease); }
.work__peek img { display: block; width: 100%; height: auto; border-radius: 12%/5.6%; border: 7px solid #10151c; box-shadow: 0 30px 50px -22px rgba(10, 27, 56, .55); }
a.work__card:hover .work__peek { transform: rotate(2deg) translateY(-10px); }
@media (max-width: 960px) { .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .work--feature { grid-column: span 2; grid-row: auto; min-height: 420px; } }
@media (max-width: 600px) { .works__grid { grid-template-columns: 1fr; } .work--feature { grid-column: auto; } .work__peek { width: 46%; } }
.about { padding: clamp(60px, 10vw, 130px) 0 clamp(90px, 12vw, 150px); }
.about__in { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 6vw, 96px); border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 72px); }
.about__body p:first-child { font-size: clamp(18px, 2vw, 22px); line-height: 1.9; }
.about__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .about__in { grid-template-columns: 1fr; } }
.footer { border-top: 1px solid var(--line); padding: 36px 0 60px; color: var(--muted); font-size: 14px; }
.footer__in { width: min(var(--wrap), 100% - 48px); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.footer__in p:nth-of-type(1) { margin-right: auto; }
.footer a { color: var(--muted); }

/* ── 10 · app page ────────────────────────────────────────────────────────── */
body.pp { --pp: 1; }
html[data-phase="dawn"] body.pp, body.pp { background: var(--bg); }
.pp-wrap { width: min(1100px, 100% - 48px); margin: 0 auto; }
.pp-narrow { width: min(760px, 100% - 48px); }
.pp-center { text-align: center; }
.pp-sec { padding: clamp(80px, 12vw, 150px) 0; }
.pp-sec--tint { background: var(--card); }
.pp-h2 { font-size: clamp(32px, 5.2vw, 60px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; margin-bottom: 26px; }
.pp-center.pp-h2 { margin-bottom: clamp(36px, 6vw, 72px); }
.pp-lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); line-height: 1.9; max-width: 32em; }
.pp-note { margin-top: 20px; color: var(--muted); font-size: 15px; max-width: 32em; }
.pp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin-bottom: 26px; }
.subnav { position: sticky; top: var(--nav-h); z-index: 80; margin-top: var(--nav-h); height: var(--sub-h); background: color-mix(in srgb, var(--bg) 82%, transparent);
          -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.subnav__in { width: min(1100px, 100% - 48px); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 24px; }
.subnav__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; }
.subnav__links { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
.subnav__links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.subnav__links a:hover, .subnav__links a.is-on { color: var(--fg); }
.subnav .btn { margin-left: 0; }
@media (max-width: 820px) { .subnav__links { display: none; } .subnav .btn { margin-left: auto; } }
body.pp main { margin-top: 0; }

.pp-hero { padding: clamp(48px, 9vw, 110px) 0 0; text-align: center; overflow: hidden; }
.pp-hero__in { width: min(860px, 100% - 40px); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.pp-hero__icon { margin-bottom: 26px; }
.pp-hero__title { display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1.05; }
.pp-hero__title .wk-name { font-size: clamp(56px, 11vw, 120px); font-weight: 700; letter-spacing: .04em; }
.pp-hero__en { font-family: var(--latin); font-weight: 300; font-size: clamp(14px, 2vw, 20px); letter-spacing: .5em; color: var(--muted); text-indent: .5em; }
.pp-hero__sub { margin-top: 34px; font-size: clamp(26px, 4vw, 44px); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.pp-hero__sub2 { margin-top: 12px; color: var(--muted); font-size: clamp(16px, 1.8vw, 20px); max-width: 28em; }
.pp-hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.pp-hero__phones { position: relative; margin-top: clamp(48px, 7vw, 84px); display: flex; justify-content: center; align-items: flex-start; gap: clamp(0px, 3vw, 44px);
                   height: clamp(440px, 62vw, 700px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.pp-hero__ph--pl, .pp-hero__ph--pr { margin-top: 64px; transform: scale(.88); opacity: .96; }
.pp-hero__ph--pl .phone, .pp-hero__ph--pr .phone { --w: min(260px, 26vw); }
.pp-hero__ph--pc .phone { --w: min(330px, 62vw); }
@media (max-width: 700px) { .pp-hero__ph--pl, .pp-hero__ph--pr { display: none; } }

.pp-pain__in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.pile { position: relative; aspect-ratio: 1 / .92; width: min(100%, 520px); margin-inline: auto; }
.pcard { position: absolute; left: min(var(--x), 52%); top: var(--y); width: 44%; padding: 14px 16px 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--bg);
         box-shadow: 3px 3px 0 var(--line); transform: rotate(var(--r)) translateY(-30px); opacity: 0; filter: grayscale(var(--age)); display: flex; flex-direction: column; gap: 6px;
         transition: transform 1s var(--ease) calc(var(--n) * 110ms), opacity .8s ease calc(var(--n) * 110ms); }
.pile.in .pcard { transform: rotate(var(--r)); opacity: calc(1 - var(--age) * .45); }
.pcard__t { font-family: var(--wk); font-size: 16px; line-height: 1.4; }
.pcard__d { font-size: 12px; color: var(--muted); }
@media (max-width: 800px) { .pp-pain__in { grid-template-columns: 1fr; } .pcard { width: 46%; } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); text-align: center; }
.step { display: flex; flex-direction: column; align-items: center; }
.step__ph { margin-bottom: 30px; }
.step__n { width: 34px; height: 38px; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: 15px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); margin-bottom: 14px; }
.step__title { font-size: 24px; font-weight: 700; line-height: 1.3; }
.step__text { margin-top: 10px; color: var(--muted); font-size: 16px; max-width: 18em; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 64px; } }

.features { --fw: min(320px, 36svh); }
.features__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 90px); }
.features__phone .phone { --w: var(--fw); }
.features__stick { position: sticky; top: calc(50svh - var(--fw) * 1.12 + 20px); display: grid; place-items: center; }
.features__list { display: flex; flex-direction: column; }
.feat { min-height: 78svh; display: flex; align-items: center; }
.feat__in { opacity: .28; transition: opacity .6s ease; max-width: 26em; }
.feat.is-on .feat__in { opacity: 1; }
.feat__n { display: inline-block; font-family: var(--latin); font-weight: 300; font-size: 15px; letter-spacing: .2em; color: var(--muted); margin-bottom: 14px; }
.feat__title { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.feat__text { margin-top: 16px; color: var(--muted); font-size: 17.5px; line-height: 1.9; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); gap: 2px; }
.tabs button { border: 0; background: transparent; padding: .5em 1.3em; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted); transition: background .25s, color .25s; }
.tabs button[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.tabs--sm { margin-top: 22px; } .tabs--sm button { padding: .35em 1em; font-size: 14px; }
.extras { margin-top: clamp(40px, 6vw, 80px); padding-top: 36px; border-top: 1px dashed var(--line-strong); }
.extras__t { font-size: 18px; margin-bottom: 14px; }
.extras ul { display: grid; gap: 8px; color: var(--muted); }
.extras li { padding-left: 1.4em; position: relative; }
.extras li::before { content: ""; position: absolute; left: 0; top: .6em; width: .6em; height: .68em; background: var(--brand); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); opacity: .6; }
@media (max-width: 900px) {
  .features { --fw: min(190px, 25svh); }
  .features__grid { grid-template-columns: 1fr; gap: 0; }
  .features__stick { top: calc(var(--nav-h) + var(--sub-h)); padding: 14px 0 26px; z-index: 5; background: linear-gradient(var(--bg) 82%, transparent); }
  .feat { min-height: 62svh; align-items: flex-start; padding-top: 6vh; }
}

.compare__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cmp { padding: clamp(28px, 4vw, 48px); border-radius: 32px; border: 1.5px dashed var(--line-strong); }
.cmp__name { font-size: 15px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.cmp__big { font-family: var(--latin); font-weight: 200; font-size: clamp(64px, 11vw, 132px); line-height: 1.05; letter-spacing: -.02em; margin: 18px 0 22px; color: var(--muted); }
.cmp ul { display: grid; gap: 10px; font-size: 17px; }
.cmp--b { background: var(--navy); border: 1.5px solid var(--navy); color: #fff; }
.cmp--b .cmp__name { color: rgba(255, 255, 255, .7); }
.cmp--b .cmp__big { color: #fff; font-weight: 300; }
html[data-theme="dark"] .cmp--b { background: #16346b; border-color: #2b4f93; }
@media (max-width: 760px) { .compare__grid { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 26px 22px 24px; border-radius: 24px; background: var(--bg); border: 1px solid var(--line); }
.tile:nth-child(odd) { transform: rotate(-.6deg); } .tile:nth-child(even) { transform: rotate(.5deg); }
.tile svg { width: 30px; height: 30px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.tile h3 { font-size: 17px; line-height: 1.4; font-weight: 700; }
.tile p { margin-top: 4px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.install__in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.install__card { padding: clamp(24px, 3vw, 40px); border-radius: 32px; background: var(--card); border: 1px solid var(--line); }
.tabpanel { margin-top: 26px; }
.tabpanel[hidden] { display: none; }
.isteps { counter-reset: s; display: grid; gap: 18px; }
.isteps li { counter-increment: s; display: flex; gap: 16px; align-items: center; font-size: 17px; font-weight: 600; }
.isteps li::before { content: counter(s); flex: none; width: 32px; height: 36px; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; font-weight: 700; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.inote { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--line-strong); font-size: 14.5px; color: var(--muted); line-height: 1.8; }
@media (max-width: 800px) { .install__in { grid-template-columns: 1fr; } }

.qas { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 4px; font-size: 19px; font-weight: 600; }
.qa summary::-webkit-details-marker { display: none; }
.qa__i { position: relative; flex: none; width: 18px; height: 18px; }
.qa__i::before, .qa__i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease); }
.qa__i::after { transform: rotate(90deg); }
.qa[open] .qa__i::after { transform: rotate(0); }
.qa__a { padding: 0 4px 26px; color: var(--muted); line-height: 1.9; max-width: 40em; }

.cta { background: radial-gradient(120% 140% at 50% 0%, #17407f 0%, var(--navy-d) 62%); color: #fff; text-align: center; padding: clamp(90px, 14vw, 170px) 24px; }
.cta__in { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.cta__icon { margin-bottom: 32px; }
.cta__title { font-size: clamp(40px, 7vw, 84px); line-height: 1.1; letter-spacing: .02em; font-weight: 700; }
.cta__text { margin-top: 18px; font-size: 20px; color: rgba(255, 255, 255, .72); }
.cta .pp-hero__actions { margin-top: 44px; }

/* intro: the little shop */
.intro { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #F7F9FC;
         background-image: linear-gradient(rgba(79, 114, 151, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 114, 151, .12) 1px, transparent 1px); background-size: 26px 26px;
         transition: opacity .9s ease .1s, transform 1.1s cubic-bezier(.7, 0, .3, 1); color: #1A1A1A; }
.intro[hidden] { display: none; }
.intro__btn { background: none; border: 0; padding: 0; cursor: pointer; width: min(80vw, 380px); }
.intro__shop { display: block; width: 100%; height: auto; overflow: visible; }
.intro__shop .wk { font-family: var(--wk); }
.intro__shop .intro__sign text { font-size: 27px; fill: #003366; }
.intro__door { transform-box: view-box; transform-origin: 233px 460px; transition: transform .8s cubic-bezier(.5, 0, .2, 1); }
.intro.is-open .intro__door { transform: scaleX(.14); }
.intro__hint { margin-top: 22px; font-family: var(--wk); color: #4F6580; font-size: 18px; animation: hint 2.6s ease-in-out infinite; }
@keyframes hint { 50% { opacity: .35; } }
.intro__skip { position: absolute; top: 18px; right: 18px; border: 1.5px dashed #5B6677; background: transparent; color: #44546a; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-size: 14px; }
.intro.is-enter { opacity: 0; transform: scale(var(--zoom, 14)); pointer-events: none; }
.intro.is-open .intro__hint { opacity: 0; animation: none; }

/* ── 11 · swipe demo ──────────────────────────────────────────────────────── */
.demo__in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.demo__phone { display: grid; justify-items: center; }
.demo-phone { --w: min(340px, 82vw); }
.demo-screen { background: #E8EEF5; }
.demo-bg { filter: saturate(.9); opacity: 1 !important; }
.demo-dim { position: absolute; inset: 0; background: rgba(22, 30, 46, .5); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 61%; background: #fff; border-radius: 1.5em 1.5em 0 0; color: #1A1A1A;
         font-size: calc(var(--w) / 24.4); display: flex; flex-direction: column; align-items: stretch; padding: 0 1.6em 1.1em; outline-offset: -4px; }
.sheet__tape { position: absolute; top: .1em; left: 50%; width: 6em; height: 1.35em; transform: translateX(-50%); background: repeating-linear-gradient(135deg, #2B5189 0 .45em, #7F9DC3 .45em .9em); clip-path: polygon(3% 0, 97% 0, 100% 50%, 97% 100%, 3% 100%, 0 50%); }
.sheet__title { margin-top: 2.2em; text-align: center; font-size: 1.3em; font-weight: 400; line-height: 1.2; }
.sheet__dashes { margin-top: .7em; display: flex; justify-content: center; gap: .4em; }
.sheet__dashes i { width: 1.7em; height: .38em; border-radius: 1em; border: 1.5px solid #1A1A1A; background: #fff; transition: background .3s; }
.sheet__dashes i.on { background: #1A1A1A; } .sheet__dashes i.cur { background: #003366; border-color: #003366; }
.sheet__count { margin-top: .5em; text-align: center; font-size: .78em; color: #5E6877; }
.sheet__stage { position: relative; flex: 1; min-height: 0; margin: 0 -1.6em; }
.sheet__cards { position: absolute; inset: 0; }
.tcard { position: absolute; inset: .9em 1.6em .8em; background: #fff; border: 2px solid #1A1A1A; border-radius: .85em; box-shadow: .3em .3em 0 #C5D2E0; padding: 1.35em 1.1em 1em; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; display: flex; flex-direction: column; gap: .5em; }
.tcard:active { cursor: grabbing; }
.tcard.is-next { transform: scale(.95) translateY(.7em); box-shadow: none; opacity: .8; pointer-events: none; }
.tcard__tape { position: absolute; top: -.85em; left: 50%; width: 4.7em; height: 1.3em; transform: translateX(-50%) rotate(-1.5deg); }
.tape--plum { background: #7C5C90; } .tape--navy { background: repeating-linear-gradient(135deg, #2B5189 0 .4em, #7F9DC3 .4em .8em); } .tape--steel { background: #A9BDD3; }
.tcard__cat { align-self: flex-start; background: var(--c, #6A4C7C); color: #fff; border-radius: 2em; padding: .1em .75em; font-size: .72em; line-height: 1.7; }
.tcard__t { font-family: var(--wk); font-size: 1.12em; line-height: 1.45; }
.tcard__d { margin-top: auto; font-size: .78em; color: #5E6877; }
.stamp { position: absolute; top: 1.2em; z-index: 3; padding: .15em .65em; font-family: var(--wk); font-size: .98em; border: 2px dashed currentColor; border-radius: .45em; opacity: 0; pointer-events: none; background: #fff; }
.stamp--keep { left: .8em; color: #003366; transform: rotate(-8deg); } .stamp--arch { right: .8em; color: #B44B33; transform: rotate(7deg); }
.sheet__tip { text-align: center; font-size: .72em; color: #5E6877; margin: .2em 0 .8em; }
.sheet__btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55em; }
.sb { height: 3em; border-radius: 2em; border: 2px solid #1A1A1A; background: #fff; font-size: 1em; font-weight: 600; cursor: pointer; transition: transform .2s; }
.sb:active { transform: scale(.96); }
.sb--later { border-style: dashed; border-color: #5B6677; color: #2B3340; font-weight: 500; }
.sb--keep { background: #1A1A1A; color: #fff; }
.sheet__foot { display: flex; justify-content: space-between; margin-top: .7em; font-size: .78em; }
.sl { background: none; border: 0; padding: .2em 0; cursor: pointer; color: #6B7686; text-decoration: underline; text-underline-offset: .25em; }
.sl--u { color: #1A1A1A; }
.sheet__done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55em; text-align: center; }
.sheet__done[hidden] { display: none; }
.done__stamp { font-size: 1.9em; color: #003366; border: 3px solid #003366; border-radius: .5em; padding: .12em .7em; margin: 0; line-height: 1.3; }
.done__stats { font-size: 1em; margin: .3em 0 0; } .done__note { font-size: .82em; color: #5E6877; margin: 0; }
.done__again { margin-top: .6em; background: #1A1A1A; color: #fff; border: 0; border-radius: 2em; padding: .75em 1.6em; font-weight: 600; cursor: pointer; font-size: .95em; }
.done__stamp.stamping { animation: stampIn .75s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes stampIn { 0% { transform: scale(2.6) rotate(-14deg); opacity: 0; } 55% { transform: scale(.94) rotate(-4deg); opacity: 1; } 70% { transform: scale(1.03) rotate(-2deg) translate(2px, 1px); } 85% { transform: scale(1) rotate(-3deg) translate(-2px, 0); } 100% { transform: scale(1) rotate(-3deg); opacity: 1; } }
@media (max-width: 860px) { .demo__in { grid-template-columns: 1fr; } .demo__text { text-align: center; } .demo__text .pp-lead, .demo__text .pp-note { margin-inline: auto; } }

/* ── 12 · motion preferences ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .chap { height: auto; } .chap__pin { position: static; height: auto; padding: 90px 0; } .hero__sun, .hero__title .hl, .hero__eyebrow, .hero__lead, .hero__actions { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .sc-ring { stroke-dashoffset: var(--o); } .sc-dotg { transform: translate(var(--gx), var(--gy)); } .sc-group, .sc-flag { opacity: .8; }
  .sc-route-draw { stroke-dashoffset: 0; } .sc-pin, .sc-coin { transform: scale(1); } .sc-receipt { opacity: 1; transform: translate(58px, 44px); }
  .sc-beam { opacity: .22; } .sc-ticket { transform: rotate(3deg); }
  .pcard { opacity: calc(1 - var(--age) * .45); transform: rotate(var(--r)); }
}
@media print { .nav, .subnav, .timechip, .intro { display: none !important; } }


/* ── 13 · round type for headlines and the story, splash, tighter rhythm ──── */
.hero__title, .line, .turn__title, .closing__title, .sec-title, .work__name, .pp-h2 { font-family: var(--round); font-weight: 400; letter-spacing: -.01em; }
.hero__title { letter-spacing: -.02em; line-height: 1.2; }
.line { line-height: 1.35; max-width: 13em; }
.turn__title { line-height: 1.3; }
.chap { height: calc(100svh + (var(--k) + 1.5) * 56svh); }
.chap__visual { container-type: inline-size; }
.chap__ghost { font-size: min(210px, 27cqw); }
.chap__ghost--long { font-size: min(150px, 17cqw); }
.chap__visual, .chap__text { min-width: 0; }
.splash { display: none; }
html.js .splash { display: grid; place-items: center; position: fixed; inset: 0; z-index: 500; background: var(--bg); pointer-events: none; animation: splashOut .7s ease 1.35s both; }
.splash span { font-family: var(--latin); font-weight: 300; letter-spacing: .5em; text-indent: .5em; font-size: clamp(15px, 2vw, 20px); color: var(--fg); animation: splashIn 1.4s ease both; }
@keyframes splashIn { 0% { opacity: 0; letter-spacing: .8em; } 45%, 75% { opacity: 1; } 100% { opacity: 0; letter-spacing: .5em; } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
html.js { --h0: 1.2s; }
@media (prefers-reduced-motion: reduce) { html.js { --h0: 0s; } }
.hero__eyebrow { animation-delay: calc(var(--h0, 0s) + .1s); }
.hero__title .hl:nth-child(1) { animation-delay: calc(var(--h0, 0s) + .35s); }
.hero__title .hl:nth-child(2) { animation-delay: calc(var(--h0, 0s) + .65s); }
.hero__lead { animation-delay: calc(var(--h0, 0s) + 1.1s); }
.hero__actions { animation-delay: calc(var(--h0, 0s) + 1.5s); }
.hero__sun { animation-delay: var(--h0, 0s); }
@media (prefers-reduced-motion: reduce) { .splash { display: none !important; } }

.link-arrow + .link-arrow { margin-left: 22px; }
.work--feature { grid-column: span 2; }

/* ── 14 · story product pages (Kumi, Countdown, …) ───────────────────────── */
.pp--story .pp-hero__title .pp-name { font-family: var(--round); font-size: clamp(56px, 11vw, 120px); font-weight: 400; letter-spacing: .04em; }
html[lang="en"] .pp--story .pp-hero__en { display: none; }
.pp-center-lead { margin-inline: auto; text-align: center; }
.demo__text--wide { text-align: center; margin-bottom: clamp(28px, 5vw, 56px); }
.pp-art { display: block; margin: -6px auto 22px; overflow: visible; }

/* Kumi — twelve dots find their groups */
body[data-app="kumi"] { --accent: #EDB7AA; }
.kumi-art { width: min(310px, 80vw); height: auto; }
.kd { --c: #AFC4DD; fill: var(--muted); opacity: .5; stroke: rgba(0, 51, 102, .18); stroke-width: 1; transform: translate(var(--x0), var(--y0));
      animation: kdrift 7.5s var(--ease) infinite alternate; animation-delay: calc(var(--i) * 70ms); }
.kd--g1 { --c: #B9CDB8; } .kd--g2 { --c: #EBDDA6; } .kd--g3 { --c: #EDB7AA; }
@keyframes kdrift { 0%, 16% { transform: translate(var(--x0), var(--y0)); fill: var(--muted); opacity: .5; } 58%, 100% { transform: translate(var(--x1), var(--y1)); fill: var(--c); opacity: 1; } }
body[data-app="kumi"] .pcard--note { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
body[data-app="kumi"] .pcard--note:nth-child(2n) { background: color-mix(in srgb, #AFC4DD 38%, var(--bg)); }
body[data-app="kumi"] .pcard--note:nth-child(3n) { background: color-mix(in srgb, #B9CDB8 38%, var(--bg)); }
body[data-app="kumi"] .pcard--note .pcard__t { font-family: var(--round); font-size: 15px; }

/* Kumi demo — a tiny projector screen */
.kx { width: min(100%, 460px); margin-inline: auto; padding: 14px; border-radius: 30px; display: grid; gap: 12px; background: #0B1E3F; color: #fff; box-shadow: 0 34px 60px -34px rgba(10, 27, 56, .7); }
.kx__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px 0; font-size: 14px; color: rgba(255, 255, 255, .78); }
.kx__sw { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.kx__sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kx__track { position: relative; width: 38px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .26); transition: background .25s; }
.kx__track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.kx__sw input:checked + .kx__track { background: #EDB7AA; }
.kx__sw input:checked + .kx__track::after { transform: translateX(16px); }
.kx__sw input:focus-visible + .kx__track { outline: 3px solid #9DBCE3; outline-offset: 3px; }
.kx__stage { position: relative; height: clamp(330px, 54svh, 420px); border-radius: 22px; background: #06142B; overflow: hidden; outline-offset: -3px; }
.kx__stage [hidden] { display: none !important; }
.kx__idle, .kx__reveal, .kx__over, .kx__shuffle { position: absolute; inset: 0; }
.kx__idle { display: grid; place-content: center; justify-items: center; gap: 20px; text-align: center; padding: 24px; }
.kx__mark { position: relative; width: 76px; height: 76px; border-radius: 23%; background: #003366; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.kx__mark i, .kx__mark b { position: absolute; border-radius: 50%; background: #fff; }
.kx__mark i { left: 19px; width: 17px; height: 17px; } .kx__mark i:nth-child(1) { top: 17px; } .kx__mark i:nth-child(2) { top: 42px; }
.kx__mark b { right: 15px; top: 25px; width: 26px; height: 26px; background: #EDB7AA; }
.kx__idle-t { font-family: var(--round); font-size: 19px; line-height: 1.5; }
.kx__go { border: 0; cursor: pointer; padding: .75em 1.8em; border-radius: 99px; background: #fff; color: #0B1E3F; font-weight: 700; font-size: 16px; transition: transform .3s var(--ease); }
.kx__go:hover { transform: translateY(-2px); }
.kx__shuf-t { position: absolute; left: 0; right: 0; top: 14px; text-align: center; font-family: var(--round); letter-spacing: .3em; color: rgba(255, 255, 255, .7); animation: kxblink 1s ease-in-out infinite; }
@keyframes kxblink { 50% { opacity: .35; } }
.kx__chip { position: absolute; left: 0; top: 0; padding: 4px 12px 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: transform .62s var(--ease), opacity .5s; will-change: transform; }
.kx__chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.kx__reveal { padding: 26px 28px; display: grid; align-content: start; gap: 6px; }
.kx__count { font-family: var(--latin); font-weight: 300; letter-spacing: .3em; color: rgba(255, 255, 255, .55); font-size: 14px; }
.kx__gname { font-family: var(--round); font-size: clamp(38px, 10vw, 54px); font-weight: 400; line-height: 1.15; animation: kxin .7s var(--ease) both; }
.kx__n { color: rgba(255, 255, 255, .55); font-size: 14px; margin-bottom: 8px; }
.kx__members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.kx__members li { display: flex; align-items: center; gap: 10px; font-size: 21px; opacity: 0; animation: kxin .6s var(--ease) calc(.35s + var(--i) * .22s) both; }
.kx__members i, .kx__card i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
@keyframes kxin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.kx__legend { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 14px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.kx__legend span { display: inline-flex; align-items: center; gap: 6px; } .kx__legend i { width: 8px; height: 8px; border-radius: 50%; }
.kx__over { padding: 14px 14px 40px; overflow: auto; }
.kx__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kx__card { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 16px; background: var(--gc); color: #0B1E3F; font-size: 15px; animation: kxin .6s var(--ease) calc(var(--i) * .1s) both; }
.kx__card b { font-family: var(--round); font-weight: 400; font-size: 18px; margin-bottom: 2px; }
.kx__card span { display: flex; align-items: center; gap: 8px; }
.kx__ctl { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.kx__ctl[hidden], .kx__ctl [hidden] { display: none !important; }
.kx__btn { border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; padding: .55em 1.3em; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 15px; transition: background .25s; }
.kx__btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.kx__btn:disabled { opacity: .35; cursor: default; }
.kx__btn--main { background: #fff; color: #0B1E3F; border-color: #fff; } .kx__btn--main:hover:not(:disabled) { background: #EDB7AA; }

/* Countdown — paper, walnut, serif */
html[data-theme="light"] body[data-app="countdown"] { --bg: #EFEBE1; --fg: #262421; --muted: #6D675B; --brand: #7F5D3C; --line: rgba(38, 36, 33, .14);
  --card: #FAF6EC; --btn-bg: #262421; --btn-fg: #FAF6EC; --sand-l: #CDB896; --sand-d: #7F5D3C; background: #EFEBE1; }
html[data-theme="dark"] body[data-app="countdown"] { --bg: #1C1A17; --fg: #E9E3D7; --muted: #A39B8B; --brand: #C98A4B; --line: rgba(233, 227, 215, .16);
  --card: #262320; --btn-bg: #E9E3D7; --btn-fg: #1C1A17; --sand-l: #5E5342; --sand-d: #C98A4B; background: #1C1A17; }
body[data-app="countdown"] :is(.pp-h2, .feat__title, .step__title, .cta__title, .pp-hero__sub, .tile h3, .cdx__cap-t, .pp-name, .qa__q) { font-family: "Noto Serif TC", "Songti TC", "Noto Serif CJK TC", serif; font-weight: 600; }
body[data-app="countdown"] .pp-name { font-weight: 600; letter-spacing: .08em; }
body[data-app="countdown"] .pp-hero__en, body[data-app="countdown"] .feat__n, body[data-app="countdown"] .step__n { font-family: "JetBrains Mono", ui-monospace, monospace; }
body[data-app="countdown"] .pcard--note { background: var(--card); border-color: var(--line-strong); box-shadow: 3px 3px 0 var(--line); }
body[data-app="countdown"] .pcard__t { font-family: "Noto Serif TC", serif; font-size: 15px; }
body[data-app="countdown"] .pp-sec--tint, body[data-app="countdown"] .install__card { background: var(--card); }
body[data-app="countdown"] .install.pp-sec--tint .install__card { background: var(--bg); }
body[data-app="countdown"] .tile { background: var(--card); }
body[data-app="countdown"] .cta { background: radial-gradient(120% 140% at 50% 0%, #4a3a28 0%, #1C1A17 66%); }
.cd-art { width: 56px; height: auto; color: var(--brand); }
.cd-glass { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.cd-top, .cd-bot { fill: currentColor; transform-box: view-box; animation: cdsand 7s ease-in-out infinite alternate; }
.cd-top { opacity: .35; transform-origin: 30px 39px; }
.cd-bot { opacity: .7; transform-origin: 30px 72px; animation-name: cdsand2; }
@keyframes cdsand { from { transform: scaleY(1); } to { transform: scaleY(.12); } }
@keyframes cdsand2 { from { transform: scaleY(.12); } to { transform: scaleY(1); } }
.cg { fill: currentColor; opacity: 0; animation: cdgrain 1.3s linear infinite; animation-delay: calc(var(--i) * .33s); }
@keyframes cdgrain { 0% { transform: translateY(40px); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(68px); opacity: 0; } }

.cdx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); max-width: 980px; margin-inline: auto; align-items: stretch; }
.cdx__glass, .cdx__cap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: clamp(22px, 3vw, 34px); border-radius: 28px; background: var(--bg); border: 1px solid var(--line); text-align: center; }
.cdx__svg { width: min(176px, 44vw); height: auto; overflow: visible; }
.cdx__frame { fill: none; stroke: var(--fg); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.cdx__sand { fill: var(--sand-l); transform-box: view-box; transform-origin: 100px 158px; transition: transform .9s var(--ease); }
.cdx__band { fill: var(--sand-l); opacity: .75; transform-box: fill-box; transform-origin: 50% 100%; animation: cdband .7s var(--ease) both; }
.cdx__band.is-note { fill: var(--sand-d); opacity: 1; }
@keyframes cdband { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.cdx__stream { stroke: var(--sand-d); stroke-width: 2; stroke-dasharray: 3 5; opacity: 0; transition: opacity .3s; }
.cdx.run .cdx__stream, .cdx__glass.run .cdx__stream { opacity: .9; animation: cdflow .5s linear infinite; }
@keyframes cdflow { to { stroke-dashoffset: -16; } }
.cdx__read { font-size: 16px; color: var(--muted); } .cdx__read b { font-family: "Fraunces", "Noto Serif TC", serif; font-style: italic; font-weight: 500; font-size: 30px; color: var(--fg); letter-spacing: -.01em; }
.cdx__done { font-family: "Noto Serif TC", serif; font-size: 20px; line-height: 1.6; color: var(--brand); }
.cdx__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cdx__btns .btn { padding: .55em 1.2em; font-size: 15px; }
.cdx__cap-t { font-size: 22px; } .cdx__cap-h { color: var(--muted); font-size: 15px; }
.cdx__seg { margin-block: 4px; } .cdx__seg button[aria-checked="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.note { position: relative; width: 100%; text-align: left; padding: 18px 20px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 28px -20px rgba(38, 36, 33, .5); }
.note__date { font-family: "Fraunces", serif; font-style: italic; font-size: 22px; color: var(--brand); line-height: 1.2; }
.note__text { margin-top: 8px; font-family: "Noto Serif TC", "Songti TC", serif; font-size: 16px; line-height: 1.8; transition: opacity .5s ease; }
.note__tag { margin-top: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.note__sealed { position: absolute; left: 20px; right: 20px; top: 58px; bottom: 40px; display: grid; align-content: start; gap: 9px; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.note__sealed i { display: block; height: 8px; border-radius: 4px; background: var(--line); } .note__sealed i:nth-child(2) { width: 82%; } .note__sealed i:nth-child(3) { width: 58%; }
.note__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.note__sealed span { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.note__sealed span:last-child { color: var(--brand); }
#cdx-cap[data-stage="1"] .note__text { opacity: 0; } #cdx-cap[data-stage="1"] .note__sealed { opacity: 1; }
#cdx-cap[data-stage="2"] .note { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent), 0 14px 28px -20px rgba(38, 36, 33, .5); }
@media (max-width: 800px) { .cdx { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .kd { animation: none; transform: translate(var(--x1), var(--y1)); fill: var(--c); opacity: 1; }
  .cd-top, .cd-bot, .cg { animation: none; } .cg { display: none; }
  .kx__gname, .kx__members li, .kx__card, .cdx__band, .kx__shuf-t { animation: none; opacity: 1; }
}

/* story pages: notes laid out in a grid so longer sentences never overlap */
.pp--story .pile { aspect-ratio: auto; width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pp--story .pcard { position: static; width: auto; min-height: 96px; }
.pp--story .pcard:nth-child(even) { margin-top: 26px; }
@media (max-width: 800px) { .pp--story .pcard { width: auto; } }

/* works: three full product pages sit side by side as tall cards, the rest follow below */
.work--feature { grid-column: auto; grid-row: auto; }
.work--feature .work__card { min-height: clamp(470px, 38vw, 560px); }
.work--feature .work__name { font-size: clamp(32px, 3.4vw, 44px); }
.work--feature .work__tag { max-width: 11em; font-size: 17px; }
.work--feature .work__peek { left: 50%; right: auto; bottom: -24%; width: min(58%, 220px); transform: translateX(-50%) rotate(4deg); }
.work--feature a.work__card:hover .work__peek { transform: translateX(-50%) rotate(1.5deg) translateY(-10px); }
.work--feature .work__go { margin-top: 0; }
@media (max-width: 960px) { .work--feature { grid-column: auto; min-height: 0; } .work--feature:nth-child(3) { grid-column: span 2; } .work--feature:nth-child(3) .work__card { min-height: 380px; } }
@media (max-width: 600px) { .work--feature:nth-child(3) { grid-column: auto; } .work--feature .work__card, .work--feature:nth-child(3) .work__card { min-height: 460px; } .work--feature .work__peek { width: min(52%, 200px); } }
.work--feature .work__card { min-height: 0; }
.work--feature .work__peek { position: relative; left: auto; right: auto; bottom: auto; width: min(58%, 220px); margin: 22px auto -62%; transform: rotate(4deg); }
.work--feature a.work__card:hover .work__peek { transform: rotate(1.5deg) translateY(-10px); }
@media (max-width: 960px) { .work--feature:nth-child(3) .work__card { min-height: 0; } }
@media (max-width: 600px) { .work--feature .work__card, .work--feature:nth-child(3) .work__card { min-height: 0; } .work--feature .work__peek { width: min(56%, 210px); } }

/* ── 15. Tend — cream, navy, a little sun ───────────────────── */
html[data-theme="light"] body[data-app="tend"] { --bg: #F8F4EA; --fg: #1B1B1B; --muted: #756F62; --brand: #003366; --line: rgba(27, 27, 27, .12);
  --card: #FFFFFF; --btn-bg: #003366; --btn-fg: #FFFFFF; --tx-y: #F6D766; --tx-pale: #FCF2C9; --tx-amber: #85600A; --tx-chk: #fff; background: #F8F4EA; }
html[data-theme="dark"] body[data-app="tend"] { --bg: #141311; --fg: #EEE9DD; --muted: #A59E8E; --brand: #9DBBE3; --line: rgba(238, 233, 221, .14);
  --card: #201E1A; --btn-bg: #9DBBE3; --btn-fg: #141311; --tx-y: #E5C04D; --tx-pale: #2E2915; --tx-amber: #E5C04D; --tx-chk: #141311; background: #141311; }
body[data-app="tend"] :is(.pp-h2, .feat__title, .step__title, .cta__title, .pp-hero__sub, .tile h3, .tx__title, .pp-name, .qa__q, .extras__t) { font-family: var(--round); font-weight: 400; }
body[data-app="tend"] .pp-name { letter-spacing: .12em; }
body[data-app="tend"] .pcard--note { background: var(--tx-pale); border-color: transparent; box-shadow: 0 10px 22px -16px rgba(0, 51, 102, .45); }
body[data-app="tend"] .pcard__t { font-family: var(--round); }
body[data-app="tend"] .pp-sec--tint { background: var(--card); }
body[data-app="tend"] .install.pp-sec--tint .install__card, body[data-app="tend"] .tile { background: var(--bg); }
body[data-app="tend"] .step__n, body[data-app="tend"] .isteps li::before { background: var(--tx-y); color: #1B1B1B; }
body[data-app="tend"] .cta { background: radial-gradient(120% 140% at 50% 0%, #1B5290 0%, #003366 58%, #011C38 100%); }

.tend-art { width: 108px; height: auto; overflow: visible; }
.td-win { fill: var(--tx-pale); stroke: var(--brand); stroke-width: 2; }
.td-mull { fill: none; stroke: var(--brand); stroke-width: 1.6; opacity: .6; }
.td-sun { fill: var(--tx-y); animation: tdsun 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.td-sill { fill: var(--brand); opacity: .85; }
.td-rod { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; } .td-knob { fill: var(--brand); }
.td-cloth { fill: var(--tx-y); }
.td-fold path { fill: none; stroke: color-mix(in srgb, var(--tx-amber) 40%, transparent); stroke-width: 1.6; stroke-linecap: round; }
.td-cur { transform-box: view-box; animation: tdcur 9s cubic-bezier(.6, 0, .25, 1) infinite; }
.td-cur--l { transform-origin: 12px 0; } .td-cur--r { transform-origin: 128px 0; }
@keyframes tdcur { 0%, 10% { transform: scaleX(1); } 34%, 76% { transform: scaleX(.22); } 100% { transform: scaleX(1); } }
@keyframes tdsun { from { transform: scale(.92); } to { transform: scale(1.1); } }

/* the little board */
.tx { display: grid; gap: 14px; justify-items: center; width: 100%; }
.tx__phone { width: 100%; max-width: 380px; padding: 20px 16px 22px; border-radius: 34px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 30px 60px -34px rgba(0, 51, 102, .55); position: relative; overflow: hidden; }
.tx__head { padding: 0 6px; } .tx__title { font-size: 30px; line-height: 1.15; } .tx__date { color: var(--muted); font-size: 13.5px; }
.tx__week { margin-top: 12px; padding: 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.tx__top { display: flex; align-items: center; gap: 14px; }
.tx__ring { position: relative; width: 52px; height: 52px; flex: none; }
.tx__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 4.5; }
.tx__ring-bg { stroke: var(--line); } .tx__ring-fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .7s var(--ease); }
.tx__ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.tx__wk { font-family: var(--round); font-size: 17px; line-height: 1.35; }
.tx__slide { position: relative; height: 44px; margin-top: 12px; border-radius: 99px; background: color-mix(in srgb, var(--tx-y) 22%, var(--bg)); overflow: hidden; }
.tx__slide-t { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 34px; font-size: 14px; color: var(--muted); pointer-events: none; transition: opacity .3s; }
.tx__slide input { position: absolute; left: 4px; top: 0; width: calc(100% - 8px); height: 100%; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: grab; touch-action: pan-y; }
.tx__slide input:disabled { cursor: default; opacity: .5; }
.tx__slide input::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.tx__slide input::-moz-range-track { height: 44px; background: transparent; }
.tx__slide input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; margin-top: 4px; border: 0; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.tx__slide input::-moz-range-thumb { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
html[data-theme="dark"] .tx__slide input::-webkit-slider-thumb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141311' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
html[data-theme="dark"] .tx__slide input::-moz-range-thumb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141311' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.tx__slide input:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 99px; }
.tx__list { margin-top: 14px; display: grid; gap: 10px; }
.tx__row { position: relative; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); outline-offset: 2px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tx__bg { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .2s; }
.tx__bg-r, .tx__bg-l { position: absolute; top: 0; bottom: 0; display: none; align-items: center; } .tx__bg-r { left: 0; padding-left: 20px; } .tx__bg-l { right: 0; padding-right: 20px; }
.tx__row[data-dir="r"] .tx__bg { opacity: 1; background: var(--brand); color: var(--btn-fg); } .tx__row[data-dir="r"] .tx__bg-r { display: flex; }
.tx__row[data-dir="l"] .tx__bg { opacity: 1; background: var(--tx-y); color: #1B1B1B; } .tx__row[data-dir="l"] .tx__bg-l { display: flex; }
.tx__row.is-armed .tx__bg { filter: saturate(1.25) brightness(1.04); }
.tx__in { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); transition: transform .28s var(--ease); cursor: grab; }
.tx__row.is-drag .tx__in { transition: none; cursor: grabbing; }
.tx__ic { position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0); }
.tx__ic::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--tx-pale); }
.tx__ic i { position: relative; font-style: normal; font-size: 20px; line-height: 1; }
.tx__row.is-late .tx__ic { background: conic-gradient(var(--tx-y) 100%, var(--tx-y) 0); }
.tx__row.is-done .tx__ic { background: var(--brand); } .tx__row.is-done .tx__ic::before { background: var(--card); opacity: .9; }
.tx__txt { flex: 1; min-width: 0; display: grid; gap: 1px; } .tx__txt b { font-weight: 600; font-size: 16px; line-height: 1.3; }
.tx__txt small { font-size: 13px; color: var(--brand); } .tx__row.is-late .tx__txt small { color: var(--tx-amber); font-weight: 600; }
.tx__row.is-done .tx__txt b { opacity: .6; }
.tx__chk { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.6px solid var(--line-strong); background: transparent; cursor: pointer; position: relative; transition: background .25s, border-color .25s, transform .2s; }
.tx__chk:hover { border-color: var(--brand); } .tx__chk:active { transform: scale(.9); }
.tx__chk::after { content: ""; position: absolute; left: 11px; top: 7px; width: 8px; height: 14px; border: solid var(--line-strong); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); opacity: .6; }
.tx__row.is-done .tx__chk { background: var(--brand); border-color: var(--brand); } .tx__row.is-done .tx__chk::after { border-color: var(--tx-chk); opacity: 1; }
.tx__post { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); border: 0; background: color-mix(in srgb, var(--tx-y) 40%, transparent); color: var(--fg); padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.tx__row:hover .tx__post, .tx__row:focus-within .tx__post { opacity: 1; pointer-events: auto; }
@media (hover: none) { .tx__post { display: none; } }
.tx__toast { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 99px; background: #1B1B1B; color: #F8F4EA; font-size: 13.5px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
.tx__toast[hidden] { display: none; } .tx__toast.in { animation: txtoast .4s var(--ease) both; }
.tx__toast button { border: 0; background: transparent; color: #F6D766; font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 2px 4px; flex: none; }
@keyframes txtoast { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tx__reset { padding: .5em 1.3em; font-size: 14.5px; }
@media (prefers-reduced-motion: reduce) {
  .td-cur, .td-sun { animation: none; } .td-cur { transform: scaleX(.22); }
  .tx__in, .tx__ring-fg { transition: none; } .tx__toast.in { animation: none; }
}
/* works: link-only cards stay compact instead of stretching to the tall feature card beside them */
.work:not(.work--feature) { align-self: start; }
.work:not(.work--feature) .work__card { gap: 12px; }

/* ── 16. Stub — paper ticket, night-park navy, a little gold ── */
html[data-theme="light"] body[data-app="stub"] { --bg: #FBFBF8; --fg: #0C2340; --muted: #5C6779; --brand: #0C2340; --line: rgba(12, 35, 64, .14);
  --card: #F4F1E7; --btn-bg: #0C2340; --btn-fg: #fff; --gold: #C28A00; --gold-l: #F6C344; --tk: #F8F6F0; --tk-ink: #0C2340; background: #FBFBF8; }
html[data-theme="dark"] body[data-app="stub"] { --bg: #0A1426; --fg: #EEF1F7; --muted: #9CA8BD; --brand: #F6C344; --line: rgba(238, 241, 247, .16);
  --card: #11203A; --btn-bg: #F6C344; --btn-fg: #0A1426; --gold: #F6C344; --gold-l: #F6C344; --tk: #F8F6F0; --tk-ink: #0C2340; background: #0A1426; }
body[data-app="stub"] :is(.pp-h2, .feat__title, .step__title, .cta__title, .pp-hero__sub, .tile h3, .pp-name, .qa__q, .extras__t) { font-weight: 800; letter-spacing: .02em; }
body[data-app="stub"] .pp-name { letter-spacing: .22em; font-weight: 800; }
body[data-app="stub"] .pcard--note { background: var(--tk); color: var(--tk-ink); border: 1.5px dashed rgba(12, 35, 64, .35); border-radius: 10px; box-shadow: 0 12px 22px -16px rgba(12, 35, 64, .5); }
body[data-app="stub"] .pcard--note .pcard__d { color: #5C6779; }
body[data-app="stub"] .pp-sec--tint { background: var(--card); }
body[data-app="stub"] .install.pp-sec--tint .install__card, body[data-app="stub"] .tile { background: var(--bg); }
body[data-app="stub"] .step__n, body[data-app="stub"] .isteps li::before { background: var(--gold-l); color: #0C2340; }
body[data-app="stub"] .cta { background: radial-gradient(120% 140% at 50% 0%, #1D4378 0%, #0C2340 60%, #050E1D 100%); }

.stub-art { width: 118px; height: auto; overflow: visible; }
.sb-p { fill: var(--tk); stroke: var(--brand); stroke-width: 1.8; stroke-linejoin: round; }
.sb-star { fill: var(--gold-l); stroke: none; }
.sb-dash { fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-dasharray: 2.5 4; stroke-linecap: round; opacity: .7; }
.sb-stub { transform-box: view-box; transform-origin: 154px 70px; animation: sbtear 6.5s cubic-bezier(.5, 0, .2, 1) infinite; }
@keyframes sbtear { 0%, 22% { transform: none; } 34%, 62% { transform: translate(7px, 1px) rotate(10deg); } 80%, 100% { transform: none; } }

/* the little game + ticket */
.sx { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(18px, 3vw, 36px); max-width: 980px; margin-inline: auto; align-items: start; }
.sx__play { display: grid; gap: 12px; justify-items: center; }
.sx__modes { justify-self: stretch; justify-content: center; flex-wrap: wrap; }
.sx__stage { width: 100%; min-height: 360px; padding: 22px 20px 20px; border-radius: 28px; background: #0C2340; color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; position: relative; overflow: hidden; outline-offset: 3px; user-select: none; -webkit-user-select: none; }
html[data-theme="dark"] .sx__stage { background: #11203A; border: 1px solid var(--line); }
.sx__tag { font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--gold-l); }
.sx__sub { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.sx__big { font-size: clamp(21px, 3.6vw, 27px); font-weight: 800; line-height: 1.5; padding-inline: 6px; text-wrap: balance; }
.sx__big b { display: inline-block; margin: 2px 0; color: var(--gold-l); font-size: .8em; letter-spacing: .12em; }
.sx__big--s { font-size: clamp(19px, 3.2vw, 23px); }
.sx__hint { font-size: 12.5px; color: rgba(255, 255, 255, .5); letter-spacing: .08em; margin-top: 6px; }
.sx__num { font-family: var(--latin); font-size: 74px; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; transition: color .3s; }
.sx__num.is-hot { color: #FF5A63; animation: sxpulse .5s ease-in-out infinite alternate; }
@keyframes sxpulse { to { transform: scale(1.08); } }
.sx__boom { font-size: 64px; line-height: 1; animation: sxboom .6s var(--ease) both; }
@keyframes sxboom { from { transform: scale(.2) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.25); } to { transform: none; opacity: 1; } }
.sx__stage[data-mode="1b"] { animation: sxflash .5s ease-out; }
@keyframes sxflash { 0% { box-shadow: inset 0 0 0 999px rgba(255, 90, 99, .5); } 100% { box-shadow: inset 0 0 0 999px rgba(255, 90, 99, 0); } }
.sx__go { margin-top: 8px; border: 0; background: var(--gold-l); color: #0C2340; font-weight: 800; padding: .6em 1.6em; border-radius: 99px; cursor: pointer; font-size: 15px; }
.sx__lr { width: 100%; display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.sx__lr button { flex: 1; border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; padding: .6em 1em; border-radius: 99px; font-weight: 700; cursor: pointer; font-size: 15px; }
.sx__lr button:last-child { background: #fff; color: #0C2340; border-color: #fff; }
.sx__reset { padding: .45em 1.2em; font-size: 14px; }

.sx__ticket { position: relative; padding: 20px 22px 18px; color: var(--tk-ink); background: var(--tk); transform: rotate(-1.5deg); box-shadow: 0 24px 40px -26px rgba(12, 35, 64, .6);
  -webkit-mask: radial-gradient(circle 7px at 7px 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at calc(100% - 7px) 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 7px at 7px 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at calc(100% - 7px) 50%, transparent 98%, #000) right / 51% 100% no-repeat; border-radius: 6px; }
.tk__top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; padding-bottom: 12px; border-bottom: 1.5px dashed rgba(12, 35, 64, .3); }
.tk__place { font-weight: 800; font-size: 16px; } .tk__date { font-size: 13px; color: #5C6779; font-variant-numeric: tabular-nums; }
.tk__stamp { position: absolute; right: 16px; top: 52px; transform: rotate(6deg); border: 2px solid #C23B3B; color: #C23B3B; font-weight: 800; font-size: 13px; padding: 2px 9px; border-radius: 6px; background: var(--tk); animation: sxboom .5s var(--ease) both; }
.tk__empty { padding: 34px 6px; text-align: center; color: #5C6779; font-size: 15px; }
.tk__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; } .tk__row span { font-size: 13px; color: #5C6779; font-weight: 600; } .tk__row b { font-size: 18px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.tk__pens { margin-top: 6px; padding-top: 10px; border-top: 1.5px dashed rgba(12, 35, 64, .3); } .tk__pens p { font-size: 12.5px; font-weight: 700; color: #5C6779; margin-bottom: 4px; }
.tk__pens li { font-size: 13px; line-height: 1.6; } .tk__pens li::before { content: "· "; }
.tk__bar { height: 34px; margin-top: 14px; background: repeating-linear-gradient(90deg, #0C2340 0 2px, transparent 2px 5px, #0C2340 5px 6px, transparent 6px 10px, #0C2340 10px 13px, transparent 13px 15px); opacity: .85; }
@media (max-width: 800px) { .sx { grid-template-columns: 1fr; } .sx__ticket { max-width: 420px; justify-self: center; width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .sb-stub { animation: none; transform: translate(7px, 1px) rotate(10deg); } .sx__num.is-hot, .sx__boom, .tk__stamp, .sx__stage[data-mode="1b"] { animation: none; }
}

/* works: every full-page card is the same size, in 3 / 2 / 1 columns; the phone is a fixed size so it never depends on card width */
.work--feature, .work--feature:nth-child(3) { grid-column: auto !important; }
.work--feature .work__card, .work--feature:nth-child(3) .work__card { min-height: 0; }
.work--feature .work__peek { width: 200px; margin: auto auto -183px; padding-top: 22px; box-sizing: content-box; }
.work--feature .work__go { margin-bottom: 22px; }
@media (max-width: 600px) { .work--feature .work__peek { width: 190px; margin-bottom: -174px; } }

/* ── 17. TAN — ledger paper, ink, one red seal ─────────────── */
html[data-theme="light"] body[data-app="tan"] { --bg: #F6F1E7; --fg: #1C1813; --muted: #6E6558; --brand: #1C1813; --line: #E2D9C8; --card: #FDFAF3; --tint: #EFE8D8;
  --btn-bg: #1C1813; --btn-fg: #F6F1E7; --seal: #A63A2B; --seal-t: #F3E3DE; --green: #3E5C43; background: #F6F1E7; }
html[data-theme="dark"] body[data-app="tan"] { --bg: #1C1813; --fg: #F1EBDD; --muted: #A59C8B; --brand: #F1EBDD; --line: rgba(241, 235, 221, .16); --card: #26211A; --tint: #221D16;
  --btn-bg: #F1EBDD; --btn-fg: #1C1813; --seal: #E0705F; --seal-t: #3A231F; --green: #8FB596; background: #1C1813; }
body[data-app="tan"] :is(.pp-h2, .feat__title, .step__title, .cta__title, .pp-hero__sub, .tile h3, .pp-name, .qa__q, .extras__t, .nx__head) { font-family: "Noto Serif TC", "Songti TC", "Source Han Serif TC", "PMingLiU", serif; font-weight: 700; letter-spacing: .01em; }
body[data-app="tan"] .pp-name { font-weight: 900; letter-spacing: .12em; }
body[data-app="tan"] .pp-sec--tint { background: var(--tint); }
body[data-app="tan"] .install.pp-sec--tint .install__card, body[data-app="tan"] .tile { background: var(--card); }
body[data-app="tan"] .pcard--note { background: var(--card); color: var(--fg); border: 1px dashed rgba(110, 101, 88, .55); border-radius: 4px; box-shadow: 0 12px 22px -16px rgba(28, 24, 19, .45); }
body[data-app="tan"] .pcard--note .pcard__d { color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: .86em; }
body[data-app="tan"] .step__n, body[data-app="tan"] .isteps li::before { background: var(--seal); color: #fff; }
body[data-app="tan"] .cta { background: radial-gradient(120% 140% at 50% 0%, #3B3226 0%, #1C1813 62%, #0F0D0A 100%); }
body[data-app="tan"] .cta .btn--primary { background: #F6F1E7; color: #1C1813; }

.tan-art { width: 128px; height: auto; overflow: visible; }
.tn-p { fill: var(--card); stroke: var(--fg); stroke-width: 1.8; stroke-linejoin: round; }
.tn-dash { fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-dasharray: 2.5 4; stroke-linecap: round; opacity: .5; }
.tn-bar { fill: var(--fg); opacity: .8; } .tn-bar--s { opacity: .35; } .tn-bar--m { opacity: .22; }
.tn-dot { fill: var(--seal); } .tn-dot--b { fill: var(--green); } .tn-dot--c { fill: var(--fg); opacity: .7; }
.tn-stamp { transform-box: fill-box; transform-origin: center; transform: rotate(-12deg); animation: tnstamp 5.2s cubic-bezier(.3, 1.5, .5, 1) infinite; }
.tn-stamp circle { fill: var(--seal-t); stroke: var(--seal); stroke-width: 2; } .tn-stamp .tn-ring { fill: none; stroke-width: 1; }
.tn-stamp text { fill: var(--seal); font-family: "Noto Serif TC", "Songti TC", serif; font-weight: 900; font-size: 21px; }
@keyframes tnstamp { 0%, 14% { opacity: 0; transform: translateY(-8px) rotate(-12deg) scale(1.8); } 24% { opacity: 1; transform: rotate(-12deg) scale(.94); } 30%, 84% { opacity: 1; transform: rotate(-12deg) scale(1); } 96%, 100% { opacity: 0; transform: rotate(-12deg) scale(1); } }

/* the settle calculator */
.nx { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(18px, 3vw, 34px); max-width: 1000px; margin-inline: auto; align-items: start; }
.nx__book { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 14px; box-shadow: 0 22px 40px -32px rgba(28, 24, 19, .5); }
.nx__cap { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); padding: 0 2px 8px; }
.nx__ex { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 2px 12px; border-top: 1px dashed var(--line); }
.nx__ex:first-child { border-top: 0; }
.nx__cat { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: "Noto Serif TC", "Songti TC", serif; font-weight: 700; font-size: 15px; background: var(--tint); color: var(--fg); border: 1px solid var(--line); }
.nx__n { font-weight: 700; font-size: 15.5px; line-height: 1.3; } .nx__p { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.nx__a { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums; }
.nx__chips { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nx__chip { border: 1.5px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; min-height: 34px; padding: 0 .95em; border-radius: 99px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.nx__chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.nx__chip:focus-visible, .nx__rule button:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
@media (pointer: coarse) { .nx__chip { min-height: 40px; } }
.nx__msg { min-height: 1.4em; font-size: 13px; color: var(--seal); font-weight: 600; padding: 4px 2px 0; }

.nx__out { position: relative; padding: 20px 20px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 40px -32px rgba(28, 24, 19, .5); overflow: hidden; }
.nx__rule { display: flex; gap: 4px; padding: 3px; border-radius: 99px; background: var(--tint); border: 1px solid var(--line); margin-bottom: 14px; }
.nx__rule button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: .55em .4em; border-radius: 99px; cursor: pointer; transition: background .2s, color .2s; }
.nx__rule button[aria-checked="true"] { background: var(--fg); color: var(--bg); }
.nx__head { font-size: 19px; line-height: 1.3; margin-bottom: 4px; }
.nx__tr { display: grid; }
.nx__tr li { display: grid; grid-template-columns: minmax(0, auto) auto minmax(0, auto) 1fr; align-items: baseline; gap: 6px; padding: 11px 0; border-top: 1px dashed var(--line); font-size: 15px; animation: nxin .35s ease-out both; }
.nx__tr li:first-child { border-top: 0; }
.nx__who { font-weight: 700; overflow-wrap: anywhere; } .nx__arr { color: var(--seal); font-weight: 700; }
.nx__tr b { justify-self: end; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-weight: 500; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes nxin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.nx__total { margin-top: 10px; padding-top: 12px; border-top: 1.5px solid var(--fg); font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 13.5px; color: var(--muted); }
.nx__foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.nx__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; } .nx__btns .btn { padding: .5em 1.3em; font-size: 14.5px; }
.nx__btns .btn:disabled { opacity: .45; cursor: default; }
.nx__seal { position: absolute; right: 18px; bottom: 16px; width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--seal); display: grid; place-items: center; color: var(--seal); background: color-mix(in srgb, var(--seal-t) 70%, transparent);
  font-family: "Noto Serif TC", "Songti TC", serif; font-weight: 900; font-size: 24px; transform: rotate(-14deg) scale(.5); opacity: 0; pointer-events: none; box-shadow: inset 0 0 0 4px transparent, inset 0 0 0 5px var(--seal); }
.nx__out.is-stamped .nx__seal { opacity: .92; transform: rotate(-14deg) scale(1); animation: nxseal .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes nxseal { from { opacity: 0; transform: rotate(-14deg) scale(2); } to { opacity: .92; transform: rotate(-14deg) scale(1); } }
@media (max-width: 800px) { .nx { grid-template-columns: 1fr; } }
html[lang="en"] .nx__seal { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; font-family: var(--latin); }
@media (max-width: 420px) { .nx__seal { width: 72px; height: 72px; font-size: 20px; } html[lang="en"] .nx__seal { font-size: 11px; letter-spacing: .02em; } .nx__book, .nx__out { padding-inline: 14px; } .nx__chips { grid-column: 1 / -1; } .nx__chip { padding: 0 .8em; } }
@media (prefers-reduced-motion: reduce) {
  .tn-stamp { animation: none; opacity: 1; } .nx__tr li, .nx__out.is-stamped .nx__seal { animation: none; }
}

/* card taglines: balance the lines so a single character never hangs on the second one */
.work--feature .work__tag { max-width: 14em; text-wrap: balance; }
.badge--beta { background: transparent; color: var(--fg); border: 1.5px solid var(--fg); }

/* ── 18 · phones and touch: bigger tap targets, no tiny print ───────────── */
.tcard__cat { font-size: max(.72em, 11px); } .tcard__d { font-size: max(.78em, 11px); }
.sheet__tip, .sheet__count { font-size: max(.74em, 11.5px); } .sheet__foot { font-size: max(.78em, 11.5px); }
.btn small { font-size: max(.74em, 11.5px); }
@media (pointer: coarse), (max-width: 700px) {
  .tool { height: 44px; min-width: 44px; }
  .btn { min-height: 44px; } .btn--sm { min-height: 40px; }
  .tabs button { min-height: 40px; } .tabs--sm button { min-height: 36px; }
  .nx__rule button { min-height: 40px; }
  .brand, .link-arrow, .hero__skip, .subnav__name { position: relative; }
  .brand::after, .link-arrow::after, .hero__skip::after, .subnav__name::after { content: ""; position: absolute; inset: -10px -8px; }
}
a, button, [role="tab"], [role="radio"], summary, label { touch-action: manipulation; -webkit-tap-highlight-color: rgba(0, 51, 102, .12); }
.footer { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 700px) and (orientation: landscape) { body { padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); } }

/* ── 19 · Grace Studio house style ───────────────────────────────────────────
   Same language as the studio's own website: Helvetica Neue / Noto Sans TC, navy #003366, hairline rules,
   square corners, small tracked labels, an underline that grows on hover. Soft and round stays inside each app's own page. */
:root {
  --font: "Helvetica Neue", Helvetica, Futura, "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", "Heiti TC", Arial, sans-serif;
  --latin: "Helvetica Neue", Helvetica, Futura, "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --navy-lt: #1A4E8A;
}
.nw { white-space: nowrap; }

/* the wordmark — exactly the website's: 16px, .3em, GRACE light / STUDIO bold */
.brand__word { font-size: 16px; letter-spacing: .3em; }
.brand__word .light { font-weight: 300; } .brand__word .bold { font-weight: 700; }
.brand--sm .brand__word { font-size: 13px; }
.logo-mark { height: 32px; } .brand--sm .logo-mark { height: 26px; }

/* top bar: text links that underline on hover, square hairline tools */
.nav__links { gap: 32px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.nav__links a { position: relative; color: var(--fg); padding: 4px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); }
.nav__tools { gap: 8px; margin-left: 12px; }
.tool { border-radius: 0; height: 36px; min-width: 36px; font-size: 12px; letter-spacing: .15em; font-weight: 500; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.tool:hover { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.burger { display: none; width: 40px; height: 36px; border: 1px solid var(--line); background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--fg); transition: transform .3s var(--ease), opacity .2s; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.drawer { display: none; }
@media (max-width: 720px) {
  .burger { display: inline-flex; }
  .drawer { display: block; position: fixed; inset: var(--nav-h) 0 0; z-index: 99; background: var(--bg); padding: 12px 24px calc(40px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
            opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
  body.menu-open .drawer { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  body.menu-open { overflow: hidden; }
  .drawer a { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; letter-spacing: .08em; text-decoration: none; color: var(--fg); }
  .nav__tools { margin-left: auto; }
}

/* buttons, badges, cards: square, hairline, tracked */
.btn { border-radius: 0; font-size: 13px; letter-spacing: .14em; font-weight: 500; padding: 1.05em 1.9em; border-width: 1px; }
.btn--sm { font-size: 12px; padding: .75em 1.3em; }
.btn--lg { font-size: 13px; padding: 1.2em 2.2em; }
.btn:hover { transform: none; }
.btn--primary { border-color: var(--btn-bg); }
.btn--primary:hover { background: var(--navy-lt); border-color: var(--navy-lt); color: #fff; }
html[data-theme="dark"] .btn--primary:hover { background: #fff; border-color: #fff; color: #0A1B38; }
.btn--ghost { border-color: var(--brand); color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: var(--bg); }
.btn:not(.is-disabled):hover > span[aria-hidden="true"] { transform: translateX(3px); }
.btn > span[aria-hidden="true"] { display: inline-block; transition: transform .35s var(--ease); }
.badge { border-radius: 0; font-size: 12px; letter-spacing: .14em; padding: 4px 10px; font-weight: 500; }
.badge--soon { transform: none; }
.skip { border-radius: 0; }
.work__card { border-radius: 0; border: 1px solid var(--line); }
.tile, .install__card { border-radius: 0; }
.tile:nth-child(odd), .tile:nth-child(even) { transform: none; }
.link-arrow { font-size: 12px; letter-spacing: .16em; font-weight: 500; }
.hero__eyebrow, .pp-eyebrow { letter-spacing: .3em; }

/* headlines: the studio's type, not a round one — light for the big statements, bold navy for titles */
.hero__title, .line, .turn__title, .closing__title { font-family: var(--font); font-weight: 300; letter-spacing: .02em; }
.sec-title, .work__name { font-family: var(--font); font-weight: 700; letter-spacing: .03em; color: var(--brand); }
.work--feature .work__name { letter-spacing: .04em; }
.about .sec-title { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.3; }
@media (max-width: 420px) { .about .sec-title { font-size: 28px; } }

/* motion: one curve everywhere, a little quicker, and none of it blocks the page */
html.js .reveal { transform: translateY(16px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
@media (prefers-reduced-motion: reduce) { .nav__links a::after, .btn > span[aria-hidden="true"], .drawer, .burger span { transition: none; } }
@media (pointer: coarse), (max-width: 700px) { .tool, .burger { height: 44px; min-width: 44px; } .btn { min-height: 44px; } .btn--sm { min-height: 40px; } }
@media (max-width: 720px) { .brand__word { font-size: 13px; letter-spacing: .22em; } .brand { gap: 10px; } .logo-mark { height: 28px; } .nav__tools { gap: 6px; } }

/* performance: story chapters that are off screen are not styled, laid out or painted (their height is fixed, so nothing jumps) */
.chap { content-visibility: auto; contain-intrinsic-size: auto calc(100svh + (var(--k) + 1.5) * 56svh); }

/* home: the sky is one fixed layer that cross-fades between the hours (cheap), the text colours switch once */
body[data-page="home"] { background: transparent; }
.sky { position: fixed; inset: 0; z-index: -1; background: var(--bg); transition: background-color .9s var(--ease); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sky { transition: none; } }

/* 20 · share image: a quiet strip on each app page, and a dialog that shows the card before it is saved */
.sharebar { padding-block: clamp(36px, 6vw, 64px); border-top: 1px solid var(--line); }
.sharebar__in { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; }
.sharebar__t { margin: 0 0 6px; font: 700 14px/1.4 var(--font, inherit); letter-spacing: .2em; color: var(--brand); }
.sharebar__d { margin: 0; max-width: 34em; font-size: 15px; line-height: 1.7; color: var(--muted); }
.sharedlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 0; background: var(--bg); color: var(--fg); overflow: auto; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.sharedlg::backdrop { background: rgba(8, 14, 28, .62); }
.sharedlg[open] { animation: shdlg .35s var(--ease, ease) both; }
@keyframes shdlg { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sharedlg__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sharedlg__sizes { margin: 0; border-radius: 0; background: transparent; padding: 0; gap: 0; }
.sharedlg__sizes button { border-radius: 0; font-size: 12px; letter-spacing: .12em; padding: .5em 1.1em; border: 1px solid var(--line); margin-left: -1px; }
.sharedlg__sizes button:first-child { margin-left: 0; }
.sharedlg__x { width: 44px; height: 44px; border: 0; background: transparent; color: var(--fg); font-size: 26px; line-height: 1; cursor: pointer; }
.sharedlg__x:hover { color: var(--brand); }
.sharedlg__stage { display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--fg) 5%, var(--bg)); }
.sharedlg__stage canvas { display: block; max-width: 100%; max-height: min(62vh, 640px); width: auto; height: auto; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.sharedlg__err { margin: 0; padding: 12px 16px; font-size: 14px; line-height: 1.6; color: #a63a2b; border-top: 1px solid var(--line); }
.sharedlg__act { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sharedlg__act .btn { flex: 1 1 140px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .sharedlg[open] { animation: none; } }

/* 21 · recent updates: a plain ledger, newest first */
.updates { padding: 0 0 clamp(64px, 9vw, 120px); }
.updates__in { width: min(var(--wrap), 100% - 48px); margin: 0 auto; }
.updates__list { list-style: none; margin: clamp(20px, 3vw, 32px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.upd { border-bottom: 1px solid var(--line); }
.upd__a { position: relative; display: grid; grid-template-columns: 96px 1fr auto; align-items: baseline; gap: 4px 24px; padding: 18px 0; color: inherit; text-decoration: none; }
.upd__d { display: flex; flex-direction: column; font-style: normal; line-height: 1.2; }
.upd__d b { font: 700 15px/1.2 var(--font, inherit); letter-spacing: .14em; color: var(--brand); }
.upd__d i { font-style: normal; font-size: 11px; letter-spacing: .2em; color: var(--muted); margin-top: 4px; }
.upd__m { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.upd__t { font-size: 16px; font-weight: 500; letter-spacing: .04em; color: var(--fg); }
.upd__b { font-size: 14px; line-height: 1.7; color: var(--muted); }
.upd__go { align-self: center; color: var(--brand); transition: transform .35s var(--ease, ease); }
a.upd__a:hover .upd__go, a.upd__a:focus-visible .upd__go { transform: translateX(6px); }
a.upd__a:hover .upd__t { color: var(--brand); }
a.upd__a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) { .upd__a { grid-template-columns: 1fr auto; padding: 16px 0; min-height: 56px; } .upd__d { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; } .upd__d i { margin-top: 0; } .upd__m { grid-column: 1; } .upd__go { grid-column: 2; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { .upd__go { transition: none; } }
.updates .sec-title { font-size: clamp(24px, 2.6vw, 34px); }
.sharebar__btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) { .sharebar__btns { width: 100%; } .sharebar__btns .btn { flex: 1 1 0; justify-content: center; } .sharedlg__sizes button { padding: .5em .8em; letter-spacing: .06em; } }
