:root {
  --bg: #111114; --panel: #1a1a1f; --panel-2: #222228; --line: #2e2e36;
  --text: #f1f1f3; --muted: #9a9aa6; --accent: #d4ff3a; --accent-ink: #111114;
  --pass: #5bd38c; --warn: #ffc24b; --fail: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.mark { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); }
.tag { color: var(--muted); font-size: 13px; }
.layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; padding: 20px 24px; max-width: 1500px; margin: 0 auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; align-self: start; }
h2 { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
h2.inline { margin: 0; }
.panel h2:first-child { margin-top: 0; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.count { float: right; font-variant-numeric: tabular-nums; }
.count.over { color: var(--fail); }
input:not([type]), input[type=text], textarea {
  display: block; width: 100%; margin-top: 4px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 10px; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.small { width: 90px; flex: none; }
.file { flex: 1; cursor: pointer; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 8px; padding: 9px 10px; display: flex; justify-content: space-between; gap: 8px; }
.file input { display: none; }
.file span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.rival { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.rival input:not([type=file]) { margin: 0; }
.rival .file { padding: 7px 10px; }
.stage { min-width: 0; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { background: transparent; color: var(--muted); border: 0; padding: 6px 14px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.score { font-size: 15px; margin-bottom: 8px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checks li { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.checks b { color: var(--c); margin-right: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
.checks .pass { --c: var(--pass); } .checks .warn { --c: var(--warn); } .checks .fail { --c: var(--fail); }
.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 16px 32px; }

/* --- YouTube-like surfaces (approximations) --- */
.yt { --yt-bg: #0f0f0f; --yt-text: #f1f1f1; --yt-sub: #aaaaaa; --yt-ph: #272727; border-radius: 14px; overflow: hidden; }
.yt.light { --yt-bg: #ffffff; --yt-text: #0f0f0f; --yt-sub: #606060; --yt-ph: #e5e5e5; }
.feeds { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.surface { background: var(--yt-bg); color: var(--yt-text); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-family: Roboto, Arial, sans-serif; min-width: 0; }
.surface h3 { margin: 0 0 12px; font: 600 12px/1 "Segoe UI", system-ui, sans-serif; color: var(--yt-sub); text-transform: uppercase; letter-spacing: 1px; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--yt-ph); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 500; padding: 1px 4px; border-radius: 4px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--yt-ph); flex: none; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.t { font-weight: 500; color: var(--yt-text); display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.sub { color: var(--yt-sub); font-size: 12px; }
.ph .t { color: var(--yt-sub); }
.mine { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
/* Desktop home grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
.card .meta { display: flex; gap: 12px; margin-top: 12px; }
.card .t { font-size: 16px; line-height: 22px; -webkit-line-clamp: 2; }
/* Phone home feed */
.phone { width: 340px; }
.phone .card { margin: 0 -14px 18px; }
.phone .thumb { border-radius: 0; }
.phone .card .meta { padding: 0 12px; }
.phone .card .t { font-size: 14px; line-height: 20px; }
/* Search and suggested rows */
.rowcard { display: flex; gap: 10px; margin-bottom: 12px; }
.rowcard .thumb { width: 168px; flex: none; border-radius: 8px; }
.rowcard .t { font-size: 14px; line-height: 20px; -webkit-line-clamp: 2; }
.search .rowcard .thumb { width: 46%; }
.search .rowcard .t { font-size: 18px; line-height: 26px; }
.search .desc { color: var(--yt-sub); font-size: 12px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 1100px) { .feeds { grid-template-columns: 1fr; } .phone { width: auto; max-width: 400px; } }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; padding: 16px; } .grid { grid-template-columns: 1fr; } }
