:root {
  --bg: #f6f7fb;
  --bg-grad-1: rgba(99, 102, 241, .14);
  --bg-grad-2: rgba(236, 72, 153, .10);
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --border: #e3e6ef;
  --text: #0f1222;
  --muted: #5d6478;
  --faint: #8a90a3;
  --accent: #5b5bf0;
  --accent-2: #8b5cf6;
  --accent-ink: #ffffff;
  --up: #16a34a;
  --down: #e11d48;
  --warn-bg: #fff7e6;
  --warn-border: #f5d48a;
  --warn-text: #7a5300;
  --err-bg: #fff1f2;
  --err-border: #fecdd3;
  --err-text: #9f1239;
  --shadow: 0 1px 2px rgba(16, 18, 34, .04), 0 8px 24px rgba(16, 18, 34, .06);
  --shadow-hover: 0 2px 4px rgba(16, 18, 34, .06), 0 16px 40px rgba(16, 18, 34, .12);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d16;
    --bg-grad-1: rgba(99, 102, 241, .20);
    --bg-grad-2: rgba(236, 72, 153, .12);
    --surface: #141725;
    --surface-2: #1c2033;
    --border: #262b42;
    --text: #eef0f8;
    --muted: #a3a9be;
    --faint: #737a92;
    --accent: #7c7cff;
    --accent-2: #a78bfa;
    --up: #22c55e;
    --down: #fb7185;
    --warn-bg: #2a2110;
    --warn-border: #5c4614;
    --warn-text: #f5cf7a;
    --err-bg: #2a1118;
    --err-border: #5c1d2c;
    --err-text: #fda4af;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d16;
  --bg-grad-1: rgba(99, 102, 241, .20);
  --bg-grad-2: rgba(236, 72, 153, .12);
  --surface: #141725;
  --surface-2: #1c2033;
  --border: #262b42;
  --text: #eef0f8;
  --muted: #a3a9be;
  --faint: #737a92;
  --accent: #7c7cff;
  --accent-2: #a78bfa;
  --up: #22c55e;
  --down: #fb7185;
  --warn-bg: #2a2110;
  --warn-border: #5c4614;
  --warn-text: #f5cf7a;
  --err-bg: #2a1118;
  --err-border: #5c1d2c;
  --err-text: #fda4af;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--bg-grad-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: var(--shadow);
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: transform .15s;
}
.icon-btn:hover { transform: translateY(-1px); }

/* ---------- hero / input ---------- */
.hero { padding: 40px 0 28px; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 12px; font-weight: 800;
}
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 auto 28px; max-width: 560px; }
.search {
  display: flex; gap: 8px; align-items: center; max-width: 820px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 8px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow); }
.search svg.lead { flex: none; margin-left: 10px; color: var(--faint); }
.search input[type="url"], .search input[type="text"] {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 6px; font-size: 16px;
}
.search select {
  flex: none; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 10px 8px; font-size: 14px; cursor: pointer;
}
.btn {
  flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font-weight: 600;
  padding: 12px 20px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  transition: transform .15s, opacity .15s, box-shadow .15s; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; padding: 9px 14px; font-weight: 500; font-size: 14px; text-decoration: none; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip-btn {
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.chip-btn:hover { color: var(--text); border-color: var(--accent); }

/* ---------- progress ---------- */
.progress { max-width: 820px; margin: 20px auto 0; display: none; }
.progress.on { display: block; }
.progress-track { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .35s ease; border-radius: 999px; }
.progress-bar.indeterminate { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- alerts ---------- */
.alert { max-width: 820px; margin: 20px auto 0; border-radius: 14px; padding: 12px 16px; font-size: 14px; border: 1px solid; }
.alert.err { background: var(--err-bg); border-color: var(--err-border); color: var(--err-text); }
.alert.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); max-width: none; margin: 0 0 20px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- list header ---------- */
#result { padding: 12px 0 80px; }
.list-head {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag.accent { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.list-head h2 { font-size: clamp(22px, 3vw, 32px); letter-spacing: -.025em; line-height: 1.15; margin: 0 0 8px; }
.list-head h2 a { text-decoration: none; }
.list-head h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.byline { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.criteria { font-style: italic; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 12px; margin: 0 0 16px; }
.desc { color: var(--muted); font-size: 15px; max-width: 900px; }
.desc p { margin: 0 0 10px; }
.desc.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--border); }
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; margin-bottom: 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px);
}
.field {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; height: 40px;
}
.field input, .field select { border: 0; outline: 0; background: transparent; font-size: 14px; height: 100%; }
.field.grow { flex: 1; min-width: 200px; }
.field.grow input { flex: 1; min-width: 0; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.seg button.on { background: var(--surface-2); color: var(--text); }
.count { font-size: 13px; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ---------- items ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; animation: rise .35s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.card:hover .media img { transform: scale(1.04); }
.media .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.rank {
  position: absolute; top: 12px; left: 12px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #fff; background: rgba(10, 12, 24, .62); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15);
  font-variant-numeric: tabular-nums;
}
.rank.top1 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.rank.top2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank.top3 { background: linear-gradient(135deg, #c2410c, #9a3412); }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; color: #fff; backdrop-filter: blur(6px); }
.credit {
  position: absolute; right: 8px; bottom: 8px; font-size: 11px; color: #fff; background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 999px;
  max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px);
}
.body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.title { font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; margin: 0; }
.title a { text-decoration: none; }
.title a:hover { color: var(--accent); }
.entity { font-size: 13px; color: var(--muted); margin-top: 2px; }
.votes { display: flex; flex-direction: column; gap: 6px; }
.vote-nums { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vote-nums .u { color: var(--up); }
.vote-nums .d { color: var(--down); }
.vote-nums .pct { color: var(--muted); font-weight: 500; }
.bar { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--down) 70%, transparent); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--up); border-radius: 999px; }
.props { display: flex; flex-wrap: wrap; gap: 6px; }
.prop { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop b { color: var(--text); font-weight: 600; }
.item-desc { font-size: 14px; color: var(--muted); }
.item-desc p { margin: 0 0 8px; }
.item-desc p.h { color: var(--text); font-weight: 600; margin-bottom: 2px; }
.item-desc.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

/* list view */
.grid.rows { grid-template-columns: 1fr; gap: 12px; }
.grid.rows .card { flex-direction: row; }
.grid.rows .media { width: 240px; flex: none; aspect-ratio: auto; min-height: 160px; }
.grid.rows .card:hover { transform: translateY(-2px); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.sentinel { height: 1px; }

/* skeleton */
.skel .media, .skel .line { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel .line { height: 12px; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 640px) {
  .search { flex-wrap: wrap; border-radius: 18px; }
  .search input[type="url"] { flex-basis: calc(100% - 50px); }
  .search select, .search .btn { flex: 1; justify-content: center; }
  .list-head { padding: 20px; border-radius: 20px; }
  .grid.rows .card { flex-direction: column; }
  .grid.rows .media { width: 100%; aspect-ratio: 16 / 10; min-height: 0; }
  .count { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   v2: navigation, views, drawer, rails, history, chart
   ===================================================================== */

.nav { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; }
.nav a {
  text-decoration: none; padding: 7px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); }
.nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.topbar-right { display: flex; gap: 10px; align-items: center; }

.options { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(14px); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-title h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.section-title span { color: var(--muted); font-size: 13px; }

/* horizontal rails of list cards */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: 14px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.lcard {
  scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; cursor: pointer;
}
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.lcard .thumb { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.lcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lcard .lbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard .ltitle { font-weight: 650; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lcard .lmeta { font-size: 12px; color: var(--muted); margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.grid.lists { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.trivia { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.trivia a { text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; gap: 12px; align-items: center; transition: border-color .15s; }
.trivia a:hover { border-color: var(--accent); }
.trivia b.pos { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--accent); min-width: 44px; text-align: center; }
.trivia small { color: var(--muted); display: block; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* movement rows */
.rows-list { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.row-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); text-decoration: none; }
.row-item:first-child { border-top: 0; }
.row-item:hover { background: var(--surface-2); }
.row-item img, .row-item .ph { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.row-item .t { font-weight: 600; font-size: 14px; }
.row-item .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .r { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.row-item .r b { display: block; font-size: 16px; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(5, 7, 15, .45); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(560px, 100%); background: var(--bg); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .25s ease; z-index: 50; overflow-y: auto; box-shadow: -20px 0 60px rgba(0,0,0,.2);
}
.drawer.on { transform: none; }
.drawer-hero { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.drawer-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drawer-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(10,12,24,.6); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.drawer-body { padding: 20px 22px 40px; display: flex; flex-direction: column; gap: 18px; }
.drawer h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.drawer h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--muted); }
.tabs button.on { color: var(--accent); border-color: var(--accent); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); font-size: 14px; }

/* export menu */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 160px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-hover); padding: 6px; display: flex; flex-direction: column;
}
.menu-pop a { text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.menu-pop a:hover { background: var(--surface-2); }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .row-item { grid-template-columns: 44px 1fr auto; gap: 10px; padding: 10px 12px; }
  .row-item img, .row-item .ph { width: 44px; height: 44px; }
}
