:root {
  --bg: #0c0c0e;
  --bg-2: #141418;
  --card: #1a1a20;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f4;
  --muted: #9a9aa8;
  --accent: #c45c6a;
  --accent-2: #e8d5c4;
  --danger: #d45c5c;
  --ok: #7dba8a;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --topbar: rgba(10, 10, 12, 0.92);
  --input: #111116;
  --hero-bg: linear-gradient(120deg, #1b1216, #121218 55%, #1a1512);
  --stat-bg: #121216;
  --log-bg: #0b0b0e;
  --log-text: #c8c8d0;
  --page-glow: radial-gradient(900px 500px at 0% 0%, rgba(196, 92, 106, 0.12), transparent 50%);
}

html[data-theme="light"] {
  --bg: #f6eef1;
  --bg-2: #fff;
  --card: #ffffff;
  --line: rgba(48, 24, 32, 0.12);
  --text: #1c1418;
  --muted: #6d5b63;
  --accent: #c04558;
  --accent-2: #8a3040;
  --danger: #c43c3c;
  --ok: #2d8a4e;
  --shadow: 0 12px 28px rgba(90, 40, 50, 0.12);
  --topbar: rgba(255, 250, 252, 0.94);
  --input: #fff;
  --hero-bg: linear-gradient(120deg, #f7dce3, #fff 50%, #f3e6dc);
  --stat-bg: #f7eef1;
  --log-bg: #f3eaed;
  --log-text: #3a2a30;
  --page-glow: radial-gradient(900px 500px at 0% 0%, rgba(196, 92, 106, 0.16), transparent 50%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    var(--page-glow),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 40%);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }

.wrap {
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 160px;
  color: var(--text);
}
.brand strong {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand span {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
}

.search {
  flex: 1;
  display: flex;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 11px 14px;
  outline: none;
  min-width: 0;
  font-size: 16px;
}
.search button, .btn {
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: 700;
}
.search button { padding: 0 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
}
.btn.gold, .btn.secondary {
  background: var(--stat-bg);
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.btn.tiny { padding: 6px 10px; font-size: 12px; }
.btn.danger { background: var(--danger); color: white; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  min-height: 40px;
}
.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe7a3, #f0b429 55%, transparent 56%),
              conic-gradient(from 200deg, #f0b429, #ffe7a3, #f0b429);
  box-shadow: inset -4px -2px 0 0 var(--card);
}
html[data-theme="light"] .theme-icon {
  background: #5b6b88;
  box-shadow: inset -5px -1px 0 0 var(--card);
}
.theme-label { display: none; }
.login-theme { margin-top: 14px; width: 100%; justify-content: center; }
.login-theme .theme-label { display: inline; }

.hero {
  margin: 22px 0 8px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 280px;
  aspect-ratio: 16 / 6;
  border: 1px solid var(--line);
  background: #120c10;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 10, 0.28) 0%, rgba(10, 8, 10, 0.62) 100%);
  pointer-events: none;
}
.hero-copy { padding: 40px 32px; position: relative; z-index: 1; }
.hero-copy h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}
.hero-copy .hero-lead {
  max-width: 34em;
  letter-spacing: 0;
  text-transform: none;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.stats-row, .sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.pill, .sort-row a {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}
.sort-row a.active, .pill b { color: var(--accent-2); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover, .card.is-previewing {
  transform: translateY(-3px);
  border-color: rgba(196, 92, 106, 0.45);
  box-shadow: var(--shadow);
}
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.thumb img, .thumb video.preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb video.preview {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: #000;
}
.card.is-previewing .thumb video.preview { opacity: 1; }
.card.is-previewing .play { opacity: 0; }
.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.45));
}
.play span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  font-size: 18px;
}
.badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,0.75);
  color: white;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}
.fast-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: #222;
  color: var(--accent-2);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
}
.card-body { padding: 14px 16px 18px; }
.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  min-height: 42px;
  color: var(--text);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin: 22px 0 70px;
}
.player-card, .side-card, .comments, .admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.player-wrap {
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
video, .player-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
}
.watch-info { padding: 16px 20px 20px; }
.watch-info h1 {
  font-size: 24px;
  margin: 0 0 10px;
  line-height: 1.25;
}
.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(232, 213, 196, 0.08);
  color: var(--accent-2);
  font-size: 13px;
}
.side-card { padding: 14px; }
.side-card h2, .comments h2, .admin-card h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 4px 8px 12px;
  color: var(--muted);
}
.mini {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
}
.mini:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.mini img {
  width: 118px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
}
.mini h4 { margin: 0 0 4px; font-size: 13px; color: var(--text); }
.mini p { margin: 0; color: var(--muted); font-size: 12px; }

.comments { padding: 18px 22px 24px; margin-top: 18px; }
.comment-form, .login-form { display: grid; gap: 10px; }
.comment-form .row { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; }
input[type="text"], input[type="password"], input[type="search"], textarea, select {
  background: var(--input);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
  font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
.comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.comment strong { color: var(--accent-2); }
.comment small { color: var(--muted); margin-left: 8px; }
.comment p { margin: 6px 0 0; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card .pad { padding: 28px; }
.login-mark {
  width: 108px;
  height: 108px;
  margin: 0 auto 14px;
}
.login-mark svg { width: 100%; height: 100%; display: block; }
.login-card h1 {
  font-size: 26px;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}
.login-card p { color: var(--muted); margin: 0 0 18px; }
.login-card .login-kicker {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 10px;
}
.error { color: #f0a0a0; font-weight: 700; margin-bottom: 10px; }

.admin-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  margin: 20px 0 50px;
}
.admin-card { padding: 18px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-grid.wide { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: var(--stat-bg);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--line);
}
.stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat b { display: block; font-size: 20px; margin-top: 4px; color: var(--text); }
.table-wrap { overflow: auto; max-height: 520px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.flash {
  margin: 14px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(196, 92, 106, 0.16);
}
.log, .mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: var(--log-bg);
  border-radius: 8px;
  padding: 12px;
  max-height: 240px;
  overflow: auto;
  color: var(--log-text);
}
.detail {
  color: var(--muted);
  max-width: 420px;
  word-break: break-word;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin: 10px 0 16px;
}
.badge-on, .badge-off {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.badge-on { background: rgba(125, 186, 138, 0.15); color: var(--ok); }
.badge-off { background: rgba(212, 92, 92, 0.15); color: var(--danger); }

.admin-nav {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.admin-nav a.active { color: var(--text); border-color: var(--accent); }

.footer {
  text-align: center;
  color: var(--muted);
  padding: 10px 0 40px;
  font-size: 12px;
}

.lock-hero {
  background:
    radial-gradient(700px 280px at 8% 10%, rgba(80, 180, 255, 0.22), transparent 55%),
    radial-gradient(500px 240px at 90% 20%, rgba(255, 140, 90, 0.18), transparent 50%),
    linear-gradient(120deg, #1a1530, #121824 50%, #1a1218);
}
.lock-stats-card h2 { color: #d7d7ea; }
.stat-grid.colorful .stat { border-width: 1px; }
.tone-unlock { background: linear-gradient(180deg, #163528, #12181c); border-color: rgba(90, 220, 150, 0.35); }
.tone-unlock b { color: #7dffa8; }
.tone-fail { background: linear-gradient(180deg, #3a1618, #181214); border-color: rgba(255, 110, 110, 0.4); }
.tone-fail b { color: #ff8d8d; }
.tone-session { background: linear-gradient(180deg, #24183a, #16141f); border-color: rgba(180, 130, 255, 0.4); }
.tone-session b { color: #c9a7ff; }
.tone-ip { background: linear-gradient(180deg, #10283c, #121820); border-color: rgba(90, 190, 255, 0.45); }
.tone-ip b { color: #7fd4ff; }
.tone-watch { background: linear-gradient(180deg, #132445, #141820); border-color: rgba(100, 160, 255, 0.4); }
.tone-watch b { color: #8ec5ff; }
.tone-play { background: linear-gradient(180deg, #16301a, #141816); border-color: rgba(110, 220, 120, 0.4); }
.tone-play b { color: #98f0a4; }
.tone-stream { background: linear-gradient(180deg, #182040, #14161c); border-color: rgba(120, 150, 255, 0.4); }
.tone-stream b { color: #a8b8ff; }
.tone-download { background: linear-gradient(180deg, #3a2410, #1a1612); border-color: rgba(255, 170, 80, 0.45); }
.tone-download b { color: #ffc078; }
.tone-comment { background: linear-gradient(180deg, #3a1830, #1a1418); border-color: rgba(255, 120, 190, 0.4); }
.tone-comment b { color: #ff9ad4; }
.tone-click { background: linear-gradient(180deg, #3a3010, #18160f); border-color: rgba(240, 210, 80, 0.4); }
.tone-click b { color: #f4e07a; }
.tone-search { background: linear-gradient(180deg, #1a3024, #141816); border-color: rgba(90, 230, 180, 0.35); }
.tone-search b { color: #86f0c8; }
.tone-event { background: linear-gradient(180deg, #32141e, #181214); border-color: rgba(255, 110, 150, 0.4); }
.tone-event b { color: #ff9bb4; }

.lock-table tbody tr:nth-child(odd) { background: rgba(255,255,255,0.025); }
.lock-table tbody tr:hover { background: rgba(130, 180, 255, 0.08); }
.num-unlock { color: #7dffa8; font-weight: 700; }
.num-watch { color: #8ec5ff; font-weight: 700; }
.num-play { color: #98f0a4; font-weight: 700; }
.num-stream { color: #a8b8ff; font-weight: 700; }
.num-download { color: #ffc078; font-weight: 700; }
.num-comment { color: #ff9ad4; font-weight: 700; }
.num-event { color: #ff9bb4; font-weight: 700; }
.mono-cell {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #c8d4ea;
}

.ip-chip {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, Consolas, monospace;
  background: linear-gradient(180deg, #1d3554, #152436);
  color: #9fd4ff;
  border: 1px solid rgba(120, 190, 255, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.action-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #2a2a33;
  color: #d8d8e0;
}
.act-unlock { background: #1e4d3a; color: #7dffa8; }
.act-unlock_fail { background: #4a1d1d; color: #ff8d8d; }
.act-watch, .act-watch_repeat { background: #1c3558; color: #8ec5ff; }
.act-play { background: #1c4a24; color: #98f0a4; }
.act-comment { background: #4a2140; color: #ff9ad4; }
.act-download { background: #4a3014; color: #ffc078; }
.act-stream { background: #222a55; color: #a8b8ff; }
.act-click { background: #453a14; color: #f4e07a; }
.act-search { background: #1a4032; color: #86f0c8; }
.act-page_view { background: #2a2438; color: #c9b8ff; }

.notify-wrap { position: relative; }
.notify-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--accent-2);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.notify-bell:hover { border-color: rgba(196, 92, 106, 0.5); color: var(--text); }
.notify-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e25b6c;
  color: white;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.notify-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, 84vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 90;
  overflow: hidden;
}
.notify-panel.open { display: block; }
.notify-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.notify-dropdown-list { max-height: 360px; overflow: auto; }
.notify-item, .notify-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.notify-item:hover, .notify-row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.notify-item.unread, .notify-row.unread { background: rgba(90, 160, 255, 0.08); }
.notify-item strong, .notify-row strong { font-size: 13px; }
.notify-item span, .notify-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.notify-item small, .notify-row small { color: #8aa0b8; font-size: 11px; }
.notify-dropdown-list .empty, .notify-inbox .meta { padding: 14px 12px; }

.notify-inbox { margin-bottom: 48px; }
.notify-row {
  grid-template-columns: 110px 1fr auto auto;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
}
.notify-copy { display: grid; gap: 2px; min-width: 0; }

.admin-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 24px));
  pointer-events: none;
}
.admin-toast {
  pointer-events: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid #8ec5ff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.admin-toast.show { opacity: 1; transform: translateY(0); }
.admin-toast strong { display: block; margin-bottom: 4px; }
.admin-toast p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-toast small { color: #8aa0b8; font-size: 11px; }
.toast-unlock { border-left-color: #7dffa8; }
.toast-watch, .toast-watch_repeat { border-left-color: #8ec5ff; }
.toast-play { border-left-color: #98f0a4; }
.toast-comment { border-left-color: #ff9ad4; }
.toast-download { border-left-color: #ffc078; }

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .notify-row { grid-template-columns: 1fr; }
  .watch-layout, .admin-grid, .comment-form .row, .form-row, .stat-grid.wide, .stat-grid { grid-template-columns: 1fr; }
  .brand { min-width: 0; }
  .brand strong { font-size: 15px; }
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    align-items: center;
  }
  .search {
    grid-column: 1 / -1;
    min-height: 46px;
  }
  .search button { min-width: 84px; }
  .nav-links { justify-content: flex-end; }
  .wrap { width: min(1520px, calc(100% - 20px)); }
  .hero { min-height: 180px; aspect-ratio: 16 / 9; margin: 14px 0 6px; }
  .hero-copy { padding: 22px 16px; }
  .hero-copy p { letter-spacing: 0.08em; }
  .hero-copy .hero-lead { letter-spacing: 0; font-size: 15px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px; }
  .card-body h3 { font-size: 15px; min-height: 0; }
  .sort-row, .stats-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    margin: 10px 0;
  }
  .pill, .sort-row a { white-space: nowrap; padding: 9px 12px; }
  .watch-layout { margin: 12px 0 48px; gap: 12px; }
  .watch-info { padding: 14px 14px 16px; }
  .watch-info h1 { font-size: 20px; }
  .comments { padding: 16px; margin-top: 12px; }
  .comment-form .row textarea { min-height: 72px; }
  .mini { grid-template-columns: 96px 1fr; }
  .login-page { padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); }
  .login-card .pad { padding: 22px 18px; }
  .admin-card { padding: 14px; }
  .table-wrap { max-height: none; }
  table { font-size: 12px; }
  .btn, .search button { min-height: 44px; }
  .btn.tiny { min-height: 36px; }
  .admin-toasts { right: 10px; bottom: 10px; width: calc(100% - 20px); }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card { border-radius: 16px; }
  .thumb { aspect-ratio: 16 / 10; }
  .play span { width: 56px; height: 56px; font-size: 20px; }
  .nav-links .btn.ghost { padding: 8px 10px; }
}
