:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --text: #111827;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #0d9488;
  --accent-ink: #ffffff;
  --accent-soft: #ccfbf1;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
  --top-h: 52px;
  --nav-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #131c2e;
    --surface-2: #1c2740;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --line: #22304a;
    --accent: #2dd4bf;
    --accent-ink: #042f2e;
    --accent-soft: #134e4a;
    --warn: #fbbf24;
    --danger: #f87171;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }

/* ---- chrome ---------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; margin-right: auto; }
.gear { color: var(--muted); display: grid; place-items: center; width: 40px; height: 40px; }
.sync {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 10px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.sync[data-status="ok"] { color: var(--accent); }
.sync[data-status="needs-tap"] { color: var(--warn); border-color: currentColor; }
.sync[data-status="error"] { color: var(--danger); border-color: currentColor; }
.sync[data-status="syncing"] svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.view {
  max-width: 720px; margin: 0 auto;
  padding: 8px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px));
}

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--nav-h); font-size: 12px; color: var(--muted); text-decoration: none;
}
.nav a.on { color: var(--accent); font-weight: 600; }
.nav .ico { position: relative; font-size: 19px; line-height: 1; }
.badge {
  position: absolute; top: -6px; right: -14px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font: 700 11px/18px system-ui, sans-serif; text-align: center;
}

/* ---- common --------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 8px 2px; }
.error { color: var(--danger); }
.section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 2px 8px; font-weight: 600; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.fold summary { cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; margin: 12px 0; }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 6px; cursor: pointer; }
.tag { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; background: var(--danger); color: #fff; vertical-align: middle; }
.empty { text-align: center; padding: 48px 12px; }
.empty h2 { margin: 0 0 8px; }
.steps { text-align: left; display: inline-block; margin: 8px auto 20px; }
.note { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }

.poster, .thumb { border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }
.poster { width: 64px; height: 96px; }
.poster.big { width: 104px; height: 156px; box-shadow: var(--shadow); }
.thumb { width: 44px; height: 66px; }
.ph { display: block; }
.prov { width: 22px; height: 22px; border-radius: 5px; }
.provs { display: inline-flex; gap: 4px; flex: none; }

/* ---- cards & rows ---------------------------------------------------- */
.card {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; margin-bottom: 10px; cursor: pointer;
}
.card-body { flex: 1; min-width: 0; }
.card-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { color: var(--muted); font-size: 14px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub b { color: var(--text); font-weight: 600; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.bar { height: 5px; border-radius: 3px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.check {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--accent); background: transparent; color: var(--accent);
  font-size: 22px; font-weight: 700; cursor: pointer;
}
.check:active { background: var(--accent); color: var(--accent-ink); }
.play {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--accent-ink);
  font-size: 18px; cursor: pointer; padding-left: 4px;
}
.next-actions { display: flex; gap: 8px; margin: 12px 0 4px; }
.next-actions .btn.primary { flex: 1; }
.next-title { margin: 4px 2px 0; font-size: 13px; }
.next-title a { color: inherit; text-decoration: none; }

.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer;
}
.row-body { flex: 1; min-width: 0; }
.row-title { font-weight: 600; }
.row-sub { color: var(--muted); font-size: 13px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.chips { display: flex; gap: 8px; margin: 12px 0; overflow-x: auto; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }

.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- paused shows ---------------------------------------------------- */
.paused-row .crow-title { color: var(--text); text-decoration: none; }
.paused-row .btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.paused-row::after { display: none; }
.status-seg { margin-top: 10px; }
.paused-tag { color: var(--warn); font-weight: 600; }

/* ---- compact watching list ------------------------------------------ */
.watch-head { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 -8px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.clist { background: var(--surface); border-radius: 12px; overflow: hidden; }
.crow {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 14px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.crow:last-child { border-bottom: 0; }
.crow::after { /* progress as a thin underline */
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: var(--pct); background: var(--accent); opacity: .7;
}
.crow-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.crow-next { flex: none; font-size: 13px; color: var(--muted); }
.crow-next b { color: var(--accent); font-weight: 700; }

/* ---- movies ---------------------------------------------------------- */
.mrow { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
.mrow .row-body { cursor: pointer; }
.mrow .play, .mrow .check { width: 42px; height: 42px; font-size: 16px; }
.mrow .check { font-size: 18px; }
.searchbar.inline { position: static; padding: 6px 0 2px; }

/* ---- age rating badge ------------------------------------------------ */
.cert {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1;
  padding: 3px 5px; border: 1.5px solid currentColor; border-radius: 4px; color: var(--muted);
  white-space: nowrap;
}
h1 .cert { font-size: 13px; padding: 3px 6px; }
.stars { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; white-space: nowrap; vertical-align: middle; }
h1 .stars { font-size: 15px; }

/* ---- summaries ------------------------------------------------------- */
.scores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.score { font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.chips { scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.overview { margin: 14px 2px 4px; line-height: 1.5; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.tagline { margin: 14px 2px 0; font-style: italic; color: var(--muted); }
.movie-btns { margin: 4px 0 16px; }
.sheet-text { margin: 0 6px 10px; font-size: 14px; line-height: 1.45; color: var(--muted); max-height: 30vh; overflow-y: auto; }

/* ---- episode page ---------------------------------------------------- */
.ep-hero { height: 210px; }
.ep-hero::after { background: linear-gradient(to bottom, transparent 55%, var(--bg)); }
.ep-head { margin-top: -28px; position: relative; }
.ep-head h1 { font-size: 21px; margin: 4px 0; line-height: 1.25; }
.ep-head a { text-decoration: none; }
.credits { margin: 16px 2px 0; font-size: 14px; display: grid; gap: 4px; }
.guests { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.guests::-webkit-scrollbar { display: none; }
.guest { flex: none; width: 92px; font-size: 13px; }
.guest img, .guest-ph { width: 92px; height: 120px; object-fit: cover; border-radius: 10px; background: var(--surface-2); display: block; margin-bottom: 6px; }
.guest-name { font-weight: 600; line-height: 1.25; }
.ep-nav { display: flex; justify-content: space-between; margin: 22px 0 8px; }
.btn[disabled] { opacity: .5; }

/* ---- open in streaming app ------------------------------------------ */
.open-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }

/* ---- QR transfer ----------------------------------------------------- */
.qr-panel .qr { width: min(78vw, 320px); margin: 4px auto 8px; background: #fff; border-radius: 12px; padding: 8px; }
.qr-panel .qr svg { display: block; width: 100%; height: auto; }
.import .steps li { margin: 4px 0; }
.btns.center { justify-content: center; }
.scanner { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.scanner video { width: 100%; max-height: 75vh; object-fit: cover; }
.scan-frame { position: absolute; width: 60vw; height: 60vw; max-width: 300px; max-height: 300px; border: 3px solid #5eead4; border-radius: 16px; pointer-events: none; }

/* ---- cover screen ---------------------------------------------------- */
body.cover-mode .top, body.cover-mode .nav { display: none; }
body.cover-mode .view { padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
body.cover-mode .toast { bottom: 10px; left: 8px; right: 8px; font-size: 13px; padding: 8px 10px; }
.cover-list { display: grid; gap: 8px; }
.cover-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 8px 8px 8px 12px; }
.cover-text { flex: 1; min-width: 0; color: var(--text); text-decoration: none; display: flex; flex-direction: column; }
.cover-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-ep { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; font-size: 22px; font-weight: 700; cursor: pointer; }
.cover-btn.play { border: 0; background: var(--accent); color: var(--accent-ink); }
.cover-btn.check { border: 2px solid var(--accent); background: transparent; color: var(--accent); }
.cover-empty { text-align: center; padding: 40px 10px; }
.cover-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 3px; margin-bottom: 8px; }
.cover-tabs a { text-align: center; padding: 7px 0; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.cover-tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.cover-note { font-size: 12px; color: var(--muted); margin: 0 2px 6px; text-align: center; }
.cover-remote { display: grid; gap: 8px; }
.cover-remote.offline { opacity: .45; }
.cover-dpad { max-width: 270px; gap: 6px; }
.cover-dpad .rk { min-height: 62px; font-size: 22px; }
.cover-rrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cover-rrow .rk { min-height: 50px; font-size: 20px; }

/* ---- search result kind tag ----------------------------------------- */
.kind { display: inline-block; vertical-align: middle; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 2px 5px; margin-left: 4px; }

/* ---- type on TV ------------------------------------------------------ */
.gear.kbd { background: none; border: 0; font-size: 22px; cursor: pointer; }
.kbd-panel input#kbdText { width: 100%; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); padding: 0 12px; font-size: 17px; margin: 4px 0 10px; }
.kbd-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }

/* ---- TV remote ------------------------------------------------------- */
.gear.kbd { text-decoration: none; font-size: 21px; }
.remote { display: grid; gap: 14px; padding-top: 10px; }
.remote-head { display: flex; align-items: baseline; gap: 8px; }
.remote.offline .dpad, .remote.offline .rrow { opacity: .45; }
.dpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; width: 100%; margin: 0 auto; }
.rk { min-height: 58px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; font-weight: 600;
  cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.rk:active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.dpad .rk { min-height: 74px; font-size: 24px; }
.dpad .rk.ok { border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 0; }
.rrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rrow .rk { font-size: 15px; min-height: 52px; }
.rtype { display: flex; gap: 8px; }
.rtype input { flex: 1; min-width: 0; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); padding: 0 12px; font-size: 16px; }

/* ---- people ---------------------------------------------------------- */
.person-head { display: flex; gap: 14px; align-items: flex-end; margin-top: 12px; }
.person-head h1 { font-size: 22px; margin: 0 0 4px; }
a.guest { color: var(--text); text-decoration: none; }

/* ---- discover -------------------------------------------------------- */
.fbar { display: flex; justify-content: flex-end; margin: -4px 0 8px; }
.filters { background: var(--surface); border-radius: 12px; padding: 4px 12px 12px; margin-bottom: 12px; }
.fhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.fwrap { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { padding: 6px 11px; font-size: 13px; }
.fchip.inc { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.fchip.exc { background: transparent; color: var(--danger); border-color: var(--danger); text-decoration: line-through; }
.filters .seg { flex-wrap: wrap; }
.fhint { margin: 12px 0 0; }
.empty-filters { background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.empty-filters p { margin: 0 0 6px; }
.empty-filters .btns { margin-top: 10px; }
.factions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.row.disc { align-items: flex-start; }
.row.disc .thumb { margin-top: 2px; }
.disc-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; min-height: 32px; }
.more { border: 0; background: transparent; color: var(--muted); font-size: 20px; width: 36px; height: 30px; cursor: pointer; }

/* ---- search ---------------------------------------------------------- */
.searchbar { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); padding: 10px 0; background: var(--bg); z-index: 5; }
.searchbar input {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); padding: 0 14px; font-size: 16px;
}

/* ---- show page ------------------------------------------------------- */
.hero { height: 150px; margin: -8px -16px 0; background: var(--surface-2) center/cover no-repeat; position: relative; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--bg)); }
.show-head { display: flex; gap: 14px; margin-top: -60px; position: relative; align-items: flex-end; }
.show-head h1 { font-size: 22px; margin: 0 0 4px; line-height: 1.2; }
.show-head .muted { font-size: 13px; }
.toggle-row { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 600; }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: 13px; }
.prov-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; }
.prov-chip img { width: 22px; height: 22px; border-radius: 50%; }

.season { background: var(--surface); border-radius: 12px; margin: 10px 0; overflow: hidden; }
.season-head { display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; }
.season-name { font-weight: 600; margin-right: auto; }
.chev { color: var(--muted); width: 14px; text-align: center; }
.eps { border-top: 1px solid var(--line); }
.ep { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.ep:last-child { border-bottom: 0; }
.ep-main { flex: 1; min-width: 0; cursor: pointer; padding: 4px 0; }
.ep-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-sub { font-size: 12px; color: var(--muted); }
.ep.done .ep-title { color: var(--muted); }
.ep.future { opacity: .5; }
.tick {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--line); background: transparent; color: var(--accent-ink);
  font-weight: 800; cursor: pointer;
}
.ep.done .tick { background: var(--accent); border-color: var(--accent); }
.tick:disabled { cursor: default; }

/* ---- settings ------------------------------------------------------- */
.form fieldset { border: 0; background: var(--surface); border-radius: 12px; margin: 0 0 14px; padding: 14px; }
.form legend { font-weight: 700; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.form label { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; clear: both; }
.form input {
  display: block; width: 100%; margin-top: 4px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 12px; font-size: 16px;
}
.btns { display: flex; gap: 8px; flex-wrap: wrap; clear: both; }

/* ---- overlays -------------------------------------------------------- */
.toast {
  position: fixed; left: 16px; right: 16px; z-index: 30;
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: #111827; color: #f9fafb; border-radius: 12px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast span { flex: 1; }
.toast button { background: none; border: 0; color: #5eead4; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.sheet-title { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 0 10px; }
.sheet-btn { display: block; width: 100%; min-height: 50px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 16px; cursor: pointer; }
.sheet-btn.cancel { font-weight: 700; }
.sheet-btn.danger { color: var(--danger); }

/* Add a list (shared from Claude) */
p.center { text-align: center; }
.mrow.dim { opacity: .6; }
.mrow[data-action] { cursor: pointer; }
.mrow input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--accent); pointer-events: none; }
#listText { width: 100%; box-sizing: border-box; margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--surface-2); background: var(--surface); color: inherit; font: 14px/1.4 ui-monospace, monospace; }
.sheet-text { white-space: pre-wrap; }
