/* Winkpass Creations: site styles */
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --surface: #fffdf9;
  --ink: #17141d;
  --ink-2: #514b5a;
  --ink-3: #7a7382;
  --line: rgba(23, 20, 29, .11);
  --blue: #2f6bff;
  --shadow: 0 1px 2px rgba(23, 20, 29, .06), 0 12px 40px -12px rgba(23, 20, 29, .18);
  --radius: 28px;
  --display: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);

  --iperiod-bg: linear-gradient(145deg, #ffe7ef 0%, #ffd3e1 55%, #ffc1d5 100%);
  --iperiod-accent: #d63a72;
  --mirror-bg: linear-gradient(160deg, #f4f7fb 0%, #dfe7f1 60%, #cfd9e7 100%);
  --run-bg: linear-gradient(150deg, #fff0e3 0%, #ffd9bf 100%);
  --run-accent: #e2531f;
  --knot-bg: linear-gradient(150deg, #e8efff 0%, #d4e1ff 100%);
  --knot-accent: #1d4fb3;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c0b10;
    --paper-2: #14121a;
    --surface: #1a1822;
    --ink: #f4f0e9;
    --ink-2: #bdb6c6;
    --ink-3: #8c8595;
    --line: rgba(255, 255, 255, .1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 50px -18px rgba(0, 0, 0, .8);
    --iperiod-bg: linear-gradient(145deg, #3b1428 0%, #2a0e1d 100%);
    --iperiod-accent: #ff7aa8;
    --mirror-bg: linear-gradient(160deg, #232a35 0%, #161b23 100%);
    --run-bg: linear-gradient(150deg, #3a1d10 0%, #22110a 100%);
    --run-accent: #ff8a5c;
    --knot-bg: linear-gradient(150deg, #132449 0%, #0c1730 100%);
    --knot-accent: #8fb2ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; letter-spacing: -.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--text); text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-light { background: #fff; color: #111; }
.btn-gold { background: #ffcf3f; color: #2b1a00; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; padding: 4px 0; font: 600 15px/1.3 var(--text); text-decoration: none; border-bottom: 1.5px solid currentColor; cursor: pointer; }
.link-light { color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { background: #ffd23f; color: #111; border-color: transparent; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--display); letter-spacing: -.03em; }
.brand-mark { width: 48px; height: 28px; }
.brand-full img { width: 150px; height: auto; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav-actions { margin-left: auto; }
}

/* ---------- Language switcher ---------- */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 700 13px/1 var(--text); letter-spacing: .04em; position: relative; overflow: hidden; isolation: isolate; transition: border-color .2s, box-shadow .2s; }
.lang-btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: conic-gradient(from var(--spin, 0deg), #e5487f, #ff8a3d, #ffd23f, #3ddc84, #2f6bff, #7a4dff, #e5487f); opacity: 0; transition: opacity .3s; }
.lang-btn::after { content: ""; position: absolute; inset: 1.5px; z-index: -1; border-radius: inherit; background: var(--surface); }
.lang-btn:hover::before, .lang.is-open .lang-btn::before, .lang.is-switching .lang-btn::before { opacity: 1; animation: lang-spin 2.4s linear infinite; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes lang-spin { to { --spin: 360deg; } }
.lang-globe { width: 18px; height: 18px; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.lang-btn:hover .lang-globe, .lang.is-open .lang-globe { transform: rotate(200deg); }
.lang-code { min-width: 1.4em; text-align: center; }
.lang-chev { width: 12px; height: 12px; opacity: .6; transition: transform .25s; }
.lang.is-open .lang-chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 90; width: min(360px, calc(100vw - 32px)); padding: 10px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); animation: lang-in .22s cubic-bezier(.2, .8, .2, 1); transform-origin: top right; }
[dir="rtl"] .lang-menu { transform-origin: top left; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.lang-menu ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lang-menu button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: none; text-align: start; transition: background .15s, border-color .15s; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--paper-2); outline: none; }
.lang-menu button.is-on { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.lang-native { font-weight: 650; font-size: 15px; }
.lang-en { font-size: 12px; color: var(--ink-3); }
@media (max-width: 520px) {
  .nav-store-label { display: none; }
  .nav-actions .btn-sm { padding: 0 12px; }
  .nav-inner { gap: 12px; }
  .brand { font-size: 20px; }
}

/* Hide the page briefly while a non-English translation loads (i18n-boot.js). */
.i18n-pending main, .i18n-pending .nav-links, .i18n-pending .footer { opacity: 0; }
main, .nav-links, .footer { transition: opacity .2s ease; }

/* Non-Latin scripts: never letter-space Arabic (it breaks joining); give CJK room to breathe. */
:lang(ar) *, :lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0 !important; }
:lang(ar) body { line-height: 1.75; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { line-height: 1.3; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(zh-Hant) h1, :lang(zh-Hant) h2, :lang(zh-Hant) h3 { letter-spacing: 0; line-height: 1.25; }
:lang(ja) h1, :lang(ja) h2 { word-break: auto-phrase; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) p { word-break: keep-all; }
:lang(ja) body, :lang(zh-Hant) body { line-break: strict; }
:lang(ru) .hero h1, :lang(de) .hero h1 { hyphens: auto; }
:lang(ar) .kicker, :lang(ja) .kicker, :lang(ko) .kicker, :lang(zh-Hant) .kicker { letter-spacing: .04em; }
[dir="rtl"] .card-top, [dir="rtl"] .rating { direction: rtl; }
[dir="rtl"] .shot { transform: rotate(-2deg) translateY(10px); }
[dir="rtl"] .card:hover .shot { transform: none; }
.daily-answer, .daily-tiles { direction: ltr; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(47, 107, 255, .16), transparent 70%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #2bd576; box-shadow: 0 0 0 4px rgba(43, 213, 118, .2); }
.hero h1 { font-size: clamp(44px, 7.2vw, 92px); margin: 22px 0 22px; letter-spacing: -.035em; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #e5487f 0%, #ff8a3d 35%, #2f6bff 75%, #7a4dff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 36em; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.store-row-center { justify-content: center; }
.badge { display: inline-block; border-radius: 10px; transition: transform .2s; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 50px; width: auto; }
.stats { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 36px; margin: 40px 0 0; justify-content: start; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.stats dd { margin: 0; font: 700 clamp(26px, 3vw, 36px)/1.1 var(--display); letter-spacing: -.02em; }

.hero-art { position: relative; display: grid; place-items: center; }
/* "A day with Winkpass": colours and positions are driven by CSS variables set in site.js. */
.day { width: min(560px, 100%); }
.day-scene {
  --sky-top: #7fc3f7; --sky-bot: #dff2ff; --land-a: #a8d8a8; --land-b: #86c58f; --land-c: #64ad76;
  --wall: #fff6ea; --roof: #e07a5f; --glow: 0; --stars: 0; --cloud: 1; --sun-x: 20%; --sun-y: 40%; --sun-o: 1;
  --moon-x: 70%; --moon-y: 20%; --moon-o: 0; --shade: 0;
  position: relative; aspect-ratio: 4 / 3.3; border-radius: 32px; overflow: hidden; isolation: isolate; cursor: ew-resize; touch-action: pan-y;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 78%);
  box-shadow: 0 30px 60px -30px rgba(40, 30, 80, .45), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.day-scene:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.day-stars { position: absolute; inset: 0 0 35% 0; opacity: var(--stars); transition: opacity .4s; pointer-events: none; }
.day-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 3.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.6); } }
.day-sun, .day-moon { position: absolute; left: var(--x); top: var(--y); width: 15%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; pointer-events: none; }
.day-sun { --x: var(--sun-x); --y: var(--sun-y); opacity: var(--sun-o); background: radial-gradient(circle at 40% 38%, #fffbe6 0%, #ffe07a 42%, #ffb347 100%); box-shadow: 0 0 40px 14px rgba(255, 214, 110, .55), 0 0 120px 40px rgba(255, 180, 90, .25); }
.day-moon { --x: var(--moon-x); --y: var(--moon-y); width: 11%; opacity: var(--moon-o); background: radial-gradient(circle at 62% 38%, #fffdf2 0%, #f1ecd8 60%, #d9d2b8 100%); box-shadow: 0 0 30px 8px rgba(240, 236, 210, .35); }
.day-moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 28% 30%, rgba(0, 0, 0, .08) 0 12%, transparent 13%), radial-gradient(circle at 60% 66%, rgba(0, 0, 0, .06) 0 9%, transparent 10%); }
.day-cloud { position: absolute; height: 9%; border-radius: 999px; background: #fff; opacity: calc(.85 * var(--cloud)); filter: blur(.3px); animation: drift 38s linear infinite; pointer-events: none; }
.day-cloud::before, .day-cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.day-cloud::before { width: 55%; aspect-ratio: 1; left: 14%; bottom: 30%; }
.day-cloud::after { width: 38%; aspect-ratio: 1; left: 48%; bottom: 22%; }
.day-cloud.c1 { width: 24%; top: 16%; left: -30%; }
.day-cloud.c2 { width: 17%; top: 30%; left: -30%; animation-duration: 52s; animation-delay: -20s; }
.day-cloud.c3 { width: 20%; top: 9%; left: -30%; animation-duration: 64s; animation-delay: -41s; }
@keyframes drift { from { left: -30%; } to { left: 110%; } }
.day-land { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.land-a { fill: var(--land-a); } .land-b { fill: var(--land-b); } .land-c { fill: var(--land-c); }
.trunk { fill: color-mix(in srgb, #7a5234, #1a1628 calc(var(--shade) * 70%)); }
.leaf { fill: color-mix(in srgb, #4f9f67, #1d2c3e calc(var(--shade) * 80%)); }
.wall { fill: var(--wall); } .roof { fill: var(--roof); }
.chimney { fill: color-mix(in srgb, #b85a45, #2a2238 calc(var(--shade) * 70%)); }
.door { fill: color-mix(in srgb, #8d5b3f, #1f1a2c calc(var(--shade) * 70%)); }
.glow { fill: #ffd66b; opacity: calc(.18 + .82 * var(--glow)); filter: drop-shadow(0 0 calc(6px * var(--glow)) rgba(255, 214, 107, .9)); }
.day-clock { position: absolute; top: 14px; inset-inline-start: 14px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .72); color: #1d1a26; font: 700 14px/1 var(--text); font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .3); }
.day-card { position: absolute; inset-inline: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; border-radius: 20px; background: rgba(255, 255, 255, .86); color: #1d1a26; backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .4); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
.day-card.is-changing { transform: translateY(10px) scale(.97); opacity: 0; }
.day-card img { width: 48px; height: 48px; border-radius: 24%; flex: none; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.day-card-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.day-time { font-size: 12px; font-weight: 700; color: #6a6478; font-variant-numeric: tabular-nums; }
.day-card strong { font-size: 15px; font-weight: 650; }
.day-open { flex: none; border: 0; border-radius: 999px; padding: 9px 14px; background: #1d1a26; color: #fff; font: 600 13px/1 var(--text); transition: transform .2s; }
.day-open:hover { transform: translateY(-1px); }
.day-track { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); position: relative; }
.day-track::before { content: ""; position: absolute; inset-inline: 26px; top: 50%; height: 2px; background: linear-gradient(90deg, #ffb347, #6cc4ff 45%, #ff9a76 75%, #2b2d5c); opacity: .5; z-index: 0; }
[dir="rtl"] .day-track::before { transform: scaleX(-1); }
.day-track li { position: relative; z-index: 1; }
.day-track button { display: block; padding: 3px; border: 0; border-radius: 30%; background: var(--surface); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), box-shadow .2s; }
.day-track img { width: 40px; height: 40px; border-radius: 24%; opacity: .55; transition: opacity .2s; }
.day-track button:hover img, .day-track button[aria-pressed="true"] img { opacity: 1; }
.day-track button[aria-pressed="true"] { transform: translateY(-3px) scale(1.12); box-shadow: 0 0 0 2px var(--blue); }
.day-hint { margin-top: 12px; text-align: center; font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 520px) {
  .day-scene { border-radius: 24px; aspect-ratio: 4 / 3.8; }
  .day-track img { width: 30px; height: 30px; }
  .day-card strong { font-size: 14px; }
  .day-open { padding: 8px 11px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, auto); }
}

/* ---------- Press marquee ---------- */
.press { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.marquee { display: flex; width: max-content; animation: marquee 48s linear infinite; direction: ltr; }
.marquee:hover { animation-play-state: paused; }
.marquee ul { display: flex; gap: 56px; padding: 22px 28px; }
.marquee li { white-space: nowrap; font-size: 16px; color: var(--ink-2); }
.marquee q { font: 600 italic 18px/1 var(--display); color: var(--ink); quotes: "“" "”"; }
.marquee b { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin-left: 8px; color: var(--ink-3); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head-sm { margin-top: clamp(56px, 8vw, 96px); }
.kicker { font: 700 13px/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.section h2 { font-size: clamp(34px, 5vw, 60px); letter-spacing: -.03em; }
.section-sub { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 40em; }

/* ---------- Bento cards ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.card {
  --card-ink: var(--ink); --card-ink-2: var(--ink-2);
  position: relative; overflow: hidden; border-radius: var(--radius); padding: clamp(24px, 3vw, 36px);
  color: var(--card-ink); display: flex; flex-direction: column; gap: 14px; min-height: 380px; isolation: isolate;
  box-shadow: var(--shadow);
}
.card h3 { font-size: clamp(30px, 3.2vw, 42px); }
.card-lede { color: var(--card-ink-2); font-size: 16.5px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-top img { width: 64px; height: 64px; border-radius: 22%; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .35); }
.tag { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--card-ink) 8%, transparent); color: var(--card-ink); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: auto; padding-top: 8px; }
.rating { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--card-ink-2); }
.stars { --pct: 90%; display: inline-block; width: 86px; height: 16px; background: linear-gradient(90deg, #ffb400 var(--pct), color-mix(in srgb, currentColor 22%, transparent) var(--pct)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 16'%3E%3Cg%3E%3Cpath id='s' d='M8 .8l2.2 4.6 5 .6-3.7 3.4 1 5-4.5-2.5-4.5 2.5 1-5L.8 6l5-.6z'/%3E%3Cuse href='%23s' x='17.5'/%3E%3Cuse href='%23s' x='35'/%3E%3Cuse href='%23s' x='52.5'/%3E%3Cuse href='%23s' x='70'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 16'%3E%3Cg%3E%3Cpath id='s' d='M8 .8l2.2 4.6 5 .6-3.7 3.4 1 5-4.5-2.5-4.5 2.5 1-5L.8 6l5-.6z'/%3E%3Cuse href='%23s' x='17.5'/%3E%3Cuse href='%23s' x='35'/%3E%3Cuse href='%23s' x='52.5'/%3E%3Cuse href='%23s' x='70'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.ticks li { position: relative; padding-inline-start: 28px; margin: 7px 0; color: var(--card-ink-2, var(--ink-2)); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: currentColor; opacity: .14; }
.ticks li::after { content: ""; position: absolute; inset-inline-start: 6px; top: calc(.35em + 4px); width: 5px; height: 9px; border: solid var(--card-ink, var(--ink)); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.card-iperiod, .card-knot { flex-direction: row; gap: 28px; }
.card-iperiod .card-copy, .card-knot .card-copy, .card-spawn .card-copy { display: flex; flex-direction: column; gap: 14px; flex: 1 1 58%; min-width: 0; }
.shot { flex: 0 0 auto; width: 38%; max-width: 250px; height: auto; max-height: 400px; object-fit: cover; object-position: top; align-self: flex-end; margin-bottom: calc(-1 * clamp(24px, 3vw, 36px)); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .25); transform: rotate(2deg) translateY(10px); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.card:hover .shot { transform: rotate(0) translateY(0); }

.card-iperiod { background: var(--iperiod-bg); }
.card-iperiod h3 { color: var(--iperiod-accent); }

.card-flash { --card-ink: #fff; --card-ink-2: rgba(255, 255, 255, .72); background: #0b0b0f; }
.card-flash .beam { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 100% 0%, rgba(255, 214, 102, .45), transparent 60%), conic-gradient(from 200deg at 100% 0%, transparent 0deg, rgba(255, 230, 150, .2) 22deg, transparent 50deg); transition: opacity .4s; }
.card-flash:hover .beam { opacity: 1; filter: brightness(1.3); }

.card-mirror { background: var(--mirror-bg); }
.card-mirror::after { content: ""; position: absolute; inset: -50% auto -50% -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: rotate(18deg); z-index: -1; transition: left .9s ease; left: -60%; }
.card-mirror:hover::after { left: 120%; }

.card-solitaire { --card-ink: #fff; --card-ink-2: rgba(255, 255, 255, .78); background: radial-gradient(120% 90% at 30% 10%, #1c8a5c 0%, #0c5a3b 55%, #073826 100%); }
.card-solitaire::after { content: "♠ ♥ ♣ ♦"; position: absolute; right: -10px; bottom: -24px; font-size: 110px; letter-spacing: -.1em; line-height: 1; color: rgba(255, 255, 255, .07); z-index: -1; white-space: nowrap; }

.card-run { background: var(--run-bg); }
.card-run h3 { color: var(--run-accent); }
.card-run::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; border-radius: 50%; border: 18px dashed color-mix(in srgb, var(--run-accent) 20%, transparent); z-index: -1; }

.card-knot { background: var(--knot-bg); }
.card-knot h3 { color: var(--knot-accent); }
.card-spawn { --card-ink: #f3f0ff; --card-ink-2: #c9c1ee; flex-direction: row; gap: 28px; background: radial-gradient(90% 70% at 15% 0%, rgba(61, 220, 132, .22), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(255, 92, 200, .28), transparent 60%), linear-gradient(180deg, #1b0f3d, #0a0620); }
.card-spawn h3 { color: #ffcf3f; }

@media (max-width: 1000px) {
  .span-4, .span-3 { grid-column: span 6; }
  .span-2 { grid-column: span 3; }
}
@media (max-width: 640px) {
  .section h2 br { display: none; }
  .bento { gap: 16px; }
  .span-2, .span-3, .span-4 { grid-column: span 6; }
  .card { min-height: 0; }
  .card-iperiod, .card-knot, .card-spawn { flex-direction: column; }
  .shot { width: 62%; align-self: center; }
}

/* ---------- Shelf ---------- */
.section-shelf { background: var(--paper-2); }
.shelf-controls { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 9px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; transition: background .2s, color .2s; }
.chip:hover { border-color: var(--ink-3); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0 16px; min-height: 42px; min-width: min(260px, 100%); }
.search svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.search input { border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); width: 100%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile a { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.tile a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile img { width: 64px; height: 64px; border-radius: 22%; flex: none; background: var(--paper-2); }
.tile-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tile-name { font-weight: 650; font-size: 15.5px; line-height: 1.25; }
.tile-pitch { color: var(--ink-2); font-size: 13.5px; line-height: 1.35; }
.tile-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.tile-meta .stars { width: 64px; height: 12px; color: var(--ink-3); }
.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.pill-new { background: #2f6bff; color: #fff; }
.tile[hidden] { display: none; }
.empty { text-align: center; padding: 40px 0; color: var(--ink-3); }
.fineprint { margin-top: 20px; font-size: 13px; color: var(--ink-3); }
.dev-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.dev-links a { display: flex; flex-direction: column; gap: 4px; padding: 24px 28px; border-radius: 22px; background: var(--ink); color: var(--paper); text-decoration: none; position: relative; transition: transform .2s; }
.dev-links a:hover { transform: translateY(-2px); }
.dev-links a::after { content: "↗"; position: absolute; inset-inline-end: 24px; top: 50%; transform: translateY(-50%); font-size: 26px; }
.dev-links strong { font: 700 20px/1.2 var(--display); }
.dev-links span { font-size: 14px; opacity: .7; }
@media (max-width: 640px) { .dev-links { grid-template-columns: 1fr; } }

/* ---------- Lab ---------- */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lab-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.lab-card h3 { font-size: 26px; }
.lab-card p { color: var(--ink-2); font-size: 15.5px; }
.lab-card p a { font-weight: 600; }
.lab-card .cta-row { margin-top: auto; }
.lab-note { font-size: 13px; color: var(--ink-3) !important; min-height: 1.2em; }
kbd { font: 600 12px var(--mono); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper-2); }
.lab-visual { height: 200px; border-radius: 20px; background: radial-gradient(circle at 50% 45%, #2a2410 0%, #0a0a0c 60%); display: grid; place-items: center; overflow: hidden; }
.lab-bulb { width: 70px; height: 70px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 40px 16px rgba(255, 210, 63, .55), 0 0 120px 50px rgba(255, 210, 63, .2); animation: pulse 3.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); box-shadow: 0 0 24px 8px rgba(255, 210, 63, .45), 0 0 80px 30px rgba(255, 210, 63, .12); } }
.mirror-stage { position: relative; height: 200px; border-radius: 20px; overflow: hidden; background: var(--mirror-bg); display: grid; place-items: center; }
.mirror-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: 0; transition: opacity .4s; }
.mirror-stage.is-live video { opacity: 1; }
.mirror-stage.is-ascii video { opacity: 0; }
.ascii { position: absolute; inset: 0; margin: 0; display: none; place-items: center; background: #0a0a12; color: #9dffb0; font: 700 6px/6px var(--mono); letter-spacing: .5px; overflow: hidden; white-space: pre; }
.mirror-stage.is-ascii .ascii { display: grid; }
.mirror-idle { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; }
.mirror-idle svg { width: 40px; height: 40px; }
.mirror-stage.is-live .mirror-idle { display: none; }

.daily-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.daily-head h3 span { color: var(--ink-3); font-weight: 600; font-size: .7em; }
.streak { font: 700 14px/1 var(--text); padding: 6px 10px; border-radius: 999px; background: #fff1cc; color: #7a4a00; }
.streak:empty { display: none; }
.daily-hint { font-style: italic; }
.daily-answer, .daily-tiles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 48px; }
.daily-answer { padding: 8px; border-radius: 14px; background: var(--paper-2); }
.ltile { width: 40px; height: 44px; border-radius: 10px; border: 0; background: #fff4d6; color: #3a2206; font: 800 22px/1 var(--display); box-shadow: inset 0 -4px 0 #d9a441, 0 2px 6px rgba(0, 0, 0, .15); transition: transform .15s; }
.ltile:hover { transform: translateY(-2px); }
.ltile[disabled] { opacity: .25; transform: none; cursor: default; }
.daily-answer .ltile { background: #ffcf3f; width: min(40px, calc((100% - (var(--n, 8) - 1) * 4px) / var(--n, 8))); font-size: clamp(14px, 4.4vw, 22px); }
.daily-answer { gap: 4px; flex-wrap: nowrap; }
.daily-answer .ltile.is-empty { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.daily-answer .ltile.is-locked { background: #9fd3ff; box-shadow: inset 0 -4px 0 #4f8fd6, 0 2px 6px rgba(0, 0, 0, .15); color: #07224a; }
.daily-answer.is-failed .ltile { background: #ffd1d1; color: #5a0d0d; box-shadow: inset 0 -4px 0 #d66; }
.daily-status { display: flex; justify-content: space-between; align-items: center; min-height: 1.2em; }
.daily-tries { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.daily-lang { font-size: 13px; color: var(--ink-3) !important; }
.daily-answer.is-solved .ltile { background: #3ddc84; color: #06341a; box-shadow: inset 0 -4px 0 #1f9d55; animation: pop .4s ease backwards; }
.daily-answer.is-solved .ltile:nth-child(2) { animation-delay: .05s; } .daily-answer.is-solved .ltile:nth-child(3) { animation-delay: .1s; } .daily-answer.is-solved .ltile:nth-child(4) { animation-delay: .15s; } .daily-answer.is-solved .ltile:nth-child(5) { animation-delay: .2s; } .daily-answer.is-solved .ltile:nth-child(6) { animation-delay: .25s; } .daily-answer.is-solved .ltile:nth-child(7) { animation-delay: .3s; }
.daily-answer.is-wrong { animation: shake .4s; }
@keyframes pop { 50% { transform: translateY(-8px) scale(1.08); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (max-width: 1000px) { .lab-grid { grid-template-columns: 1fr 1fr; } .lab-daily { grid-column: span 2; } }
@media (max-width: 640px) { .lab-grid { grid-template-columns: 1fr; } .lab-daily { grid-column: auto; } }

/* Lights-out flashlight mode */
.lights-overlay { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .5s ease; --x: 50vw; --y: 40vh; background: radial-gradient(circle 180px at var(--x) var(--y), rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 55%, rgba(4, 4, 8, .965) 100%); }
body.lights-out .lights-overlay { opacity: 1; }
body.lights-out .nav { z-index: 70; }
@media (pointer: coarse) { .lights-overlay { background: radial-gradient(circle 150px at var(--x) var(--y), rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 50%, rgba(4, 4, 8, .96) 100%); } }

/* ---------- Timeline ---------- */
.section-story { background: var(--ink); color: var(--paper); }
.section-story .section-sub { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.section-story .kicker { color: #8fb0ff; }
.timeline-wrap { position: relative; }
.timeline-wrap::before, .timeline-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: var(--gutter); z-index: 1; pointer-events: none; }
.timeline-wrap::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.timeline-wrap::after { right: 0; background: linear-gradient(-90deg, var(--ink), transparent); }
.timeline { --tl-pad: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--tl-pad) 28px; scroll-padding-inline: var(--tl-pad); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; cursor: grab; }
.timeline.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.era { flex: 0 0 min(300px, 78vw); scroll-snap-align: start; border-radius: 24px; padding: 24px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; gap: 14px; position: relative; }
.era::before { content: ""; position: absolute; top: 34px; inset-inline-end: 24px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.era.is-milestone { background: linear-gradient(160deg, rgba(47, 107, 255, .35), rgba(122, 77, 255, .18)); border-color: rgba(143, 176, 255, .35); }
.era.is-milestone::before { background: #8fb0ff; box-shadow: 0 0 0 5px rgba(143, 176, 255, .25); }
.era-year { font: 800 44px/1 var(--display); letter-spacing: -.03em; }
.era p { font-size: 15.5px; color: rgba(255, 255, 255, .78); }
.era-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.era-icons img { width: 44px; height: 44px; border-radius: 22%; pointer-events: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section-story { background: #15131c; color: var(--ink); }
  :root:not([data-theme="light"]) .timeline-wrap::before { background: linear-gradient(90deg, #15131c, transparent); }
  :root:not([data-theme="light"]) .timeline-wrap::after { background: linear-gradient(-90deg, #15131c, transparent); }
  :root:not([data-theme="light"]) .section-story .section-sub { color: var(--ink-2); }
}

/* ---------- Privacy ---------- */
.section-privacy h2 { max-width: 18em; }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.principle { padding: 28px 24px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.p-num { font: 700 14px/1 var(--mono); color: var(--blue); }
.principle h3 { font-size: 22px; margin: 18px 0 10px; }
.principle p { color: var(--ink-2); font-size: 15.5px; }
.privacy-foot { margin-top: 32px; color: var(--ink-2); max-width: 46em; }
.privacy-foot a { font-weight: 600; }
@media (max-width: 1000px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Finale & footer ---------- */
.finale-inner { text-align: center; }
.finale h2 { font-size: clamp(34px, 5vw, 56px); }
.finale p { margin-top: 14px; color: var(--ink-2); font-size: 18px; }
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font: 700 13px/1 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer li { margin: 8px 0; }
.footer a, .footer .linklike { color: var(--ink-2); text-decoration: none; }
.footer a:hover, .footer .linklike:hover { color: var(--ink); text-decoration: underline; }
.footer-note { margin: 14px 0 8px; color: var(--ink-3); }
.footer-base { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- App detail sheet ---------- */
.sheet { width: min(760px, calc(100vw - 32px)); max-height: min(88vh, 720px); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: hidden; }
.sheet::backdrop { background: rgba(10, 8, 16, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.sheet-inner { position: relative; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.sheet-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.sheet-close svg { width: 18px; height: 18px; }
.sheet-body { display: flex; gap: 28px; padding: 32px; align-items: flex-start; }
.sheet-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sheet-head { display: flex; gap: 18px; align-items: center; padding-inline-end: 40px; }
.sheet-head img { width: 84px; height: 84px; border-radius: 22%; box-shadow: var(--shadow); flex: none; }
.sheet-tag { font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 4px; }
.sheet h2 { font-size: clamp(28px, 4vw, 38px); }
.sheet .rating { margin-top: 6px; color: var(--ink-2); }
.sheet .rating:empty { display: none; }
.sheet-desc { color: var(--ink-2); font-size: 16.5px; }
.sheet .ticks { --card-ink: var(--ink); --card-ink-2: var(--ink-2); }
.sheet-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.sheet-links .badge img { height: 46px; }
.sheet-shot { flex: 0 0 200px; width: 200px; height: auto; border-radius: 18px; box-shadow: var(--shadow); }
.sheet-shot { aspect-ratio: 480 / 1040; object-fit: cover; object-position: top; background: var(--paper-2); transition: opacity .25s ease; }
.sheet-shot.is-loading { opacity: 0; }
@media (max-width: 640px) {
  .sheet { width: 100vw; max-width: 100vw; max-height: 90vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet[open] { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  .sheet-body { flex-direction: column; padding: 26px 20px 32px; }
  .sheet-shot { width: 60%; flex-basis: auto; align-self: center; }
}

/* ---------- Consent ---------- */
.consent { position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 80; max-width: 420px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); font-size: 14.5px; animation: rise .5s cubic-bezier(.2, .8, .2, 1); }
.consent a { font-weight: 600; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 480px) { .consent { inset-inline-end: 16px; max-width: none; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

/* ---------- Reveal on scroll ---------- */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.is-pending { opacity: 0; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .marquee { animation: none; flex-wrap: wrap; width: auto; }
  .marquee ul[aria-hidden] { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
}
