/* ddl.lt design system
   DNA: seal.net's liquid-metal portal and arc controls, rebuilt on Apple's rules —
   one idea per screen, display type set tight, hairline glass, generous air,
   motion that is scroll-linked and eased like a physical object. */

:root {
  --ink-0: #040507;
  --ink-1: #0a0c10;
  --ink-2: #11141a;
  --ink-3: #1a1e26;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #f5f5f7;
  --fg-2: rgba(245, 245, 247, 0.72);
  --fg-3: rgba(245, 245, 247, 0.48);
  --fg-4: rgba(245, 245, 247, 0.28);
  --gold: #ead2a0;
  --gold-2: #c9a46a;
  --gold-hi: #fff5de;
  --gold-ink: #1b1408;
  --haze: #1f3a52;
  --ember: #4a3420;
  /* one accent per kind; the vortex and controls tint toward it */
  --k-link: #8fd6ff;
  --k-file: #ead2a0;
  --k-folder: #f2b79c;
  --k-secret: #c8b8ff;
  --accent: var(--gold);
  --ok: #7fe0b0;
  --warn: #ffcf7a;
  --bad: #ff8b8b;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-1: 12px;
  --r-2: 20px;
  --r-3: 30px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-1);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: rgba(234, 210, 160, 0.35); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, canvas { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Atmosphere ─────────────────────────────────────────────────────────────── */
.atmosphere {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 18% 18%, rgba(48, 92, 122, 0.42), transparent 60%),
    radial-gradient(50vw 40vw at 92% 100%, rgba(120, 82, 40, 0.22), transparent 65%),
    radial-gradient(40vw 40vw at 70% 40%, rgba(70, 60, 120, 0.12), transparent 70%),
    linear-gradient(180deg, #0c1117 0%, #0a0c10 55%, #08090c 100%);
}
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.dust { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.5s var(--ease), backdrop-filter 0.5s var(--ease), padding 0.5s var(--ease), border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding-top: 10px; padding-bottom: 10px;
  background: rgba(10, 12, 16, 0.62);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 34px; height: 34px; transition: transform 0.8s var(--spring); }
.brand:hover svg { transform: rotate(90deg); }
.brand-word { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.32em; font-size: 13px; }
.brand-word i { font-style: normal; color: var(--gold); letter-spacing: 0.05em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 13px; color: var(--fg-2); padding: 8px 14px; border-radius: 999px;
  transition: color 0.3s, background 0.3s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.lang {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.03); transition: border-color 0.3s, background 0.3s;
}
.lang:hover { border-color: rgba(234, 210, 160, 0.5); background: rgba(234, 210, 160, 0.06); }
.lang svg { width: 14px; height: 14px; opacity: 0.8; }
@media (max-width: 640px) { .nav-link.opt { display: none; } }

/* ── Type ───────────────────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(48px, 7.4vw, 104px); margin: 0;
}
.h2 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  font-size: clamp(40px, 5.6vw, 80px); margin: 0;
}
.h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(22px, 2.2vw, 28px); margin: 0; line-height: 1.15; }
.lede { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.4; color: var(--fg-2); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}
.muted { color: var(--fg-3); }
.gold-text {
  background: linear-gradient(100deg, #fff5de 0%, #ead2a0 30%, #b88d4f 55%, #f6e3bb 80%, #ead2a0 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s var(--ease) infinite;
}
@keyframes sheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--s, 16px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 28px); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  --b: rgba(255, 255, 255, 0.08);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  background: var(--b); border: 1px solid var(--line-2); color: var(--fg);
  transition: transform 0.4s var(--spring), background 0.3s, border-color 0.3s, box-shadow 0.4s, opacity 0.3s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn-gold {
  color: var(--gold-ink); border-color: transparent; font-weight: 600;
  background: linear-gradient(135deg, #fff3d6 0%, #ead2a0 45%, #c9a46a 100%);
  box-shadow: 0 10px 30px -10px rgba(234, 210, 160, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-gold:hover { background: linear-gradient(135deg, #fff8e6 0%, #f1dcae 45%, #d4b078 100%); box-shadow: 0 16px 40px -12px rgba(234, 210, 160, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.btn-danger:hover { border-color: rgba(255, 139, 139, 0.5); color: var(--bad); background: rgba(255, 139, 139, 0.08); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; color: var(--fg); }
.link-arrow::after { content: "→"; transition: transform 0.4s var(--spring); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold-2); }

/* ── Glass surfaces ─────────────────────────────────────────────────────────── */
.glass {
  position: relative; border-radius: var(--r-3); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* Cursor spotlight: set --mx/--my from JS (ui.js spotlight()) */
.spot { overflow: hidden; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(234, 210, 160, 0.12), transparent 45%);
  transition: opacity 0.5s var(--ease);
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(234, 210, 160, 0.6), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity 0.5s var(--ease);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }
.card { padding: clamp(24px, 3vw, 40px); }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 8px; }
.field > span { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.input, .textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--fg);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); border-radius: var(--r-1);
  padding: 12px 14px; outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.input::placeholder, .textarea::placeholder { color: var(--fg-4); }
.input:focus, .textarea:focus { border-color: rgba(234, 210, 160, 0.7); box-shadow: 0 0 0 4px rgba(234, 210, 160, 0.12); background: rgba(0, 0, 0, 0.5); }
.textarea { resize: none; line-height: 1.5; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-1); background: rgba(0, 0, 0, 0.35); transition: border-color 0.3s, box-shadow 0.3s; }
.input-prefix:focus-within { border-color: rgba(234, 210, 160, 0.7); box-shadow: 0 0 0 4px rgba(234, 210, 160, 0.12); }
.input-prefix b { padding-left: 14px; font-weight: 500; color: var(--fg-3); font-size: 15px; white-space: nowrap; flex: none; max-width: 62%; overflow: hidden; text-overflow: ellipsis; }
.input-prefix .input { border: 0; background: transparent; box-shadow: none; padding-left: 2px; flex: 1; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--fg-2);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  transition: all 0.35s var(--ease);
}
.chip:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.3); }
.chip[aria-pressed="true"] { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); font-weight: 600; }

.modes { display: grid; gap: 8px; }
.mode {
  position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; align-items: center; text-align: left;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), transform 0.4s var(--spring);
}
.mode:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }
.mode:active { transform: scale(0.985); }
.mode svg { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: var(--fg-2); transition: all 0.35s; }
.mode b { font-size: 14px; font-weight: 600; }
.mode small { font-size: 12px; color: var(--fg-3); line-height: 1.35; }
.mode[aria-pressed="true"] { border-color: rgba(234, 210, 160, 0.55); background: rgba(234, 210, 160, 0.07); }
.mode[aria-pressed="true"] svg { background: var(--gold); color: var(--gold-ink); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--fg-2); cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); position: relative; cursor: pointer; transition: background 0.3s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.4s var(--spring); }
.switch input:checked { background: var(--gold-2); }
.switch input:checked::after { transform: translateX(18px); }

/* ── Scroll reveal (ui.js reveal()) ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(32px); filter: blur(8px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out), filter 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }
/* Word-by-word luminance reveal for big statements, driven by --p (0..1) */
.words span { color: rgba(245, 245, 247, 0.16); transition: color 0.25s linear; }
.words span.lit { color: var(--fg); }
.words span.gold.lit { color: var(--gold); }

/* ── Portal (shared: composer, open page, request page) ─────────────────────── */
.portal {
  --size: min(600px, 94vw);
  position: relative; width: var(--size); height: var(--size); container-type: inline-size;
  user-select: none;
}
.portal-canvas { position: absolute; left: 50%; top: 50%; width: 300%; height: 300%; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; }
.portal-arcs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; overflow: visible; pointer-events: none; }
.arc { pointer-events: auto; cursor: pointer; }
.arc path.shape {
  fill: rgba(22, 24, 30, 0.92); stroke: rgba(255, 255, 255, 0.06); stroke-width: 1;
  transition: fill 0.4s var(--ease), stroke 0.4s var(--ease);
}
.arc:hover path.shape, .arc:focus-visible path.shape { fill: rgba(36, 38, 46, 0.96); stroke: rgba(234, 210, 160, 0.45); }
.arc.active path.shape { fill: rgba(234, 210, 160, 0.14); stroke: rgba(234, 210, 160, 0.6); }
.arc.primary path.shape { fill: rgba(26, 24, 20, 0.95); }
/* hover previews the active state: the arc turns gold like it does once the seal is ready */
.arc.primary:hover path.shape, .arc.primary:focus-visible path.shape { fill: #d9bd86; stroke: rgba(255, 245, 222, 0.7); }
.arc.primary:hover text, .arc.primary:focus-visible text { fill: var(--gold-ink); }
.arc .ico { color: var(--fg); }
.arc .ico .glyph { transform-box: fill-box; transform-origin: center; transition: transform 0.5s var(--spring); }
.arc:hover .ico .glyph, .arc:focus-visible .ico .glyph { transform: scale(1.15); }
.arc text { fill: var(--fg); font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.16em; text-transform: uppercase; }
.arc.primary text { fill: var(--gold-hi); transition: fill 0.4s var(--ease); }
.arc[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.arc:focus { outline: none; }
.arcs-hidden .arc { opacity: 0; pointer-events: none; }
.arc { transition: opacity 0.6s var(--ease), transform 0.8s var(--spring); transform-origin: 300px 300px; }

.portal-ring { position: absolute; inset: 0; z-index: 3; pointer-events: none; width: 100%; height: 100%; transform: rotate(-90deg); }
.portal-ring circle { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset 0.3s linear, opacity 0.5s; filter: drop-shadow(0 0 6px rgba(234, 210, 160, 0.8)); }

.disc {
  position: absolute; left: 50%; top: 50%; width: 66.6%; height: 66.6%; transform: translate(-50%, -50%);
  border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 50% 35%, #23252c 0%, #17191e 60%, #121418 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 90px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -30px 60px rgba(0, 0, 0, 0.35);
  display: grid; place-items: center;
  transition: transform 0.9s var(--spring), opacity 0.6s var(--ease), box-shadow 0.6s;
}
.disc.hidden { transform: translate(-50%, -50%) scale(0.6); opacity: 0; pointer-events: none; }
.disc.glow { box-shadow: 0 0 0 1px rgba(234, 210, 160, 0.55), 0 0 60px rgba(234, 210, 160, 0.35), 0 40px 90px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.disc-inner { width: 72%; max-height: 78%; display: flex; flex-direction: column; gap: 2.4cqw; font-size: clamp(11px, 2.4cqw, 15px); }
.disc-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 1em; }
.disc-head b { font-weight: 600; }
.disc-head span { color: var(--fg-3); font-size: 0.85em; font-weight: 500; }
.disc .textarea, .disc .input { font-size: max(16px, 1em); border-radius: 14px; background: rgba(0, 0, 0, 0.3); border-color: rgba(234, 210, 160, 0.35); }
.disc .textarea { height: 26cqw; min-height: 90px; }
.disc .textarea.masked { -webkit-text-security: disc; }
.disc-foot { text-align: center; color: var(--fg-2); font-size: 0.85em; font-weight: 500; line-height: 1.5; }
.disc-foot .dot { opacity: 0.5; margin: 0 6px; }
.disc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tiny-btn { font-size: 0.85em; font-weight: 600; color: var(--fg-2); padding: 4px 8px; border-radius: 8px; transition: color 0.3s, background 0.3s; }
.tiny-btn:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); }

.drop {
  border: 1.5px dashed rgba(234, 210, 160, 0.35); border-radius: 18px; padding: 4cqw 3cqw; text-align: center;
  display: grid; gap: 6px; place-items: center; color: var(--fg-2); cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.5s var(--spring);
}
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(234, 210, 160, 0.06); transform: scale(1.02); }
.drop svg { width: 30px; height: 30px; color: var(--gold); }
.drop b { color: var(--fg); font-weight: 600; }
.filelist { list-style: none; margin: 0; padding: 0; max-height: 17cqw; overflow: auto; display: grid; gap: 4px; scrollbar-width: thin; }
.filelist li { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85em; color: var(--fg-2); }
.filelist li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist li span:last-child { color: var(--fg-3); flex: none; }

.result-link {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(234, 210, 160, 0.4); font-family: var(--mono); font-size: 0.82em;
  word-break: break-all; line-height: 1.35; cursor: pointer; transition: border-color 0.3s, background 0.3s;
}
.result-link:hover { border-color: var(--gold); background: rgba(234, 210, 160, 0.06); }
.result-link .lbl { font-family: var(--font); font-size: 0.85em; font-weight: 700; color: var(--gold); flex: none; letter-spacing: 0.08em; }
.qr { width: 46%; aspect-ratio: 1; margin: 0 auto; background: #f6efe0; border-radius: 16px; padding: 8px; }
.qr img { width: 100%; height: 100%; }

/* ── Selector (pyramid seen from above: link · files · folder · secret) ─────── */
.selector { position: absolute; left: 50%; top: 50%; width: 58%; height: 58%; transform: translate(-50%, -50%); z-index: 3; transition: transform 0.9s var(--spring), opacity 0.6s var(--ease); }
.selector.hidden { transform: translate(-50%, -50%) scale(1.25) rotate(45deg); opacity: 0; pointer-events: none; }
.selector svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6)); }
.face { cursor: pointer; outline: none; }
.face polygon { transition: fill-opacity 0.4s var(--ease); }
.face text { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.18em; fill: rgba(245, 245, 247, 0.7); transition: fill 0.4s var(--ease); pointer-events: none; }
.face:hover text, .face:focus-visible text, .face.hot text { fill: #fff; }
.face .edge { fill: none; stroke: url(#edgeGold); stroke-width: 1.5; opacity: 0.5; transition: opacity 0.4s; }
.face:hover .edge, .face.hot .edge { opacity: 1; }
.face .shine { opacity: 0; transition: opacity 0.4s; mix-blend-mode: screen; }
.face:hover .shine, .face.hot .shine { opacity: 1; }
.face .sub { font-size: 9.5px; letter-spacing: 0.12em; fill: var(--gold); opacity: 0; transition: opacity 0.4s; font-weight: 600; }
.face:hover .sub, .face.hot .sub { opacity: 0.9; }

/* ── Side sheet (options) ───────────────────────────────────────────────────── */
.sheet {
  position: absolute; z-index: 20; width: 340px; max-height: min(640px, 82vh); overflow: auto; padding: 22px;
  border-radius: 26px; display: grid; gap: 18px; scrollbar-width: thin;
  opacity: 0; transform: translateX(-12px) scale(0.96); pointer-events: none; transform-origin: left center;
  transition: opacity 0.45s var(--ease), transform 0.6s var(--spring);
}
.sheet.open { opacity: 1; transform: none; pointer-events: auto; }
.sheet h4 { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); font-weight: 600; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head b { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.02em; }
@media (max-width: 1100px) {
  .sheet { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto !important; width: auto; max-height: 72vh; transform: translateY(30px); transform-origin: bottom center; }
  .sheet.open { transform: none; }
}

/* ── Toast ──────────────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(30, 32, 38, 0.85); border: 1px solid var(--line-2);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.6s var(--spring) both;
}
.toast.ok { border-color: rgba(127, 224, 176, 0.4); }
.toast.bad { border-color: rgba(255, 139, 139, 0.5); }
.toast.out { animation: toast-out 0.4s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.92); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--fg-3); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.footer h5 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); font-weight: 600; }
.footer a { display: block; padding: 4px 0; transition: color 0.3s; }
.footer a:hover { color: var(--fg); }
.footer-base { margin-top: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ── Misc ───────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--fg-2); }
.badge.gold { color: var(--gold); border-color: rgba(234, 210, 160, 0.4); background: rgba(234, 210, 160, 0.06); }
.badge.ok { color: var(--ok); border-color: rgba(127, 224, 176, 0.35); }
.badge.bad { color: var(--bad); border-color: rgba(255, 139, 139, 0.35); }
.kbd { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); }
.code {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: #e8e4da; white-space: pre; overflow: auto;
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; position: relative;
}
.code .c { color: var(--fg-4); }
.code .k { color: var(--gold); }
.code .s { color: #a8e0c4; }
.copy-btn { position: absolute; top: 10px; right: 10px; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--gold); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ── Composer states ────────────────────────────────────────────────────────── */
.arc.primary.ready path.shape { fill: #d9bd86; stroke: rgba(255, 245, 222, 0.7); }
.arc.primary.ready:hover path.shape { fill: #ead2a0; }
.arc.primary.ready text { fill: var(--gold-ink); }
.files-head { align-items: center; }
.files-head b { font-size: 1.05em; }
.mini-actions { display: flex; gap: 6px; }
.mini { width: 2.6em; height: 2.6em; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--fg-2); transition: all 0.35s var(--spring); }
.mini:hover { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); transform: scale(1.08); }
.mini svg { width: 1.25em; height: 1.25em; }
.filelist.rich { max-height: 26cqw; padding-right: 4px; }
.filelist.rich li { display: grid; grid-template-columns: 1.3em 1fr auto 1.6em; align-items: center; gap: 0.6em; padding: 0.35em 0.2em; border-radius: 10px; animation: row-in 0.5s var(--ease-out) both; }
.filelist.rich li:hover { background: rgba(255, 255, 255, 0.04); }
.filelist.rich .fi svg { width: 1.2em; height: 1.2em; color: var(--fg-3); }
.filelist.rich .fn { color: var(--fg); font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; white-space: normal; line-height: 1.3; }
.filelist.rich .fs { color: var(--fg-3); font-size: 0.92em; }
.filelist.rich .fx { width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; color: var(--fg-3); transition: all 0.3s; }
.filelist.rich .fx:hover { color: var(--bad); background: rgba(255, 139, 139, 0.1); }
.filelist.rich .fx svg { width: 1em; height: 1em; }
.filelist.rich .more { display: block; text-align: center; color: var(--fg-3); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
.busy { display: grid; place-items: center; gap: 6px; text-align: center; }
.busy-pct { font-family: var(--font-display); font-weight: 600; font-size: 3.4em; letter-spacing: -0.04em; line-height: 1; background: linear-gradient(180deg, #fff5de, #c9a46a); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.busy-stage { color: var(--fg-2); font-size: 0.9em; letter-spacing: 0.04em; }
.res-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.res-head b { font-family: var(--font-display); font-size: 1.9em; font-weight: 600; letter-spacing: -0.03em; }
.res-check { width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #fff3d6, #c9a46a); color: var(--gold-ink); animation: pop 0.7s var(--spring) both; }
.res-check svg { width: 1.2em; height: 1.2em; stroke-dasharray: 30; stroke-dashoffset: 30; animation: tick 0.6s var(--ease-out) 0.25s forwards; }
@keyframes pop { from { transform: scale(0); } }
@keyframes tick { to { stroke-dashoffset: 0; } }
.res-actions { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.res-actions .btn { height: 2.5em; padding: 0 1em; font-size: 0.85em; }
.res-actions .btn svg { width: 1.1em; height: 1.1em; }
.nav-link.account { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 420px) { .nav-link { padding: 8px 9px; } .brand-word { display: none; } .lang { padding: 0 10px; } }

/* ── Busy: the disc collapses into a small core while the vortex runs white-hot ── */
.disc.small { transform: translate(-50%, -50%) scale(0.44); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 80px rgba(255, 240, 210, 0.35), 0 30px 60px -20px rgba(0, 0, 0, 0.9); }
.disc.small .busy-pct { font-size: 6.2em; -webkit-text-fill-color: #f5f5f7; background: none; color: #f5f5f7; }
.disc.small .busy-stage { font-size: 1.7em; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); }
.cancel-pill {
  position: absolute; left: 50%; bottom: 13%; z-index: 6; display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 20px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(22, 24, 30, 0.72); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 0.5s var(--ease), transform 0.6s var(--spring), border-color 0.3s, color 0.3s;
}
.cancel-pill svg { width: 14px; height: 14px; }
.cancel-pill.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; transition-delay: 0.35s; }
.cancel-pill:hover { border-color: rgba(255, 139, 139, 0.5); color: var(--bad); }
.portal-wrap { position: relative; }

/* ── Result card ─────────────────────────────────────────────────────────────── */
.result-card {
  position: absolute; left: 50%; top: 50%; z-index: 7; width: min(460px, 92vw); max-height: 92svh; overflow: auto;
  padding: 28px 28px 22px; border-radius: 22px; display: grid; gap: 18px; text-align: center;
  background: linear-gradient(180deg, rgba(30, 31, 36, 0.94), rgba(20, 21, 25, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  opacity: 0; transform: translate(-50%, -46%) scale(0.94); pointer-events: none; filter: blur(6px);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--spring), filter 0.7s var(--ease-out);
}
.result-card.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; filter: none; }
.rc-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.rc-head b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.rc-head .res-check { width: 30px; height: 30px; }
.rc-halves { display: flex; justify-content: center; gap: 6px; }
.rc-qrs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qr-col { display: grid; justify-items: center; gap: 4px; }
.qr-col b { margin-top: 10px; font-size: 14px; font-weight: 600; }
.qr-col small { font-size: 12px; color: var(--fg-3); margin-bottom: 8px; }
.qr-tile { position: relative; width: 100%; aspect-ratio: 1; border-radius: 18px; padding: 10px; background: #fff; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.8); transition: transform 0.5s var(--spring); }
.qr-tile.gold { background: linear-gradient(135deg, #f6e3bb, #d9bd86 55%, #c9a46a); }
.qr-tile:hover { transform: translateY(-3px) scale(1.02); }
.qr-tile img { width: 100%; height: 100%; }
.qr-dl { position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f5f5f7; color: #111; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); transition: transform 0.4s var(--spring); }
.qr-dl:hover { transform: scale(1.12); }
.qr-dl svg { width: 15px; height: 15px; }
.qr-copy { width: 100%; height: 42px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; font-size: 12px; background: transparent; }
.qr-copy svg { width: 15px; height: 15px; }
.qr-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--fg-2); transition: color 0.3s; }
.qr-open:hover { color: var(--fg); }
.qr-open svg { width: 14px; height: 14px; }
.rc-note { margin: 0; font-size: 13px; color: var(--fg-3); line-height: 1.45; }
.rc-vault { display: grid; grid-template-columns: 22px 1fr; gap: 12px; text-align: left; padding-top: 18px; border-top: 1px solid var(--line); }
.rc-vault .rc-ico svg { width: 20px; height: 20px; color: var(--fg-2); margin-top: 2px; }
.rc-vault b { font-size: 14px; }
.rc-vault p { margin: 4px 0 12px; font-size: 13px; color: var(--fg-2); line-height: 1.45; }
.rc-vault .btn { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
.rc-vault .btn svg { width: 14px; height: 14px; }
.rc-foot { display: flex; justify-content: center; gap: 10px; }
.rc-foot .tiny-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.rc-foot svg { width: 15px; height: 15px; }
@media (max-width: 420px) { .rc-qrs { gap: 12px; } .result-card { padding: 22px 16px 18px; } }
.portal-ring { transition: transform 0.9s var(--spring); }
.portal-ring.small { transform: rotate(-90deg) scale(0.47); }
@media (max-width: 520px) { .nav-link.opt2 { display: none; } .nav-links { gap: 2px; } }

/* ── Options sheet: wide enough that everything fits without scrolling ─────── */
.sheet { width: 460px; max-height: min(780px, 92vh); gap: 16px; padding: 24px; }
.sheet .field { gap: 10px; }
.modes.tiles { grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; }
.modes.tiles .mode { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 8px; padding: 14px 8px 12px; }
.modes.tiles .mode svg { grid-row: auto; width: 38px; height: 38px; }
.modes.tiles .mode b { font-size: 13.5px; }
.mode-desc { margin: 0; min-height: 2.7em; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
.sheet .chips { flex-wrap: nowrap; gap: 6px; }
.sheet .chip { flex: 1 1 auto; padding: 0 10px; white-space: nowrap; }
.sheet-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .sheet { width: auto; } .sheet .chips { flex-wrap: wrap; } }

/* ── Language menu ───────────────────────────────────────────────────────────── */
.lang-wrap { position: relative; }
.lang .chev { width: 12px; height: 12px; opacity: 0.7; transition: transform 0.4s var(--spring); }
.lang[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px; border-radius: 16px; display: grid; gap: 2px; z-index: 60;
  background: rgba(22, 24, 30, 0.88); border: 1px solid var(--line-2); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right; transition: opacity 0.25s var(--ease), transform 0.4s var(--spring);
}
.lang-menu.open { opacity: 1; transform: none; }
.lang-menu button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; font-size: 14px; color: var(--fg-2); text-align: left; transition: background 0.25s, color 0.25s; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(255, 255, 255, 0.07); color: var(--fg); }
.lang-menu button b { width: 26px; font-size: 11px; letter-spacing: 0.08em; color: var(--fg-3); }
.lang-menu button[aria-checked="true"] { color: var(--fg); }
.lang-menu button[aria-checked="true"] b { color: var(--gold); }
.lang-menu button[aria-checked="true"]::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
