:root {
    --bg: #0d0f14;
    --bg-raised: #161a22;
    --bg-hover: #1e242f;
    --line: #262d3a;
    --text: #e8ebf0;
    --text-dim: #939cad;
    --accent: #4d9fff;
    --accent-soft: #4d9fff22;
    --warn: #ffb454;
    --good: #5fd08a;
    --danger: #ff6b6b;
    --radius: 10px;
}

* { box-sizing: border-box; }

/* Måste stå kvar. Webbläsarens [hidden] { display: none } ligger i UA-lagret och
   förlorar mot varje författardeklaration av display — .gate har display: grid
   och .pill har inline-block, så de avdöljs inte utan den här regeln. */
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { font-size: 20px; }
.brand h1 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }

.tabs { display: flex; gap: 4px; flex: 1; }

.tab {
    background: none;
    border: 0;
    color: var(--text-dim);
    padding: 7px 13px;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.tab:hover { background: var(--bg-hover); color: var(--text); }
.tab.is-active { background: var(--accent-soft); color: var(--accent); }

.pill {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    margin-left: 4px;
    background: var(--accent);
    color: #06121f;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.topbar-actions { display: flex; gap: 6px; }

.icon-btn {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--text-dim);
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.is-on { color: var(--good); border-color: var(--good); }
.icon-btn.is-busy { opacity: 0.5; pointer-events: none; }

/* ---------------------------------------------------------- layout */

main { max-width: 1400px; margin: 0 auto; padding: 20px; }
.view { display: none; }
.view.is-active { display: block; }

.filters { margin-bottom: 16px; }

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

input[type="search"], select {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius);
    font: inherit;
    min-width: 220px;
}
input[type="search"] { flex: 1; max-width: 380px; }
input[type="search"]:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.toggle { display: flex; align-items: center; gap: 7px; color: var(--text-dim); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--text-dim);
    padding: 5px 11px 5px 6px;
    border-radius: 20px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.chip:hover { background: var(--bg-hover); }
.chip.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip img { width: 20px; height: 20px; border-radius: 5px; }
.chip .count { color: var(--text-dim); font-size: 11px; }

.field-hint { color: var(--text-dim); font-size: 12.5px; margin: 0 0 9px; }
.field-hint strong { color: var(--accent); font-weight: 600; }

.meta { color: var(--text-dim); font-size: 13px; margin: 0 0 14px; }
.meta.error { color: var(--danger); }
.empty { color: var(--text-dim); text-align: center; padding: 50px 20px; }

/* ---------------------------------------------------------- kort */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: border-color 0.12s, transform 0.12s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.poster {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    background: var(--bg-hover);
    display: block;
}
.poster-missing {
    aspect-ratio: 2 / 3;
    display: grid;
    place-items: center;
    background: var(--bg-hover);
    color: var(--text-dim);
    font-size: 28px;
}

.card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.3; }

.badge {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
}
.badge.dated { background: #1d3a2a; color: var(--good); }
.badge.soon { background: #3d2f14; color: var(--warn); }
.badge.undated { background: var(--bg-hover); color: var(--text-dim); }
.badge.none { background: transparent; color: var(--text-dim); padding-left: 0; }

.card-providers { display: flex; gap: 4px; padding-top: 4px; }

/* Allt som ska ligga i linje längst ned samlas här. Exakt ett element per kort
   får margin-top: auto — annars delas det fria utrymmet mellan dem och inget
   hamnar i botten. */
.card-actions {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-providers img { width: 20px; height: 20px; border-radius: 5px; }

.card-add {
    background: var(--accent);
    color: #06121f;
    border: 0;
    border-radius: 7px;
    padding: 6px;
    font: inherit;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}
.card-add:disabled { background: var(--bg-hover); color: var(--text-dim); cursor: default; }

/* ---------------------------------------------------------- ändringar */

.changelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.change {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-left: 3px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 14px;
}
.change.date_set { border-left-color: var(--good); }
.change.new_season { border-left-color: var(--accent); }
.change.date_changed { border-left-color: var(--warn); }
.change.date_cleared { border-left-color: var(--danger); }
.change.providers_changed { border-left-color: #b07cff; }
.change.related_added { border-left-color: #ff9ad1; }

.relation-search { position: relative; margin: 18px 0 0; }
.relation-search input {
    width: 100%;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 10px 16px;
    border-radius: var(--radius);
    font: inherit;
}
.relation-search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ---------------------------------------------------------- betyg */

.stars { display: inline-flex; align-items: center; gap: 1px; }

.star {
    background: none;
    border: 0;
    padding: 0 2px;
    font-size: 19px;
    line-height: 1;
    color: #3a4252;
    cursor: pointer;
    transition: color 0.1s;
}
.star.is-on { color: var(--warn); }
/* Hovring förhandsvisar: stjärnan under muspekaren och alla före den tänds. */
.stars:hover .star { color: var(--warn); }
.stars .star:hover ~ .star { color: #3a4252; }
.star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.star-clear {
    background: none;
    border: 0;
    color: var(--text-dim);
    font-size: 15px;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 4px;
}
.star-clear:hover { color: var(--danger); }

.stars-mini { font-size: 12px; color: var(--warn); letter-spacing: 1px; }
.stars-mini .dim { color: #3a4252; }

.hero-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.hero-rating-label { font-size: 12.5px; color: var(--text-dim); }
.hero-rating-avg { font-size: 12.5px; color: var(--text-dim); margin-left: auto; }

.type-chips { margin-bottom: 12px; }

.type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}
.type-tv { background: #1a2c3f; color: #6fb2e8; }
.type-movie { background: #33243f; color: #c08fe8; }

.relation-sentence {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text);
}

.carried {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.45;
}
.carried em { color: var(--good); font-style: normal; font-weight: 600; }

.rel-kind {
    min-width: 0;
    width: 100%;
    padding: 5px 8px;
    font-size: 12.5px;
    border-radius: 7px;
}

.change img { width: 36px; border-radius: 5px; }
.change-text { flex: 1; }
.change-title { font-weight: 600; font-size: 14px; }
.change-detail { color: var(--text-dim); font-size: 13px; }
.change-when { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

/* ---------------------------------------------------------- dialog */

.dialog {
    background: var(--bg-raised);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    max-width: 460px;
    width: calc(100% - 40px);
}
.dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
.dialog h2 { margin: 0 0 14px; font-size: 17px; }

.seasons { width: 100%; border-collapse: collapse; font-size: 14px; }
.seasons td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.seasons td:first-child { color: var(--text-dim); width: 95px; }
.seasons td:last-child { text-align: right; }

.dialog-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.dialog-actions button {
    background: var(--bg-hover);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 15px;
    border-radius: 8px;
    font: inherit;
    cursor: pointer;
}
.dialog-actions button.danger { color: var(--danger); border-color: #4a2626; }

/* ---------------------------------------------------------- övrigt */

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    padding: 11px 18px;
    border-radius: var(--radius);
    box-shadow: 0 8px 28px #0008;
    z-index: 100;
    max-width: 90vw;
}
.toast.error { border-color: var(--danger); color: var(--danger); }

footer {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 18px 20px 30px;
    border-top: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------- inloggning */

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }

.gate-card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    width: 100%;
    max-width: 380px;
}
.gate-brand { font-size: 19px; font-weight: 600; margin-bottom: 20px; }
.gate-form h2 { margin: 0 0 16px; font-size: 16px; }
.gate-form label { display: block; margin-bottom: 13px; color: var(--text-dim); font-size: 13px; }
.gate-form input {
    display: block;
    width: 100%;
    margin-top: 5px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 9px 12px;
    border-radius: var(--radius);
    font: inherit;
}
.gate-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.gate-pair { display: flex; gap: 10px; }
.gate-pair label { flex: 1; }
.gate-form button {
    width: 100%;
    background: var(--accent);
    color: #06121f;
    border: 0;
    padding: 10px;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}
.gate-error { color: var(--danger); font-size: 13px; margin: 12px 0 0; }
.gate-note { color: var(--text-dim); font-size: 12.5px; margin: 12px 0 0; }
.gate-foot { color: var(--text-dim); font-size: 12px; margin: 18px 0 0; text-align: center; }

/* ---------------------------------------------------------- sökfält */

.searchbar { position: relative; margin-bottom: 14px; }
.searchbar input {
    width: 100%;
    max-width: none;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 11px 16px;
    border-radius: var(--radius);
    font: inherit;
    font-size: 15px;
}
.searchbar input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* Ingen reserverad plats behövs: platshållaren syns bara när fältet är tomt,
   statusen bara när något skrivits. De kan aldrig visas samtidigt. */
.searchbar-status {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 12px;
    pointer-events: none;
    background: var(--bg-raised);
    padding: 4px 14px 4px 10px;
    border-radius: var(--radius);
}
.searchbar-status:empty { display: none; }

.section-head {
    font-size: 14px;
    font-weight: 600;
    margin: 22px 0 12px;
    display: flex;
    align-items: baseline;
    gap: 9px;
}
.section-sub { color: var(--text-dim); font-size: 12.5px; font-weight: 400; }

/* ---------------------------------------------------------- synlighetspill */

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }

/* Reglage: knoppens läge visar att kontrollen går att klicka. En tvåfärgad
   pill såg ut som en statusetikett och missades helt. */
.vis-switch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: 0;
    padding: 2px 0;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    color: #9aa3b4;
    white-space: nowrap;
}

.vis-track {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 19px;
    border-radius: 999px;
    background: #212836;
    border: 1px solid #3a4252;
    transition: background 0.15s, border-color 0.15s;
}

.vis-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #8891a3;
    transition: transform 0.15s ease, background 0.15s;
}

.vis-switch.is-visible { color: var(--good); }
.vis-switch.is-visible .vis-track { background: #12281c; border-color: #2f6b48; }
.vis-switch.is-visible .vis-knob { transform: translateX(15px); background: var(--good); }

/* "Synlig" är 1,7 px bredare än "Privat" i proportionell text. Utan en låst
   bredd ändrar hela reglaget storlek vid varje växling och knuffar det som
   står bredvid i sidled. Marginalen är tilltagen för typsnitt som renderar
   bredare på andra system. */
.vis-label {
    min-width: 40px;
    text-align: left;
}

.vis-switch:hover .vis-track { filter: brightness(1.4); }
.vis-switch:disabled { cursor: progress; }
.vis-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.dialog-visibility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 6px;
}

/* ---------------------------------------------------------- paneler & tabeller */

.panel {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 15px; }

.stack { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.stack label { color: var(--text-dim); font-size: 13px; }
.stack input {
    display: block;
    width: 100%;
    margin-top: 5px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 9px 12px;
    border-radius: var(--radius);
    font: inherit;
}
.stack button {
    align-self: flex-start;
    background: var(--accent);
    color: #06121f;
    border: 0;
    padding: 9px 18px;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 12px; }
.table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 12px;
    padding: 7px 10px 7px 0;
    border-bottom: 1px solid var(--line);
}
.table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.is-blocked { opacity: 0.5; }
.table code { background: var(--bg); padding: 2px 7px; border-radius: 5px; font-size: 12.5px; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions button {
    background: var(--bg-hover);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.row-actions button.danger { color: var(--danger); border-color: #4a2626; }

.tag {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
}

.state { font-size: 12px; font-weight: 600; }
.state-open { color: var(--good); }
.state-used { color: var(--text-dim); }
.state-revoked, .state-expired { color: var(--warn); }

.attribution a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.attribution a:hover { color: var(--text); }

/* ---------------------------------------------------------- seriesida */

.back-btn {
    background: none;
    border: 0;
    color: var(--text-dim);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 12px;
}
.back-btn:hover { color: var(--text); }

.show-hero { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-poster { flex: 0 0 190px; }
.hero-poster .poster, .hero-poster .poster-missing { border-radius: var(--radius); }
.hero-body { flex: 1; min-width: 260px; }
.hero-body h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; }
.hero-meta { color: var(--text-dim); font-size: 13px; margin: 0 0 12px; }
.hero-providers { display: flex; gap: 6px; margin-bottom: 14px; }
.hero-providers img { width: 30px; height: 30px; border-radius: 7px; }

.hero-next {
    background: #12281c;
    border: 1px solid #2f6b48;
    color: var(--good);
    padding: 9px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}
.hero-next-none { background: var(--bg-raised); border-color: var(--line); color: var(--text-dim); }
.hero-next-done { background: var(--bg-raised); border-color: var(--line); color: var(--text-dim); }
.hero-next-waiting { background: #2a2413; border-color: #6b5a2f; color: var(--warn); }
.hero-overview { color: var(--text-dim); font-size: 14px; line-height: 1.6; max-width: 62ch; margin: 0 0 16px; }
.hero-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

.btn-ghost {
    background: var(--bg-hover);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 7px 15px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.btn-ghost.danger { color: var(--danger); border-color: #4a2626; }

#showSeasons tr.is-upcoming td { color: var(--good); font-weight: 600; }
#showSeasons td:first-child { width: 70px; }
.table td.num, .table th.num { text-align: right; }

/* ---------------------------------------------------------- ensemble */

.cast-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 116px;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.cast-card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 0 9px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--text);
}
.cast-card:hover { border-color: var(--accent); }
.cast-card img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; margin-bottom: 7px; }
.cast-missing {
    width: 100%;
    aspect-ratio: 2 / 3;
    display: grid;
    place-items: center;
    background: var(--bg-hover);
    font-size: 30px;
    margin-bottom: 7px;
}
.cast-name { font-size: 12.5px; font-weight: 600; padding: 0 9px; line-height: 1.3; }
.cast-role { font-size: 11.5px; color: var(--text-dim); padding: 0 9px; line-height: 1.3; }
.cast-eps { font-size: 11px; color: var(--text-dim); padding: 2px 9px 0; opacity: 0.7; }

.person-panel {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-top: 18px;
}
.person-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.person-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.person-head .cast-missing { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 50%; font-size: 22px; margin: 0; }
.person-head h3 { margin: 0; font-size: 16px; }
.person-head .meta { margin: 2px 0 0; }
.person-head button { margin-left: auto; }

.person-toggle { margin-bottom: 14px; font-size: 13px; }

.person-more {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.person-more .meta { margin: 0; }

/* ---------------------------------------------------------- statistik */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

.stat {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { font-size: 12.5px; color: var(--text-dim); }
.stat-hint { font-size: 11.5px; color: var(--text-dim); opacity: 0.7; margin-top: 3px; }
.stat-locked .stat-value { color: var(--text-dim); }

.stats-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 20px; }
.stats-split h3 { font-size: 13px; margin: 0; color: var(--text-dim); font-weight: 500; }

@media (max-width: 600px) {
    .show-hero { gap: 16px; }
    .hero-poster { flex: 0 0 120px; }
    .topbar { gap: 12px; padding: 10px 14px; }
    .tabs { order: 3; width: 100%; }
    main { padding: 14px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
}
