/* notfardi tube — single stylesheet, no framework. */

:root {
    --bg: #0e1116;
    --bg-raise: #151a21;
    --bg-sunken: #0a0d11;
    --line: #232b36;
    --line-soft: #1b222b;
    --text: #e8edf4;
    --text-dim: #9aa7b8;
    --brand: #ff4d5a;
    --brand-ink: #ffffff;
    --accent: #4c8dff;
    --ok: #37c98b;
    --warn: #f0b429;
    --danger: #ff5a5f;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 28px rgba(0, 0, 0, .35);
    --shell: 1180px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f7f9;
        --bg-raise: #ffffff;
        --bg-sunken: #eceef2;
        --line: #dde1e8;
        --line-soft: #e8ebf0;
        --text: #131820;
        --text-dim: #5c6675;
        --shadow: 0 6px 20px rgba(20, 30, 50, .08);
    }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 650; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .93rem; }
p { margin: 0 0 .75rem; }
img { max-width: 100%; }
code {
    background: var(--bg-sunken);
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    padding: .05em .35em;
    font-size: .9em;
}
a { color: inherit; }
.muted { color: var(--text-dim); }
.small { font-size: .84rem; }
.block { display: block; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 1rem; }

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

.site-header {
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding-bottom: .4rem;
}

.header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .9rem;
    align-items: center;
    padding: .7rem 1rem .5rem;
}

.brand {
    display: inline-flex; align-items: center; gap: .5rem;
    font-weight: 700; letter-spacing: -.02em; text-decoration: none; white-space: nowrap;
}
.brand-mark { width: 30px; height: 30px; fill: none; stroke: var(--brand); stroke-width: 1.6; }
.brand-play { fill: var(--brand); stroke: none; }
.brand-large { font-size: 1.3rem; margin-bottom: 1rem; justify-content: center; }

.search { display: flex; align-items: center; position: relative; }
.search input {
    width: 100%;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    padding: .5rem 2.6rem .5rem 1rem;
    font: inherit;
}
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search button {
    position: absolute; right: 4px;
    background: none; border: 0; color: var(--text-dim);
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
    display: grid; place-items: center;
}
.search button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-wide { margin: 1rem 0; }
.search-wide input { padding: .65rem 1rem; }
.search-wide .btn { flex: none; }

.header-nav { display: flex; align-items: center; gap: .5rem; }

.tabs {
    display: flex; gap: .3rem; overflow-x: auto;
    padding: .2rem 0 .1rem;
    scrollbar-width: none;
}
.tabs a {
    padding: .4rem .8rem; border-radius: 999px;
    color: var(--text-dim); text-decoration: none; white-space: nowrap; font-size: .9rem;
}
.tabs a:hover { background: var(--bg-raise); color: var(--text); }
.tabs a[aria-current="page"] { background: var(--text); color: var(--bg); }

.account-menu { position: relative; }
.account-menu > summary {
    list-style: none; cursor: pointer; border-radius: 50%;
    display: grid; place-items: center; padding: 2px;
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-panel {
    position: absolute; right: 0; top: calc(100% + .5rem);
    width: 260px; background: var(--bg-raise);
    border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: .7rem;
}
.account-head { display: flex; flex-direction: column; padding-bottom: .5rem; border-bottom: 1px solid var(--line-soft); }
.account-panel ul { list-style: none; margin: .5rem 0; padding: 0; }
.account-panel li a {
    display: block; padding: .38rem .5rem; border-radius: var(--radius-sm);
    text-decoration: none; font-size: .9rem; color: var(--text-dim);
}
.account-panel li a:hover { background: var(--bg-sunken); color: var(--text); }
.account-panel li a[aria-current="page"] { color: var(--brand); }

/* ---------- overflow ("kebab") menus ---------- */

.menu { position: relative; }
.menu-trigger {
    list-style: none; cursor: pointer; padding: 0;
    display: inline-grid; place-items: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: transparent; border: 1px solid transparent; color: var(--text-dim);
}
.menu-trigger::-webkit-details-marker { display: none; }
.menu-trigger:hover { background: var(--bg-sunken); color: var(--text); }
.menu-trigger svg { width: 18px; height: 18px; fill: currentColor; }
.menu[open] > .menu-trigger { background: var(--bg-sunken); color: var(--text); }

.menu-panel {
    position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20;
    min-width: 190px; text-align: left; padding: .3rem;
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-item {
    display: block; width: 100%; text-align: left; cursor: pointer;
    padding: .45rem .6rem; border: 0; border-radius: var(--radius-sm);
    background: none; font: inherit; font-size: .88rem;
    color: var(--text); text-decoration: none;
}
.menu-item:hover { background: var(--bg-sunken); }
.menu-item.danger { color: var(--danger); }
.menu-form { margin: 0; }

.comment-actions .menu-trigger { width: 26px; height: 26px; }
.comment-actions .menu-trigger svg { width: 16px; height: 16px; }

/* Card menu floats over the top-right corner of the thumbnail. */
.video-card { position: relative; }
.card-menu { position: absolute; right: .3rem; top: .3rem; z-index: 6; }
.card-menu .menu-trigger {
    background: rgba(0, 0, 0, .72); color: #fff;
    border-color: rgba(255, 255, 255, .25);
}
.card-menu .menu-trigger:hover,
.card-menu[open] .menu-trigger { background: rgba(0, 0, 0, .9); color: #fff; }

/* The inline editor on the watch page. */
.video-edit {
    margin-top: .8rem; padding: .8rem 1rem;
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius);
}
.video-edit > summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.video-edit[open] > summary { margin-bottom: .7rem; }

/* ---------- buttons, chips, pills ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    border: 1px solid transparent; border-radius: 999px;
    padding: .5rem 1.05rem; font: inherit; font-weight: 600; font-size: .9rem;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    background: var(--bg-raise); color: var(--text);
}
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: .35rem .8rem; font-size: .84rem; }
.btn-like svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn-like.is-active { border-color: var(--brand); color: var(--brand); }
.btn-like.is-active svg { fill: var(--brand); }

.linkish {
    background: none; border: 0; padding: 0; font: inherit; font-size: .85rem;
    color: var(--accent); cursor: pointer;
}
.linkish.danger { color: var(--danger); }
.linkish:hover { text-decoration: underline; }

.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .7rem; border-radius: 999px;
    background: var(--bg-raise); border: 1px solid var(--line);
    color: var(--text-dim); text-decoration: none; font-size: .82rem;
}
.chip.is-active { background: var(--text); color: var(--bg); border-color: transparent; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }

.pill {
    display: inline-block; padding: .15rem .55rem; border-radius: 999px;
    background: var(--bg-sunken); border: 1px solid var(--line);
    font-size: .74rem; color: var(--text-dim); white-space: nowrap;
}
.pill-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.status { text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; color: var(--text-dim); }
.status-ready, .status-active { color: var(--ok); }
.status-failed { color: var(--danger); }
.status-processing, .status-queued, .status-uploading { color: var(--warn); }
.status-removed, .status-suspended { color: var(--danger); }

/* ---------- avatars, cards, panels ---------- */

.avatar {
    display: inline-grid; place-items: center; flex: none;
    background: var(--bg-sunken); border: 1px solid var(--line);
    border-radius: 50%; font-weight: 650; color: var(--text-dim);
    text-transform: uppercase; overflow: hidden;
}
.avatar-xs { width: 24px; height: 24px; font-size: .66rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .76rem; }
.avatar-md { width: 40px; height: 40px; font-size: .9rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-xl { width: 88px; height: 88px; font-size: 1.7rem; }
.avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.card, .panel {
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem;
    margin-bottom: 1rem;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.panel-head a { color: var(--accent); text-decoration: none; font-size: .86rem; }

.danger-card { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.danger-list { padding-left: 1.1rem; }
.danger-list li { margin-bottom: .3rem; }

.detail-list { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; }
.detail-list dt { color: var(--text-dim); font-size: .85rem; }
.detail-list dd { margin: 0; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }

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

.form { display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .88rem; font-weight: 600; }
.field input, .field select, .field textarea {
    width: 100%; background: var(--bg-sunken); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .55rem .7rem; font: inherit;
}
.field textarea { resize: vertical; min-height: 5rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 1px;
}
.field input[type="file"] { padding: .45rem; }
.hint { margin: 0; }
.field-error, .form-error {
    color: var(--danger); font-size: .84rem; margin: 0;
}
.form-error {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
    border-radius: var(--radius-sm); padding: .5rem .7rem; margin: .6rem 0;
}

.meter { height: 4px; background: var(--bg-sunken); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s; }
.meter[data-level="2"] span { background: var(--warn); }
.meter[data-level="3"] span, .meter[data-level="4"] span { background: var(--ok); }

.avatar-row { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.avatar-form { flex: 1 1 240px; }

/* ---------- flashes ---------- */

.flash-region { display: grid; gap: .5rem; margin: .8rem auto; }
.flash {
    border-radius: var(--radius-sm); padding: .6rem .85rem; font-size: .9rem;
    border: 1px solid var(--line); background: var(--bg-raise);
}
.flash-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.flash-warning { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.flash-info { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- video grid and cards ---------- */

.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin: 1.4rem 0 1rem;
}

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

.video-card {
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius); position: relative; overflow: visible;
}
.video-card h3 { margin: 0 0 .2rem; font-size: .95rem; }
.video-card h3 a { text-decoration: none; }
.video-card h3 a:hover { color: var(--brand); }
.video-card-body { padding: .6rem .7rem .75rem; }
.stats-line { display: flex; flex-wrap: wrap; gap: .3rem; margin: .25rem 0 0; }

.thumb {
    display: block; position: relative; aspect-ratio: 16 / 9;
    background: var(--bg-sunken); overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder {
    position: absolute; inset: 0; display: grid; place-items: center;
}
.thumb-placeholder svg { width: 38px; height: 38px; fill: var(--text-dim); opacity: .5; }
.duration {
    position: absolute; right: .35rem; bottom: .35rem;
    background: rgba(0, 0, 0, .78); color: #fff;
    font-size: .74rem; padding: .05rem .3rem; border-radius: 4px;
    font-variant-numeric: tabular-nums;
}
.thumb-badge {
    position: absolute; left: .35rem; top: .35rem;
    background: rgba(0, 0, 0, .78); color: #fff;
    font-size: .72rem; padding: .1rem .4rem; border-radius: 4px; text-transform: capitalize;
}
.thumb-badge-visibility { left: .35rem; right: auto; top: auto; bottom: .35rem; }
.thumb-badge-failed { background: var(--danger); }
.thumb-badge-processing, .thumb-badge-queued, .thumb-badge-uploading { background: var(--warn); color: #22180a; }

.video-compact { display: grid; grid-template-columns: 168px 1fr; gap: .6rem; margin-bottom: .7rem; }
.video-compact h4 { margin: 0 0 .15rem; font-size: .88rem; }
.video-compact h4 a { text-decoration: none; }
.video-compact h4 a:hover { color: var(--brand); }
.video-compact p { margin: 0; }
.thumb-sm { border-radius: var(--radius-sm); aspect-ratio: 16 / 9; }

.side-title { font-size: .95rem; margin-bottom: .6rem; }

.pagination { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.6rem 0; }

/* ---------- watch page ---------- */

.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; margin-top: 1.2rem; }
@media (max-width: 1000px) { .watch-layout { grid-template-columns: 1fr; } .watch-side { order: 2; } }

.player-shell { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; }
.player { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

.player-quality { position: absolute; top: .6rem; right: .6rem; z-index: 5; }
.quality-trigger {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(0, 0, 0, .7); color: #fff;
    border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px;
    padding: .3rem .7rem; font: inherit; font-size: .82rem; cursor: pointer;
}
.quality-trigger:hover { background: rgba(0, 0, 0, .88); }
.quality-gear { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.quality-list {
    list-style: none; margin: .3rem 0 0; padding: .3rem;
    background: rgba(0, 0, 0, .85); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--radius-sm); min-width: 190px;
}
.quality-list[hidden] { display: none; }
.quality-list li button {
    display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: .8rem;
    background: none; border: 0; color: #fff; font: inherit; font-size: .85rem;
    padding: .35rem .5rem; border-radius: 6px; cursor: pointer; text-align: left;
}
.quality-list li button:hover { background: rgba(255, 255, 255, .14); }
.quality-list li button[aria-selected="true"] { background: var(--brand); }
.quality-list .q-size { color: rgba(255, 255, 255, .6); font-size: .76rem; }
.quality-note { position: absolute; right: 0; top: calc(100% + .4rem); width: 220px; text-align: right; }

.watch-title { margin: .9rem 0 .5rem; font-size: 1.25rem; }
.channel-line { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.channel-identity { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.channel-identity span { display: flex; flex-direction: column; line-height: 1.2; }
.watch-actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.meta-facts { display: flex; gap: .35rem; align-items: center; }

.description {
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 0;
}
.description-body { white-space: pre-wrap; }
.description-body.clamped {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.owner-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

/* ---------- comments ---------- */

.comments { margin-top: 1.5rem; }
.comments-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.comment-sort { display: flex; gap: .3rem; }

.comment-form { display: flex; gap: .7rem; margin: 1rem 0; }
.comment-form-main { flex: 1; display: grid; gap: .5rem; }
.comment-form textarea {
    width: 100%; background: var(--bg-sunken); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .55rem .7rem; font: inherit; resize: vertical;
}
.comment-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }
.signin-nudge { background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }

.comment-list { display: grid; gap: 1.1rem; margin-top: 1rem; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: .7rem; }
.comment-meta { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin: 0 0 .2rem; }
.comment-body { white-space: pre-wrap; word-break: break-word; }
.comment-actions { display: flex; align-items: center; gap: .8rem; margin-top: .3rem; }
.comment-replies { margin-top: .7rem; padding-left: .9rem; border-left: 2px solid var(--line); display: grid; gap: .8rem; }
.comment-reply { grid-template-columns: auto 1fr; }
.no-comments { padding: 1rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- processing ---------- */

.processing {
    text-align: center; background: var(--bg-raise);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2.6rem 1.4rem; margin-top: 1.2rem;
}
.processing-icon {
    width: 56px; height: 56px; fill: var(--brand);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .5; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .processing-icon { animation: none; } }

.progress {
    height: 8px; background: var(--bg-sunken); border-radius: 999px;
    overflow: hidden; margin: 1rem 0 .4rem;
}
.progress-fill {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: width .4s ease;
}

.processing-qualities {
    display: grid; gap: .4rem;
    max-width: 420px; margin: 1rem auto 0; text-align: left;
}
.processing-qualities .processing-bar {
    background: var(--bg-sunken); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .5rem .85rem .3rem;
    transition: border-color .3s ease;
}
.processing-qualities .processing-bar.is-active { border-color: var(--brand); }
.processing-qualities .processing-bar p { margin: 0; }
.processing-qualities .progress { margin: .5rem 0 .25rem; }
.rung-name { font-weight: 650; color: var(--text); }
.rung-percent { font-variant-numeric: tabular-nums; }
.is-active .rung-name, .is-active .rung-percent { color: var(--brand); }

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

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat {
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .9rem 1rem;
    display: grid; gap: .1rem;
}
.stat-value { font-size: 1.35rem; font-weight: 700; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .55rem .5rem; border-bottom: 1px solid var(--line-soft); text-align: left; }
.table th { color: var(--text-dim); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table tbody tr:hover { background: var(--bg-sunken); }
.table a { text-decoration: none; }
.table a:hover { color: var(--brand); }

.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.activity-list li { border-left: 2px solid var(--line); padding-left: .8rem; }
.activity-excerpt { margin: 0; word-break: break-word; }

.manage-list { display: grid; gap: .9rem; }
.manage-item {
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .9rem 1rem;
}
.manage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.manage-head h3 { margin: 0 0 .2rem; font-size: 1rem; }
.manage-head h3 a { text-decoration: none; }
.manage-head h3 a:hover { color: var(--brand); }
.manage-head p { margin: 0; }
.manage-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.manage-edit { margin-top: .6rem; }
.manage-edit summary { cursor: pointer; color: var(--accent); font-size: .86rem; }
.manage-edit[open] summary { margin-bottom: .7rem; }
.manage-lower { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }

.resume-list, .device-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .6rem; }
.resume-list li, .device-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: .5rem .7rem;
}

.channel-head { display: flex; gap: 1.1rem; align-items: center; margin: 1.6rem 0 1rem; }
.channel-head h1 { margin: 0; }
.channel-head p { margin: .15rem 0 0; }
.channel-bio { max-width: 60ch; }

/* ---------- misc ---------- */

.empty { text-align: center; padding: 2.4rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-icon { width: 42px; height: 42px; fill: none; stroke: var(--text-dim); stroke-width: 1.4; margin-bottom: .4rem; }

.auth-shell { width: 100%; max-width: 420px; margin: 0 auto; padding: 2.5rem 1rem; }
.is-centred-page { justify-content: center; }
.auth-card { margin-bottom: 1rem; }
.auth-card h1 { font-size: 1.35rem; }
.auth-switch { text-align: center; margin: .9rem 0 0; font-size: .9rem; }
.auth-foot { text-align: center; font-size: .88rem; }
.auth-foot a { color: var(--text-dim); }

.uploader { display: grid; gap: .4rem; margin: .4rem 0; }
.uploader-file { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; margin: 0; }
.uploader-actions { display: flex; gap: .5rem; }

.error-page { text-align: center; padding: 3rem 1rem; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--brand); margin: 0; line-height: 1; }
.error-actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 1.4rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; color: var(--text-dim); font-size: .86rem; }
.footer-inner nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-inner a { color: var(--text-dim); text-decoration: none; font-size: .86rem; }
.footer-inner a:hover { color: var(--text); }

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

.admin-nav {
    display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.2rem;
    padding-bottom: .8rem; border-bottom: 1px solid var(--line);
}
.admin-nav a {
    padding: .35rem .75rem; border-radius: 999px; text-decoration: none;
    color: var(--text-dim); font-size: .86rem;
}
.admin-nav a:hover { color: var(--text); background: var(--bg-raise); }
.admin-nav a.is-active { color: var(--bg); background: var(--text); }

.filter-bar {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .6rem .7rem; margin-bottom: 1rem;
}
.filter-bar input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.filter-bar select { flex: 0 0 auto; }
.filter-bar .btn { flex: 0 0 auto; }

.inline-form { display: inline-flex; align-items: center; gap: .4rem; }
.inline-form select { padding: .25rem .4rem; font-size: .82rem; }

.row-actions { display: inline-flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.row-actions form { display: inline; }

.comment-cell { max-width: 32rem; word-break: break-word; }

.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

.status-visible { color: var(--ok); }
.status-hidden { color: var(--warn); }
.status-deleted, .status-canceled { color: var(--danger); }

@media (max-width: 720px) {
    .header-inner { grid-template-columns: auto auto; row-gap: .6rem; }
    .header-inner .search { order: 3; grid-column: 1 / -1; }
    .two-col { grid-template-columns: 1fr; }
    .video-compact { grid-template-columns: 140px 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .row-actions { justify-content: flex-start; }
}