/* Viewerville website. No external fonts or assets: everything is served from this origin. */
:root {
  --ink: #2a2440;
  --navy: #2f4a86;
  --cream: #fff7e6;
  --accent: #e8694a;
  --accent-dark: #c9502f;
  --sky: #d4ecf8;
  --grass: #b8d99c;
  --hero-top: #d4ecf8;
  --bg: #fffaf0;
  --bg-alt: #f3f8fb;
  --card: #ffffff;
  --text: #2a2440;
  --muted: #5e5a73;
  --line: #e3dccb;
  --link: #2f4a86;
  --focus: #2f4a86;
  --font-display: 'Arial Black', 'Segoe UI Black', Impact, Arial, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a2e;
    --bg-alt: #232038;
    --card: #2a2646;
    --text: #f4efe2;
    --muted: #b9b4cf;
    --line: #3d3860;
    --link: #9cc7e6;
    --hero-top: #2b3a66;
    --focus: #9cc7e6;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--font-body); -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--cream); padding: 0.6rem 1rem; z-index: 20; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--sky); border-bottom: 3px solid var(--ink); }
.top-in { display: flex; align-items: center; gap: 1rem; padding-block: 0.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--cream); font: 1.35rem/1 var(--font-display); letter-spacing: 0.03em; text-shadow: 2px 1px 0 var(--navy), 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.brand img { border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.top nav { display: flex; gap: 0.25rem 1rem; flex-wrap: wrap; margin-inline: auto; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 0.35rem 0.25rem; }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

@media (max-width: 48rem) {
  html { scroll-padding-top: 1rem; }
  .top { position: static; }
  .top-in { gap: 0.5rem 0.75rem; }
  .top .btn-small { margin-left: auto; }
  .top nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; margin-inline: 0; padding-bottom: 0.2rem; }
}

/* buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 0.7rem 1.4rem; font: 1rem/1.2 var(--font-display); letter-spacing: 0.02em; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform 0.08s, box-shadow 0.08s; }
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-small { padding: 0.45rem 1rem; font-size: 0.85rem; box-shadow: 0 3px 0 var(--ink); }
.btn-ghost { background: var(--cream); color: var(--ink); }
.btn-ghost:hover { background: #fff; }

/* sections */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.15; }
h1 { font: clamp(1.9rem, 5vw, 3rem)/1.1 var(--font-display); margin: 0 0 1rem; letter-spacing: 0.01em; }
h2 { font: clamp(1.5rem, 3.5vw, 2.1rem)/1.15 var(--font-display); margin: 0 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 42rem; }
.eyebrow { display: inline-block; background: var(--ink); color: var(--cream); font: 0.8rem/1 var(--font-display); letter-spacing: 0.08em; padding: 0.4rem 0.7rem; border-radius: 6px; margin-bottom: 0.9rem; }
.section-intro { max-width: 44rem; color: var(--muted); margin: 0 0 1.75rem; }

/* hero */
.hero { padding-block: 1.5rem 2.5rem; background: linear-gradient(var(--hero-top), var(--bg) 90%); }
.hero-img { display: block; width: 100%; aspect-ratio: 1200 / 480; object-fit: cover; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 8px 0 var(--ink); background: var(--sky); }
.hero-text { margin-top: 2.25rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.5rem; }

/* stream */
.stream-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .stream-grid.loaded { grid-template-columns: minmax(0, 1fr) 21rem; } }
.stream-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 0 var(--ink); }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(5px) saturate(0.8) brightness(0.45); transform: scale(1.08); }
.stream-consent { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(100% - 1.5rem, 34rem); display: grid; justify-items: center; gap: 0.9rem; padding: 1.1rem 1.25rem; text-align: center; color: var(--cream); background: rgba(42, 36, 64, 0.88); border: 3px solid var(--cream); border-radius: 14px; }
.stream-consent p { margin: 0; font-size: 0.92rem; }
.stream-consent a { color: var(--cream); }
.stream-chat { display: none; min-height: 28rem; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--ink); box-shadow: 0 6px 0 var(--ink); }
.stream-grid.loaded .stream-chat { display: block; }
.stream-chat iframe { width: 100%; height: 100%; min-height: 28rem; border: 0; }
.stream-note { font-size: 0.9rem; color: var(--muted); margin: 1.2rem 0 0; }
@media (max-width: 40rem) { .stream-consent p { font-size: 0.78rem; line-height: 1.4; } .stream-consent { gap: 0.5rem; padding: 0.6rem 0.7rem; } .stream-consent .btn { padding: 0.5rem 1rem; font-size: 0.85rem; } }

/* cards */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: 16px; padding: 1.25rem; box-shadow: 0 5px 0 var(--ink); }
.card p { margin: 0; color: var(--muted); }
.card .icon { width: 3rem; height: 3rem; margin-bottom: 0.7rem; display: block; }
.step-no { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: #fff; border: 3px solid var(--ink); font: 1rem/1 var(--font-display); margin-bottom: 0.6rem; }
.chip { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 999px; padding: 0.1rem 0.55rem; margin-bottom: 0.5rem; background: var(--grass); color: var(--ink); }
.chip.soon { background: #ffd679; }
kbd, .cmd { font: 700 0.95em/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--ink); color: var(--cream); padding: 0.1em 0.45em; border-radius: 6px; white-space: nowrap; }
.notice { background: var(--card); border: 3px solid var(--ink); border-left-width: 10px; border-left-color: var(--accent); border-radius: 12px; padding: 1rem 1.25rem; margin-top: 1.75rem; }
.notice p { margin: 0; }

/* tables */
.table-wrap { overflow-x: auto; border: 3px solid var(--ink); border-radius: 14px; background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 30rem; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--ink); color: var(--cream); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

/* faq */
details { background: var(--card); border: 3px solid var(--ink); border-radius: 12px; margin-bottom: 0.8rem; }
summary { cursor: pointer; padding: 0.9rem 1.1rem; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 1.3rem/1 var(--font-display); color: var(--accent); }
details[open] summary::after { content: '–'; }
details > :not(summary) { padding-inline: 1.1rem; }
details > :last-child { padding-bottom: 1rem; margin-bottom: 0; }

/* legal pages */
.legal main { padding-block: 0 4rem; }
.doc { width: min(100% - 2rem, 48rem); margin-inline: auto; padding-top: 2rem; }
.doc h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2.4rem; }
.doc h3 { margin-top: 1.5rem; }
.doc .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc li { margin-bottom: 0.4rem; }
.toc { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1.2rem; margin-bottom: 2rem; }
.toc ol { margin: 0.4rem 0 0; columns: 2 14rem; }
.draft-note { background: #ffd679; color: var(--ink); border-bottom: 3px solid var(--ink); padding: 0.7rem 1rem; text-align: center; font-size: 0.95rem; }
mark.todo { background: #ffd679; color: var(--ink); padding: 0 0.25em; border-radius: 4px; }
.lang-block { border-top: 2px dashed var(--line); margin-top: 2.5rem; padding-top: 0.5rem; }

/* footer */
.foot { background: var(--ink); color: var(--cream); padding-block: 2rem; }
.foot a { color: var(--cream); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 0.8rem; font-weight: 700; }
.foot-note { margin: 0; font-size: 0.85rem; color: #cfc9e3; max-width: 46rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
