/* AutomJelly — theme inspire de Jellyfin (fond #101010, bleu #00a4dc, degrade du logo).
   Une seule piece forte : la banniere « en cours de telechargement ». Le reste reste sobre. */

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 400 700;
    font-stretch: 100%;
    font-display: swap;
    src: url("/static/fonts/noto-sans-latin.woff2") format("woff2");
}

:root {
    color-scheme: dark;
    --bg: #101010;
    --surface: #1c1c1c;
    --surface-2: #262626;
    --surface-3: #333;
    --line: rgba(255, 255, 255, .08);
    --text: rgba(255, 255, 255, .9);
    --muted: rgba(255, 255, 255, .6);
    --faint: rgba(255, 255, 255, .38);
    --accent: #00a4dc;
    --accent-strong: #0cb0e8;
    --purple: #aa5cc3;
    --grad: linear-gradient(90deg, var(--purple), var(--accent));
    --ok: #52b54b;
    --warn: #f0a33a;
    --danger: #e0463f;

    /* Echelle typographique (rapport 1,25) */
    --fs-xs: .8rem;
    --fs-sm: .875rem;
    --fs-md: 1rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.563rem;
    --fs-2xl: clamp(1.563rem, 1.1rem + 2vw, 2.441rem);

    --gutter: max(16px, 3.3vw);
    --r-card: 6px;
    --r-ctrl: 8px;
    --r-sheet: 14px;
    --header-h: 60px;
}

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

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

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

img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

svg { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.sprite { display: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::selection { background: rgba(0, 164, 220, .45); }

/* --- boutons ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45em;
    min-height: 40px;
    padding: 0 1.1em;
    border: 0;
    border-radius: var(--r-ctrl);
    background: var(--surface-3);
    font-weight: 600;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: background-color .15s;
}
.btn:hover { background: #3d3d3d; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(224, 70, 63, .5); }
.btn-danger:hover { background: rgba(224, 70, 63, .12); }
.btn-small { min-height: 32px; padding: 0 .8em; font-size: var(--fs-xs); }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.icon-btn svg { width: 22px; height: 22px; }

.text-btn {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    padding: .25em 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
}
.text-btn svg { width: 18px; height: 18px; }

/* --- en-tete ------------------------------------------------------------- */

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: var(--header-h);
    padding: 0 var(--gutter);
    background: rgba(16, 16, 16, .86);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--text);
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -.01em;
    text-decoration: none;
    flex: none;
}

.tabs {
    display: flex;
    align-self: stretch;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5em;
    padding: 0 .9rem;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: var(--fs-md);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs button[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: .9rem;
    right: .9rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--accent);
}
.tab-count {
    min-width: 1.5em;
    padding: 0 .45em;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
    line-height: 1.5em;
    text-align: center;
}

.header-tools { display: flex; align-items: center; gap: .25rem; margin-left: auto; }

/* Etat des services : trois pastilles, detail au clic */
.services { position: relative; }
.dots { display: flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.dots i.ok { background: var(--ok); }
.dots i.warn { background: var(--warn); }
.dots i.down { background: var(--danger); }

.services-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(320px, calc(100vw - 32px));
    padding: .5rem;
    border-radius: var(--r-ctrl);
    background: var(--surface-2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.service-row { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem .6rem; }
.service-row + .service-row { border-top: 1px solid var(--line); }
.service-row .dot { width: 10px; height: 10px; margin-top: .45em; border-radius: 50%; flex: none; }
.service-row .dot.ok { background: var(--ok); }
.service-row .dot.warn { background: var(--warn); }
.service-row .dot.down { background: var(--danger); }
.service-row strong { display: block; font-weight: 600; }
.service-row span { color: var(--muted); font-size: var(--fs-sm); }
.service-action { padding: .35rem .6rem .5rem 2.2rem; border-top: 1px solid var(--line); }

/* --- contenu ------------------------------------------------------------- */

main { padding: 1.75rem var(--gutter) 5rem; }

.search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 680px;
    margin-bottom: 2.25rem;
}
.search input {
    width: 100%;
    height: 48px;
    padding: 0 3rem 0 3rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: var(--fs-md);
    transition: border-color .15s, background-color .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 1.1rem; width: 22px; height: 22px; color: var(--faint); pointer-events: none; }
.search kbd {
    position: absolute;
    right: 1.1rem;
    padding: 0 .45em;
    border: 1px solid var(--surface-3);
    border-radius: 4px;
    color: var(--faint);
    font: inherit;
    font-size: var(--fs-xs);
}
.search input:focus ~ kbd { display: none; }

.block { margin-bottom: 2.75rem; }
.block-head { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.block-head h2 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
.block-head .count { color: var(--faint); font-weight: 400; }

/* --- cartes affiche ------------------------------------------------------ */

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 10.5vw, 170px), 1fr));
    gap: 1.6rem 1rem;
}

.card { min-width: 0; }
.card-img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    padding: 0;
    border: 0;
    border-radius: var(--r-card);
    overflow: hidden;
    background: var(--surface-2);
    cursor: pointer;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: .75rem;
    color: var(--faint);
    font-size: var(--fs-sm);
    text-align: center;
}
/* Survol : voile + bouton d'action rond, comme le bouton lecture de Jellyfin */
.card-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .15s;
}
.card-action {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.9);
    transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}
.card-action svg { width: 26px; height: 26px; }
.card-img:hover::before, .card-img:focus-visible::before { opacity: 1; }
.card-img:hover .card-action, .card-img:focus-visible .card-action { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-img:disabled { cursor: default; }
.card-img:disabled::before, .card-img:disabled .card-action { display: none; }

/* Ecrans tactiles : pas de survol, l'action reste visible en coin */
@media (hover: none) {
    .card-action { left: auto; top: auto; right: 6px; bottom: 6px; width: 34px; height: 34px; opacity: 1; transform: none; }
    .card-action svg { width: 19px; height: 19px; }
    .indicator.wanted { display: none; }
    .card-img:hover .card-action { transform: none; }
}

/* Indicateur de coin, comme la pastille « vu » de Jellyfin */
.indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.indicator svg { width: 17px; height: 17px; }
.indicator.wanted { background: rgba(0, 0, 0, .7); color: var(--accent); }

.card-title {
    display: -webkit-box;
    margin-top: .55rem;
    overflow: hidden;
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.card-sub { color: var(--muted); font-size: var(--fs-xs); }

/* Squelettes de chargement */
.skeleton .card-img { cursor: default; animation: pulse 1.4s ease-in-out infinite; }
.skeleton .card-title { width: 70%; height: .9em; border-radius: 4px; background: var(--surface-2); }
@keyframes pulse { 50% { opacity: .5; } }

/* --- etats vides et erreurs --------------------------------------------- */

.empty {
    max-width: 520px;
    padding: 2rem 0;
    color: var(--muted);
}
.empty strong { display: block; margin-bottom: .25rem; color: var(--text); font-size: var(--fs-md); font-weight: 600; }
.inline-error {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    max-width: 680px;
    padding: .85rem 1rem;
    border-radius: var(--r-ctrl);
    background: rgba(224, 70, 63, .12);
    color: #ffb4ae;
    font-size: var(--fs-sm);
}
.inline-error svg { margin-top: .1em; color: var(--danger); }

/* --- series : episodes manquants ---------------------------------------- */

.series-missing {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
}
.series-missing:first-child { border-top: 0; padding-top: 0; }
/* Arrivee depuis un lien de mail : la serie visee s'eclaire un instant */
.series-missing { scroll-margin-top: calc(var(--header-h) + 1rem); }
.series-missing.flash { animation: flash 2.6s ease-out; border-radius: var(--r-card); }
@keyframes flash { 0%, 35% { background: rgba(0, 164, 220, .12); } 100% { background: transparent; } }
.series-missing .card-img { cursor: default; }
.series-missing h3 { font-size: var(--fs-lg); font-weight: 600; }
.series-missing .series-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: .75rem; }

.season { max-width: 760px; margin-top: .75rem; }
.season-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .25rem; }
.season-head h4 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.episode {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto auto;
    align-items: center;
    gap: .75rem;
    padding: .5rem .5rem .5rem 0;
    border-radius: var(--r-ctrl);
}
.episode:hover { background: rgba(255, 255, 255, .03); }
.episode .ep-num { color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; }
.episode .ep-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.episode .ep-date { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }

/* --- banniere « en cours de telechargement » : la piece forte ------------ */

.now {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.75rem;
    align-items: end;
    margin: -1.75rem calc(var(--gutter) * -1) 2.5rem;
    padding: 3.5rem var(--gutter) 2rem;
    min-height: 340px;
    overflow: hidden;
}
.now-bg {
    position: absolute;
    inset: -40px;
    z-index: -2;
    background-color: var(--surface);
    background-size: cover;
    background-position: center 25%;
    filter: blur(12px) saturate(115%) brightness(.72);
    transform: scale(1.05);
}
.now::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(0deg, var(--bg) 0%, rgba(16, 16, 16, .55) 45%, rgba(16, 16, 16, .15) 100%),
        linear-gradient(90deg, rgba(16, 16, 16, .75) 0%, rgba(16, 16, 16, 0) 70%);
}
.now-poster {
    width: clamp(110px, 14vw, 170px);
    aspect-ratio: 2 / 3;
    border-radius: var(--r-card);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.now-poster img { width: 100%; height: 100%; object-fit: cover; }
.now-body { min-width: 0; max-width: 820px; }
.now-state { color: var(--accent); font-size: var(--fs-sm); font-weight: 600; }
.now-title {
    margin: .15rem 0 .35rem;
    font-size: var(--fs-2xl);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}
.now-file { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.now-progress { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.now-pct { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.6ch; text-align: right; }
.now-stats { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: .6rem; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.now-stats b { color: var(--text); font-weight: 600; }
.now-actions { margin-top: 1.25rem; display: flex; gap: .5rem; }
.now-queue { margin-top: .75rem; color: var(--faint); font-size: var(--fs-sm); }

/* Barre de progression au degrade Jellyfin */
.bar {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    overflow: hidden;
}
.bar > span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: var(--grad);
    background-size: 100vw 100%;
    transition: width .6s ease;
}
/* Reflet qui avance : seul mouvement non declenche de l'interface */
.bar.live > span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: translateX(-100%);
    animation: sheen 1.8s ease-in-out infinite;
}
@keyframes sheen { to { transform: translateX(100%); } }
/* Etape sans pourcentage (debridage, extraction, import) */
.bar.indeterminate > span { width: 35% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { left: -35%; } to { left: 100%; } }
.bar.thin { height: 4px; }

/* --- liste des taches ---------------------------------------------------- */

.job-list { display: flex; flex-direction: column; }
.job {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .85rem .5rem .85rem 0;
    border-top: 1px solid var(--line);
}
.job:first-child { border-top: 0; }
.job-thumb { width: 48px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.job-main { min-width: 0; }
.job-title { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.job-title .name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.job-line { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.job-line.err { color: #ffb4ae; white-space: normal; }
.job .bar { margin-top: .5rem; max-width: 420px; }
.job-actions { display: flex; align-items: center; gap: .25rem; }

.chip {
    flex: none;
    padding: .1em .6em;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}
.chip.active { background: rgba(0, 164, 220, .18); color: var(--accent); }
.chip.completed { background: rgba(82, 181, 75, .16); color: #7fd178; }
.chip.failed { background: rgba(224, 70, 63, .16); color: #ff8a83; }
.chip.needs_mapping { background: rgba(240, 163, 58, .16); color: var(--warn); }

/* --- feuilles (dialogues) ------------------------------------------------ */

dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: var(--r-sheet);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.sheet { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; }
.sheet-head { display: flex; align-items: flex-start; gap: 1rem; }
.sheet-head > div:not(.sheet-poster) { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: var(--fs-lg); font-weight: 600; }
.sheet-target { color: var(--muted); font-size: var(--fs-sm); margin-top: .15rem; }
.sheet-poster { width: 54px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); flex: none; }
.sheet-poster:empty { display: none; }
.sheet-poster img { width: 100%; height: 100%; object-fit: cover; }
.sheet-close { margin: -.5rem -.5rem 0 0; }
.sheet-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .25rem; }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field-label { color: var(--muted); font-size: var(--fs-sm); }
.field input, .field textarea, .field select {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid var(--surface-3);
    border-radius: var(--r-ctrl);
    background: var(--bg);
    font-size: var(--fs-sm);
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.6; word-break: break-all; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }

.links-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: -.5rem; }
.links-count { color: var(--faint); font-size: var(--fs-sm); }
.links-count.ok { color: var(--accent); }
.links-count.bad { color: var(--warn); }

.field-more summary { color: var(--muted); font-size: var(--fs-sm); cursor: pointer; }
.field-more[open] summary { margin-bottom: .6rem; }

.form-error { color: #ff8a83; font-size: var(--fs-sm); }
.form-error:empty { display: none; }

.mapping-rows { display: flex; flex-direction: column; gap: 1rem; }
.mapping-rows .file { font-weight: 600; font-size: var(--fs-sm); word-break: break-all; }

/* --- notifications ------------------------------------------------------- */

.toasts {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    transform: translateX(-50%);
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1.1rem;
    border-radius: var(--r-ctrl);
    background: #2b2b2b;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
    font-size: var(--fs-sm);
    font-weight: 500;
    animation: rise .18s ease-out;
}
.toast svg { color: var(--accent); }
.toast.err svg { color: var(--danger); }

/* --- connexion ----------------------------------------------------------- */

.login {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px 16px;
    background:
        radial-gradient(60vmax 45vmax at 15% 0%, rgba(170, 92, 195, .22), transparent 60%),
        radial-gradient(60vmax 45vmax at 90% 100%, rgba(0, 164, 220, .2), transparent 60%),
        var(--bg);
}
.login-card { width: min(380px, 100%); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-bottom: 2rem; }
.login-brand h1 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
.login-card .field input { height: 48px; background: var(--surface); font-size: var(--fs-md); }
.login-card .btn { width: 100%; min-height: 48px; margin-top: 1.25rem; font-size: var(--fs-md); }
.login-card .form-error { margin-top: .75rem; text-align: center; }

/* --- petits ecrans ------------------------------------------------------- */

@media (max-width: 720px) {
    :root { --header-h: 56px; }
    .app-header { flex-wrap: wrap; height: auto; gap: 0; padding-top: .35rem; }
    .brand { height: 48px; }
    .header-tools { height: 48px; }
    .tabs { order: 3; width: 100%; height: 44px; margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - .9rem); }
    main { padding-top: 1.25rem; }
    .search { margin-bottom: 1.75rem; }
    .search kbd { display: none; }
    .now { grid-template-columns: 1fr; margin-top: -1.25rem; padding-top: 2rem; min-height: 0; }
    .now-poster { width: 96px; }
    .series-missing { grid-template-columns: 72px 1fr; gap: 1rem; }
    .episode { grid-template-columns: 2rem 1fr auto; }
    .episode .ep-date { display: none; }
    .job { grid-template-columns: 40px 1fr auto; gap: .75rem; }
    .job-thumb { width: 40px; }
    .job-actions .btn { width: 40px; padding: 0; border-radius: 50%; }
    .job-actions .btn .lbl { display: none; }
    dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
    .sheet { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .bar.live > span::after { display: none; }
}

.empty code { padding: .05em .35em; border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: .9em; }
