/* ThoraTube – YouTube-inspireret layout med børnevenlige farver */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --text: #1f1f2e;
  --muted: #6b6b80;
  --line: #f0e6dc;
  --brand: #ff3355;
  --brand-2: #ffb400;
  --blue: #2f80ed;
  --green: #27c485;
  --purple: #8a5cf6;
  --chip: #f4ecff;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(60, 30, 90, .08);
  --topbar: 64px;
  --sidebar: 240px;
  --logo: url(/logo.svg);
  --glow1: #ffe3ea; --glow2: #fff1c2; --glow3: #e5dbff;
  --nav-hover: #f5f0ff;
  --soft: #faf7ff; --soft-line: #e9dfff;
  --deco: '★ ● ▲ ■ ★ ● ▲ ■ ★ ● ▲ ■ ★ ● ▲ ■ ★ ● ▲ ■';
}
/* Tema 2: robot / bil / fodbold – blåligt */
:root[data-theme="robot"] {
  --bg: #f2f7ff;
  --surface: #ffffff;
  --text: #0f1f33;
  --muted: #5b6b80;
  --line: #dde8f5;
  --brand: #1f6feb;
  --brand-2: #ffb400;
  --blue: #0ea5e9;
  --green: #22c55e;
  --purple: #0b7fd6;
  --chip: #e3f0ff;
  --shadow: 0 6px 20px rgba(20, 60, 120, .10);
  --logo: url(/logo-robot.svg);
  --glow1: #dbeafe; --glow2: #cffafe; --glow3: #e0f2fe;
  --nav-hover: #eaf3ff;
  --soft: #f3f8ff; --soft-line: #cfe2fb;
  --deco: '⚙ ⚽ 🚗 ⚡ ⚙ ⚽ 🚗 ⚡ ⚙ ⚽ 🚗 ⚡ ⚙ ⚽ 🚗 ⚡';
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body { position: relative; }
img, video, canvas, svg { max-width: 100%; }
/* Lange ord/links må aldrig gøre siden bredere end skærmen */
.title, .desc, .comment .txt, .note, .flag-item, .card .sub, .short-info, td, .stat, .app-card .info, .ch-head .ch-desc, .empty, .hint { overflow-wrap: anywhere; word-break: break-word; }
body {
  font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); font-weight: 600;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-weight: 800; cursor: pointer; border: 0; }
input, textarea, select { font-family: inherit; font-size: 15px; font-weight: 600; }
img { display: block; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: #f1f1f5; color: var(--text); font-size: 15px; transition: transform .1s, background .15s;
}
.btn:hover { background: #e8e8ef; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: #e62a49; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.yellow { background: var(--brand-2); color: #3b2a00; }
.btn.dark { background: var(--text); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: #f1f1f5; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.big { padding: 14px 28px; font-size: 18px; }
.btn.active { background: var(--text); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: transparent; display: inline-grid; place-items: center; }
.icon-btn:hover { background: #f1f1f5; }
.icon-btn svg { width: 24px; height: 24px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 800; color: var(--muted); }
.field input, .field textarea, .field select {
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 600; }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 15px; }
.radio:has(input:checked) { border-color: var(--purple); background: var(--soft); }
.radio input { width: 18px; height: 18px; accent-color: var(--purple); margin: 0; }
.flag-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.flag-item { display: flex; gap: 10px; align-items: flex-start; background: #fff6f8; border: 2px solid #ffd6de; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.flag-item .who { font-weight: 900; }
.flag-item .cat { display: inline-block; background: var(--brand); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.flag-item .txt { margin-top: 2px; white-space: pre-wrap; }
.flag-item .when { color: var(--muted); font-size: 12px; margin-left: 6px; }
.report-video { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
@media (max-width: 700px) { .report-video { grid-template-columns: 1fr; } }
.report-video .thumb { border-radius: 12px; }
.review-box { background: #fff6f8; border: 3px solid var(--brand); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.review-box .t { font-size: 18px; font-weight: 900; color: #a8103a; }
.review-box .s { color: var(--muted); font-size: 14px; margin-top: 4px; }
.error { background: #ffe7ec; color: #a8103a; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }
.success { background: #e3fbef; color: #0a6b46; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }

/* ---------- Gate (ikke logget ind) ---------- */
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 20% 20%, var(--glow1) 0, transparent 40%),
              radial-gradient(circle at 80% 30%, var(--glow2) 0, transparent 40%),
              radial-gradient(circle at 50% 90%, var(--glow3) 0, transparent 45%), var(--bg);
}
.gate-card {
  background: var(--surface); border-radius: 32px; box-shadow: var(--shadow); padding: 40px 36px; max-width: 460px; width: 100%; text-align: center;
}
.gate-card .logo { justify-content: center; margin-bottom: 8px; }
.gate-card .logo .logo-text { font-size: 34px; }
.gate-card .logo .play { width: 56px; height: 56px; border-radius: 14px; }
.gate-card p { color: var(--muted); font-size: 16px; margin: 6px 0 24px; }
.gate-actions { display: flex; flex-direction: column; gap: 12px; }
.gate-actions .btn { justify-content: center; }
.gate-card form { text-align: left; }
.parent-link { display: block; margin-top: 18px; font-size: 14px; color: var(--purple); font-weight: 800; }
.parent-link:hover { text-decoration: underline; }
.gate-version a { color: var(--purple); }
.gate-version { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; opacity: .8; }
.gate-card h2 { margin: 0 0 16px; font-size: 22px; }
.gate-back { margin-top: 12px; }
.stickers { font-size: 28px; letter-spacing: 6px; margin-bottom: 8px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo .play { width: 38px; height: 38px; border-radius: 10px; background: var(--logo) center / contain no-repeat; flex: none; }
.logo .logo-text { font-size: 24px; font-weight: 900; letter-spacing: -.5px; }
.logo .logo-text b { color: var(--brand); }
.logo .kids { white-space: nowrap; font-size: 10px; background: var(--brand-2); color: #3b2a00; padding: 2px 7px; border-radius: 999px; font-weight: 900; margin-left: 2px; }

/* ---------- Shell ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar); z-index: 30;
  background: var(--surface); border-bottom: 2px solid var(--line);
  display: grid; grid-template-columns: 1fr minmax(200px, 640px) 1fr; align-items: center; padding: 0 16px; gap: 16px;
}
.topbar .left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .right { display: flex; align-items: center; gap: 6px; justify-content: flex-end; min-width: 0; }
.search { display: flex; align-items: center; min-width: 0; }
.search input {
  flex: 1; height: 42px; padding: 0 18px; border: 2px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; outline: none; font-size: 16px; min-width: 0;
}
.search input:focus { border-color: var(--purple); }
.search button { height: 42px; width: 64px; border-radius: 0 999px 999px 0; background: var(--purple); color: #fff; display: grid; place-items: center; }
.search button svg { width: 22px; height: 22px; }

.sidebar {
  position: fixed; top: var(--topbar); left: 0; bottom: 0; width: var(--sidebar); padding: 12px; overflow-y: auto; z-index: 20;
  background: var(--surface); border-right: 2px solid var(--line); transition: transform .2s;
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; font-size: 15px; font-weight: 700; color: var(--text);
}
.sidebar .nav-item:hover { background: var(--nav-hover); }
.sidebar .nav-item.active { background: var(--chip); color: var(--purple); }
.sidebar .nav-item svg { width: 24px; height: 24px; flex: none; }
.sidebar .nav-item .badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.sidebar .sec { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 16px 14px 6px; font-weight: 900; }
.sidebar hr { border: 0; border-top: 2px solid var(--line); margin: 10px 0; }
.sidebar .nav-item .av { width: 26px; height: 26px; }

.main { margin-left: var(--sidebar); padding: calc(var(--topbar) + 20px) 28px 60px; transition: margin .2s; min-height: 100vh; }
.main.wide { margin-left: 0; }

/* ---------- Avatar ---------- */
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 15px; overflow: hidden; flex: none; text-transform: uppercase; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.av.xl { width: 120px; height: 120px; font-size: 48px; border: 5px solid #fff; box-shadow: var(--shadow); }

/* ---------- Chips / page headers ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 7px 14px; border-radius: 999px; background: #f1f1f5; font-size: 14px; font-weight: 800; }
.chip.active { background: var(--text); color: #fff; }
h1.page { font-size: 26px; margin: 0 0 18px; font-weight: 900; }
h2.sec { font-size: 18px; margin: 28px 0 12px; font-weight: 900; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 17px; }
.empty .big { font-size: 56px; margin-bottom: 8px; }

/* ---------- Video grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 26px 18px; }
.card { cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #c9b8ff, #ffc4d1); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .thumb img { transform: scale(1.04); }
.thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 6px; font-weight: 800; }
.thumb .hiddenTag { position: absolute; left: 8px; top: 8px; background: var(--brand-2); color: #3b2a00; font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 900; }
.thumb .noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; }
.thumb .hiddenTag.proc { background: var(--purple); color: #fff; }
.thumb .hiddenTag.fail { background: var(--brand); color: #fff; }
.proc-box { position: relative; display: grid; place-items: center; background: #2a1f3d; }
.proc-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; filter: blur(2px); }
.proc-inner { position: relative; text-align: center; color: #fff; padding: 20px; }
.proc-inner .big { font-size: 56px; }
.proc-inner .t { font-size: 22px; font-weight: 900; margin-top: 6px; }
.proc-inner .s { font-size: 14px; opacity: .85; margin-top: 4px; }
.proc-inner .btn { margin-top: 14px; }
.card .meta { display: flex; gap: 12px; margin-top: 12px; }
.card .title { font-size: 16px; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 3px; font-weight: 700; }
.card .sub a:hover { color: var(--text); }

/* ---------- Shorts ---------- */
.thumb .shortTag { position: absolute; left: 8px; top: 8px; background: var(--purple); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 900; z-index: 1; }
.card.short .thumb { aspect-ratio: 9/16; }
.shelf { margin-bottom: 26px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.shelf-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shelf-row .card { flex: 0 0 150px; scroll-snap-align: start; }
.shelf-row .card .thumb { border-radius: 14px; }
.shelf-row .card .title { font-size: 14px; margin-top: 8px; }
.shelf-row .card .sub { font-size: 12px; }
.shorts-wrap { position: relative; margin: -20px -28px -60px; background: #14101f;
  /* Mobil-browsere: 100vh er højere end det synlige område (adresselinjen tæller med), så vi bruger
     den faktiske højde (--app-h sættes af JS fra window.innerHeight) med dvh som fallback. */
  height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)); height: calc(var(--app-h, 100dvh) - var(--topbar)); }
.shorts-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.shorts-feed::-webkit-scrollbar { display: none; }
.short-item { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; padding: 12px 0; }
.short-stage { position: relative; height: 100%; aspect-ratio: 9/16; max-width: 100%; background: #000; border-radius: 18px; overflow: hidden; }
.short-stage video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.short-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 30px; }
.short-mute { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.5); font-size: 18px; }
.short-info { position: absolute; left: 12px; right: 70px; bottom: 14px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.short-info .ch { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; margin-right: 8px; }
.short-info .ch .av { width: 30px; height: 30px; font-size: 12px; border: 2px solid #fff; }
.short-info .t { font-weight: 900; font-size: 16px; line-height: 1.25; }
.short-info .d { font-size: 13px; opacity: .9; margin-top: 3px; }
.short-actions { position: absolute; right: 8px; bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.short-actions .act { display: flex; flex-direction: column; align-items: center; background: rgba(0,0,0,.45); color: #fff; border-radius: 16px; padding: 8px 6px; min-width: 52px; }
.short-actions .act span { font-size: 22px; }
.short-actions .act small { font-size: 11px; font-weight: 800; }
.short-actions .act.on { background: var(--blue); }
.short-actions .act[disabled] { opacity: .5; }
.shorts-nav { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.shorts-nav .icon-btn { background: rgba(255,255,255,.15); color: #fff; font-size: 14px; }
.shorts-nav .icon-btn:hover { background: rgba(255,255,255,.3); }
@media (max-width: 900px) {
  .shorts-wrap { margin: -14px -14px -40px; height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)); height: calc(var(--app-h, 100dvh) - var(--topbar)); }
  .short-info { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .short-actions { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .short-item { padding: 0; }
  .short-stage { border-radius: 0; aspect-ratio: auto; width: 100%; }
  .shorts-nav { display: none; }
}

/* ---------- Watch ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; }
@media (max-width: 1100px) { .watch { grid-template-columns: 1fr; } }
.player { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { width: 100%; height: 100%; }
.watch h1 { font-size: 22px; margin: 16px 0 10px; font-weight: 900; }
.watch-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.watch-bar .ch { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.watch-bar .ch .name { font-weight: 900; font-size: 16px; }
.watch-bar .ch .subs { color: var(--muted); font-size: 13px; }
.likebar { display: inline-flex; background: #f1f1f5; border-radius: 999px; overflow: hidden; }
.likebar button { padding: 9px 16px; background: transparent; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.likebar button:hover { background: #e4e4ec; }
.likebar button.on { color: var(--blue); }
.likebar button + button { border-left: 2px solid #e4e4ec; }
.desc { background: var(--soft); border-radius: 16px; padding: 14px 16px; margin-top: 16px; font-size: 14px; white-space: pre-wrap; }
.desc .stats { font-weight: 900; margin-bottom: 6px; }
.comments h3 { font-size: 18px; margin: 28px 0 12px; }
.comment-form { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.comment-form textarea { flex: 1; min-height: 44px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; resize: vertical; outline: none; }
.comment-form textarea:focus { border-color: var(--purple); }
.comment { display: flex; gap: 12px; margin-bottom: 16px; }
.comment .body { flex: 1; }
.comment .who { font-weight: 900; font-size: 14px; }
.comment .when { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 700; }
.comment .txt { margin: 3px 0 4px; font-size: 15px; white-space: pre-wrap; }
.comment .actions { display: flex; gap: 8px; }
.comment .actions button { background: transparent; color: var(--muted); font-size: 12px; padding: 3px 6px; border-radius: 8px; }
.comment .actions button:hover { background: #f1f1f5; color: var(--text); }
.comment .replies { margin-top: 10px; }
.related .card { display: grid; grid-template-columns: 168px 1fr; gap: 10px; margin-bottom: 12px; }
.related .thumb { border-radius: 12px; }
.related .meta { margin-top: 0; }
.related .title { font-size: 14px; }

/* ---------- Channel page ---------- */
.banner { height: 160px; border-radius: 24px; background: linear-gradient(120deg, var(--c, #ff6b6b), #fff2 60%, #ffffff33), var(--c, #ff6b6b); position: relative; overflow: hidden; }
.banner::after { content: var(--deco); position: absolute; inset: auto 0 12px 0; text-align: center; color: rgba(255,255,255,.35); letter-spacing: 18px; font-size: 22px; white-space: nowrap; }
.ch-head { display: flex; gap: 20px; align-items: center; margin: -40px 0 24px 24px; flex-wrap: wrap; }
.ch-head .info { padding-top: 40px; flex: 1; }
.ch-head h1 { margin: 0; font-size: 28px; font-weight: 900; }
.ch-head .handle { color: var(--muted); font-weight: 700; }
.ch-head .ch-desc { margin-top: 6px; font-size: 14px; white-space: pre-wrap; }
.ch-head .actions { display: flex; gap: 8px; padding-top: 40px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(30, 10, 50, .5); z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 24px; padding: 28px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 16px; font-size: 22px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ---------- Optager ---------- */
.rec-cta { text-align: center; margin-top: 14px; }
.rec-cta .hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.rec-overlay { position: fixed; inset: 0; background: #000; z-index: 60; display: grid; place-items: center; }
.rec-stage { position: relative; width: 100%; height: 100%; max-width: 100vw; display: grid; place-items: center; overflow: hidden; }
.rec-stage video, .rec-stage canvas { width: 100%; height: 100%; object-fit: contain; background: #000; }
#recCanvas { cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.rec-top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
.rec-timer { color: #fff; font-weight: 900; font-size: 16px; background: rgba(0,0,0,.5); padding: 6px 12px; border-radius: 999px; margin-right: auto; }
.rec-timer.on { background: var(--brand); }
.rec-round { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; }
.rec-hint { position: absolute; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 100px); left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; opacity: .8; text-shadow: 0 1px 4px #000; pointer-events: none; }
.rec-bottom { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; }
.rec-shutter { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.4); background-clip: padding-box; transition: .15s; }
.rec-shutter::after { content: ''; display: block; width: 28px; height: 28px; margin: auto; border-radius: 50%; background: var(--brand); transition: .15s; }
.rec-shutter.on::after { border-radius: 6px; width: 26px; height: 26px; }
.rec-review { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; }
.rec-review video { flex: 1; min-height: 0; }
.rec-review .row { display: flex; gap: 10px; justify-content: center; padding: 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: #111; }
.rec-error { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); background: #ffe7ec; color: #a8103a; padding: 14px 16px; border-radius: 14px; text-align: center; font-weight: 800; }

/* ---------- Upload ---------- */
.upload-box { max-width: 720px; }
.dropzone { border: 3px dashed var(--soft-line); border-radius: 24px; padding: 40px 20px; text-align: center; background: var(--soft); cursor: pointer; transition: background .15s; }
.dropzone:hover, .dropzone.over { background: var(--chip); }
.dropzone .big { font-size: 56px; }
.dropzone .t { font-size: 18px; font-weight: 900; margin-top: 8px; }
.dropzone .s { color: var(--muted); font-size: 13px; margin-top: 4px; }
.progress { height: 14px; background: #eee; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), var(--brand)); transition: width .2s; }
.thumb-preview { width: 100%; max-width: 360px; aspect-ratio: 16/9; border-radius: 14px; object-fit: cover; background: #ddd; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .two { grid-template-columns: 1fr; } }

/* ---------- Tables (admin) ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 2px solid var(--line); font-size: 14px; vertical-align: top; }
.table th { background: var(--soft); font-weight: 900; font-size: 13px; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.tag.pending { background: #fff1c2; color: #7a5300; }
.tag.approved { background: #e3fbef; color: #0a6b46; }
.tag.rejected, .tag.blocked { background: #ffe7ec; color: #a8103a; }
.tag.admin { background: var(--chip); color: var(--purple); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 30px; font-weight: 900; }
.stat .l { color: var(--muted); font-size: 13px; }
.app-card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.app-card .info { flex: 1; min-width: 200px; }
.app-card .info b { font-size: 17px; }
.app-card .info .m { color: var(--muted); font-size: 13px; }
.app-card .info .note { background: var(--soft); padding: 8px 12px; border-radius: 10px; margin-top: 8px; font-size: 14px; white-space: pre-wrap; }
.app-card .actions { display: flex; gap: 8px; }

/* ---------- Temavælger ---------- */
.theme-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-opt { flex: 1; min-width: 150px; border: 3px solid var(--line); border-radius: 18px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; background: #fff; }
.theme-opt.on { border-color: var(--brand); box-shadow: var(--shadow); }
.theme-opt .sw { width: 44px; height: 44px; border-radius: 12px; background: center / contain no-repeat; flex: none; }
.theme-opt b { display: block; }
.theme-opt small { color: var(--muted); }
.theme-mini { display: inline-flex; gap: 6px; align-items: center; }
.theme-mini button { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); background: center / contain no-repeat #fff; }
.theme-mini button.on { border-color: var(--brand); }

/* ---------- Push-bjælke ---------- */
.push-bar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 90; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); border-radius: 18px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.push-bar span { flex: 1; min-width: 200px; }
@media (min-width: 901px) { .push-bar { left: auto; right: 24px; max-width: 480px; } }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 800; opacity: 0; transition: .2s; z-index: 100; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --topbar: 56px; }
  /* iPhone zoomer ind på felter med skrift under 16px og zoomer ikke ud igen – derfor 16px her */
  input, textarea, select, .search input { font-size: 16px; }
  .main > * { max-width: 100%; }
  pre, .table { max-width: 100%; }
  .sidebar { transform: translateX(-100%); width: min(280px, 85vw); }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .main { margin-left: 0; padding: calc(var(--topbar) + 14px) 14px 40px; width: 100%; max-width: 100vw; overflow-x: hidden; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; padding: 0 8px; width: 100%; max-width: 100vw; }
  .topbar .left { gap: 2px; }
  .logo .logo-text, .logo .kids { display: none; }
  .logo .play { width: 34px; height: 34px; }
  .search input { height: 38px; padding: 0 14px; font-size: 15px; }
  .search button { height: 38px; width: 48px; }
  .topbar .right .btn { padding: 8px 10px; }
  .topbar .right .btn .lbl { display: none; }   /* kun ikon på små skærme */
  .related .card { grid-template-columns: 1fr; }
  .watch { gap: 20px; }
  .watch h1 { font-size: 19px; }
  .ch-head { margin-left: 12px; gap: 12px; }
  .ch-head h1 { font-size: 22px; }
  .banner { height: 110px; }
  .stats { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .table { display: block; overflow-x: auto; }
  pre { max-width: 100%; overflow-x: auto; }
}
