:root {
  --bg: #f5f5f4; --card: #ffffff; --text: #1c1917; --muted: #78716c; --line: #e7e5e4;
  --accent: #e4405f; --accent-text: #ffffff; --ok: #15803d; --warn: #b45309; --err: #b91c1c;
  --chip: #f5f5f4; --tt: #0f766e; --ig: #be185d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0a09; --card: #1c1917; --text: #f5f5f4; --muted: #a8a29e; --line: #292524;
    --accent: #f472b6; --accent-text: #1c1917; --ok: #4ade80; --warn: #fbbf24; --err: #f87171; --chip: #292524;
    --tt: #5eead4; --ig: #f9a8d4;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0a09; --card: #1c1917; --text: #f5f5f4; --muted: #a8a29e; --line: #292524;
  --accent: #f472b6; --accent-text: #1c1917; --ok: #4ade80; --warn: #fbbf24; --err: #f87171; --chip: #292524;
  --tt: #5eead4; --ig: #f9a8d4;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  padding: env(safe-area-inset-top) 16px calc(84px + env(safe-area-inset-bottom));
}
main { max-width: 640px; margin: 0 auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 0 10px; }
.top select { width: auto; max-width: 50%; padding: 6px 10px; font-size: 14px; }
h1 { font-size: 19px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=datetime-local], input[type=date], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
}
textarea { min-height: 100px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 500; margin: 0; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; padding: 0; cursor: pointer; }
.pick { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 20px; text-align: center;
  color: var(--muted); cursor: pointer; font-weight: 500; }
.pick input { display: none; }
button { font: inherit; cursor: pointer; }
button.primary { width: 100%; margin-top: 14px; padding: 13px; font-weight: 700; border: 0;
  border-radius: 12px; background: var(--accent); color: var(--accent-text); }
button.primary:disabled { opacity: .5; }
button.sec { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--chip); color: var(--text); font-size: 14px; }
button.sec.danger { color: var(--err); }
ul.files { list-style: none; padding: 0; margin: 10px 0 0; }
ul.files li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.between { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.muted { color: var(--muted); font-size: 13px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .err { color: var(--err); }
.msg { margin-top: 8px; font-size: 14px; }
.done { text-align: center; }
.done .big { font-size: 28px; font-weight: 800; margin: 4px 0; }
.item { padding: 10px 0; border-top: 1px solid var(--line); display: block; color: inherit; text-decoration: none; }
.item:first-of-type { border-top: 0; }
.badge { font-size: 12px; border-radius: 6px; padding: 1px 7px; background: var(--chip); border: 1px solid var(--line); white-space: nowrap; }
.badge.ig { color: var(--ig); } .badge.tt { color: var(--tt); }
.badge.good { color: var(--ok); } .badge.bad { color: var(--err); } .badge.mid { color: var(--warn); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumbs figure { margin: 0; font-size: 12px; }
.thumbs img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; background: var(--line); }
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.videos video, .one video { width: 100%; aspect-ratio: 9/16; border-radius: 10px; background: #000; }
.one { max-width: 260px; margin: 0 auto; }
.cut { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); }
.cut input { padding: 6px 8px; font-size: 14px; }
.cut .ctl { display: flex; gap: 4px; }
.cut .ctl button { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--chip); color: var(--text); }
.checks { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; }
.checks li::before { content: "✓ "; color: var(--ok); }
.checks li.no::before { content: "✕ "; color: var(--err); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.src { font-size: 11px; color: var(--muted); }
table.diff { width: 100%; font-size: 12px; border-collapse: collapse; }
table.diff td { border-top: 1px solid var(--line); padding: 4px; vertical-align: top; word-break: break-all; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.tabs a { flex: 1; text-align: center; font-size: 11px; color: var(--muted); text-decoration: none; position: relative; }
.tabs a span { display: block; font-size: 18px; line-height: 1.3; }
.tabs a.on { color: var(--accent); font-weight: 700; }
.tabs b { position: absolute; top: -2px; right: 18%; background: var(--accent); color: var(--accent-text); border-radius: 999px;
  font-size: 10px; padding: 0 5px; }
.daytitle { font-weight: 700; margin: 14px 0 4px; font-size: 14px; }
.score { font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.more { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
details.more > summary { color: var(--muted); padding: 2px 0; }
details.more[open] > summary { color: var(--text); }
details.card > summary { font-size: 16px; }
a.card { display: block; color: inherit; text-decoration: none; }
.hero { display: flex; align-items: center; gap: 14px; font-weight: 600; border-color: var(--accent); }
.hero .big { font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1; }
.hero.calm { border-color: var(--line); }
.hero.calm .big { color: var(--ok); font-size: 28px; }
.pagetitle { margin: 4px 0 12px; }
.links a.sec, a.sec { display: inline-block; text-decoration: none; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; }
.links { justify-content: center; margin: 4px 0 12px; }
a.link { text-decoration: none; font-size: 13px; }
[hidden] { display: none !important; }
