:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}

:root {
  --bg: #f5f7f6; --surface: #ffffff; --ink: #15201d; --muted: #5b6b66; --line: #dbe3e0;
  --accent: #1f6b58; --accent-soft: #e2efea; --flag: #b42d2d; --flag-soft: #fbe9e7;
  --warn: #9a6a00; --warn-soft: #fbf1d9; --good: #23784a; --star: #c98a00;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --surface: #17201d; --ink: #e6eeeb; --muted: #9aaba5; --line: #2a3733;
    --accent: #5fc2a3; --accent-soft: #1d3a32; --flag: #f07a6e; --flag-soft: #3a1f1c;
    --warn: #e2b24a; --warn-soft: #3a2f16; --good: #6fd39a; --star: #f0b93c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513; --surface: #17201d; --ink: #e6eeeb; --muted: #9aaba5; --line: #2a3733;
  --accent: #5fc2a3; --accent-soft: #1d3a32; --flag: #f07a6e; --flag-soft: #3a1f1c;
  --warn: #e2b24a; --warn-soft: #3a2f16; --good: #6fd39a; --star: #f0b93c; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 48px; }
.demo { background: var(--warn-soft); color: var(--warn); font-size: 13px; text-align: center; padding: 8px 16px; font-weight: 500; }
header.top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 28px 8px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
.tag { color: var(--muted); font-size: 14px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin: 18px 0 6px; text-wrap: balance; max-width: 22ch; }
.lede { color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.controls { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; margin-bottom: 18px; }
@media (max-width: 720px) { .controls { grid-template-columns: 1fr 1fr; } .controls .search, .controls #sort { grid-column: 1 / -1; } }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.updated { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--muted); margin:0 0 14px; }
.updated .dot { width:8px; height:8px; border-radius:50%; background:#3a9a5b; flex:none; margin-top:6px; }
.count { font-family: var(--font-data); font-size: 12px; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; min-width: 0; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.score { display: flex; align-items: baseline; gap: 6px; }
.score b { font-family: var(--font-data); font-size: 18px; font-weight: 500; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 14px; }
.small { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 500; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.chip.flag { background: var(--flag-soft); color: var(--flag); border-color: transparent; }
.chip.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.price { font-family: var(--font-data); font-size: 14px; font-weight: 500; }
.price.none { color: var(--muted); font-weight: 400; font-size: 13px; font-family: var(--font-body); }
nav.tabs { display: flex; gap: 6px; margin: 4px 0 0; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav.tabs a { white-space: nowrap; }
@media (max-width: 480px) { nav.tabs { gap: 0; } nav.tabs a { padding: 10px 10px; font-size: 14px; } }
nav.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.actions { display:flex; flex-wrap:wrap; gap:8px; }
.site.alt { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.site { display: inline-block; margin-top: 10px; background: var(--accent); color: var(--surface); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.musts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 16px; }
.tog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.tog[aria-pressed="true"] { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.chip.ir { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.type { background: var(--ink); color: var(--surface); border-color: transparent; }
.feat { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; font-size: 14px; }
.feat .y { color: var(--good); font-weight: 600; } .feat .n { color: var(--muted); } .feat .u { color: var(--muted); font-style: italic; }
.mgr { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.price .small { font-family: var(--font-body); }
.pager { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:22px 0 0; }
.pager button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 8px 12px; min-width: 40px; font-weight: 500; }
.pager button[aria-current="page"] { background: var(--accent); color: var(--surface); border-color: var(--accent); font-weight: 700; }
.pager button:disabled { opacity: .4; cursor: default; }
.note { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin: 0 0 18px; max-width: 62ch; font-size: 14px; }
.q-item { border-top:1px solid var(--line); padding:14px 0; display:flex; flex-direction:column; gap:6px; }
.q-item .actions button { padding: 7px 12px; }
.q-item .actions .del { background: transparent; color: var(--flag); border:1px solid var(--flag); }
.back { display: inline-flex; gap: 6px; color: var(--accent); text-decoration: none; font-weight: 600; margin: 18px 0 6px; }
.detail-head h2 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px); margin: 4px 0; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 780px) { .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.panel h4 { font-family: var(--font-data); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.panel p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.ai { border-left: 3px solid var(--flag); background: var(--flag-soft); }
.ai.calm { border-left-color: var(--good); background: var(--accent-soft); }
.ai.wait { border-left-color: var(--line); background: var(--surface); color: var(--muted); }
.bigscores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigscores div b { font-family: var(--font-data); font-size: 28px; font-weight: 500; display: block; line-height: 1.1; }
.issue { display: grid; grid-template-columns: 120px 1fr 30px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--flag); border-radius: 4px; }
.issue span:last-child { font-family: var(--font-data); text-align: right; color: var(--muted); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
dd.pending { color: var(--muted); font-weight: 400; font-style: italic; }
.review { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.review:first-of-type { border-top: 0; padding-top: 0; }
.links a { display: block; color: var(--accent); font-weight: 600; text-decoration: none; padding: 6px 0; overflow-wrap: anywhere; }
form { display: flex; flex-direction: column; gap: 12px; }
label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 5px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.checks label { flex-direction: row; align-items: center; font-weight: 500; gap: 6px; }
.checks input { width: auto; }
button { font: inherit; font-weight: 600; background: var(--accent); color: var(--surface); border: 0; border-radius: 8px; padding: 11px 16px; cursor: pointer; }
.toast { color: var(--good); font-weight: 600; font-size: 14px; }
.empty { color: var(--muted); padding: 30px 0; }
.src { font-size: 12px; color: var(--muted); margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.detail-head h1 { font-family: var(--font-display); font-weight: bold; font-size: clamp(26px, 4vw, 36px); line-height: inherit; margin: 4px 0; letter-spacing: -0.02em; overflow-wrap: anywhere; max-width: none; text-wrap: wrap; }
