/* Diario ascolti — stile. Mobile first, pensato per il pollice, chiaro/scuro automatico. */
:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --fg: #1c1b1a;
  --muted: #6f6b66;
  --line: #e4e1da;
  --accent: #d3492a;
  --accent-fg: #ffffff;
  --ok: #2e7d4f;
  --warn: #a8690f;
  --bad: #c0392b;
  --tab-h: 56px;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --card: #1c1c1f;
    --fg: #f2f0ec;
    --muted: #9a968f;
    --line: #2c2c30;
    --accent: #ef6a4a;
    --accent-fg: #1a0d08;
    --ok: #5cc48a;
    --warn: #e0a23c;
    --bad: #ff7a6b;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  touch-action: manipulation;
  overscroll-behavior-y: none;
}
body.noscroll { overflow: hidden; }
h1 { font-size: 28px; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px);
  min-height: 100vh;
}

/* Intestazioni */
header.top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
header.top .count { color: var(--muted); font-size: 14px; }
.back {
  background: none; border: 0; color: var(--accent); font-size: 17px; padding: 8px 8px 8px 0;
  min-height: 44px; margin-right: auto; cursor: pointer;
}
header.top.sub { align-items: center; }
header.top.sub h1 { font-size: 22px; order: 2; width: 100%; }

/* Bottoni */
.btn {
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; cursor: pointer;
}
.btn:active { opacity: .7; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 8px; min-height: 44px; cursor: pointer; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Campi */
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
input[type="date"] { -webkit-appearance: none; appearance: none; text-align: left; }
input[type="checkbox"], input[type="radio"] { width: 22px; min-height: 0; height: 22px; padding: 0; accent-color: var(--accent); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
label > input, label > select, label > textarea { color: var(--fg); font-weight: 400; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg); font-weight: 400; }
form.form { display: grid; gap: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.hint.warn { color: var(--warn); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg label {
  display: block; margin: 0; cursor: pointer;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg); font-size: 15px; font-weight: 600;
}
.seg input:checked + span { background: var(--accent); color: var(--accent-fg); border-color: transparent; }

/* Filtri lista */
.filters { display: grid; gap: 8px; margin-bottom: 8px; }
.filters .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Lista */
.month { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-bottom: 8px; cursor: pointer;
  min-height: 72px;
}
.item:active { opacity: .7; }
.cover, .ph {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line); display: block;
}
.ph { display: grid; place-items: center; color: var(--muted); font-size: 22px; }
.cover.big, .ph.big { width: 96px; height: 96px; border-radius: 12px; font-size: 34px; }
.txt { display: grid; gap: 1px; min-width: 0; }
.txt b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txt span, .txt small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txt small { font-size: 12.5px; }
.date { color: var(--muted); font-size: 12.5px; align-self: start; padding-top: 4px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.tag { font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 99px; background: var(--line); color: var(--muted); white-space: nowrap; }
.tag.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tag.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 48px 12px; }

/* Card menu */
.menu { display: grid; gap: 8px; margin-top: 10px; }
.menu button {
  display: grid; gap: 2px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; min-height: 64px; cursor: pointer;
}
.menu b { font-size: 17px; }
.menu span { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.card h2 { margin-bottom: 10px; }

/* Form entrata */
.cover-row { display: flex; gap: 14px; align-items: center; }
.cover-row .ids { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* Tab bar */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
#tabs button {
  display: grid; place-items: center; gap: 1px; align-content: center; height: var(--tab-h);
  background: none; border: 0; color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: pointer;
}
#tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#tabs button.on { color: var(--accent); }

/* Banner */
#banner {
  position: sticky; top: 0; z-index: 15; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--warn); color: #fff; font-size: 14px; font-weight: 600;
}
#banner[hidden] { display: none; }
#banner button { background: rgba(255,255,255,.22); border: 0; color: #fff; font-weight: 700; border-radius: 10px; padding: 8px 12px; min-height: 36px; }

/* Toast e caricamento */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 20px);
  background: var(--fg); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#busy {
  position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
#busy[hidden] { display: none; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bottom sheet */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg); border-radius: 20px 20px 0 0; padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px);
  display: grid; gap: 12px; align-content: start;
}
.sheet-h { display: flex; justify-content: space-between; align-items: center; }
.srch { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.results { display: grid; gap: 8px; }
.res {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 72px; cursor: pointer;
}
.res:active { opacity: .7; }
.sheet-f { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-f .btn { flex: 1; }

/* Import */
.progress { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-size: 14px; font-weight: 600; min-height: 36px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.rv {
  display: grid; grid-template-columns: 22px 56px 1fr; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 8px;
}
.rv .src { font-size: 12.5px; color: var(--muted); }
.rv .hit { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.rv .acts { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.pill { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.dubbio { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.nessuno { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.sticky-bar { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); padding-top: 8px; }
.warnlist { font-size: 13px; color: var(--muted); max-height: 180px; overflow: auto; margin: 8px 0; padding-left: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* Mesi comprimibili */
.month-h {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin: 14px 0 6px; padding: 8px 2px; min-height: 44px;
  background: none; border: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; cursor: pointer;
}
.month-h .chev { width: 14px; color: var(--accent); }

/* Swipe per eliminare */
.swipe { position: relative; margin-bottom: 8px; border-radius: var(--radius); overflow: hidden; background: var(--bad); }
.swipe-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 22px; color: #fff; font-weight: 700; }
.swipe .item { position: relative; margin: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; }

/* Toast con azione */
#toast.act { pointer-events: auto; display: flex; gap: 14px; align-items: center; }
#toast button { background: none; border: 0; color: var(--accent); font-weight: 800; font-size: 14.5px; padding: 4px 2px; min-height: 32px; }

/* Anni comprimibili (sopra i mesi) */
.year-h {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin: 20px 0 2px; padding: 8px 2px; min-height: 46px;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font-size: 18px; font-weight: 750; letter-spacing: -.01em; cursor: pointer;
}
.year-h .chev { width: 16px; color: var(--accent); font-size: 15px; }
.chips[hidden] { display: none; }

/* ───────── Statistiche ─────────
   Palette categorica validata (scripts/validate_palette: 6 slot, chiaro e scuro, adiacenti). Il grigio "Altri" è il muted. */
:root {
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300; --c-other: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7;
}
@media (prefers-color-scheme: dark) {
  :root { --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --c6: #008300; --grid: #2c2c2a; --axis: #383835; }
}

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 2px; align-content: start; }
.tile b { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.tile span { color: var(--muted); font-size: 12.5px; }
section.card h2 { font-size: 17px; }
.readout { min-height: 34px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.readout .link { min-height: 32px; padding: 4px 8px; font-size: 14px; }

.chart, .donut { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .ax, .donut .ax { font-size: 10.5px; fill: var(--muted); }
.chart .val { font-size: 11px; font-weight: 650; fill: var(--fg); }
.chart .hit { fill: transparent; }
.chart .b { fill: var(--c1); }
.col { outline: none; cursor: pointer; }
.chart.has-sel .col:not(.sel) .b, .chart.has-sel .col:not(.sel) .s { opacity: .5; }
.col:focus-visible .hit { stroke: var(--accent); stroke-width: 1.5; }
.donut-wrap { width: 168px; margin: 4px auto 10px; }
.donut-n { font-size: 26px; font-weight: 700; fill: var(--fg); }
.donut .seg { cursor: pointer; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 6px 0 4px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i, .lg-row .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }

.lg { display: grid; }
.lg-row {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; text-align: left; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--line); min-height: 46px; padding: 6px 2px; cursor: pointer;
}
.lg-row:first-child { border-top: 0; }
.lg-row:active { opacity: .6; }
.lg-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-row .ct { color: var(--muted); font-size: 13px; white-space: nowrap; }

.toprow {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 8px 2px; min-height: 60px; cursor: pointer;
}
.toprow:first-of-type { border-top: 0; }
.toprow:active { opacity: .6; }
.toprow .cover, .toprow .ph { width: 44px; height: 44px; border-radius: 6px; font-size: 18px; }
.toprow .cnt { font-weight: 700; font-size: 15px; }
.hbar { display: block; height: 6px; margin-top: 5px; }
.hbar i { display: block; height: 100%; width: var(--w); background: var(--c1); border-radius: 0 4px 4px 0; }

details { margin-top: 8px; }
summary { color: var(--accent); font-weight: 600; font-size: 14px; min-height: 36px; display: flex; align-items: center; cursor: pointer; }
.tbl { overflow-x: auto; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; }

/* Animazioni discrete all'apertura */
@keyframes growY { from { transform: scaleY(0); } }
@keyframes growW { from { width: 0; } }
@keyframes drawSeg { from { stroke-dasharray: 0 var(--c); } }
.chart .b, .chart .s { transform-box: fill-box; transform-origin: 50% 100%; animation: growY .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 14ms); }
.chart .val { animation: fadeIn .4s .5s both; }
@keyframes fadeIn { from { opacity: 0; } }
.donut .seg { animation: drawSeg .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.hbar i { animation: growW .6s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .chart .b, .chart .s, .chart .val, .donut .seg, .hbar i { animation: none; }
}

/* ───────── Rating: stelle, badge, grafici dei voti ───────── */
:root { --star: #e09b00; --star-off: #d9d5cc; }
@media (prefers-color-scheme: dark) { :root { --star: #f2b533; --star-off: #3a3a40; } }
.st { display: block; flex: none; }
.st.on path { fill: var(--star); }
.st.off path { fill: var(--star-off); }
.stars-sm { display: flex; gap: 1px; margin-top: 2px; }
.muted { color: var(--muted); }

.rate .rate-row { display: flex; align-items: center; gap: 10px; }
.stars-in { display: flex; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; outline: none; }
.stars-in:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.zero { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 16px; cursor: pointer; }
.zero.on { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.rate .link[disabled] { opacity: .35; }
.rate-line { display: grid; gap: 2px; margin-top: 8px; min-height: 54px; }
.rate-line b { font-size: 16px; }
.rate-line span { color: var(--muted); font-size: 14px; }
.rate-line small { color: var(--muted); font-size: 12.5px; }

h3 { font-size: 13px; margin: 16px 0 2px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.avg { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.avg b { font-size: 44px; line-height: 1; font-weight: 750; letter-spacing: -.03em; }
.avg small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.badge { display: grid; gap: 2px; align-content: start; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 92px; font: inherit; color: inherit; }
button.badge { cursor: pointer; }
button.badge:active { opacity: .65; }
.badge b { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.badge b.sm { font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge span { font-weight: 650; font-size: 13.5px; }
.badge small { color: var(--muted); font-size: 12px; }
.badge:last-child:nth-child(odd) { grid-column: 1 / -1; }

.toprow.nocover { grid-template-columns: 1fr auto; }
.toprow .txt small { color: var(--muted); font-size: 12px; margin-top: 2px; }

.chart .hb { fill: var(--c1); transform-box: fill-box; transform-origin: 0 50%; animation: growX .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 30ms); }
.rw { cursor: pointer; outline: none; }
.rw:focus-visible .hit { stroke: var(--accent); stroke-width: 1.5; }
.chart .val.zero { fill: var(--muted); font-weight: 500; }
.chart .ln { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: drawLn .9s ease-out both; }
.chart .pt { fill: var(--c1); stroke: var(--card); stroke-width: 2; }
.col.sel .pt { stroke: var(--fg); }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes drawLn { from { stroke-dashoffset: 1; } }
@media (prefers-reduced-motion: reduce) { .chart .hb, .chart .ln { animation: none; } }

/* Rating legend */
.lrow { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.lrow:first-child { border-top: 0; padding-top: 0; }
.lstars { display: flex; gap: 1px; padding-top: 2px; }
.ltxt { display: grid; gap: 1px; }
.ltxt span { color: var(--muted); font-size: 14px; }

/* ───────── Avvisi sul disco scelto ───────── */
.alerts { display: grid; gap: 8px; }
.alerts:empty { display: none; }
.alert { border: 1px solid var(--line); border-left: 4px solid var(--muted); background: var(--card); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.alert.want { border-left-color: var(--accent); }
.alert.own { border-left-color: var(--ok); }
.alert b { font-weight: 650; }
.alert small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.alert .fp { display: block; margin-top: 6px; font-size: 13px; }
.alert .fp.ok { color: var(--ok); }
.alert .fp.warn { color: var(--warn); }
.alert .btn { margin-top: 6px; }

/* ───────── Esploratore dei voti ───────── */
.mode-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.seg2 button { border: 0; background: none; padding: 0 16px; min-height: 36px; font-weight: 650; font-size: 14px; color: var(--fg); cursor: pointer; }
.seg2 button.on { background: var(--accent); color: var(--accent-fg); }
.rsel { margin-bottom: 4px; }
.tiles5 { margin: 6px 0 4px; }
.tiles5 .tile b { font-size: 24px; }
.toprow .cnt small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; text-align: right; }
