/* Agepix landing — the app's own theme (ui/theme/Color.kt): the near-black surface #0B0B0E, lilac glass, the
   cyan → violet → pink CTA gradient (brushCta) and the same gradient as the Generating scan line (brushScanLine),
   pink for the brush mask and the age value. Sora (res/font). Logical properties throughout so Arabic (dir="rtl")
   mirrors cleanly. */

:root {
  --ground-0: #15131f;
  --ground: #0b0b0e;
  --ground-1: #08080b;
  --glass-0: rgba(47, 33, 112, .42);
  --glass-1: rgba(22, 22, 28, .82);
  --glass-flat: rgba(22, 22, 28, .9);
  --glass-deep: rgba(22, 22, 28, .98);
  --glass-line: rgba(255, 255, 255, .1);
  --field: #202028;
  --accent-0: #8167e6;
  --accent: #9673ff;
  --accent-1: #ff80bf;
  --accent-hi: #b8a1ff;
  --container: #2f2170;
  --pink: #f573b5;
  --age: #e866a6;
  --teal: #a6e9f0;
  --cyan: #74f2ff;
  --grad: linear-gradient(100deg, #74f2ff -10%, #9673ff 45%, #ff80bf 110%);
  --grad-text: linear-gradient(100deg, #8ff4ff 0%, #b8a1ff 45%, #ff8cc6 100%);
  --scan: linear-gradient(90deg, rgba(102, 232, 250, 0) 0%, #66e8fa 20%, #a88cfa 50%, #f573b5 80%, rgba(245, 115, 181, 0) 100%);
  --rim: linear-gradient(140deg, rgba(116, 242, 255, .55), rgba(150, 115, 255, .22) 45%, rgba(255, 128, 191, .55));
  --gold-0: #ffffff;
  --gold: #eeedfb;
  --gold-1: #b8a1ff;
  --ivory: #ffffff;
  --body: #dcdaea;
  --muted: #9c9ab8;
  --sign: #b8a1ff;
  --shadow: 0 14px 34px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --glow: 0 10px 30px rgba(129, 103, 230, .45);
  --font-display: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 22px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
html[lang="vi"] { --font-display: 'Be Vietnam Pro', 'Sora', sans-serif; --font: 'Be Vietnam Pro', 'Sora', system-ui, sans-serif; }
html[lang="ru"], html[lang="bg"], html[lang="el"] { --font-display: 'Manrope', 'Sora', sans-serif; --font: 'Manrope', 'Sora', system-ui, sans-serif; }
html[lang="hi"] { --font-display: 'Noto Sans Devanagari', 'Sora', sans-serif; --font: 'Noto Sans Devanagari', 'Sora', system-ui, sans-serif; }
html[lang="ar"] { --font-display: 'Readex Pro', 'Sora', sans-serif; --font: 'Readex Pro', 'Sora', system-ui, sans-serif; }
html[lang="ja"] { --font-display: 'Noto Sans JP', 'Sora', sans-serif; --font: 'Noto Sans JP', 'Sora', system-ui, sans-serif; }


*, *::before, *::after { box-sizing: border-box; }
/* the ground lives on <html> so the fixed night sky (.nebula, z-index -1) paints above it — a body background would cover it */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; background: linear-gradient(180deg, var(--ground-0) 0%, var(--ground) 45%, var(--ground-1) 100%) fixed var(--ground-1); }
body {
  margin: 0; font-family: var(--font); color: var(--body); font-size: 16px; line-height: 1.6;
  background: transparent;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; min-height: 100vh;
}
html[dir="rtl"] body { line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
.flip-x { transform: scaleX(-1); }
html[dir="rtl"] .ic.flip-x { transform: none; }
html[dir="rtl"] .icon-btn .ic:not(.flip-x), html[dir="rtl"] .btn .ic-dir { transform: scaleX(-1); }
.i18n-wait main, .i18n-wait .site-header { opacity: 0; }
main, .site-header { transition: opacity .25s; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 300; padding: 10px 16px; background: var(--ivory); color: var(--ground); border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.container { width: min(1180px, 100%); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- nebula backdrop (fixed, cheap) ---------- */
.nebula { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.nebula i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.nebula .n1 { width: 60vmax; height: 60vmax; inset-inline-end: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(150, 115, 255, .5), transparent 65%); }
.nebula .n2 { width: 50vmax; height: 50vmax; inset-inline-start: -20vmax; bottom: -20vmax; background: radial-gradient(circle, rgba(255, 128, 191, .28), transparent 65%); }
.nebula .n3 { width: 40vmax; height: 40vmax; inset-inline-start: 30%; top: 40%; background: radial-gradient(circle, rgba(116, 242, 255, .11), transparent 70%); }
.nebula::after {
  content: ''; position: absolute; inset: -50%; background-repeat: repeat; opacity: .5; animation: twinkle 7s ease-in-out infinite alternate;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(1px 1px at 72% 62%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 82%, rgba(184, 161, 255, .9), transparent 60%),
    radial-gradient(1.2px 1.2px at 52% 38%, rgba(166, 233, 240, .8), transparent 60%);
  background-size: 520px 520px;
}
/* public/js/cosmos.js: the Milky Way, stars and constellations (painted once) + shooting stars */
.lite .nebula::after { animation: none; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .8; } }

/* ---------- buttons ---------- */
.btn {
  --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--h);
  padding: 0 22px; border-radius: 999px; border: 0; font-weight: 700; font-size: 15px; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap; transition: transform .25s var(--spring), box-shadow .25s, background-color .2s, opacity .2s;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { color: #fff; background: var(--grad); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary:hover { box-shadow: 0 14px 40px rgba(255, 128, 191, .45), inset 0 1px 0 rgba(255, 255, 255, .35); transform: translateY(-2px); }
.btn-primary:disabled { background: rgba(156, 154, 184, .12); color: #9c8bb8; box-shadow: inset 0 0 0 1px rgba(156, 154, 184, .18); cursor: not-allowed; transform: none; }
.btn-glass { color: var(--ivory); background: rgba(47, 33, 112, .5); box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(150, 115, 255, .42); transform: translateY(-2px); }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 16px; }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: var(--ivory); background: rgba(47, 33, 112, .6); box-shadow: inset 0 0 0 1px var(--glass-line); transition: transform .2s var(--spring), background-color .2s; }
.icon-btn:hover { background: rgba(150, 115, 255, .55); }
.icon-btn:active { transform: scale(.92); }
.chip-btn { border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); background: rgba(166, 233, 240, .1); box-shadow: inset 0 0 0 1px rgba(166, 233, 240, .35); }
.chip-btn[aria-pressed="true"], .chip-btn:disabled { opacity: .5; cursor: default; }

/* ---------- glass ---------- */
.glass {
  position: relative; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--glass-0), var(--glass-1));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--rim); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.lite .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(160deg, rgba(32, 30, 48, .9), rgba(22, 22, 28, .94)); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; padding-top: env(safe-area-inset-top); transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.site-header.is-scrolled { background: rgba(11, 11, 14, .78); box-shadow: 0 1px 0 rgba(184, 161, 255, .14), 0 10px 30px rgba(0, 0, 0, .3); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.lite .site-header.is-scrolled { background: rgba(11, 11, 14, .96); backdrop-filter: none; -webkit-backdrop-filter: none; }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 18px rgba(150, 115, 255, .45); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ivory); line-height: 1; display: flex; flex-direction: column; letter-spacing: .04em; }
.brand-name small { font-family: var(--font); font-size: 9.5px; font-weight: 700; letter-spacing: .32em; color: var(--accent-hi); text-transform: uppercase; margin-top: 3px; }
.main-nav { display: flex; gap: 2px; margin-inline-start: auto; }
.main-nav a { position: relative; padding: 9px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s, background-color .2s; white-space: nowrap; }
.main-nav a:hover { color: var(--ivory); background: rgba(150, 115, 255, .14); }
.main-nav a.is-active { color: var(--ivory); background: rgba(150, 115, 255, .22); }
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-menu { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(47, 33, 112, .48); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--ivory); font-weight: 700; font-size: 13px; }
.lang-btn .chev { width: 14px; height: 14px; transition: transform .2s; }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-list { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 210px; max-height: min(70vh, 460px); overflow: auto; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: var(--glass-deep); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); z-index: 10; }
.lang-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--body); }
.lang-list li small { color: var(--muted); font-weight: 700; font-size: 11px; letter-spacing: .08em; }
.lang-list li:hover, .lang-list li:focus { background: rgba(150, 115, 255, .2); outline: none; color: var(--ivory); }
.lang-list li[aria-selected="true"] { color: var(--ivory); background: rgba(150, 115, 255, .3); }
.menu-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(47, 33, 112, .48); box-shadow: inset 0 0 0 1px var(--glass-line); position: relative; }
.menu-toggle span { position: absolute; inset-inline-start: 12px; width: 18px; height: 2px; border-radius: 2px; background: var(--ivory); transition: transform .25s, top .25s; }
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 24px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }
.progress-track { position: absolute; inset: auto 0 0; height: 2px; }
.progress-fill { height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
html[dir="rtl"] .progress-fill { transform-origin: 100% 50%; }
.site-header.is-compact .main-nav { display: none; }
.site-header.is-compact .menu-toggle { display: block; }

/* ---------- section scaffolding ---------- */
.section { position: relative; padding: clamp(72px, 9vw, 120px) 0; overflow-x: clip; }
.section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 0 14px; padding: 7px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hi); background: rgba(150, 115, 255, .14); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .28); }
.kicker .ic { color: var(--teal); }
.kicker.small { font-size: 11px; padding: 5px 12px; margin-bottom: 8px; }
html[lang="ar"] .kicker, html[lang="ur"] .kicker, html[lang="hi"] .kicker { letter-spacing: 0; text-transform: none; font-size: 14px; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.12; color: var(--ivory); letter-spacing: .01em; text-shadow: 0 0 34px rgba(150, 115, 255, .35); text-wrap: balance; }
.section-sub { margin: 18px auto 0; max-width: 640px; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); text-wrap: pretty; }
.section-sub.small { font-size: 14.5px; margin: 6px 0 0; }
.card-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--ivory); }
.read-card { padding: 22px 24px; }
.read-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.3; color: var(--ivory); }

.read-meta { margin: -4px 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sign); }
.read-body { margin: 0; color: var(--body); font-size: 15.5px; line-height: 1.7; }
.form-note, .sample-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.form-note .ic, .sample-note .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--accent-hi); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(11, 11, 14, .55); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .16); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 9px 16px; background: none; color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; transition: color .2s, background-color .25s, box-shadow .25s; }
.tabs button:hover { color: var(--ivory); }
.tabs button[aria-selected="true"] { color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(129, 103, 230, .4); }

/* ---------- fields ---------- */
.form-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.form-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 20px; color: var(--ivory); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.field-label { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #d8b6f2; }
html[lang="ar"] .field-label, html[lang="ur"] .field-label, html[lang="hi"] .field-label { text-transform: none; letter-spacing: 0; font-size: 14px; }
.input { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 0; background: var(--field); color: var(--ivory); font-size: 16px; box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .22); transition: box-shadow .2s, background-color .2s; color-scheme: dark; }
.input::placeholder { color: rgba(156, 154, 184, .65); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px rgba(176, 74, 223, .18); background: rgba(32, 32, 40, .85); }
.input:disabled { opacity: .45; }
.input[type="date"], .input[type="time"] { font-variant-numeric: tabular-nums; }
.input[type="date"]::-webkit-calendar-picker-indicator, .input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(.5) hue-rotate(220deg); cursor: pointer; }
textarea.input { resize: none; line-height: 1.5; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--body); -webkit-user-select: none; user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px rgba(156, 154, 184, .6); transition: background-color .2s, box-shadow .2s; }
.check-box .ic { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--spring); }
.check input:checked + .check-box { background: var(--grad); box-shadow: 0 0 12px rgba(190, 60, 230, .6); }
.check input:checked + .check-box .ic { opacity: 1; transform: none; }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #ffd1ef; background: rgba(255, 128, 191, .14); box-shadow: inset 0 0 0 1px rgba(255, 128, 191, .35); }
.place-field { position: relative; }
.place-box { position: relative; }
.place-box .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--accent-hi); width: 18px; height: 18px; pointer-events: none; }
.place-box .input { padding-inline-start: 42px; }
.place-list { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; max-height: 280px; overflow: auto; border-radius: 16px; background: var(--glass-deep); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); overscroll-behavior: contain; }
.place-list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; line-height: 1.35; }
.place-list li b { display: block; color: var(--ivory); font-weight: 700; font-size: 15px; }
.place-list li small { color: var(--muted); font-size: 12.5px; }
.place-list li[aria-selected="true"], .place-list li:hover { background: rgba(150, 115, 255, .24); }
.place-list li.place-msg { cursor: default; color: var(--muted); font-size: 13.5px; }
.place-list li.place-msg:hover { background: none; }

/* ============ HERO ============ */
.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: center; padding: calc(var(--header-h) + 28px) 0 70px; overflow-x: clip; }
.hero-grid { position: relative; }
.hero-copy { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "chip visual" "title visual" "sub visual" "ctas visual" "feats visual"; column-gap: 40px; align-items: center; }
.live-chip { grid-area: chip; align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 8px 16px; border-radius: 999px; font-size: 13.5px; color: var(--body); background: rgba(22, 22, 28, .66); box-shadow: inset 0 0 0 1px rgba(166, 233, 240, .32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.live-chip b { color: var(--ivory); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11.5px; }
html[lang="ar"] .live-chip b, html[lang="ur"] .live-chip b, html[lang="hi"] .live-chip b { text-transform: none; letter-spacing: 0; font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(166, 233, 240, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(166, 233, 240, .6); } 70% { box-shadow: 0 0 0 10px rgba(166, 233, 240, 0); } 100% { box-shadow: 0 0 0 0 rgba(166, 233, 240, 0); } }
.hero-title { grid-area: title; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 5.6vw, 72px); line-height: 1.05; color: var(--ivory); letter-spacing: .005em; text-shadow: 0 0 40px rgba(150, 115, 255, .45); text-wrap: balance; }
.hero-title em { display: inline; }
.hero-sub { grid-area: sub; margin: 22px 0 0; max-width: 500px; font-size: clamp(16.5px, 1.6vw, 19px); color: var(--body); }
.hero-ctas { grid-area: ctas; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-features { grid-area: feats; display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.hero-features li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--body); background: rgba(32, 32, 40, .55); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .18); }
.hero-features .ic { width: 16px; height: 16px; color: var(--accent-hi); }
.hero-visual { grid-area: visual; position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stage3d { position: relative; width: 100%; aspect-ratio: 1; max-width: 640px; margin-inline: auto; touch-action: pan-y; }
.stage3d::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(150, 115, 255, .35), transparent 68%); filter: blur(10px); }
.stage-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: spin 120s linear infinite; opacity: .9; }
.stage3d.is-3d .stage-fallback { opacity: 0; transition: opacity .8s; }
.stage3d { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* the fallback art stays under the canvas: it must never catch the pointer, or the browser starts an image drag and
   cancels the spin (pointercancel) */
.stage3d img { pointer-events: none; -webkit-user-drag: none; }
.stage3d:active, .stage3d.is-grabbing { cursor: grabbing; }
/* the canvas bleeds past the square so orbiting cards never meet a hard edge; the stage itself takes the pointer */
.stage3d canvas { position: absolute; inset: -12%; width: 124% !important; height: 124% !important; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.stage-tip { position: absolute; top: 12%; inset-inline: 0; margin: 0 auto; width: max-content; max-width: 90%; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ivory); background: rgba(22, 22, 28, .82); box-shadow: inset 0 0 0 1px rgba(166, 233, 240, .4), var(--shadow); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none; }
.stage-tip.is-shown { opacity: 1; transform: none; }
.stage-hint { display: flex; align-items: center; gap: 8px; max-width: 420px; margin: 4px auto 0; font-size: 12.5px; color: var(--muted); text-align: center; justify-content: center; }
.stage-hint .ic { width: 16px; height: 16px; color: var(--teal); }
.scroll-cue { position: absolute; bottom: 22px; inset-inline-start: 50%; width: 26px; height: 42px; margin-inline-start: -13px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px rgba(184, 161, 255, .5); }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent-hi); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* hero: one face at every age (hero3d.js); the readout under it follows the age on screen */
.stage-fallback { inset: 12% 24%; width: 52%; height: 76%; object-fit: cover; border-radius: 28px; animation: none; box-shadow: 0 30px 70px rgba(0, 0, 0, .55); }
.stage3d::before { background: radial-gradient(circle, rgba(150, 115, 255, .32), rgba(255, 128, 191, .08) 45%, transparent 68%); }
.stage-age { position: absolute; inset-inline: 0; bottom: 2%; margin: 0 auto; width: max-content; display: flex; align-items: baseline; gap: 10px; padding: 8px 18px; border-radius: 999px; background: rgba(11, 11, 14, .66); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; z-index: 2; }
.stage-age small { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .stage-age small, html[lang="hi"] .stage-age small, html[lang="ja"] .stage-age small { letter-spacing: 0; text-transform: none; font-size: 13px; }
.stage-age b { font-size: 30px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 2ch; text-align: center; }
.stage-tip { box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .45), var(--shadow); }

/* ---------- shared: a picture with the app's scan line ---------- */
.portrait, .art-preview, .player, .paint, .compare { position: relative; margin: 0; overflow: hidden; background: #16161c; isolation: isolate; }
.p-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.p-next { clip-path: inset(0 0 calc(100% - var(--sweep, 0%)) 0); }
.p-next:not([src]) { display: none; }
.scan { position: absolute; inset-inline: 0; top: var(--sweep, 0%); height: 3px; margin-top: -1px; background: var(--scan); box-shadow: 0 0 18px 4px rgba(191, 115, 255, .55); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 3; }
.scan::before { content: ''; position: absolute; inset-inline: 0; bottom: 100%; height: 120px; background: linear-gradient(180deg, rgba(168, 84, 247, 0), rgba(237, 92, 184, .32)); }
.is-sweeping > .scan { opacity: 1; }
.is-working > .scan { opacity: 1; animation: scanLoop 1.6s ease-in-out infinite alternate; }
.is-working > .scan::before { animation: trailFlip 3.2s steps(1) infinite; }
@keyframes scanLoop { from { top: 0%; } to { top: 100%; } }
@keyframes trailFlip { 0% { bottom: 100%; top: auto; transform: none; } 50% { bottom: auto; top: 100%; transform: scaleY(-1); } }
.sample-tag { position: absolute; inset-inline-start: 12px; bottom: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .85); background: rgba(11, 11, 14, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.sample-tag .ic { width: 13px; height: 13px; color: var(--teal); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(11, 11, 14, .6); box-shadow: inset 0 0 0 1px var(--glass-line); }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 700; font-size: 14px; transition: color .2s, background-color .25s, box-shadow .25s; }
.seg button[aria-checked="true"] { color: #fff; background: var(--container); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .55), 0 6px 18px rgba(129, 103, 230, .3); }
.seg button .ic { width: 18px; height: 18px; }
.seg-inline { display: inline-flex; width: min(100%, 320px); }
.seg-sm button { min-height: 36px; padding: 0 12px; }
.panel-title { margin: 0 0 14px; font-size: 20px; font-weight: 700; color: var(--ivory); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--body); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: background-color .2s, box-shadow .2s, color .2s; }
.chip:hover { background: rgba(150, 115, 255, .14); }
.chip[aria-pressed="true"] { color: #fff; background: var(--container); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .7); }
.chip-more { color: var(--accent-hi); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .35); background: none; border: 1px dashed transparent; }
.chip-more .ic { width: 14px; height: 14px; }
.field-label { color: var(--accent-hi); margin: 20px 0 10px; display: block; }

/* ============ FACE AGING ============ */
.aging-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
.aging-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.portrait { width: min(100%, 440px); margin-inline: auto; aspect-ratio: 3 / 4; border-radius: 28px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08); }
.age-badge { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 4; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; color: #fff; background: rgba(11, 11, 14, .62); box-shadow: inset 0 0 0 1px rgba(232, 102, 166, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.age-badge:empty { display: none; }
.age-rail { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.age-pick { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 6px; border: 0; border-radius: 14px; background: none; color: var(--body); }
.age-thumb { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; margin-bottom: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: box-shadow .25s, transform .25s var(--spring); }
.age-thumb img { width: 100%; height: 100%; object-fit: cover; }
.age-pick b { font-size: 15px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.age-pick small { font-size: 10.5px; color: var(--muted); line-height: 1.25; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age-pick:hover .age-thumb { transform: translateY(-2px); }
.age-pick[aria-pressed="true"] .age-thumb { box-shadow: 0 0 0 2px var(--age), 0 8px 20px rgba(232, 102, 166, .35); }
.age-pick[aria-pressed="true"] b { color: var(--age); }
.age-pick.is-lock img { filter: blur(3px) brightness(.55); transform: scale(1.1); }
.age-pick.is-lock .ic { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; color: #fff; }
.aging-panel { padding: 26px; }
.steps { display: grid; gap: 10px; margin: 22px 0; padding: 16px; list-style: none; border-radius: 16px; background: rgba(11, 11, 14, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; color: var(--muted); transition: color .2s; }
.steps i { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18); }
.steps li.is-active { color: var(--ivory); }
.steps li.is-active i { box-shadow: none; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--cyan); border-right-color: var(--accent); animation: spin .8s linear infinite; }
.steps li.is-done { color: var(--body); }
.steps li.is-done i { background: var(--grad); box-shadow: none; }
.steps li.is-done i::after { content: ''; position: absolute; left: 6px; top: 4px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ============ JOURNEY ============ */
.journey-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.journey-copy .section-title, .journey-copy .section-sub { text-align: start; margin-inline: 0; }
.journey-copy .kicker { margin-bottom: 14px; }
.journey-facts { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.journey-facts li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--body); }
.journey-facts .ic { width: 22px; height: 22px; padding: 6px; box-sizing: content-box; border-radius: 12px; color: var(--teal); background: rgba(150, 115, 255, .14); }
.journey-copy .btn-lg { margin-top: 24px; }
.player { width: min(100%, 420px); margin-inline: auto; aspect-ratio: 3 / 4; border-radius: 30px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 80px rgba(150, 115, 255, .25); }
.player-frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: opacity, transform; }
.player-frames img:first-child { opacity: 1; }
.player-glow { position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(180deg, rgba(11, 11, 14, 0), rgba(11, 11, 14, .7) 60%, #0b0b0e); z-index: 3; pointer-events: none; }
.player-age { position: absolute; top: 16px; inset-inline-start: 18px; z-index: 4; margin: 0; display: flex; flex-direction: column; line-height: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.player-age b { font-size: 64px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.player-age small { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
html[lang="ar"] .player-age small, html[lang="hi"] .player-age small, html[lang="ja"] .player-age small { letter-spacing: 0; text-transform: none; font-size: 14px; }
.player .sample-tag { top: 16px; bottom: auto; inset-inline-start: auto; inset-inline-end: 14px; }
.player-bar { position: absolute; inset: auto 0 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 16px 16px; }
.player-play { flex: none; width: 46px; height: 46px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.player-play .ic { width: 20px; height: 20px; }
.player-track { position: relative; flex: 1; height: 30px; cursor: pointer; touch-action: none; --p: 0%; }
.player-track::before, .player-fill { content: ''; position: absolute; inset-inline-start: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; }
.player-track::before { inset-inline-end: 0; background: rgba(255, 255, 255, .22); }
.player-fill { width: var(--p); background: var(--grad); }
.player-knob { position: absolute; top: 50%; inset-inline-start: var(--p); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(150, 115, 255, .35); }
html[dir="rtl"] .player-knob { margin: -7px -7px 0 0; }
.player-time { flex: none; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .8); }

/* ============ AI ART ============ */
.art-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 26px; }
.art-bar .tabs { flex: 0 1 auto; min-width: 0; }
.art-bar .tabs button[aria-selected="true"] { background: var(--container); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .6); }
.art-bar .seg { flex: none; }
.art-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
.art-preview { width: min(100%, 420px); margin-inline: auto; aspect-ratio: 3 / 4; border-radius: 28px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08); }
.art-preview figcaption { position: absolute; inset: auto 0 0; z-index: 4; display: flex; flex-direction: column; gap: 4px; padding: 60px 20px 20px; background: linear-gradient(180deg, rgba(11, 11, 14, 0), rgba(11, 11, 14, .88)); }
.art-preview figcaption b { font-size: 20px; font-weight: 800; color: #fff; }
.art-preview figcaption span { font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.style { position: relative; width: 100%; display: block; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #16161c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: transform .3s var(--spring), box-shadow .25s; }
.style img { width: 100%; height: 100%; object-fit: cover; }
.style span { position: absolute; inset: auto 0 0; padding: 28px 10px 10px; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: #fff; text-align: start; background: linear-gradient(180deg, rgba(11, 11, 14, 0), rgba(11, 11, 14, .85)); }
.style:hover { transform: translateY(-3px); }
.style[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent-hi), 0 12px 26px rgba(129, 103, 230, .4); }
.style-more img { filter: blur(8px) brightness(.5); transform: scale(1.15); }
.style-more span { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center; background: none; font-size: 14px; }
.style-more .ic { width: 22px; height: 22px; padding: 9px; box-sizing: content-box; border-radius: 50%; color: var(--container); background: var(--gold); }

/* ============ AI TOOLS ============ */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.tool-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.tool-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 800; color: var(--ivory); }
.tool-title .ic { width: 26px; height: 26px; padding: 8px; box-sizing: content-box; border-radius: 14px; color: #fff; background: var(--container); box-shadow: inset 0 0 0 1px rgba(184, 161, 255, .5); }
.tool-q { margin: -6px 0 0; color: var(--muted); font-size: 14.5px; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 0; border-radius: 16px; text-align: start; color: var(--body); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.mode b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ivory); }
.mode small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mode[aria-pressed="true"] { background: rgba(47, 33, 112, .6); box-shadow: inset 0 0 0 1.5px var(--accent-hi); }
.mode .ic-lock { width: 14px; height: 14px; color: var(--accent-hi); }
.compare, .paint { width: 100%; max-width: 380px; margin-inline: auto; aspect-ratio: 1; border-radius: 22px; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .08); direction: ltr; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.cmp-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-label { position: absolute; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(11, 11, 14, .6); pointer-events: none; }
.cmp-l { left: 12px; }
.cmp-r { right: 12px; }
.cmp-range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3; width: 3px; margin-left: -1.5px; background: linear-gradient(180deg, rgba(94, 232, 255, 0), #5ee8ff 15%, #a873ff 50%, #ff73bf 85%, rgba(255, 115, 191, 0)); box-shadow: 0 0 14px rgba(168, 114, 255, .9); pointer-events: none; }
.cmp-line b { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--container); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.cmp-line .ic { width: 20px; height: 20px; }
.cmp-range:focus-visible ~ .cmp-line b { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.facts-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.facts-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--body); background: rgba(79, 201, 138, .1); box-shadow: inset 0 0 0 1px rgba(79, 201, 138, .35); }
.facts-chips .ic { width: 16px; height: 16px; color: #4fc98a; }
.paint canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.paint-before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.paint-mask { cursor: crosshair; touch-action: none; }
.paint.is-done .paint-mask { cursor: pointer; pointer-events: none; }
.paint.is-holding .paint-after { opacity: 0; }
.paint-hint { position: absolute; top: 12px; left: 50%; z-index: 4; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(11, 11, 14, .66); white-space: nowrap; pointer-events: none; transition: opacity .25s; }
.paint-hint .ic { width: 15px; height: 15px; color: var(--pink); }
.paint-hint.is-hidden { opacity: 0; }
.paint.is-done .paint-hint .ic { color: #4fc98a; }
.paint-popup { position: absolute; inset: 14%; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; border-radius: 22px; text-align: center; background: rgba(22, 22, 28, .94); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); animation: pop .3s var(--spring); }
.paint-popup img { width: 64px; height: 64px; }
.paint-popup b { color: #fff; font-size: 16px; line-height: 1.3; }
.paint-popup span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.paint-popup .btn { margin-top: 8px; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.paint-tools { display: flex; align-items: center; gap: 10px; transition: opacity .25s; }
.paint-tools.is-off { opacity: .35; pointer-events: none; }
.size-range { flex: 1; min-width: 60px; accent-color: var(--accent); }
.icon-btn.icon-sm { width: 38px; height: 38px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--glass-line); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn .ic { width: 18px; height: 18px; }
.paint-actions { display: flex; justify-content: center; }
.paint-actions .btn { min-width: 200px; }

/* download: three ages fanned around the icon */
.dl-art { display: grid; place-items: center; }
.dl-face { position: absolute; width: 44%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .14); }
.dl-face.f1 { transform: translateX(-62%) rotate(-10deg); }
.dl-face.f2 { transform: translateY(-6%); z-index: 1; }
.dl-face.f3 { transform: translateX(62%) rotate(10deg); }
.dl-art .dl-icon { position: absolute; inset: auto; bottom: 2%; width: 26%; height: auto; z-index: 2; border-radius: 24%; animation: float 6s ease-in-out infinite; }

/* ============ FEATURES ============ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; perspective: 1400px; }
.feature { position: relative; display: flex; flex-direction: column; text-align: start; border: 0; padding: 0; border-radius: 20px; overflow: hidden; background: linear-gradient(170deg, rgba(32, 30, 48, .9), rgba(16, 16, 21, .95)); box-shadow: var(--shadow), inset 0 0 0 1px rgba(184, 161, 255, .2); transform-style: preserve-3d; transition: transform .5s var(--ease), box-shadow .3s; --rx: 0deg; --ry: 0deg; }
.feature.is-in { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
.feature:hover { box-shadow: 0 24px 50px rgba(0, 0, 0, .5), 0 0 30px rgba(129, 103, 230, .3), inset 0 0 0 1px rgba(184, 161, 255, .5); }
.feature-art { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.feature-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.feature:hover .feature-art img { transform: scale(1.06); }
.feature-text { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 18px; }
.feature-text b { font-family: var(--font-display); font-size: 17px; color: var(--ivory); line-height: 1.25; }
.feature-text span { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.feature-sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .16), transparent 45%); opacity: 0; transition: opacity .3s; }
.feature:hover .feature-sheen { opacity: 1; }

/* ============ DOWNLOAD ============ */
.download-card { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 32px; overflow: hidden; background: radial-gradient(circle at 15% 50%, rgba(255, 128, 191, .28), transparent 50%), linear-gradient(140deg, #2f2170, #121019 70%); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(184, 161, 255, .3); }
.dl-art { position: relative; aspect-ratio: 1; width: min(100%, 380px); margin-inline: auto; }
.dl-icon { position: absolute; inset: 24%; width: 52%; height: 52%; border-radius: 22%; box-shadow: 0 24px 60px rgba(150, 115, 255, .65); animation: float 6s ease-in-out infinite; }
.dl-copy .section-title { text-align: start; }
.dl-copy .section-sub { margin-inline: 0; }
.dl-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 26px; }
.play-badge img { width: 200px; height: auto; }
.qr-mini { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); max-width: 200px; }
.qr-mini .qr-tile { padding: 8px; border-radius: 12px; background: #fff; flex: none; }
.qr-mini .qr-tile img { width: 80px; height: 80px; }
.dl-meta { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }

/* ============ FOOTER ============ */
.site-footer { position: relative; padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(184, 161, 255, .14); background: rgba(8, 8, 11, .6); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-brand { max-width: 440px; }
.footer-brand p { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: flex-start; }
.footer-links a { font-size: 14.5px; font-weight: 600; color: var(--body); text-decoration: none; }
.footer-links a:hover { color: var(--ivory); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(184, 161, 255, .1); }
.footer-bottom p { margin: 0; font-size: 12.5px; color: rgba(156, 154, 184, .75); max-width: 760px; }

/* ============ DOCK · MODAL · TOAST ============ */
.get-dock { display: none; }
.modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 11, 14, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal-dialog { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; padding: 28px; border-radius: 26px; background: radial-gradient(circle at 50% 0%, rgba(150, 115, 255, .22), transparent 55%), var(--glass-deep); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); animation: pop .35s var(--spring); outline: none; }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(47, 33, 112, .58); color: var(--ivory); }
.modal-app { display: flex; gap: 14px; align-items: center; padding-inline-end: 44px; }
.modal-app img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 8px 22px rgba(150, 115, 255, .5); }
.modal-app-name { margin: 0; font-weight: 800; color: var(--ivory); }
.modal-app-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.modal-title { margin: 22px 0 6px; font-family: var(--font-display); font-size: 24px; line-height: 1.25; color: var(--ivory); }
.modal-sub { margin: 0; color: var(--body); font-size: 15px; }
.modal-visual { display: flex; justify-content: center; gap: 10px; margin: 18px 0 0; }
.modal-visual:empty { display: none; }
.modal-visual img { height: 120px; width: auto; border-radius: 10px; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.modal-get { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(184, 161, 255, .14); }
.qr-block { text-align: center; }
.qr-block p { margin: 8px 0 0; font-size: 12px; color: var(--muted); max-width: 150px; }
.qr-tile { position: relative; padding: 10px; border-radius: 16px; background: #fff; }
.qr-tile img { width: 140px; height: 140px; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 34px !important; height: 34px !important; margin: -17px 0 0 -17px; border-radius: 9px; box-shadow: 0 0 0 4px #fff; }
.modal-actions .play-badge img { width: 180px; }
.modal-steps { margin: 14px 0 0; padding-inline-start: 20px; font-size: 14px; color: var(--body); display: grid; gap: 4px; }
.modal-steps .step-tap { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 500; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ivory); background: var(--glass-deep); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
html.modal-open { overflow: hidden; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .main-nav a { padding: 8px 9px; font-size: 13.5px; }
}
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .main-nav.is-open { display: flex; position: absolute; top: calc(var(--header-h) + env(safe-area-inset-top)); inset-inline: 12px; flex-direction: column; gap: 2px; padding: 10px; border-radius: 20px; background: var(--glass-deep); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); }
  .main-nav.is-open a { padding: 13px 16px; font-size: 16px; }
}
@media (max-width: 980px) {
  .hero { min-height: 0; padding-top: calc(var(--header-h) + 22px); }
  .hero-copy { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chip" "title" "visual" "sub" "ctas" "feats"; text-align: center; justify-items: center; }
  .live-chip { justify-self: center; }
  .hero-visual { width: 100%; margin: 6px 0 0; }
  .stage3d { max-width: 520px; }
  .stage3d canvas { inset: 0; width: 100% !important; height: 100% !important; }
  .hero-sub { margin-inline: auto; }
  .hero-ctas, .hero-features { justify-content: center; }
  .scroll-cue { display: none; }
  .download-card { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .dl-copy .section-title { text-align: center; }
  .dl-copy .section-sub { margin-inline: auto; }
  .dl-actions { justify-content: center; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; --radius: 20px; }
  .container { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .header-cta { display: none; }
  .brand-name { font-size: 20px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 30px; }
  .stage3d { aspect-ratio: 1; max-width: 420px; }
  .form-card { padding: 20px; }
  .read-card { padding: 18px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .feature-text { padding: 10px 12px 14px; }
  .feature-text b { font-size: 15px; }
  .feature-text span { font-size: 12.5px; }
  .modal { place-items: end stretch; padding: 0; }
  .modal-dialog { width: 100%; max-height: calc(100dvh - 30px); border-radius: 26px 26px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); animation: sheetIn .35s var(--ease); }
  .modal-dialog::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(184, 161, 255, .35); }
  @keyframes sheetIn { from { transform: translateY(100%); } }
  .modal-get { grid-template-columns: 1fr; }
  .qr-block { display: none; }
  .modal-steps .step-scan { display: none; }
  .modal-steps .step-tap { display: list-item; }
  .modal-actions { display: flex; flex-direction: column; align-items: center; }
  .get-dock { position: fixed; inset: auto 10px calc(10px + env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 20px; background: rgba(22, 22, 28, .94); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--glass-line); transform: translateY(140%); transition: transform .4s var(--ease); }
  html.show-dock .get-dock { transform: none; }
  html.modal-open .get-dock { transform: translateY(140%); }
  .get-dock img { width: 40px; height: 40px; border-radius: 11px; }
  .get-dock-text { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .get-dock-text strong { font-size: 14px; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .get-dock-text small { font-size: 12px; color: var(--muted); }
  html.show-dock .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .hero-title { font-size: 34px; }
  .hero-features li { font-size: 12px; padding: 6px 10px; }
  .btn-lg { --h: 52px; padding: 0 22px; font-size: 15px; }
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { gap: 10px; }
  .tabs button { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 370px) {
  .lang-btn { padding: 0 9px; }
  .lang-btn .chev { display: none; }
  .brand-name small { display: none; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover, .btn-glass:hover { transform: none; }
  .feature:hover .feature-art img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ TEASERS — a taste here, the rest in the app ============ */
.teaser { position: relative; }
.t-lock { filter: blur(5px); opacity: .7; -webkit-user-select: none; user-select: none; pointer-events: none; }
.teaser:not(.is-open) { padding-bottom: 8px; }
.teaser:not(.is-open) .t-lock { display: inline; }
.unlock {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: 100%; margin: 14px auto 0;
  padding: 10px 18px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 800; line-height: 1.3; text-align: center;
  color: #2f2170; background: linear-gradient(135deg, var(--gold-0), var(--gold) 55%, var(--gold-1));
  box-shadow: 0 8px 24px rgba(184, 161, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .25s var(--spring), box-shadow .25s;
}
.unlock .ic { width: 18px; height: 18px; }
.unlock:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(184, 161, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .6); }
.teaser .unlock { position: relative; z-index: 1; margin-top: -1.4em; }
.is-locked { position: relative; }
.is-locked > .locked-blur { filter: blur(6px); opacity: .6; pointer-events: none; -webkit-user-select: none; user-select: none; }
.is-locked > .unlock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 2; }
.is-locked > .unlock:hover { transform: translate(-50%, calc(-50% - 2px)); }
.tabs button.is-lock { color: rgba(156, 154, 184, .7); }
.tabs button.is-lock .ic-lock { width: 13px; height: 13px; color: var(--gold); }
.reading-cta { display: flex; justify-content: center; margin-top: 22px; }

/* ============ RESPONSIVE — the Agepix sections ============ */
@media (max-width: 1080px) {
  .aging-grid, .art-grid { grid-template-columns: minmax(0, 1fr); }
  .aging-panel, .art-side { max-width: 640px; width: 100%; margin-inline: auto; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}
@media (max-width: 980px) {
  .journey-grid { grid-template-columns: minmax(0, 1fr); }
  .journey-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .journey-copy .section-title, .journey-copy .section-sub { text-align: center; margin-inline: auto; }
  .journey-facts { justify-items: start; }
  .art-bar { flex-direction: column; }
  .art-bar .tabs { max-width: 100%; }
}
@media (max-width: 720px) {
  .age-rail { display: flex; overflow-x: auto; gap: 8px; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .age-rail::-webkit-scrollbar { display: none; }
  .age-rail li { flex: 0 0 62px; scroll-snap-align: start; }
  .aging-panel { padding: 20px; }
  .tool-card { padding: 18px; }
  .player-age b { font-size: 52px; }
  .style-grid { gap: 8px; }
  .style span { font-size: 11.5px; padding: 22px 8px 8px; }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .dl-art { width: min(100%, 300px); }
}
@media (max-width: 420px) {
  .paint-actions .btn { min-width: 0; width: 100%; }
  .seg button { padding: 0 10px; font-size: 13px; }
}
