:root {
  --bg: #111318; --panel: #1b1e26; --panel-2: #242833; --text: #f1f2f5; --muted: #9aa0ad;
  --accent: #ff3b30; --ok: #34c759; --line: #2c3140; --radius: 18px;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f5f8; --panel: #ffffff; --panel-2: #eceef3; --text: #15171c; --muted: #5d6472; --line: #dde0e7; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
h1 { font-size: 22px; margin: 6px 2px 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-topic { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; min-height: 108px; text-align: left; color: var(--text); font: inherit;
  display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.btn-topic:active { transform: scale(.97); }
.btn-topic .emoji { font-size: 30px; line-height: 1; }
.btn-topic .label { font-weight: 650; font-size: 16px; margin-top: 8px; }
.btn-topic .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.btn-topic.empty { opacity: .45; }
.filter { display: flex; gap: 8px; margin: 0 0 14px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-size: 15px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.back { background: none; border: 0; color: var(--muted); font: inherit; padding: 8px 0; cursor: pointer; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.thumb { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--panel-2); }
.body { padding: 16px; }
.topic-name { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.title { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.sub { color: var(--muted); font-size: 15px; }
.why { margin: 14px 0 0; padding: 12px 14px; background: var(--panel-2); border-radius: 12px; font-size: 15px; }
.why b { font-weight: 650; }
.watch { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 19px;
  border-radius: 14px; min-height: 60px; }
.row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.act { min-height: 54px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.act.ok { background: var(--ok); color: #fff; border-color: transparent; }
.act:active { transform: scale(.97); }
.empty-msg { text-align: center; color: var(--muted); padding: 40px 10px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 15px;
  opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 22px; }
.login { display: grid; gap: 10px; margin-top: 30px; }
.login label { color: var(--muted); font-size: 15px; }
.login input { font: inherit; font-size: 20px; padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); }
.login .watch { border: 0; cursor: pointer; width: 100%; }
