@property --f1 { syntax: '<color>'; inherits: true; initial-value: #8B5CF6; }
@property --f2 { syntax: '<color>'; inherits: true; initial-value: #C6FF3D; }
@property --f3 { syntax: '<color>'; inherits: true; initial-value: #17122b; }
@property --sh { syntax: '<percentage>'; inherits: false; initial-value: -30%; }
@property --p { syntax: '<percentage>'; inherits: true; initial-value: 50%; }

@font-face { font-family: "Geist Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 103%; ascent-override: 94%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Serif Fallback"; font-style: italic; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Georgia Italic"); size-adjust: 94%; }

:root {
  color-scheme: dark;
  --bg: #0A0A0B;
  --surface: #141416;
  --raised: #1C1C1F;
  --line: rgb(255 255 255 / .08);
  --line-2: rgb(255 255 255 / .14);
  --text: #F4F4F5;
  --muted: #A1A1AA;
  --accent: #C6FF3D;
  --accent-ink: #C6FF3D;
  --on-accent: #0A0A0B;
  --violet: #8B5CF6;
  --dot: rgb(255 255 255 / .075);
  --glow-v: oklch(0.6 0.24 293 / .28);
  --glow-l: oklch(0.93 0.22 125 / .12);
  --shadow: 0 40px 120px -40px rgb(0 0 0 / .8), 0 0 0 1px var(--line);
  --grain: .04;
  --gutter: max(16px, 4vw);
  --r-xl: 28px; --r-lg: 24px; --r-md: 20px; --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sans: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Instrument Serif Fallback", ui-serif, Georgia, serif;
  --native: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --raised: #F1F1EC;
  --line: rgb(10 10 11 / .08);
  --line-2: rgb(10 10 11 / .15);
  --text: #0A0A0B;
  --muted: #55555E;
  --accent-ink: oklch(0.5 0.15 132);
  --dot: rgb(10 10 11 / .09);
  --glow-v: oklch(0.7 0.18 293 / .22);
  --glow-l: oklch(0.93 0.22 125 / .35);
  --shadow: 0 40px 100px -50px rgb(30 25 60 / .35), 0 0 0 1px var(--line);
  --grain: .05;
}

@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font: 400 16px/1.55 var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100dvh;
  &::after {
    content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0; transition: opacity 1.2s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sprite { position: absolute; }
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; transition: translate .2s var(--ease);
  &:focus-visible { translate: 0 76px; }
}
.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.g, .i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  --h: 44px; --depth: 4px; --lip: rgb(0 0 0 / .35);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 calc(var(--h) * .45); border-radius: 999px;
  font-weight: 650; font-size: 15px; letter-spacing: -.01em; white-space: nowrap;
  /* Tactile, game-style press: a solid lip under the button that collapses on :active. */
  box-shadow: 0 var(--depth) 0 0 var(--lip), var(--glow, 0 0 #0000);
  transition: translate .3s var(--spring), box-shadow .3s var(--spring), background-color .2s, border-color .2s;
  &:hover { translate: 0 -2px; box-shadow: 0 calc(var(--depth) + 2px) 0 0 var(--lip), var(--glow, 0 0 #0000); }
  &:active { translate: 0 calc(var(--depth) - 1px); box-shadow: 0 1px 0 0 var(--lip), var(--glow, 0 0 #0000); transition-duration: .08s; }
  & .i { transition: translate .3s var(--spring); }
  &:hover .i { translate: 3px 0; }
}
.btn-sm { --h: 38px; --depth: 3px; font-size: 14px; }
.btn-lg { --h: 54px; --depth: 5px; font-size: 16px; }
.btn-accent {
  --lip: oklch(0.6 0.16 128);
  --glow: 0 14px 34px -12px oklch(0.9 0.22 125 / .6);
  color: var(--on-accent);
  background: linear-gradient(rgb(255 255 255 / .35), transparent 55%) var(--accent);
  &::after { content: ""; position: absolute; inset: 1px 1px auto; height: 45%; border-radius: 999px 999px 40% 40%; background: linear-gradient(rgb(255 255 255 / .45), transparent); pointer-events: none; }
}
.btn-ghost { --lip: var(--line-2); border: 1px solid var(--line-2); background: color-mix(in oklch, var(--surface) 70%, transparent); &:hover { border-color: var(--muted); } }

/* ---------- Nav ---------- */
.nav-wrap { position: fixed; inset: 12px 0 auto; z-index: 50; pointer-events: none; }
.nav {
  pointer-events: auto; position: relative;
  width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 8px 0 14px; border-radius: 999px;
  background: color-mix(in oklch, var(--bg) 64%, transparent);
  border: 1px solid var(--line);
  .ready & { backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
  &::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: -1;
    box-shadow: 0 16px 40px -18px rgb(0 0 0 / .6); opacity: 0;
  }
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.04em; }
.brand-mark { width: 28px; height: 28px; transition: rotate .5s var(--spring); }
.brand:hover .brand-mark { rotate: -12deg; }
.brand-word em { font-size: 1.12em; margin-left: 1px; color: var(--accent-ink); letter-spacing: -.02em; }
.nav-links {
  display: flex; gap: 2px;
  & a { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: color .2s, background-color .2s; }
  & a:hover { color: var(--text); background: var(--line); }
}
.nav-end { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); transition: rotate .5s var(--spring), border-color .2s;
  & svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transition: scale .4s var(--spring), opacity .3s; }
  &:hover { border-color: var(--line-2); rotate: 20deg; }
}
.moon { scale: 0; opacity: 0; }
[data-theme="light"] { & .sun { scale: 0; opacity: 0; } & .moon { scale: 1; opacity: 1; } }
@media (width < 820px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: clamp(116px, 16vw, 168px) 0 clamp(56px, 8vw, 96px); isolation: isolate;
  &::before {
    content: ""; position: absolute; inset: 0 0 20%; z-index: -1;
    background: radial-gradient(circle, var(--dot) 1px, transparent 1.4px) 0 0 / 22px 22px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  }
}
.hero-glow {
  position: absolute; z-index: -1; inset: -120px 0 auto; height: 1100px; pointer-events: none;
  background:
    radial-gradient(40% 40% at 78% 30%, var(--glow-v), transparent 70%),
    radial-gradient(35% 30% at 18% 18%, var(--glow-l), transparent 70%),
    radial-gradient(50% 35% at 50% 75%, oklch(0.55 0.2 293 / .14), transparent 70%);
}
.pill-tag {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in oklch, var(--surface) 70%, transparent);
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  &::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2.4s var(--ease) infinite; }
}
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3); opacity: 0; } }

.display {
  margin-top: 28px;
  font-size: clamp(3.5rem, 13vw, 11.5rem);
  line-height: .86; letter-spacing: -.065em; font-weight: 700;
  & em {
    display: inline-block; padding: 0 .1em .16em .02em; margin: 0 -.06em -.16em -.02em;
    font-size: 1.1em; letter-spacing: -.035em; line-height: .86;
    background: linear-gradient(100deg, var(--accent-ink) calc(var(--sh) - 18%), #F6FFD9 var(--sh), var(--accent-ink) calc(var(--sh) + 18%));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shine 7s var(--ease) 1s infinite;
  }
}
[data-theme="light"] .display em { background-image: linear-gradient(100deg, var(--accent-ink) calc(var(--sh) - 18%), oklch(0.82 0.2 128) var(--sh), var(--accent-ink) calc(var(--sh) + 18%)); }
@keyframes shine { 0% { --sh: -30%; } 30%, 100% { --sh: 130%; } }

.hero-sub {
  margin-top: clamp(24px, 4vw, 44px);
  display: grid; gap: 24px 48px; align-items: end;
  @media (width >= 900px) { grid-template-columns: minmax(0, 560px) auto; justify-content: space-between; }
}
.hero > .wrap:first-of-type { position: relative; }
.sticker {
  display: none; position: absolute; right: 2%; top: 30%; width: clamp(150px, 13vw, 190px); aspect-ratio: 1;
  @media (width >= 900px) { display: grid; place-items: center; }
  & > svg { grid-area: 1 / 1; width: 100%; height: 100%; overflow: visible; animation: spin 22s linear infinite; }
  & text { font: 600 10px/1 var(--sans); letter-spacing: .14em; fill: var(--text); }
}
.sticker-core {
  grid-area: 1 / 1; width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); box-shadow: 0 20px 50px -12px oklch(0.9 0.22 125 / .6); rotate: -8deg;
  & svg { width: 52%; fill: var(--on-accent); }
}
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--muted); max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Studio (live demo) ---------- */
.studio {
  margin-top: clamp(48px, 7vw, 88px);
  border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow);
  overflow: clip; position: relative; transform-origin: 50% 0;
  &::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
    background: linear-gradient(160deg, oklch(0.93 0.22 125 / .5), transparent 30%, transparent 70%, oklch(0.6 0.24 293 / .6));
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
}
.studio-bar {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
  & .file { flex: 1; text-align: center; font-weight: 500; color: var(--text); }
  & .ext { color: var(--muted); }
  & .live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
}
.lights { display: flex; gap: 7px; & i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); } & i:first-child { background: #ff5f57; } & i:nth-child(2) { background: #febc2e; } & i:nth-child(3) { background: #28c840; } }
.studio-grid {
  display: grid;
  @media (width >= 940px) { grid-template-columns: 340px minmax(0, 1fr); }
}
.panel {
  display: grid; gap: 16px; align-content: start; padding: 20px; border-top: 1px solid var(--line); order: 2;
  @media (width >= 940px) { order: 0; border-top: 0; border-right: 1px solid var(--line); }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; gap: 10px; align-items: center;
  & span { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
}
.field { display: grid; gap: 7px; border: 0; padding: 0; min-width: 0; }
.field-row { display: flex; gap: 12px; align-items: end; }
.grow { flex: 1; }
.label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--muted); padding: 0; }
.count { font-variant-numeric: tabular-nums; color: var(--text); &.over { color: #ff6b6b; } }
input:not([type]), textarea, .affix {
  width: 100%; border-radius: var(--r-sm); background: var(--raised); border: 1px solid var(--line);
  padding: 10px 12px; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:not([type]):focus-visible, textarea:focus-visible, .affix:has(input:focus-visible) {
  border-color: var(--accent-ink); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent);
}
textarea { resize: vertical; min-height: 104px; line-height: 1.45; }
.affix {
  display: flex; align-items: center; gap: 2px; padding: 0 0 0 12px; color: var(--muted);
  & input { border: 0; background: none; box-shadow: none; padding: 10px 12px 10px 0; color: var(--text); &:focus-visible { box-shadow: none; outline: none; } }
}
.avatar-pick {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  transition: scale .3s var(--spring);
  &:hover { scale: 1.06; }
  &::after {
    content: "+"; position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center; font-size: 15px; font-weight: 700; line-height: 1;
    background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--surface);
  }
  &:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
}
.avatar-prev, .pc-av, .drop-thumb {
  display: grid; place-items: center; overflow: hidden; border-radius: 50%; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, oklch(0.72 0.2 var(--hue, 293)), oklch(0.55 0.22 calc(var(--hue, 293) + 50)));
  & img { width: 100%; height: 100%; object-fit: cover; }
}
.avatar-prev { width: 100%; height: 100%; font-size: 15px; letter-spacing: -.02em; }

/* segmented control with sliding thumb */
.seg {
  --n: 3; --i: 0;
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: var(--r-sm); background: var(--raised); border: 1px solid var(--line);
  &::before {
    content: ""; position: absolute; inset: 3px auto 3px 3px; width: calc((100% - 6px) / var(--n));
    border-radius: 9px; background: var(--text); transform: translateX(calc(var(--i) * 100%));
    transition: transform .4s var(--spring);
  }
  &:has(> label:nth-child(4)) { --n: 4; }
  &:has(> label:nth-child(2) input:checked) { --i: 1; }
  &:has(> label:nth-child(3) input:checked) { --i: 2; }
  &:has(> label:nth-child(4) input:checked) { --i: 3; }
  & label {
    position: relative; text-align: center; padding: 7px 4px; font-size: 13px; font-weight: 500; cursor: pointer;
    color: var(--muted); transition: color .25s; border-radius: 9px; user-select: none;
    &:has(input:checked) { color: var(--bg); }
    &:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
  }
  & input { position: absolute; opacity: 0; pointer-events: none; }
}
.seg-sm label { padding: 5px 4px; font-size: 12px; }

input[type="range"] {
  --p: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: none; cursor: pointer;
  &::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--raised) var(--p)); box-shadow: 0 0 0 1px var(--line); }
  &::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--raised) var(--p)); }
  &::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .4), 0 0 0 1px rgb(0 0 0 / .1); transition: scale .2s var(--spring); }
  &::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .4); }
  &:active::-webkit-slider-thumb { scale: 1.2; }
  &:focus-visible { outline: none; &::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 40%, transparent); } }
}
.switch {
  display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; cursor: pointer; width: fit-content;
  & input { position: absolute; opacity: 0; }
  & .track {
    position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-2); transition: background-color .25s;
    &::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .35s var(--spring), background-color .25s; }
  }
  &:has(input:checked) .track { background: var(--accent); border-color: transparent; &::after { transform: translateX(16px); background: var(--on-accent); } }
  &:has(input:focus-visible) .track { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
}
.dice {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--raised); border: 1px solid var(--line-2);
  transition: border-color .2s, scale .15s var(--ease);
  &:hover { border-color: var(--accent-ink); }
  &:active { scale: .95; }
  & .i { width: 17px; height: 17px; }
  &.roll .i { animation: roll .6s var(--spring); }
}
@keyframes roll { from { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(1.25); } to { transform: rotate(360deg) scale(1); } }

.stage {
  container-type: inline-size; display: grid; grid-template-rows: auto 1fr auto; gap: 16px; padding: clamp(12px, 3vw, 20px); min-width: 0;
  background: radial-gradient(circle, var(--dot) 1px, transparent 1.3px) 0 0 / 18px 18px;
}
.platforms {
  display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; min-width: 0;
  & label {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 10px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted);
    transition: color .2s, background-color .2s, border-color .2s, scale .15s var(--ease);
    &:hover { color: var(--text); border-color: var(--line-2); }
    &:active { scale: .96; }
    &:has(input:checked) { background: var(--text); color: var(--bg); border-color: transparent; }
    &:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
  }
  & .g { width: 16px; height: 16px; }
  & input { position: absolute; opacity: 0; pointer-events: none; }
}
.frame {
  position: relative; isolation: isolate; overflow: clip; border-radius: 22px;
  padding: clamp(18px, 7cqi, 72px) clamp(14px, 7cqi, 72px);
  min-height: 340px; display: grid; place-items: center;
  background: #120f22;
  &::before {
    content: ""; position: absolute; z-index: -1; inset: -60%;
    background: conic-gradient(from 0deg, #8B5CF6, #3b2a8f, #0e7490, #C6FF3D, #6d28d9, #8B5CF6);
    opacity: 0; transition: opacity 1.2s var(--ease);
  }
  &::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(70% 70% at 50% 50%, rgb(10 10 11 / .25), rgb(10 10 11 / .55)); }
}
@keyframes spin { to { transform: rotate(1turn); } }
/* pseudo-elements can't be targeted through the nesting selector, so these live at top level */
.ready body::after { opacity: var(--grain); }
.ready .frame::before { filter: blur(60px); opacity: .85; animation: spin 24s linear infinite; }
.stage-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--muted);
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500;
  & .i { width: 15px; height: 15px; transition: translate .25s var(--ease); }
  &:hover .i { translate: 3px 0; }
}

/* ---------- Post card (pc) ---------- */
.pc {
  --c-bg: #000; --c-fg: #e7e9ea; --c-mut: #71767b; --c-line: #2f3336; --c-acc: #1d9bf0; --c-like: #f91880;
  width: 100%; max-width: 560px; border-radius: 18px; background: var(--c-bg); color: var(--c-fg);
  font: 400 15px/1.34 var(--native); letter-spacing: 0;
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / .65), 0 0 0 1px rgb(255 255 255 / .06);
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding: 14px 16px 12px;
  text-align: left;
  & b { font-weight: 700; }
  & .pc-av { width: 40px; height: 40px; font-size: 15px; }
  & .pc-head { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; line-height: 20px; }
  & .pc-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  & .pc-mut { color: var(--c-mut); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  & .pc-more { margin-left: auto; color: var(--c-mut); display: flex; }
  & .pc-text { margin: 2px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 20px; }
  & .hl { color: var(--c-acc); }
  & .pc-acts { display: flex; justify-content: space-between; color: var(--c-mut); font-size: 13px; max-width: 440px; }
  & .pc-act { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; min-width: 0; }
  & .i { width: 18.5px; height: 18.5px; stroke-width: 1.6; }
  & .lk { color: var(--c-like); & .i { fill: currentColor; stroke: currentColor; } }
  & .vb { width: 18px; height: 18px; flex: none; & .r { fill: var(--c-badge, var(--c-acc)); stroke: var(--c-badge, var(--c-acc)); stroke-width: 2.2; stroke-linejoin: round; } & .ck { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; } }
}
@container (width < 440px) {
  .frame { padding: 28px 10px; min-height: 300px; }
  .pc .pc-acts { font-size: 12px; & .i { width: 16.5px; height: 16.5px; } & .bm { display: none; } }
}
@container (width < 340px) {
  .frame { padding: 22px 6px; }
  .pc[data-p] { padding: 11px 10px 9px; grid-template-columns: 32px minmax(0, 1fr); gap: 0 8px; & .pc-av { width: 32px; height: 32px; font-size: 13px; } & .pc-acts { gap: 4px; } }
  .pc[data-p="igc"] { grid-template-columns: 30px minmax(0, 1fr) 24px; }
  .pc[data-p="imessage"] { padding: 0; }
}
@container (width < 420px) { .pc { font-size: 14px; padding: 12px 13px 10px; gap: 0 10px; grid-template-columns: 36px minmax(0,1fr); & .pc-av { width: 36px; height: 36px; } & .pc-act span { font-size: 12px; } } }

.pc[data-p="x"] {
  &[data-t="light"] { --c-bg: #fff; --c-fg: #0f1419; --c-mut: #536471; --c-line: #eff3f4; }
  &[data-t="dim"] { --c-bg: #15202b; --c-fg: #f7f9f9; --c-mut: #8b98a5; --c-line: #38444d; }
}
.pc[data-p="threads"] {
  --c-bg: #101010; --c-fg: #f3f5f7; --c-mut: #8a8a8a; --c-acc: #0095f6; --c-like: #ff3040;
  grid-template-columns: 36px minmax(0, 1fr); padding: 14px 16px;
  & .pc-av { width: 36px; height: 36px; }
  & .pc-name { font-weight: 600; }
  & .pc-text { margin: 1px 0 10px; }
  & .hl { color: var(--c-acc); }
  & .pc-acts { justify-content: flex-start; gap: 6px; margin-left: -8px; }
  & .pc-act { padding: 4px 8px; border-radius: 999px; }
  & .i { width: 19px; height: 19px; stroke-width: 1.8; }
  &[data-t="light"] { --c-bg: #fff; --c-fg: #000; --c-mut: #737373; }
  &[data-t="dim"] { --c-bg: #181818; --c-fg: #f3f5f7; --c-mut: #8a8a8a; }
}
.pc[data-p="bluesky"] {
  --c-bg: #000; --c-fg: #f1f3f5; --c-mut: #8d98a5; --c-acc: #1083fe; --c-like: #ec4899;
  grid-template-columns: 42px minmax(0, 1fr); padding: 12px 16px 8px;
  & .pc-av { width: 42px; height: 42px; }
  & .pc-name { font-weight: 600; }
  & .pc-text { margin: 2px 0 8px; line-height: 1.4; }
  & .pc-acts { max-width: 330px; margin-left: -6px; & .pc-act { padding: 5px 6px; } }
  & .vb { width: 16px; height: 16px; }
  &[data-t="light"] { --c-bg: #fff; --c-fg: #0b0f14; --c-mut: #42576c; }
  &[data-t="dim"] { --c-bg: #161e27; --c-fg: #f1f3f5; --c-mut: #93a5b7; }
}
.pc[data-p="igc"] {
  --c-bg: #000; --c-fg: #f5f5f5; --c-mut: #a8a8a8; --c-acc: #e0f1ff; --c-like: #ff3040; --c-badge: #0095f6;
  grid-template-columns: 32px minmax(0, 1fr) 24px; gap: 0 12px; padding: 16px; font-size: 14px; line-height: 18px;
  & .pc-av { width: 32px; height: 32px; font-size: 12px; }
  & .pc-head { font-size: 13px; gap: 6px; line-height: 18px; }
  & .pc-name { font-weight: 600; }
  & .pc-text { margin: 2px 0 6px; line-height: 18px; }
  & .hl { color: var(--c-acc); }
  & .ig-meta { display: flex; gap: 14px; font-size: 12px; font-weight: 600; color: var(--c-mut); }
  & .ig-heart { display: grid; justify-items: center; gap: 2px; align-content: start; padding-top: 10px; color: var(--c-mut); font-size: 12px; font-variant-numeric: tabular-nums; & .i { width: 14px; height: 14px; stroke-width: 2; } }
  & .vb { width: 13px; height: 13px; }
  &[data-t="light"] { --c-bg: #fff; --c-fg: #000; --c-mut: #737373; --c-acc: #00376b; }
  &[data-t="dim"] { --c-bg: #121212; --c-fg: #f5f5f5; --c-mut: #a8a8a8; }
}
.pc[data-p="imessage"] {
  --c-bg: #000; --c-fg: #fff; --c-mut: #98989f; --c-in: #262628; --c-head: #161618; --c-acc: #fff;
  display: block; padding: 0; overflow: clip; font-size: 16px; line-height: 21px; max-width: 400px;
  & .hl { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
  & .im-head { display: grid; justify-items: center; gap: 4px; padding: 14px 16px 10px; background: var(--c-head); border-bottom: 1px solid rgb(127 127 127 / .2); font-size: 11px; }
  & .pc-av { width: 52px; height: 52px; font-size: 21px; font-weight: 500; background: linear-gradient(180deg, #a5abb8, #858994); }
  & .im-head .pc-name { font-weight: 400; display: inline-flex; align-items: center; gap: 2px; color: var(--c-fg); }
  & .im-body { display: grid; gap: 3px; padding: 12px 14px 14px; }
  & .im-time { text-align: center; font-size: 11px; line-height: 14px; color: var(--c-mut); margin-bottom: 8px; & b { font-weight: 600; } }
  & .bub { position: relative; max-width: 76%; width: fit-content; padding: 7px 13px; border-radius: 19px; white-space: pre-wrap; overflow-wrap: anywhere; z-index: 0; }
  & .bub.tail::before, & .bub.tail::after { content: ""; position: absolute; bottom: 0; height: 20px; z-index: -1; }
  & .in { background: var(--c-in); color: var(--c-fg); margin: 12px 0 6px; }
  & .in.tail::before { left: -7px; width: 20px; background: var(--c-in); border-bottom-right-radius: 15px; }
  & .in.tail::after { left: -10px; width: 10px; background: var(--c-bg); border-bottom-right-radius: 10px; }
  & .out { background: #0b84fe; color: #fff; margin-left: auto; }
  & .out.tail::before { right: -7px; width: 20px; background: #0b84fe; border-bottom-left-radius: 15px; }
  & .out.tail::after { right: -10px; width: 10px; background: var(--c-bg); border-bottom-left-radius: 10px; }
  & .tap { position: absolute; top: -16px; right: -14px; width: 30px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #0b84fe; box-shadow: 0 0 0 2px var(--c-bg); & .i { width: 14px; height: 14px; fill: #fff; stroke: #fff; } }
  & .im-del { text-align: right; font-size: 11px; color: var(--c-mut); font-weight: 500; line-height: 14px; margin-top: 2px; }
  &[data-t="light"] { --c-bg: #fff; --c-fg: #000; --c-mut: #6e6e73; --c-in: #e9e9eb; --c-head: #f6f6f6; }
  &[data-t="dim"] { --c-bg: #1c1c1e; --c-in: #3a3a3c; --c-head: #2c2c2e; }
}

/* View transitions */
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .9, .1, 1); }
.vt-morph {
  & #card { view-transition-name: pcard; }
  & .pc-av { view-transition-name: pav; }
  & .pc-name { view-transition-name: pname; }
  & .pc-text, & .pc .in { view-transition-name: ptext; }
}
::view-transition-old(pname), ::view-transition-new(pname),
::view-transition-old(ptext), ::view-transition-new(ptext) { inline-size: auto; block-size: auto; object-fit: none; }
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme::view-transition-old(root) { z-index: 1; }
.vt-theme::view-transition-new(root) { z-index: 2; }
.vt-gal .tcard { view-transition-name: var(--vtn); view-transition-class: tcard; }
::view-transition-group(*.tcard) { animation-duration: .45s; }

/* ---------- Marquee ---------- */
.marquee-sec { padding: 16px 0 clamp(16px, 3vw, 40px); }
.marquee-cap { text-align: center; color: var(--muted); font-size: 14px; margin: 0 var(--gutter) 22px; }
.marquee {
  overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  &:hover .marquee-track { animation-play-state: paused; }
}
.marquee-track {
  display: flex; gap: 12px; width: max-content; padding: 4px 0;
  animation: mq 48s linear infinite;
  & li, & li a { display: inline-flex; align-items: center; gap: 10px; }
  & li {
    padding: 12px 20px 12px 16px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 16px; letter-spacing: -.01em;
    white-space: nowrap; transition: color .2s, border-color .2s;
    &:hover { border-color: var(--line-2); & .g { color: var(--accent-ink); } }
  }
  & .g { width: 20px; height: 20px; color: var(--muted); transition: color .2s; }
}
@keyframes mq { to { transform: translateX(calc(-50% - 6px)); } }

/* ---------- Sections ---------- */
.sec { padding: clamp(48px, 7vw, 88px) 0; }
.sec-head {
  display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 860px;
  & h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: .95; letter-spacing: -.055em; }
  & h2 em { font-size: 1.08em; color: var(--accent-ink); letter-spacing: -.03em; }
}
.sec-lede { color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); max-width: 60ch; }

/* ---------- Bento ---------- */
.bento {
  display: grid; gap: 14px; grid-template-columns: 1fr;
  @media (width >= 680px) { grid-template-columns: repeat(2, minmax(0, 1fr)); & .t-frames, & .t-local, & .t-schema { grid-column: span 2; } }
  @media (width >= 1040px) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    & .t-frames, & .t-local { grid-column: span 4; }
    & .t-export, & .t-rand, & .t-theme, & .t-share, & .t-schema { grid-column: span 2; }
  }
}
.tile {
  --mx: 50%; --my: 0%;
  position: relative; overflow: clip; isolation: isolate; container-type: inline-size;
  display: flex; flex-direction: column; gap: 22px; justify-content: space-between;
  padding: clamp(20px, 2.4vw, 28px); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .3s, translate .4s var(--ease);
  &::before {
    content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; left: -210px; top: -210px; border-radius: 50%;
    background: radial-gradient(closest-side, oklch(0.6 0.24 293 / .2), transparent);
    transform: translate(var(--mx), var(--my)); opacity: 0; transition: opacity .4s;
  }
  &:hover { border-color: var(--line-2); &::before { opacity: 1; } }
  & h3 { font-size: 21px; line-height: 1.15; letter-spacing: -.03em; font-weight: 600; margin-bottom: 6px; }
  & .tile-copy p { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 46ch; }
}
.sk-av { width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); flex: none; }
.sk-ln { height: 7px; border-radius: 4px; background: var(--line-2); display: block; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w90 { width: 90%; }

.frames-demo {
  display: grid; gap: 16px;
  @container (width >= 520px) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}
.fprev {
  aspect-ratio: 16 / 9; border-radius: 18px; display: grid; place-items: center; padding: 8%;
  background: radial-gradient(90% 120% at 0% 0%, var(--f1), transparent 65%), radial-gradient(90% 120% at 100% 100%, var(--f2), transparent 65%), var(--f3);
  transition: --f1 .8s var(--ease), --f2 .8s var(--ease), --f3 .8s var(--ease);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}
.mini-post {
  width: min(320px, 100%); display: grid; grid-template-columns: 26px 1fr; gap: 8px 10px; padding: 14px;
  border-radius: 14px; background: #0b0b0d; box-shadow: 0 20px 40px -14px rgb(0 0 0 / .6);
  --line-2: rgb(255 255 255 / .16);
  & .sk-av { grid-row: span 3; }
  & .sk-ln { align-self: center; }
}
.mini-acts { grid-column: 2; display: flex; justify-content: space-between; padding-top: 6px; & i { width: 14px; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .12); } }
.swatches {
  display: flex; flex-wrap: wrap; gap: 10px;
  @container (width >= 520px) { display: grid; grid-template-columns: repeat(2, 40px); }
  & button {
    width: 40px; height: 40px; border-radius: 50%; position: relative;
    background: radial-gradient(90% 90% at 20% 20%, var(--a), transparent 70%), radial-gradient(90% 90% at 80% 80%, var(--b), transparent 70%), var(--c);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); transition: scale .3s var(--spring);
    &:hover { scale: 1.1; }
    &::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent-ink); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .35s var(--spring); }
    &[aria-checked="true"]::after { opacity: 1; transform: none; }
  }
}
.export-demo { display: grid; gap: 12px; justify-items: center; }
#exportCanvas {
  width: 100%; max-width: 288px; height: auto; aspect-ratio: 8 / 5; border-radius: 14px; image-rendering: pixelated;
  background: var(--raised); box-shadow: 0 0 0 1px var(--line);
}
.export-demo .seg { width: 100%; max-width: 288px; }
.readout { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; & b { color: var(--text); font-weight: 600; } }

.rand-demo { display: grid; gap: 16px; }
.counters {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  & div { padding: 12px 10px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); min-width: 0; }
  & dt { font-size: 12px; color: var(--muted); }
  & dd { font-size: clamp(18px, 7cqi, 26px); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
  & div:last-child dd { color: var(--accent-ink); }
}
.rand-demo .dice { justify-self: start; }

.theme-demo { display: grid; gap: 14px; }
.mini-card {
  --bg2: #15202b; --ln: rgb(255 255 255 / .16);
  display: grid; grid-template-columns: 26px 1fr; gap: 8px 10px; padding: 16px; border-radius: 14px;
  background: var(--bg2); box-shadow: 0 0 0 1px var(--line);
  transition: background-color .5s var(--ease);
  & .sk-av { grid-row: span 3; background: var(--ln); }
  & .sk-ln { background: var(--ln); align-self: center; transition: background-color .5s; }
  &[data-t="light"] { --bg2: #fff; --ln: rgb(15 20 25 / .14); }
  &[data-t="dark"] { --bg2: #000; --ln: rgb(255 255 255 / .14); }
}

.phone {
  position: relative; align-self: center; width: 156px; height: 210px; border-radius: 28px 28px 0 0; overflow: hidden;
  border: 1px solid var(--line-2); border-bottom: 0; background: var(--raised); padding: 18px 12px 0;
  mask-image: linear-gradient(#000 80%, transparent);
}
.phone-post { display: grid; grid-template-columns: 22px 1fr; gap: 6px 8px; & .sk-av { width: 22px; height: 22px; grid-row: span 2; } & .sk-ln { align-self: center; height: 6px; } }
.sk-img { grid-column: 1 / -1; height: 70px; border-radius: 10px; margin-top: 4px; background: linear-gradient(135deg, oklch(0.6 0.24 293 / .5), oklch(0.93 0.22 125 / .35)); }
.sheet {
  position: absolute; inset: auto 6px 0; height: 120px; border-radius: 18px 18px 0 0; padding: 8px 12px; display: grid; gap: 8px; align-content: start;
  background: var(--surface); box-shadow: 0 -10px 30px rgb(0 0 0 / .35);
  animation: sheet 5s var(--ease) infinite;
  & .grab { width: 28px; height: 4px; border-radius: 2px; background: var(--line-2); justify-self: center; }
  & .apps { display: flex; justify-content: space-between; & i { width: 26px; height: 26px; border-radius: 8px; background: var(--line-2); } & i:first-child { background: var(--accent); } & i:nth-child(2) { background: #28c840; } & i:nth-child(3) { background: var(--violet); } }
  & .sk-ln { height: 6px; }
}
@keyframes sheet { 0%, 12% { transform: translateY(110%); } 30%, 78% { transform: translateY(0); } 96%, 100% { transform: translateY(110%); } }

.t-local {
  @container (width >= 600px) { display: grid; grid-template-columns: 1fr minmax(220px, 300px); align-items: stretch; }
}
.bytes {
  margin-top: 16px; display: flex; align-items: baseline; gap: 10px; color: var(--text) !important;
  & span { font-family: var(--serif); font-style: italic; font-size: 72px; line-height: .8; color: var(--accent-ink); }
  & small { font-size: 14px; color: var(--muted); }
}
.drop {
  display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; padding: 28px 18px; min-height: 200px;
  border-radius: var(--r-md); border: 1.5px dashed var(--line-2); background: var(--raised); cursor: pointer;
  transition: border-color .25s, background-color .25s, scale .3s var(--spring);
  &:hover, &.over { border-color: var(--accent-ink); }
  &.over { scale: 1.02; }
  &:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
}
.drop-thumb {
  width: 64px; height: 64px; background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1px var(--line);
  & svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  &.pop { animation: pop .5s var(--spring); }
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.drop-txt { font-size: 15px; & b { font-weight: 600; } }
.drop-log { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.schema { display: grid; gap: 10px; }
.schema-name { font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.schema-fields {
  display: grid; gap: 6px; min-height: 196px; align-content: start;
  & li {
    display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
    background: var(--raised); border: 1px solid var(--line); font-size: 13px;
    animation: fin .5s var(--ease) both; animation-delay: calc(var(--d) * 60ms);
  }
  & small { font-size: 11px; color: var(--muted); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); }
}
@keyframes fin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Gallery ---------- */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
  @media (width < 700px) {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter);
    & button { flex: none; scroll-snap-align: start; }
    &::-webkit-scrollbar { display: none; }
  }
  & button {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 8px 0 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--muted);
    transition: color .2s, background-color .2s, border-color .2s, scale .15s var(--ease);
    &:hover { color: var(--text); border-color: var(--line-2); }
    &:active { scale: .96; }
    &[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: transparent; & small { background: var(--bg); color: var(--text); } }
  }
  & .g { width: 15px; height: 15px; }
  & small { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--raised); font-variant-numeric: tabular-nums; }
}
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr)); @media (width >= 640px) { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; } }
.gallery.collapsed .tcard:nth-child(n + 11) { display: none; }
.more-row { display: flex; justify-content: center; margin-top: 28px; &[hidden] { display: none; } }
.tcard {
  --tint: var(--muted);
  border-radius: var(--r-md); padding: 8px 8px 14px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .25s, translate .35s var(--ease);
  &:hover { border-color: var(--line-2); translate: 0 -3px; & .tprev { --zoom: 1.04; } }
  &[hidden] { display: none; }
}
.tprev {
  --zoom: 1;
  position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(100% 100% at 100% 0%, color-mix(in oklch, var(--tint) 30%, transparent), transparent 70%), var(--raised);
  & > * { transform: scale(var(--zoom)); transition: transform .5s var(--ease); }
}
.tmeta { padding: 12px 6px 0; display: grid; gap: 2px; }
.tplat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); & .g { width: 13px; height: 13px; } }
.tname { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.skc { width: 78%; display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--surface); box-shadow: 0 8px 20px -10px rgb(0 0 0 / .4), 0 0 0 1px var(--line); }
.skr { display: flex; align-items: center; gap: 6px; }
.skc .sk-av { width: 16px; height: 16px; }
.skc .sk-ln { height: 5px; }
.sk-t { background: color-mix(in oklch, var(--tint) 70%, transparent) !important; }
.sk-ph { height: 36px; border-radius: 6px; background: linear-gradient(135deg, color-mix(in oklch, var(--tint) 55%, transparent), color-mix(in oklch, var(--tint) 15%, transparent)); }
.sk-acts { display: flex; gap: 8px; & i { width: 10px; height: 5px; border-radius: 3px; background: var(--line-2); } & i:first-child { background: var(--tint); } }
.sk-vert { width: 38%; aspect-ratio: 9 / 16; border-radius: 10px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in oklch, var(--tint) 65%, #000), color-mix(in oklch, var(--tint) 18%, #111));
  & .bars { position: absolute; inset: 6px 6px auto; display: flex; gap: 2px; & i { flex: 1; height: 2px; border-radius: 1px; background: rgb(255 255 255 / .5); } & i:first-child { background: #fff; } }
  & .side { position: absolute; right: 5px; bottom: 12px; display: grid; gap: 5px; & i { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / .75); } }
  & .cap { position: absolute; left: 6px; bottom: 10px; width: 50%; display: grid; gap: 3px; & i { height: 3px; border-radius: 2px; background: rgb(255 255 255 / .7); } & i + i { width: 70%; } }
}
.sk-chat { width: 80%; display: grid; gap: 5px;
  & i { height: 14px; border-radius: 8px; background: var(--line-2); width: 55%; }
  & i.me { justify-self: end; background: color-mix(in oklch, var(--tint) 75%, transparent); width: 48%; }
  & i.w { width: 70%; }
}
.sk-thread { width: 80%; display: grid; gap: 8px; padding: 8px 10px; position: relative;
  & .skr { align-items: start; }
  &::before { content: ""; position: absolute; left: 17px; top: 26px; bottom: 26px; width: 2px; border-radius: 1px; background: var(--line-2); }
}
.sk-video { width: 80%; display: grid; gap: 6px;
  & .thumb { aspect-ratio: 16 / 9; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in oklch, var(--tint) 60%, #000), color-mix(in oklch, var(--tint) 20%, #111)); }
  & .play { width: 18px; height: 13px; border-radius: 4px; background: #fff; opacity: .9; }
}

/* ---------- Everywhere ---------- */
.ew-card {
  position: relative; overflow: clip; isolation: isolate;
  display: grid; gap: 32px; padding: clamp(24px, 5vw, 64px); border-radius: var(--r-xl);
  background: radial-gradient(60% 90% at 100% 0%, oklch(0.6 0.24 293 / .18), transparent 70%), radial-gradient(50% 80% at 0% 100%, oklch(0.93 0.22 125 / .08), transparent 70%), var(--surface);
  border: 1px solid var(--line);
  @media (width >= 960px) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; }
  & h2 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: .95; letter-spacing: -.055em; margin: 14px 0; & em { color: var(--accent-ink); font-size: 1.08em; } }
}
.os-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  @media (width >= 560px) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  & li {
    display: grid; gap: 2px; padding: 18px; border-radius: 18px; background: color-mix(in oklch, var(--raised) 80%, transparent); border: 1px solid var(--line);
    transition: translate .35s var(--ease), border-color .25s;
    &:hover { translate: 0 -3px; border-color: var(--line-2); & svg { color: var(--accent-ink); } }
  }
  & svg { width: 28px; height: 28px; margin-bottom: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: color .25s; }
  & b { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
  & small { font-size: 13px; color: var(--muted); }
}

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; gap: 8px; @media (width >= 960px) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; align-items: start; & .sec-head { position: sticky; top: 110px; } } }
.faq { border-top: 1px solid var(--line); }
details {
  border-bottom: 1px solid var(--line);
  &::details-content { block-size: 0; overflow-y: clip; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
  &[open]::details-content { block-size: auto; }
}
summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 2px; font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; letter-spacing: -.02em; border-radius: 8px;
  &::-webkit-details-marker { display: none; }
  &::after {
    content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2);
    background: linear-gradient(currentColor 0 0) center / 11px 1.5px no-repeat, linear-gradient(currentColor 0 0) center / 1.5px 11px no-repeat;
    transition: transform .45s var(--spring), background-color .25s, color .25s;
  }
  &:hover::after { border-color: var(--muted); }
}
details[open] summary::after { transform: rotate(135deg); background-color: var(--accent); color: var(--on-accent); border-color: transparent; }
.ans { padding: 0 48px 24px 2px; color: var(--muted); }

/* ---------- Final + footer ---------- */
.final { padding: clamp(40px, 8vw, 120px) 0 clamp(72px, 10vw, 140px); position: relative; isolation: isolate; overflow: clip;
  &::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(40% 60% at 50% 60%, var(--glow-v), transparent 70%); }
}
.final-inner { text-align: center; display: grid; justify-items: center; gap: 32px;
  & h2 { font-size: clamp(2.6rem, 8vw, 7rem); line-height: .9; letter-spacing: -.06em; & em { color: var(--accent-ink); font-size: 1.1em; letter-spacing: -.03em; } }
}
.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.responsible {
  display: flex; gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 32px;
  & svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--accent-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  & p { font-size: 14px; color: var(--muted); & b { color: var(--text); font-weight: 600; } }
}
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.foot-links { display: flex; gap: 4px 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); & a { display: inline-block; padding: 6px 0; transition: color .2s; } & a:hover { color: var(--text); } }
.fine { font-size: 12px; color: var(--muted); flex-basis: 100%; }

/* ---------- Scroll-driven motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .studio { animation: tilt linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    .tcard { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .nav::before { animation: navsh linear both; animation-timeline: scroll(root); animation-range: 0 200px; }
  }
}
@keyframes rv { from { opacity: 0; transform: translateY(36px) scale(.98); } }
@keyframes tilt { from { transform: perspective(1400px) rotateX(18deg) scale(.92); opacity: .4; } }
@keyframes navsh { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .marquee-track { flex-wrap: wrap; justify-content: center; width: auto; padding-inline: var(--gutter); }
  .marquee { mask-image: none; }
  .sheet { animation: none !important; transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ============================================================
   Generated pages (tool/build_site.mjs) + shared game-UI pieces
   ============================================================ */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }

/* Glossy icon tile, like an app/game icon */
.gem {
  --tint: var(--accent);
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; color: #fff;
  background: linear-gradient(rgb(255 255 255 / .28), transparent 60%), linear-gradient(150deg, color-mix(in oklch, var(--tint) 92%, #fff), color-mix(in oklch, var(--tint) 70%, #000));
  box-shadow: 0 3px 0 color-mix(in oklch, var(--tint) 45%, #000), inset 0 1px 0 rgb(255 255 255 / .35), 0 10px 22px -10px var(--tint);
  & .g { width: 18px; height: 18px; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .35)); }
}
[style*="--tint"] .gem { --tint: inherit; }
.gem-light { color: #0A0A0B; & .g { filter: none; } }
.eyebrow .gem { width: 28px; height: 28px; border-radius: 9px; & .g { width: 15px; height: 15px; } }

/* Template cards: level-select tiles */
.tcard {
  transition: border-color .25s, translate .45s var(--spring), box-shadow .45s var(--spring);
  box-shadow: 0 4px 0 var(--line);
  & > a { display: block; border-radius: inherit; }
  & .tprev::after {
    content: ""; position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%230A0A0B'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: 0 3px 0 oklch(0.6 0.16 128); scale: 0; transition: scale .4s var(--spring);
  }
  &:hover { translate: 0 -5px; box-shadow: 0 9px 0 var(--line), 0 24px 40px -24px color-mix(in oklch, var(--tint) 70%, transparent); & .tprev::after { scale: 1; } }
  &:active { translate: 0 2px; box-shadow: 0 1px 0 var(--line); transition-duration: .08s; }
  &:has(a:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
  & a:focus-visible { outline: none; }
}
.tname { margin-top: 1px; }
.sk-col { flex: 1; display: grid; gap: 5px; }

/* Page scaffolding */
.page > .pg-hero:first-child { padding-top: clamp(108px, 14vw, 156px); }
.pg-hero { position: relative; isolation: isolate; padding-bottom: clamp(32px, 6vw, 72px);
  &::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 720px; pointer-events: none;
    background: radial-gradient(45% 55% at 85% 20%, color-mix(in oklch, var(--tint, var(--violet)) 30%, transparent), transparent 70%), radial-gradient(35% 40% at 10% 10%, var(--glow-l), transparent 70%); }
}
.pg-hero-center { text-align: center; & .wrap { display: grid; justify-items: center; gap: 20px; } & .sec-lede { margin-inline: auto; } & .pg-cta { justify-content: center; } }
.pg-hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center;
  @media (width >= 960px) { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
.pg-copy { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.pg-title { font-size: clamp(2.5rem, 7vw, 5.4rem); line-height: .92; letter-spacing: -.06em; overflow-wrap: anywhere;
  & em { color: var(--accent-ink); font-size: 1.08em; letter-spacing: -.03em; }
}
.pg-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pg-perks { display: flex; flex-wrap: wrap; gap: 8px;
  & li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
  & li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%230A0A0B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; font-size: 13px; color: var(--muted);
  & li + li::before { content: "/"; margin-right: 4px; opacity: .5; }
  & a:hover { color: var(--text); }
  & [aria-current] { color: var(--text); }
}

/* Hero art: one big tile that launches the studio */
.pg-art { display: block; position: relative; padding: 12px; border-radius: var(--r-xl); max-width: 520px; width: 100%; justify-self: center;
  & .tprev { aspect-ratio: 1 / 1; border-radius: 22px; & > * { scale: 1.6; } & > .sk-vert { scale: 1.3; } }
  & .tprev::after { display: none; }
  &:hover { translate: 0 -6px; }
}
.pg-art-play { position: absolute; right: 28px; bottom: 28px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(rgb(255 255 255 / .35), transparent 55%) var(--accent); color: var(--on-accent);
  box-shadow: 0 5px 0 oklch(0.6 0.16 128), 0 16px 34px -12px oklch(0.9 0.22 125 / .6);
  transition: scale .4s var(--spring); & .i { width: 26px; height: 26px; stroke-width: 2.2; }
  .pg-art:hover & { scale: 1.08; }
}

/* Editable fields */
.pg-fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.pg-field-group { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 0 var(--line);
  & h3 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
  & ul { display: flex; flex-wrap: wrap; gap: 6px; }
  & li { padding: 6px 11px; border-radius: 10px; font-size: 14px; background: var(--raised); border: 1px solid var(--line); }
  & small { color: var(--muted); font-size: 12px; }
}

/* Steps: quest log */
.pg-steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  & li { counter-increment: s; position: relative; padding: 66px 22px 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 0 var(--line); display: grid; gap: 6px; align-content: start; }
  & li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    font-weight: 800; color: var(--on-accent); background: linear-gradient(rgb(255 255 255 / .35), transparent 60%) var(--accent); box-shadow: 0 3px 0 oklch(0.6 0.16 128); }
  & b { font-size: 18px; letter-spacing: -.02em; }
  & p { color: var(--muted); font-size: 15px; }
  & a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
}

/* Platform groups on /templates/ */
.pg-group { padding-block: clamp(24px, 4vw, 44px); }
.pg-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px;
  & h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.04em; }
  & h2 small { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); }
}
.chips-links { display: flex; flex-wrap: wrap; gap: 10px;
  & a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 14px; font-weight: 500; background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 3px 0 var(--line); transition: translate .35s var(--spring), box-shadow .35s var(--spring), border-color .2s; }
  & a:hover { translate: 0 -3px; box-shadow: 0 6px 0 var(--line); border-color: color-mix(in oklch, var(--tint) 60%, transparent); & .g { color: var(--tint); } }
}

/* Store badges: reward tiles */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.final-inner .stores { justify-content: center; }
.store { --lip: rgb(0 0 0 / .5);
  display: inline-flex; align-items: center; gap: 12px; height: 58px; padding: 0 22px 0 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(rgb(255 255 255 / .1), transparent 60%) #111113; border: 1px solid rgb(255 255 255 / .16);
  box-shadow: 0 4px 0 var(--lip), 0 14px 30px -16px rgb(0 0 0 / .7);
  transition: translate .3s var(--spring), box-shadow .3s var(--spring);
  & svg { width: 26px; height: 26px; flex: none; }
  & span { display: grid; line-height: 1.1; text-align: left; }
  & small { font-size: 11px; opacity: .75; }
  & b { font-size: 18px; letter-spacing: -.02em; }
  &:is(a):hover { translate: 0 -2px; box-shadow: 0 6px 0 var(--lip), 0 18px 34px -16px rgb(0 0 0 / .7); }
  &:is(a):active { translate: 0 3px; box-shadow: 0 1px 0 var(--lip); transition-duration: .08s; }
  &.soon { position: relative; cursor: default; }
  &.soon::after { content: "SOON"; position: absolute; top: -9px; right: -8px; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .08em;
    color: var(--on-accent); background: var(--accent); box-shadow: 0 2px 0 oklch(0.6 0.16 128); rotate: 6deg; }
}
.ew-copy .stores { margin-top: 24px; }

/* Footer directory: every generator, crawlable from every page */
.foot-dir { display: grid; gap: 24px 20px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 8px 0 36px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
  & .foot-h { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 8px; & .g { width: 16px; height: 16px; } }
  & ul { display: grid; gap: 2px; }
  & li a { display: inline-block; padding: 3px 0; font-size: 13px; color: var(--muted); transition: color .2s; }
  & a:hover { color: var(--text); }
}

/* ============================================================
   Accounts + community gallery
   ============================================================ */
.acct { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, background-color .2s;
  &:hover { color: var(--text); background: var(--line); }
  @media (width < 520px) { display: none; }
}
.acct-menu { position: relative; }
.acct-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; padding: 0;
  background: linear-gradient(150deg, var(--violet), color-mix(in oklch, var(--violet) 55%, #000)); color: #fff; font-weight: 700; font-size: 15px; line-height: 1;
  box-shadow: 0 3px 0 color-mix(in oklch, var(--violet) 40%, #000), 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2); transition: translate .3s var(--spring);
  &:hover { translate: 0 -1px; }
  &[aria-expanded="true"] { box-shadow: 0 1px 0 color-mix(in oklch, var(--violet) 40%, #000), 0 0 0 2px var(--bg), 0 0 0 3px var(--accent-ink); translate: 0 1px; }
  & img { width: 100%; height: 100%; object-fit: cover; }
}
.acct-pop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; padding: 8px; border-radius: var(--r-md); display: grid; gap: 1px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 5px 0 var(--line), 0 30px 60px -20px rgb(0 0 0 / .6);
  transform-origin: top right; animation: pop-in .18s var(--ease);
  &[hidden] { display: none; }
  & .acct-who { display: grid; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); & b { font-size: 15px; } & small { color: var(--muted); font-size: 13px; } }
  & a, & button { text-align: left; padding: 9px 10px; border-radius: 10px; font-size: 14px; outline-offset: -2px; }
  & a:hover, & button:hover, & a:focus-visible, & button:focus-visible { background: var(--raised); }
  & button { color: #ff7a7a; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 11px; }
}
@keyframes pop-in { from { opacity: 0; scale: .96; translate: 0 -4px; } }

/* Sign-in card */
.auth-hero { min-height: 100dvh; display: grid; align-items: center; }
.auth-card { width: min(440px, 100%); margin-inline: auto; padding: clamp(24px, 5vw, 36px); border-radius: var(--r-xl); text-align: center; display: grid; gap: 16px;
  background: color-mix(in oklch, var(--surface) 92%, transparent); border: 1px solid var(--line-2); box-shadow: 0 6px 0 var(--line), 0 40px 90px -40px rgb(0 0 0 / .8);
  & .fine { margin-top: 4px; }
}
.auth-mark { --tint: var(--accent); width: 56px; height: 56px; border-radius: 18px; justify-self: center; & svg { width: 34px; height: 34px; } }
.auth-title { font-size: clamp(1.9rem, 5vw, 2.4rem); line-height: 1; letter-spacing: -.05em; & em { color: var(--accent-ink); } }
.auth-sub { color: var(--muted); font-size: 15px; }
.auth-providers { display: grid; gap: 10px; &:empty { display: none; } }
.prov { --lip: var(--line-2); display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--raised); border: 1px solid var(--line-2); box-shadow: 0 4px 0 var(--lip); transition: translate .3s var(--spring), box-shadow .3s var(--spring), border-color .2s;
  & svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  &:hover { translate: 0 -2px; box-shadow: 0 6px 0 var(--lip); border-color: var(--muted); }
  &:active { translate: 0 3px; box-shadow: 0 1px 0 var(--lip); transition-duration: .08s; }
}
.prov-google { background: #fff; color: #1f1f1f; border-color: #dadce0; --lip: #c4c7cc; }
.prov-apple, .prov-x { background: #000; color: #fff; border-color: #333; --lip: #000; }
.prov-facebook { background: #0866FF; color: #fff; border-color: #0866FF; --lip: #0447b8; & svg circle { fill: #fff; } & svg path { fill: #0866FF; } }
.prov-discord { background: #5865F2; color: #fff; border-color: #5865F2; --lip: #3c45b0; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; &::before, &::after { content: ""; flex: 1; height: 1px; background: var(--line-2); } &[hidden] { display: none; } }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line);
  & button { height: 38px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); transition: background-color .2s, color .2s; }
  & [aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 0 var(--line-2); }
}
.auth-form { display: grid; gap: 12px; text-align: left; & .btn { width: 100%; margin-top: 4px; } }
.auth-field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); &[hidden] { display: none; }
  & input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
  & input:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent); }
}
.auth-err { color: #ff7a7a; font-size: 14px; min-height: 1em; &:empty { display: none; } }

/* Gallery grid (masonry via columns: no JS, mockups keep their aspect ratio) */
.gal-sec { padding-top: 0; }
.gal-chips { margin-bottom: 24px; & a[aria-current] { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 3px 0 oklch(0.6 0.16 128); } }
.pgrid { columns: 4 240px; column-gap: 14px; }
.pcard { break-inside: avoid; margin-bottom: 14px; padding: 8px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 0 var(--line);
  transition: translate .45s var(--spring), box-shadow .45s var(--spring);
  &:hover { translate: 0 -4px; box-shadow: 0 8px 0 var(--line); }
}
.pimg { display: block; border-radius: 14px; overflow: hidden; background: var(--raised); & img { width: 100%; height: auto; } }
.pmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 4px 2px; font-size: 13px; min-width: 0; }
.pauth { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; & span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.ptpl { color: var(--muted); white-space: nowrap; font-size: 12px; &:hover { color: var(--text); } }
.pav { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.pav-letter { display: inline-grid; place-items: center; background: var(--violet); color: #fff; font-weight: 700; font-size: 13px; }
.pav-lg { width: 44px; height: 44px; font-size: 18px; }
.pav-xl { width: 88px; height: 88px; font-size: 36px; box-shadow: 0 5px 0 color-mix(in oklch, var(--violet) 40%, #000); }
.pempty { display: grid; justify-items: center; gap: 18px; padding: 56px 0; color: var(--muted); text-align: center; }

/* Post page */
.post-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; @media (width >= 960px) { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.post-art { position: relative; padding: 10px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 0 var(--line);
  & img { width: 100%; height: auto; border-radius: 20px; }
}
.post-flag { position: absolute; left: 22px; top: 22px; padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-accent); background: var(--accent); box-shadow: 0 2px 0 oklch(0.6 0.16 128); }
.post-side { display: grid; gap: 18px; @media (width >= 960px) { position: sticky; top: 110px; } }
.post-author { display: inline-flex; align-items: center; gap: 12px; & span { display: grid; } & small { color: var(--muted); } }
.post-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.02; letter-spacing: -.045em; overflow-wrap: anywhere; & em { color: var(--accent-ink); } }
.post-tools { display: flex; gap: 16px; }
.link-btn { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; &:hover { color: var(--text); } &.danger { color: #ff7a7a; } &[hidden] { display: none; } }

/* Screenshot guard: same preview mark as the studio canvas (sparse brand wordmarks). */
.frame .pc { position: relative; }
.frame .pc::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='170'%3E%3Cg transform='rotate(-18 150 85)' fill='%23fff' fill-opacity='.24' style='paint-order:stroke' stroke='%23000' stroke-opacity='.12' stroke-width='.8'%3E%3Crect x='70' y='74' width='22' height='22' rx='7' fill='none' stroke='%23fff' stroke-opacity='.24' stroke-width='1.4'/%3E%3Ctext x='75' y='90' font-family='Georgia,serif' font-style='italic' font-size='14'%3Esf%3C/text%3E%3Ctext x='100' y='91' font-family='Arial,sans-serif' font-size='17'%3E%3Ctspan font-weight='800'%3Esocial%3C/tspan%3E%3Ctspan font-family='Georgia,serif' font-style='italic' font-size='19'%3Efaker%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E") 0 0 / 300px 170px repeat;
}

/* ---------- Settings + profile details ---------- */
.settings-hero { padding-bottom: clamp(48px, 8vw, 96px); }
.settings { max-width: 720px; display: grid; gap: 18px; &[hidden] { display: none; } }
.settings-head { display: grid; gap: 12px; margin-bottom: 10px; & .link-arrow { justify-self: start; } }
.settings-card {
  display: grid; gap: 14px; padding: clamp(20px, 4vw, 28px); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 0 var(--line);
  & h2 { font-size: 20px; letter-spacing: -.03em; }
  & > .btn { justify-self: start; }
  & > p:not(.form-msg) { color: var(--muted); font-size: 15px; }
}
.avatar-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; & small { color: var(--muted); font-size: 12px; flex-basis: 100%; } & label { cursor: pointer; } & [hidden] { display: none; } }
.pav-xl { overflow: hidden; & img { width: 100%; height: 100%; object-fit: cover; } }
.auth-field {
  & > span:first-child { display: flex; justify-content: space-between; }
  & > small { font-size: 12px; color: var(--muted); font-weight: 400; }
  & textarea { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; resize: vertical; min-height: 84px;
    &:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent); } }
}
.prefix-input { position: relative; display: block;
  & i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; font-style: normal; color: var(--muted); pointer-events: none; }
  & input { width: 100%; padding-left: 30px; }
}
.field-pair { display: grid; gap: 12px; @media (width >= 560px) { grid-template-columns: 1fr 1fr; } }
.form-msg { font-size: 14px; min-height: 1em; &:empty { display: none; } &.ok { color: oklch(0.78 0.17 145); } &.err { color: #ff7a7a; } }
.btn-danger { --lip: #8f1d1d; background: #e5484d; color: #fff; }
.danger-zone { border-color: color-mix(in oklch, #e5484d 40%, transparent); & h2 { color: #ff7a7a; } }
.linked { display: flex; flex-wrap: wrap; gap: 8px;
  & li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
  & svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  & .muted { color: var(--muted); font-weight: 400; background: none; border: 0; padding: 0; }
}
.profile-bio { max-width: 52ch; font-size: 17px; text-align: center; text-wrap: balance; }
.profile-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; color: var(--muted); font-size: 14px; & a { color: var(--accent-ink); } & a:hover { text-decoration: underline; } }
