:root { --blue:#046bd2; --blue-dark:#045cb4; --ink:#1e293b; --muted:#64748b; --bg:#f0f5fa; --card:#ffffff;
  --line:#d1d5db; --red:#b42318; --green:#13795b; }
@media (prefers-color-scheme: dark) {
  :root { --ink:#e2e8f0; --muted:#94a3b8; --bg:#0b1220; --card:#111a2e; --line:#26324a; --red:#f97066; --green:#4ade80; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
main { max-width: 480px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
section { display: flex; flex-direction: column; gap: 12px; }
section[hidden], [hidden] { display: none !important; }
h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 18px 0 0; }
p { margin: 0; }
.lead { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; align-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; word-break: break-all; }
.logo-big { width: 200px; align-self: center; margin: 24px 0 8px; border-radius: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 16px; }
input, textarea { font: inherit; font-size: 18px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); width: 100%; }
input:focus, textarea:focus { outline: 3px solid rgba(4,107,210,.35); border-color: var(--blue); }
input.code { font-size: 34px; letter-spacing: 10px; text-align: center; font-weight: 700; }
form { display: flex; flex-direction: column; gap: 12px; }
.btn { display: block; width: 100%; padding: 15px 14px; border-radius: 14px; border: 1px solid var(--line);
  font: 600 18px/1.2 inherit; text-align: center; text-decoration: none; cursor: pointer; background: var(--card); color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:active, .btn.share:active { background: var(--blue-dark); }
.btn.share { background: var(--blue); border: 0; color: #fff; font-size: 30px; font-weight: 800; letter-spacing: 2px;
  padding: 22px; box-shadow: 0 8px 22px rgba(4,107,210,.35); }
.btn:disabled { opacity: .6; }
.link { background: none; border: 0; color: var(--blue); font: 600 16px inherit; padding: 6px 0; cursor: pointer; align-self: flex-start; }
.back { background: none; border: 0; color: var(--blue); font: 600 17px inherit; padding: 4px 0; align-self: flex-start; cursor: pointer; }
.error { color: var(--red); font-weight: 600; }
.error a { color: var(--blue); }
.toast { background: #e7f6ee; color: #0b5d3b; border-radius: 12px; padding: 10px 12px; font-weight: 600; text-align: center; }
@media (prefers-color-scheme: dark) { .toast { background: #12352a; color: #b7f0d2; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.top { display: flex; align-items: center; gap: 10px; }
.top #hello { flex: 1; font-weight: 700; }
.mini-logo { width: 34px; height: 34px; border-radius: 8px; }
.frame { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 9 / 16; max-height: 62vh; margin: 0 auto; width: 100%; }
.frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sound { position: absolute; right: 10px; bottom: 10px; border: 0; border-radius: 999px; padding: 8px 14px;
  background: rgba(0,0,0,.6); color: #fff; font: 600 15px/1 inherit; }
.day-tag { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.row3 { display: grid; gap: 8px; }
.linkbox { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.linkbox .mono { flex: 1; min-width: 0; }
.stat { text-align: center; color: var(--muted); font-weight: 600; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.strip button { flex: 0 0 96px; border: 2px solid transparent; border-radius: 12px; padding: 0; background: #000; overflow: hidden;
  aspect-ratio: 9 / 16; position: relative; cursor: pointer; scroll-snap-align: start; }
.strip button.on { border-color: var(--blue); }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px; }
.big-id { font-size: 30px; font-weight: 800; text-align: center; padding: 12px; background: var(--card); border-radius: 12px; border: 1px solid var(--line); }
.thumbs { display: flex; gap: 12px; }
.thumbs button { font-size: 32px; padding: 10px 22px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.thumbs button.on { border-color: var(--blue); background: rgba(4,107,210,.12); }
