/* The extension's popup.css, laid out for a browser tab: list and match side by side on a wide screen, one at a time on a phone. */
:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #f3f4f6;
  --accent: #16a34a;
  --live: #dc2626;
  --flash: #fef08a;
  --bar-a: #16a34a;
  --bar-b: #9ca3af;
  --value: #ca8a04;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --line: #262b33;
    --card: #1a1f26;
    --accent: #22c55e;
    --live: #f87171;
    --flash: #4d4410;
    --bar-a: #22c55e;
    --bar-b: #6b7280;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.4 system-ui, "Segoe UI", sans-serif;
}

button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }

/* ---------- sign-in ---------- */
#login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 12px; padding: 24px; background: var(--card); border-radius: 12px; }
.login-card h1 { margin: 0 0 4px; font-size: 20px; text-align: center; }
.login-card label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.login-card input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font-size: 16px; }
.login-error { margin: 0; min-height: 1.2em; color: var(--live); font-size: 13px; text-align: center; }

.btn { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 12px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; padding: 9px 12px; }
.btn.small { padding: 2px 8px; font-size: 12px; }
.btn.danger { color: var(--live); }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- frame ---------- */
#app { height: 100%; display: flex; flex-direction: column; }

header { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; }
.tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.tabs button.on { background: var(--card); color: var(--fg); }
.count { color: var(--live); margin-left: 2px; }
.count:empty { display: none; }
.count.good { color: var(--accent); }
.icon-btn { border: 0; background: none; font-size: 18px; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.icon-btn.on { background: var(--card); color: var(--fg); }

#q { flex: 1; min-width: 0; max-width: 420px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }

#daybar { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; border-bottom: 1px solid var(--line); }
#daybar button { border: 0; background: none; font-size: 18px; padding: 0 10px; color: var(--muted); }
#dayLabel { font-weight: 600; }

.split { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
#view { overflow-y: auto; min-height: 0; }
#side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
#detail { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.pick-one { padding-top: 80px; }

/* A phone or a narrow window: the list, or the match. */
@media (max-width: 979px) {
  #side { display: none; border-left: 0; }
  body.has-detail #side { display: flex; }
  body.has-detail #view { display: none; }
}
@media (min-width: 980px) {
  .split { grid-template-columns: minmax(380px, 1fr) minmax(460px, 1.15fr); }
  .back { display: none; }
}
@media (min-width: 1500px) {
  .split { grid-template-columns: minmax(520px, 1fr) minmax(620px, 1fr); }
}

#livepane { flex: none; background: #0b1a0f; border-bottom: 1px solid var(--line); }
#livepane iframe { display: block; width: 100%; height: 280px; border: 0; }

/* ---------- list ---------- */
.comp { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.comp img { width: 16px; height: 16px; object-fit: contain; }

.row { display: grid; grid-template-columns: 62px 1fr 54px 1fr 24px; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:hover, .row:focus-visible { background: var(--card); outline: none; }
.row.sel { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.row.flash { animation: flash 6s ease-out; }
@keyframes flash { 0%, 60% { background: var(--flash); } 100% { background: transparent; } }
.st { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.live .st { color: var(--live); font-weight: 700; }
.row.break .st, .row.other .st { color: var(--live); }
.tm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tm.home { justify-content: flex-end; text-align: right; }
.nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crest { width: 20px; height: 20px; object-fit: contain; flex: none; }
.sc { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.row.upcoming .sc { color: var(--muted); font-weight: 400; }
.star { border: 0; background: none; font-size: 15px; color: var(--muted); padding: 0; }
.star.on { color: #eab308; }
.st small.rk { display: block; color: var(--live); font-weight: 700; font-size: 11px; }

.empty, .error { margin: 0; padding: 28px 16px; text-align: center; color: var(--muted); }
.error { color: var(--live); background: var(--card); }

/* ---------- match ---------- */
.back { border: 0; background: none; padding: 8px 12px; color: var(--accent); font-weight: 600; }
.d-head { padding: 10px 16px 12px; text-align: center; }
.d-comp { color: var(--muted); font-size: 12px; }
/* The play / don't play answer above the title (shared/edge.js playVerdict): green = locked profit, amber = value, grey = nothing to act on. */
.verdict-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 8px; }
.plan { display: grid; gap: 4px; max-width: 100%; font-size: 12px; text-align: left; cursor: help; }
.plan-row { display: flex; align-items: center; gap: 8px; }
.plan-row b { color: var(--muted); }
.plan-row span:not(.go) { min-width: 0; }
.go { flex: none; margin-left: auto; padding: 1px 9px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.go:hover, .go:focus-visible { background: color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }
.go.off { border-color: var(--line); color: var(--muted); font-weight: 400; }
/* The simple view's risk / wait pills (quickStrip): goal risk coloured like the risk card, wait/now like the timing card. */
.quick { --low: var(--muted); --mid: #ca8a04; --high: #ea580c; --very-high: #dc2626; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.qpill { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--card); color: var(--muted); cursor: help; }
.qpill.mid { background: color-mix(in srgb, var(--mid) 22%, transparent); color: var(--mid); }
.qpill.high { background: color-mix(in srgb, var(--high) 22%, transparent); color: var(--high); }
.qpill.very-high { background: color-mix(in srgb, var(--very-high) 22%, transparent); color: var(--very-high); }
.qpill.now { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.qpill.wait { background: color-mix(in srgb, var(--value) 22%, transparent); color: var(--value); }
.verdict { display: flex; flex-direction: column; align-items: center; gap: 1px; max-width: 100%; padding: 4px 16px; border-radius: 12px; background: var(--card); color: var(--muted); cursor: help; }
.verdict b { font-size: 15px; letter-spacing: .06em; }
.verdict small { font-size: 11px; font-variant-numeric: tabular-nums; }
.verdict.play { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent); }
.verdict.maybe { background: color-mix(in srgb, var(--value) 24%, transparent); color: var(--value); }
.verdict.unknown { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.d-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 8px 0 4px; }
.d-team { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 600; }
.d-team img { width: 44px; height: 44px; object-fit: contain; }
.d-score { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.d-status { color: var(--live); font-weight: 700; }
.chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); }
.chip.on { border-color: var(--accent); color: var(--accent); }
.comm { margin: 0 16px 10px; padding: 8px 10px; background: var(--card); border-radius: 8px; }
.comm b { color: var(--live); margin-right: 4px; }

h3 { margin: 14px 16px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.inc { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 6px; padding: 3px 16px; }
.inc .min { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.inc .who { min-width: 0; }
.inc .who.home { text-align: right; }
.inc small { display: block; color: var(--muted); }

.stat { padding: 4px 16px; }
.stat-top { display: grid; grid-template-columns: 1fr auto 1fr; font-variant-numeric: tabular-nums; }
.stat-top span:first-child { text-align: left; font-weight: 600; }
.stat-top span:last-child { text-align: right; font-weight: 600; }
.stat-top .lbl { color: var(--muted); }
.bar { display: flex; gap: 3px; height: 4px; margin-top: 3px; }
.bar i { display: block; border-radius: 2px; }
.bar i:first-child { background: var(--bar-a); }
.bar i:last-child { background: var(--bar-b); }

.shotmap { padding: 4px 16px 8px; --home: #2f43d6; --away: #14873f; --grass: #cdeabf; --pitch-line: #a9afb7; --marker-fill: #f3f8ee; }
@media (prefers-color-scheme: dark) {
  .shotmap { --home: #7b8cff; --away: #3fd17a; --grass: #1d3a28; --pitch-line: #4f6b58; --marker-fill: #0f1a14; }
}
.pitch { display: block; width: 100%; height: auto; border-radius: 8px; }
.pitch .grass { fill: var(--grass); }
.pitch .pl { fill: none; stroke: var(--pitch-line); stroke-width: 0.35; }
.pitch .pl-fill { fill: var(--pitch-line); }
.pitch .shot.home { --c: var(--home); }
.pitch .shot.away { --c: var(--away); }
.pitch .ring { fill: var(--marker-fill); stroke: var(--c); stroke-width: 0.4; }
.pitch .shot.offtarget .ring { fill-opacity: .55; }
.pitch .dot { fill: var(--c); }
.pitch .shot.goal .ring { stroke-width: 0.6; fill: #fff; }
.pitch .shot:hover .ring { stroke-width: 0.9; }
.shot-sums { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.ss { display: flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ss.home .swatch { background: var(--home); }
.ss.away .swatch { background: var(--away); }
.shot-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; color: var(--muted); font-size: 11px; }

.risk { margin: 0 16px 6px; padding: 10px 12px; background: var(--card); border-radius: 8px; --low: var(--muted); --mid: #ca8a04; --high: #ea580c; --very-high: #dc2626; }
.risk-head { display: flex; align-items: center; gap: 12px; }
.risk-pct { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 72px; }
.risk-pct.low { color: var(--low); } .risk-pct.mid { color: var(--mid); } .risk-pct.high { color: var(--high); } .risk-pct.very-high { color: var(--very-high); }
.risk-label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.risk-label b { color: var(--fg); font-size: 13px; }
.risk-bar { height: 6px; background: var(--line); border-radius: 3px; margin: 8px 0 6px; overflow: hidden; }
.risk-bar i { display: block; height: 100%; border-radius: 3px; }
.risk-bar i.low { background: var(--low); } .risk-bar i.mid { background: var(--mid); } .risk-bar i.high { background: var(--high); } .risk-bar i.very-high { background: var(--very-high); }
.risk-split { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.risk-chart { display: block; width: 100%; height: auto; margin-top: 8px; }
.rc-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.rc-base { stroke: var(--muted); stroke-width: .6; stroke-dasharray: 3 3; }
.rc-grid { stroke: var(--line); stroke-width: .6; }
.rc-label { fill: var(--muted); font-size: 8px; }
.rc-goal { stroke: var(--live); stroke-width: .8; stroke-dasharray: 2 2; }
.rc-goal-dot { fill: var(--live); }
.rc-now { fill: var(--accent); }
.risk-note { margin: 6px 0 0; font-size: 11px; color: var(--muted); }

/* ---------- odds: a line per book under a list row, a block per market in the match ---------- */
.odds-line { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin-top: -2px; }
.odds-line .sep { color: var(--muted); }
.odd { display: inline-flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.odd small { color: var(--muted); font-size: 11px; }
.odd b { font-size: 12px; }
.odd.off { opacity: .45; }
.odd.up b, .odd.up .mv { color: var(--accent); }
.odd.down b, .odd.down .mv { color: var(--live); }
.odd .mv { font-size: 9px; font-style: normal; }
.mk { margin: 0 16px 8px; }
.mk-name { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.mk-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.mk-items .odd { justify-content: space-between; padding: 5px 8px; background: var(--card); border-radius: 6px; }
.mk-items .odd b { font-size: 13px; }
.odds-note { margin: 4px 16px 10px; font-size: 11px; color: var(--muted); }
.odds-live { margin: 0 16px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.mk .mk-items + .mk-items { margin-top: 4px; }
#feedMode { cursor: help; }
#bookStatus { cursor: help; color: var(--live); }

.bk { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.odds-line .bk { min-width: 62px; text-align: right; }
.odds-line .odd b { min-width: 3ch; text-align: right; }
.mk-group + .mk-group { margin-top: 8px; }
.mk-row { display: grid; grid-template-columns: 66px 1fr; align-items: center; gap: 6px; }
.mk-row + .mk-row { margin-top: 3px; }
.odd.best b { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 4px; padding: 0 3px; }
/* An exchange selection (Laystars): best back price, then the best lay price in a quieter tone. */
.odd .pair { display: inline-flex; align-items: baseline; gap: 4px; }
.odd b.lay { color: var(--muted); font-weight: 500; }
.odd b.lay::before { content: '/'; margin-right: 4px; opacity: .6; }
.bk[data-sub]::after { content: attr(data-sub); display: block; font-size: 9px; letter-spacing: 0; text-transform: none; opacity: .75; }
.mk-missing { margin-top: 3px; font-size: 11px; color: var(--muted); }

/* "Worth playing?" (shared/edge.js): green = a profit locked in by laying it, amber = value. */
.edge { margin: 0 16px 6px; display: grid; grid-template-columns: 74px 22px repeat(4, minmax(0, 1fr)) 50px; gap: 3px 6px; align-items: baseline; font-variant-numeric: tabular-nums; font-size: 12px; }
.edge .h { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; text-align: right; }
.edge .h:nth-child(-n+2) { text-align: left; }
.edge .c { text-align: right; }
.edge .c small { display: block; color: var(--muted); font-size: 10px; }
.edge .lock, .edge .val { color: var(--muted); }
.edge .lock.pos { color: var(--accent); font-weight: 700; }
.edge .val.pos { color: var(--value); font-weight: 700; }
.edge .v { justify-self: end; font-size: 10px; border-radius: 4px; padding: 1px 5px; color: var(--muted); }
.edge .v.arb { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent); }
.edge .v.value { background: color-mix(in srgb, var(--value) 28%, transparent); color: var(--value); }
.edge-badge { grid-column: 1 / -1; justify-self: center; font-size: 11px; padding: 1px 9px; border-radius: 10px; font-variant-numeric: tabular-nums; cursor: help; }
.edge-badge.arb { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.edge-badge.suspect { opacity: .7; }
.edge-badge.value { background: color-mix(in srgb, var(--value) 22%, transparent); color: var(--value); }
/* "Lock in or wait?" (shared/timing.js): green = play now, amber = could wait, muted = no clear gap. */
.timing { margin: 0 16px 6px; display: grid; grid-template-columns: 76px repeat(2, minmax(0, 1fr)) 64px; gap: 3px 8px; align-items: baseline; font-variant-numeric: tabular-nums; font-size: 12px; }
.timing .h { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; text-align: right; }
.timing .h:first-child { text-align: left; }
.timing .c { text-align: right; }
.timing .v { justify-self: end; font-size: 11px; font-weight: 600; color: var(--muted); }
.timing .v.now { color: var(--accent); }
.timing .v.wait { color: var(--value); }

/* «Παίξε» (shared/picks.js): the filter bar is static (outside the rebuilt list, so a focused field keeps its focus). */
#playbar { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
#playbar .chip { font-weight: 600; }
#playbar .chip.on { border-color: var(--accent); color: var(--accent); }
#playbar #fValue.on { border-color: var(--value); color: var(--value); }
#playbar label { display: flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
#minLay { width: 5.5em; padding: 1px 3px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.play-sum { margin: 0; padding: 5px 12px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pick-card { border-bottom: 1px solid var(--line); }
.pick-card .row { border-bottom: 0; }
.pick { margin: 0 12px 8px; padding: 6px 10px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--card); }
.pick.value { border-left-color: var(--value); }
.pick-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 4px; cursor: help; }
.pick.suspect { border-left-style: dashed; opacity: .72; }
.pick-flag { color: var(--live); font-size: 11px; font-weight: 600; white-space: nowrap; }
.pick-tag { padding: 1px 8px; border-radius: 10px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick.arb .pick-tag { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.pick.value .pick-tag { background: color-mix(in srgb, var(--value) 22%, transparent); color: var(--value); }
.pick-what { color: var(--muted); font-size: 11px; }

.meta { padding: 10px 16px 16px; color: var(--muted); font-size: 12px; }

/* ---------- footer ---------- */
footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 6px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer label { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
footer #commission { width: 3.6em; padding: 1px 3px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
#updated { margin-left: auto; font-variant-numeric: tabular-nums; }
#reload { border: 0; background: none; font-size: 16px; color: var(--muted); padding: 0 2px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 16px; bottom: 56px; display: flex; flex-direction: column; gap: 8px; z-index: 10; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 10px; background: var(--fg); color: var(--bg); box-shadow: 0 6px 20px rgb(0 0 0 / .25); font-size: 13px; animation: toast-in .2s ease-out; }
.toast.goal { background: var(--accent); color: #fff; font-weight: 600; }
.toast.bad { background: var(--live); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- account ---------- */
#account { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; max-width: 1100px; width: 100%; margin: 0 auto; }
.acct-head { display: flex; align-items: center; gap: 8px; }
.acct-head b { margin-right: auto; }
.muted { color: var(--muted); }
.acct-card { padding: 12px 14px; background: var(--card); border-radius: 10px; min-width: 0; }
.acct-card h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.acct-form { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-form input { flex: 1 1 200px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.acct-msg, .acct-line { margin: 6px 0; font-size: 13px; }
.acct-grid { display: grid; gap: 4px 12px; align-items: baseline; font-size: 12px; font-variant-numeric: tabular-nums; overflow-x: auto; margin-top: 8px; }
.acct-grid .h { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.acct-grid .c { text-align: right; }
.acct-grid .ok { color: var(--accent); }
.acct-grid .warn { color: var(--value); }
.acct-grid .bad { color: var(--live); }
.acct-grid.books { grid-template-columns: 90px minmax(120px, 1.3fr) minmax(90px, 1fr) 60px 100px minmax(80px, 1fr); }
.acct-grid.tokens { grid-template-columns: minmax(100px, 1fr) 120px minmax(120px, 1fr) minmax(90px, 1fr) auto; }
.acct-grid.picks { grid-template-columns: 130px 110px minmax(160px, 1.4fr) minmax(220px, 2fr) 70px 70px; }
.token-out { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.token-out p { flex-basis: 100%; margin: 0; }
code.token { padding: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; word-break: break-all; user-select: all; }

@media (max-width: 600px) {
  header { flex-wrap: wrap; }
  #q { order: 3; flex-basis: 100%; max-width: none; font-size: 16px; }
  .row { grid-template-columns: 50px 1fr 46px 1fr 22px; padding: 8px 10px; }
  .mk-row { grid-template-columns: 58px 1fr; }
  .mk-items { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 4px; }
  .mk-items .odd { padding: 5px 6px; }
}
