/*
 * Omwoyo Movies - portal design system.
 * Near-black ground, charcoal surfaces, one configurable accent.
 * No framework: every rule here is used by a template in app/Views.
 */

:root {
    --accent: #e5b45b;
    --accent-ink: #1b1405;
    --accent-soft: rgba(229, 180, 91, .16);

    --bg: #07070a;
    --surface: #131319;
    --surface-2: #1b1b23;
    --line: rgba(255, 255, 255, .10);
    --line-strong: rgba(255, 255, 255, .20);

    --ink: #f4f2ee;
    --ink-2: #b9b6b1;
    --ink-3: #7e7c79;

    --danger: #e0674f;
    --ok: #59b58a;

    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .55);
    --shell: 1440px;
    --gutter: clamp(16px, 4vw, 56px);
    --header-h: 68px;

    --ease: cubic-bezier(.22, .61, .36, 1);
    --dur: 220ms;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: .01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--accent); color: var(--accent-ink); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

main { flex: 1 0 auto; }

/* ---------- header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 40;
    height: var(--header-h);
    background: linear-gradient(180deg, rgba(7, 7, 10, .96), rgba(7, 7, 10, .68));
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header.is-pinned { border-bottom-color: var(--line); background: rgba(7, 7, 10, .95); }

.header-shell { height: var(--header-h); display: flex; align-items: center; gap: 18px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    background: linear-gradient(145deg, var(--accent), #8d5f18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    position: relative;
}
.brand-mark::after {
    content: ""; position: absolute; inset: 8px 9px; border-left: 3px solid var(--accent-ink);
    border-radius: 1px;
}
.brand-name { font-size: 1.06rem; white-space: nowrap; }

.primary-nav { display: flex; align-items: center; gap: 18px; flex: 1; min-width: 0; margin-left: 10px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    padding: 9px 12px; border-radius: 8px; color: var(--ink-2);
    font-size: .93rem; font-weight: 500; transition: color var(--dur), background var(--dur);
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a.is-active { color: var(--ink); background: var(--accent-soft); }

.header-search { margin-left: auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.header-search input {
    width: 200px; background: var(--surface); border: 1px solid var(--line);
    color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: .9rem;
    transition: border-color var(--dur), width var(--dur) var(--ease);
}
.header-search input:focus { border-color: var(--accent); width: 240px; outline: none; }
.header-search input::placeholder { color: var(--ink-3); }
.header-search button {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none;
    background: none; border: 0; color: var(--ink-2); cursor: pointer; border-radius: 8px;
}
.header-search button:hover { color: var(--accent); background: var(--surface); }
.header-search svg { width: 19px; height: 19px; fill: currentColor; }

.header-account { display: flex; align-items: center; gap: 10px; flex: none; }
.account-menu { position: relative; }
.account-menu summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
    padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line);
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu[open] summary { border-color: var(--accent); }
.avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: .82rem;
    background: linear-gradient(145deg, var(--accent), #9a6b1f); color: var(--accent-ink);
}
.account-name { font-size: .88rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-panel {
    position: absolute; right: 0; top: calc(100% + 10px); width: 246px; z-index: 50;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px;
}
.account-panel .account-email { padding: 8px 10px; color: var(--ink-3); font-size: .8rem; word-break: break-all; margin: 0; }
.account-panel a, .account-panel .link-button {
    padding: 10px; border-radius: 8px; color: var(--ink-2); font-size: .9rem; text-align: left; width: 100%;
}
.account-panel a:hover, .account-panel .link-button:hover { background: var(--surface); color: var(--ink); }
.link-button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }

.nav-toggle { display: none; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
    font: 600 .93rem/1 inherit; cursor: pointer; text-align: center;
    transition: transform var(--dur) var(--ease), background var(--dur), border-color var(--dur), color var(--dur);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #f0c271; }
.btn-ghost { background: rgba(255, 255, 255, .09); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-ghost.is-on { border-color: var(--accent); color: var(--accent); }
.btn-disabled { background: var(--surface); color: var(--ink-3); cursor: not-allowed; }
.btn-sm { padding: 9px 14px; font-size: .85rem; }
.btn-link { background: none; border: 0; color: var(--ink-2); font-weight: 500; padding: 10px 6px; }
.btn-link:hover { color: var(--accent); }
.btn-block { width: 100%; }

/* ---------- hero ---------- */

.hero { position: relative; min-height: clamp(440px, 74vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.95); }
.hero-shade, .detail-shade {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 7, 10, .95) 0%, rgba(7, 7, 10, .72) 42%, rgba(7, 7, 10, .18) 78%),
        linear-gradient(180deg, rgba(7, 7, 10, .55) 0%, transparent 35%, rgba(7, 7, 10, .96) 100%);
}
.hero-body, .detail-body { position: relative; z-index: 2; padding-block: 64px clamp(28px, 6vh, 72px); }
/* The hero keeps the shell's left edge; only its measure is capped, so it
 * lines up with the rows underneath instead of floating as a centred column. */
.hero-body > * { max-width: min(640px, 100%); }

.eyebrow {
    text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 700;
    color: var(--accent); margin-bottom: 14px;
}
.hero-title { text-wrap: balance; text-shadow: 0 4px 26px rgba(0, 0, 0, .6); }
.hero-meta, .detail-meta { color: var(--ink-2); font-size: .95rem; margin-bottom: 10px; }
.hero-languages { color: var(--ink-2); font-size: .87rem; margin-bottom: 12px; }
.hero-synopsis { color: #ddd9d3; max-width: 58ch; font-size: 1.01rem; }
.hero-cta, .detail-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.hero-empty { background: radial-gradient(120% 90% at 15% 10%, #1d1d27 0%, var(--bg) 60%); }

/* ---------- rows + cards ---------- */

.rows-shell { padding-block: clamp(20px, 4vh, 42px) 64px; display: grid; gap: clamp(26px, 4vh, 46px); }
/* Without this the scrollable track sizes its grid parent to the whole row. */
.rows-shell > * { min-width: 0; }

.row-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.row-head h2 { margin: 0; }
.row-more { margin-left: auto; font-size: .84rem; color: var(--ink-3); }
.row-more:hover { color: var(--accent); }

.row-frame { position: relative; }
.row-track {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; padding-block: 6px 14px; scroll-padding-left: 4px;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track:focus-visible { outline-offset: 8px; }
.row-item { flex: 0 0 auto; width: clamp(140px, 17vw, 196px); scroll-snap-align: start; }

.row-arrow {
    position: absolute; top: 0; bottom: 14px; width: 44px; z-index: 5;
    display: none; place-items: center; border: 0; cursor: pointer; color: var(--ink);
    background: linear-gradient(90deg, rgba(7, 7, 10, .92), transparent);
}
.row-arrow.next { right: 0; background: linear-gradient(270deg, rgba(7, 7, 10, .92), transparent); }
.row-arrow.prev { left: 0; }
.row-arrow svg { width: 26px; height: 26px; fill: currentColor; }
.row-arrow:hover { color: var(--accent); }
@media (hover: hover) and (min-width: 900px) {
    .row-arrow { display: grid; opacity: 0; transition: opacity var(--dur); }
    .row-frame:hover .row-arrow, .row-arrow:focus-visible { opacity: 1; }
}

.card { position: relative; }
.card-media {
    position: relative; display: block; border-radius: var(--radius); overflow: hidden;
    background: var(--surface); aspect-ratio: 2 / 3;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-media, .card:focus-within .card-media { transform: translateY(-5px) scale(1.015); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }

.chip {
    display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600;
    background: rgba(7, 7, 10, .78); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.chip-dub { position: absolute; top: 9px; left: 9px; color: var(--accent); border-color: rgba(229, 180, 91, .5); }
/* Top right: the Luganda badge owns the top left and the scrim owns the bottom. */
.chip-fixture { position: absolute; top: 9px; right: 9px; color: var(--danger); border-color: rgba(224, 103, 79, .5); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.chips .chip:hover { border-color: var(--accent); color: var(--accent); }

.card-scrim {
    position: absolute; inset: auto 0 0 0; padding: 26px 11px 11px; display: grid; gap: 2px;
    background: linear-gradient(180deg, transparent, rgba(7, 7, 10, .93) 58%);
    opacity: 0; transform: translateY(8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover .card-scrim, .card:focus-within .card-scrim { opacity: 1; transform: none; }
.card-title { font-weight: 600; font-size: .88rem; line-height: 1.25; }
.card-meta { font-size: .76rem; color: var(--ink-2); }

.card-actions { position: absolute; top: 7px; right: 7px; display: flex; gap: 6px; z-index: 3; }
@media (hover: hover) {
    .card-actions { opacity: 0; transition: opacity var(--dur); }
    .card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; }
}
.icon-button {
    width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
    border-radius: 50%; border: 1px solid var(--line); color: var(--ink);
    background: rgba(7, 7, 10, .82); backdrop-filter: blur(6px);
    transition: color var(--dur), border-color var(--dur), transform var(--dur);
}
.icon-button svg { width: 16px; height: 16px; fill: currentColor; }
.icon-button:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.icon-button.is-on { color: var(--accent); border-color: var(--accent); }

/* ---------- browse grid + filters ---------- */

.page-head { padding-block: clamp(26px, 5vh, 54px) 6px; }
.page-sub { color: var(--ink-2); margin: 0; }

.filters {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px;
    align-items: end; padding-block: 22px 8px;
}
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.field-submit { display: flex; gap: 10px; align-items: center; }

input:not([type]), input[type="search"], input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], input[type="number"], input[type="date"], select, textarea {
    background: var(--surface); border: 1px solid var(--line); color: var(--ink);
    border-radius: 9px; padding: 10px 12px; font: inherit; font-size: .92rem; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }

.result-count { color: var(--ink-3); font-size: .85rem; margin: 16px 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.grid-item { min-width: 0; }

.pager { display: flex; flex-wrap: wrap; gap: 7px; margin: 30px 0 10px; }
.pager a, .pager-current {
    min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center;
    border-radius: 9px; border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

.empty-state {
    border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
    padding: clamp(26px, 5vw, 52px); text-align: center; color: var(--ink-2);
    background: linear-gradient(180deg, var(--surface), transparent);
    margin-block: 18px 40px;
}
.empty-state h1, .empty-state h2 { color: var(--ink); }
.empty-state .btn { margin-top: 8px; }
.empty-state .empty-code { font-size: 3rem; font-weight: 700; color: var(--accent); letter-spacing: .06em; margin: 0; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- detail ---------- */

.detail { position: relative; display: flex; align-items: flex-end; min-height: clamp(420px, 62vh, 660px); }
.detail-media { position: absolute; inset: 0; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { position: relative; z-index: 2; display: grid; grid-template-columns: 236px 1fr; gap: clamp(20px, 3vw, 42px); padding-block: 72px 44px; }
.detail-poster img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.detail-copy { max-width: 760px; }
.badge-row { margin-bottom: 10px; }
.badge-row .chip-fixture { position: static; }
.rating {
    display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line-strong);
    border-radius: 5px; font-size: .76rem; letter-spacing: .04em; color: var(--ink-2);
}
.detail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 26px; margin: 20px 0; }
.detail-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.detail-facts dd { margin: 3px 0 0; font-size: .92rem; color: var(--ink); }
.detail-synopsis { color: #d9d5cf; }
.detail-note {
    margin-top: 18px; padding: 13px 16px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem;
}
.detail-note a { color: var(--accent); text-decoration: underline; }

/* ---------- theatre / playback ---------- */

body.page-theater { background: #000; }
body.page-theater .site-header,
body.page-theater .site-footer { display: none; }

.theater {
    --bar-h: 74px;
    display: flex; flex-direction: column;
    min-height: calc(100vh - var(--header-h));
    background: #000; color: var(--ink);
}

.theater-stage { position: relative; flex: 1 1 auto; display: grid; place-items: center; background: #000; overflow: hidden; }
.theater-video { width: 100%; height: 100%; max-height: calc(100vh - var(--bar-h)); display: block; background: #000; }
.theater-scrim { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 -140px 120px -60px rgba(0, 0, 0, .8); opacity: 0; transition: opacity var(--dur) var(--ease); }
.theater:not(.is-idle) .theater-scrim { opacity: 1; }

.theater-buffer { position: absolute; inset: 0; display: grid; place-items: center; gap: 10px; pointer-events: none; }
.theater-buffer[hidden] { display: none; }
.spinner {
    width: 42px; height: 42px; border-radius: 50%; margin-inline: auto;
    border: 3px solid var(--line-strong); border-top-color: var(--accent);
    animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.theater-cover { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: var(--gutter); background: radial-gradient(120% 90% at 50% 40%, rgba(7, 7, 10, .55), rgba(7, 7, 10, .93)); }
.theater-cover[hidden] { display: none; }
.cover-copy { display: grid; gap: 10px; justify-items: center; max-width: 620px; }
.cover-copy h1 { margin: 0; }
.cover-meta { color: var(--ink-2); font-size: .95rem; margin: 0; }
.cover-resume { color: var(--ink-3); font-size: .84rem; margin: 4px 0 0; }
.cover-note { color: var(--danger); font-size: .88rem; margin: 10px 0 0; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; margin-top: 8px; }
.tabular { font-variant-numeric: tabular-nums; }

.theater-fault {
    position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center;
    padding: var(--gutter); background: rgba(7, 7, 10, .9);
}
.theater-fault[hidden] { display: none; }
.theater-fault h2 { margin: 0; color: var(--danger); }
.theater-fault p { color: var(--ink-2); margin: 0; }

.theater-bar {
    flex: none; display: grid; gap: 6px; padding: 8px var(--gutter) 12px;
    background: #0b0b10; border-top: 1px solid var(--line);
    transition: opacity var(--dur) var(--ease);
}
.theater.is-idle .theater-bar { opacity: 0; pointer-events: none; }

.bar-seek { display: flex; align-items: center; }
.bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar-btn {
    display: grid; place-items: center; width: 40px; height: 40px; flex: none;
    background: none; border: 0; border-radius: 10px; color: var(--ink); cursor: pointer;
    transition: background var(--dur), color var(--dur);
}
.bar-btn:hover { background: var(--surface-2); color: var(--accent); }
.bar-btn svg { width: 22px; height: 22px; fill: currentColor; }
.bar-btn svg[hidden] { display: none; }
.bar-link { color: var(--ink-2); }
.bar-time { margin: 0; font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-title { margin: 0 0 0 auto; font-size: .9rem; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.bar-status { margin: 0; font-size: .8rem; color: var(--accent); }

.bar-volume { display: flex; align-items: center; gap: 6px; }
.bar-volume input[type=range] { width: 92px; }

input[type=range] {
    --fill: 0%;
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 20px; background: none; cursor: pointer; accent-color: var(--accent);
}
input[type=range]::-webkit-slider-runnable-track {
    height: 5px; border-radius: 999px;
    background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, .18) var(--fill));
}
input[type=range]::-moz-range-track {
    height: 5px; border-radius: 999px;
    background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, .18) var(--fill));
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 15px; height: 15px; margin-top: -5px; border-radius: 50%;
    background: var(--ink); border: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}
input[type=range]::-moz-range-thumb {
    width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--ink);
}
.bar-seek input[type=range]::-webkit-slider-thumb { background: var(--accent); }
.bar-seek input[type=range]::-moz-range-thumb { background: var(--accent); }

.theater:fullscreen { background: #000; }
.theater:fullscreen .theater-video { max-height: calc(100vh - var(--bar-h)); }

/* The blocked theatre keeps the art but never a player. */
.stage-blocked { position: relative; display: grid; place-items: center; min-height: 60vh; padding: clamp(40px, 12vh, 120px) var(--gutter); text-align: center; }
.stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.blocked-copy { position: relative; display: grid; gap: 10px; justify-items: center; max-width: 640px; }
.blocked-copy h1 { margin: 0; }
.blocked-reason { color: var(--ink); font-size: 1.02rem; margin: 0; }

/* ---------- forms / auth ---------- */

.card-panel {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 38px); max-width: 470px; margin: clamp(24px, 5vh, 56px) auto;
    box-shadow: var(--shadow);
}
.card-panel h1 { font-size: 1.5rem; }
.stack { display: grid; gap: 14px; }
.stack-2 { display: grid; gap: 6px; }
.hint { color: var(--ink-3); font-size: .82rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); font-size: .9rem; }
.error-list { color: var(--danger); font-size: .86rem; margin: 0 0 14px; padding-left: 18px; list-style: disc; }
.panel-wide { max-width: 860px; }
.panel-fill { max-width: none; margin: 0; }
.stack-list { display: grid; gap: 7px; list-style: none; padding: 0; margin: 0; }

/* ---------- flash ---------- */

.flash {
    margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius); font-size: .9rem;
    border: 1px solid var(--line); background: var(--surface);
}
.flash-error { border-color: rgba(224, 103, 79, .55); color: #f5b4a5; }
.flash-success { border-color: rgba(89, 181, 138, .55); color: #a9e0c5; }

/* ---------- plans ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-block: 26px 40px; }
.plan {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 26px 22px; display: grid; gap: 12px; align-content: start;
    transition: border-color var(--dur), transform var(--dur) var(--ease);
}
.plan:hover { border-color: var(--accent); transform: translateY(-3px); }
.plan.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-code { font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.plan-price { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.plan-price small { font-size: .82rem; font-weight: 500; color: var(--ink-3); }
.plan ul { display: grid; gap: 7px; font-size: .89rem; color: var(--ink-2); }
.plan li::before { content: "·"; color: var(--accent); margin-right: 8px; font-weight: 700; }
.flash-info { border-color: rgba(229, 180, 91, .5); color: #f0dcae; }

/* ---------- checkout ---------- */

.channel-row { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; }
.channel-row legend { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; padding: 0; }
.channel-option {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.channel-option:has(input:checked) { border-color: var(--accent); }
.channel-option input { accent-color: var(--accent); }

.pay-state { font-size: 1.02rem; color: var(--accent); font-weight: 600; }
.pay-state[data-state="failed"], .pay-state[data-state="expired"] { color: #f5b4a5; }
.pay-details { display: grid; gap: 10px; margin: 18px 0; }
.pay-details div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.pay-details dt { color: var(--ink-3); font-size: .84rem; }
.pay-details dd { margin: 0; font-size: .9rem; text-align: right; }
.pay-done { margin-top: 16px; display: grid; gap: 12px; }
.pay-done[hidden] { display: none; }

/* ---------- account ---------- */

.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-block: 22px 44px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.stat span { color: var(--ink-3); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }

.list-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.list-table th, .list-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list-table th { color: var(--ink-3); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.list-table td.num { text-align: right; white-space: nowrap; }
.thumb { width: 42px; height: 63px; border-radius: 6px; object-fit: cover; }
.list-title { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.list-title:hover { color: var(--accent); }
.progress-track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; min-width: 90px; }
.progress-bar { height: 100%; background: var(--accent); }

/* ---------- admin ---------- */

.admin-topbar {
    position: sticky; top: 0; z-index: 40; background: rgba(9, 9, 14, .96);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.admin-topbar-inner {
    max-width: var(--shell); margin-inline: auto; padding: 12px var(--gutter);
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand-zone {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent);
    border: 1px solid var(--accent-soft); background: var(--accent-soft);
    padding: 3px 8px; border-radius: 999px;
}
.admin-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.admin-layout {
    max-width: var(--shell); margin-inline: auto; padding: 20px var(--gutter) 60px;
    display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; align-items: start;
}
.admin-side {
    position: sticky; top: 86px; display: grid; gap: 3px; align-content: start;
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px; background: var(--surface);
}
.admin-side a {
    padding: 9px 12px; border-radius: 8px; color: var(--ink-2); font-size: .88rem; font-weight: 500;
    transition: background var(--dur), color var(--dur);
}
.admin-side a:hover { background: var(--surface-2); color: var(--ink); }
.admin-side a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.admin-main { min-width: 0; display: grid; gap: 6px; }
.admin-main .flash { margin: 0 0 6px; }

.admin-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin: 6px 0 18px; }
.admin-head h1 { font-size: 1.7rem; letter-spacing: -.02em; }
.admin-head > div { flex: 1 1 260px; }
.admin-head .btn { align-self: center; }
.admin-sub { color: var(--ink-2); font-size: .9rem; margin-top: 6px; max-width: 78ch; }
.admin-subtitle { color: var(--ink-3); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; margin: 4px 0 8px; }
.admin-note { color: var(--ink-3); font-size: .84rem; margin-top: 12px; }
.admin-empty { color: var(--ink-3); font-size: .9rem; padding: 18px 0; }

.admin-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 20px; margin-bottom: 20px;
}
.admin-card h2 { font-size: 1.06rem; margin-bottom: 12px; }
.admin-card legend { font-size: 1.02rem; font-weight: 600; padding-inline: 6px; color: var(--ink); }
.admin-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }

.admin-filters { padding-block: 4px 14px; }
.admin-form { display: grid; gap: 0; }
.admin-form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.admin-inline-save h2 { margin-bottom: 14px; }
.admin-inline-form { display: grid; gap: 12px; margin-top: 12px; padding: 14px; background: var(--surface-2); border-radius: var(--radius); }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; margin-bottom: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.check-row { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); padding: 4px 0; cursor: pointer; }
.check-row input { flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 14px; }
.check-row-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.field-hint { color: var(--ink-3); font-size: .82rem; margin-top: 4px; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.admin-table { min-width: 720px; }
.admin-table th, .admin-table td { padding: 14px 12px; }
.admin-table tr:hover td { background: rgba(255, 255, 255, .02); }
.admin-table .thumb { width: 40px; height: 60px; }
.num-cell { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .84rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.block { display: block; }
.th-actions { width: 220px; }
.td-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.td-actions form { margin: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { width: 170px; }
.row-details summary { cursor: pointer; color: var(--accent); font-size: .85rem; }

.pill {
    display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem;
    font-weight: 600; letter-spacing: .04em; border: 1px solid var(--line); color: var(--ink-2);
    white-space: nowrap;
}
.pill-ok { border-color: rgba(89, 181, 138, .5); color: #a9e0c5; background: rgba(89, 181, 138, .12); }
.pill-warn { border-color: rgba(229, 180, 91, .5); color: #f0d19a; background: var(--accent-soft); }
.pill-bad { border-color: rgba(224, 103, 79, .5); color: #f5b4a5; background: rgba(224, 103, 79, .12); }
.pill-star { border-color: rgba(229, 180, 91, .7); color: var(--accent); }
.pill-quiet { background: var(--surface-2); }

.ready-list { display: grid; gap: 10px; }
.ready-list li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: .9rem; }
.ready-list li:last-child { border-bottom: 0; }

.action-code { font-size: .84rem; color: var(--accent); }
.admin-danger { border-color: rgba(224, 103, 79, .4); }
.admin-danger h2 { color: #f5b4a5; }

/* ---------- admin titles list ---------- */

.title-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.stat {
    flex: 1 1 118px; display: grid; gap: 3px; align-content: start;
    padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink-2);
    transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.stat:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .16); color: var(--ink); }
.stat-value { font-size: 1.4rem; font-weight: 650; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.stat.is-active { border-color: var(--accent); background: var(--accent-soft); }
.stat.is-active .stat-value, .stat.is-active .stat-label { color: var(--accent); }
.stat-warn .stat-value { color: #f0d19a; }

.titles-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.titles-toolbar .titles-search { flex: 2 1 260px; }
.titles-toolbar .titles-sort { flex: 0 1 190px; }
.titles-toolbar .field-submit { flex: 0 0 auto; }
.titles-toolbar select { min-width: 170px; }

.titles-count { color: var(--ink-3); font-size: .82rem; margin: 0 0 10px; }

.title-list { list-style: none; display: grid; gap: 10px; }
.title-row {
    display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px;
    padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--surface); align-items: start;
    transition: border-color var(--dur), background var(--dur);
}
.title-row:hover { border-color: rgba(255, 255, 255, .16); }
.title-row.is-incomplete { border-color: rgba(224, 103, 79, .45); }
.title-poster-link { display: block; width: 84px; }
.title-poster {
    display: block; width: 84px; aspect-ratio: 2 / 3; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2);
}
.title-main { display: grid; gap: 5px; min-width: 0; align-content: start; }
.title-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1rem; font-weight: 600; }
.title-name a { color: var(--ink); }
.title-name a:hover { color: var(--accent); }
.title-facts, .title-slug, .title-audio { color: var(--ink-3); font-size: .8rem; }
.title-audio { color: var(--ink-2); }
.title-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; list-style: none; }
.tag {
    font-size: .72rem; color: var(--ink-2); background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.title-flag { font-size: .8rem; color: #f5b4a5; max-width: 62ch; }
.title-side { display: grid; gap: 10px; justify-items: end; }
.title-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.title-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.title-actions form { margin: 0; }

@media (max-width: 760px) {
    .title-row { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
    .title-poster-link, .title-poster { width: 64px; }
    .title-side { grid-column: 1 / -1; justify-items: start; }
    .title-badges, .title-actions { justify-content: flex-start; }
}

/* ---------- admin media panel ---------- */

.admin-card-intro { margin-bottom: 16px; }

/* Field heads pair the label with a live character count; the count turns
   amber in the last tenth of the limit rather than at the point of refusal. */
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-count { font-size: .72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.field-count.is-near { color: #f0d19a; }
.field-required { color: var(--accent); }
.field-error { margin: 0; font-size: .82rem; color: #f5b4a5; }

.input-adorned {
    display: flex; align-items: stretch; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
}
.input-adorned:focus-within { border-color: var(--accent); }
.input-prefix {
    display: flex; align-items: center; padding: 0 10px; white-space: nowrap;
    background: var(--surface-2); border-right: 1px solid var(--line);
    color: var(--ink-3); font-size: .82rem;
}
.input-adorned input { border: 0; border-radius: 0; background: transparent; }
.input-adorned input:focus { outline: none; }

/* The plan is small enough that "how much is left" belongs on the form. */
.storage-meter {
    display: grid; gap: 8px; margin-bottom: 14px; padding: 12px 14px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.storage-meter-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.storage-meter-head b { color: var(--ink); font-variant-numeric: tabular-nums; }
.storage-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.storage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.storage-meter.is-warn .storage-bar span { background: #e5b45b; }
.storage-meter.is-bad .storage-bar span { background: #e0674f; }
.storage-meter .field-hint { margin: 0; }

.compress-guide { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.compress-guide summary { cursor: pointer; color: var(--ink-2); font-size: .86rem; }
.compress-guide[open] summary { color: var(--accent); }
.compress-guide-label { margin: 14px 0 6px; font-size: .76rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.code-block { margin: 0; padding: 12px 14px; overflow-x: auto; background: #0b0b12; border: 1px solid var(--line); border-radius: var(--radius); }
.code-block code {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .78rem;
    color: #dcd7f0; white-space: pre-wrap; overflow-wrap: anywhere;
}
.uploader-estimate { margin: 0; font-size: .8rem; color: var(--ink-3); }

/* Panels below toggle visibility with the hidden attribute, and a display
   rule of their own would otherwise beat it. */
[hidden] { display: none !important; }

.artwork-grid { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 24px; align-items: start; }
.artwork-slot { display: grid; gap: 12px; min-width: 0; }

.artwork-drop {
    position: relative; display: grid; place-items: center; overflow: hidden;
    aspect-ratio: var(--art-ratio, 2 / 3); width: 100%; cursor: pointer;
    background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.artwork-drop:hover, .artwork-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.artwork-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.artwork-empty { display: grid; gap: 6px; text-align: center; padding: 18px; color: var(--ink-3); }
.artwork-empty-title { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.artwork-empty-meta { font-size: .78rem; }
.artwork-working {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(7, 7, 10, .72); color: var(--ink); font-size: .88rem; font-weight: 600;
}

.artwork-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.artwork-note { margin: 0; font-size: .82rem; color: var(--ink-3); flex: 1 1 140px; }
.artwork-note[data-tone="ok"] { color: #a9e0c5; }
.artwork-note[data-tone="warn"] { color: #f0d19a; }
.artwork-note[data-tone="bad"] { color: #f5b4a5; }
.artwork-buttons { display: flex; align-items: center; gap: 6px; }

.uploader { display: grid; gap: 14px; }

.uploader-drop {
    display: grid; justify-items: center; gap: 8px; text-align: center;
    padding: 30px 20px; cursor: pointer;
    background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.uploader-drop:hover, .uploader-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.uploader-drop-icon { color: var(--accent); }
.uploader-drop-title { font-weight: 600; font-size: 1rem; }
.uploader-drop-meta { color: var(--ink-3); font-size: .8rem; max-width: 52ch; }
.uploader-drop .btn { margin-top: 6px; pointer-events: none; }

.media-current {
    display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.media-current-main { display: grid; gap: 4px; min-width: 0; }
.media-current-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.media-current-key {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .82rem; color: var(--ink-2);
    overflow-wrap: anywhere;
}
.media-current-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.uploader-run { display: grid; gap: 10px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.uploader-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.uploader-file { display: grid; gap: 2px; min-width: 0; }
.uploader-file strong { font-size: .95rem; overflow-wrap: anywhere; }
.uploader-file .muted { font-size: .8rem; }

.uploader-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.uploader-bar span {
    display: block; height: 100%; width: 0; border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #f0c271); transition: width 180ms linear;
}

.uploader-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.uploader-status { margin: 0; font-size: .86rem; color: var(--ink-2); }
.uploader-rate { margin: 0; font-size: .8rem; font-variant-numeric: tabular-nums; }
.uploader-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.uploader-note { margin: 0; font-size: .84rem; color: var(--ink-3); }
.uploader-note[data-tone="ok"] { color: #a9e0c5; }
.uploader-note[data-tone="warn"] { color: #f0d19a; }
.uploader-note[data-tone="bad"] { color: #f5b4a5; }

.uploader-manual { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.uploader-manual summary { cursor: pointer; color: var(--ink-2); font-size: .86rem; }
.uploader-manual[open] summary { color: var(--accent); }
.uploader-manual .grid-2 { margin-top: 14px; }

.btn-danger { background: rgba(224, 103, 79, .16); color: #f5b4a5; border-color: rgba(224, 103, 79, .5); }
.btn-danger:hover { background: rgba(224, 103, 79, .28); color: #ffd0c5; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: #090910; padding-block: 34px; margin-top: 40px; }
.footer-shell { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; color: var(--ink-3); font-size: .86rem; }
.footer-brand p { margin: 8px 0 2px; color: var(--ink); font-weight: 600; }
.footer-tagline { font-weight: 400; color: var(--ink-3); }
.footer-links { display: grid; gap: 8px; align-content: start; }
.footer-links a:hover { color: var(--accent); }
.footer-meta p { margin: 0 0 6px; }
.footer-meta a:hover { color: var(--accent); }
.footer-territory { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
    .header-search input { width: 150px; }
    .header-search input:focus { width: 180px; }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: grid; place-items: center; gap: 4px; width: 42px; height: 42px; margin-left: auto;
        background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
    }
    .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform var(--dur); }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .primary-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; z-index: 39;
        flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 14px var(--gutter) 22px;
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
        background: rgba(9, 9, 14, .98); border-bottom: 1px solid var(--line);
        display: none;
    }
    body.nav-open .primary-nav { display: flex; }

    .nav-links { flex-direction: column; gap: 2px; }
    .nav-links a { padding: 14px 12px; font-size: 1rem; }

    .header-search { margin: 12px 0 0; }
    .header-search input { flex: 1; width: auto; }

    .header-account { margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
    .account-menu { width: 100%; }
    .account-menu summary { justify-content: flex-start; }
    .account-panel { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
    .detail-body { grid-template-columns: 1fr; }
    .detail-poster { width: 148px; }

    .admin-layout { grid-template-columns: 1fr; gap: 16px; }
    .admin-side {
        position: static; grid-auto-flow: column; grid-auto-columns: max-content;
        overflow-x: auto; scrollbar-width: thin;
    }

    .artwork-grid { grid-template-columns: 1fr; }
    .artwork-drop { max-width: 320px; }
}

@media (max-width: 520px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
    .row-item { width: 42vw; max-width: 150px; }
    .hero-cta .btn, .detail-cta .btn { flex: 1 1 auto; }
    .btn { padding: 11px 16px; }
    .admin-head h1 { font-size: 1.4rem; }
    .admin-topbar-actions { gap: 7px; }
    .inline-form { width: 100%; }
    .inline-form input { width: auto; flex: 1; min-width: 0; }
    .th-actions { width: auto; }
    .filters { grid-template-columns: 1fr 1fr; }
    .field-submit { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
    .site-header, .site-footer, .hero-cta, .detail-cta, .card-actions { display: none !important; }
}
