/* C411 owns its viewport; normal Média layout returns when the route closes. */
body.torrent-reader-open { overflow: hidden !important; }
body.torrent-reader-open #main-view > .sidebar,
body.torrent-reader-open #main-view > .content-area > .topbar,
body.torrent-reader-open .mobile-bottom-nav,
body.torrent-reader-open .site-footer { display: none !important; }
body.torrent-reader-open #main-view > .content-area { margin: 0; padding: 0; min-height: 0; }
body.torrent-reader-open #main-view > .content-area > .page-content { width: 100%; max-width: none; margin: 0; padding: 0; }
#torrents-page:not([hidden]) { position: fixed; inset: 0; z-index: 10; width: 100%; height: 100vh; height: 100dvh; min-height: 0; max-height: none; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; animation: none; transform: none; isolation: isolate; }
.torrent-tools { --torrent-line: var(--media-line); --torrent-bg: var(--media-bg); --torrent-panel: var(--media-panel); --torrent-muted: var(--media-muted); --torrent-accent: var(--media-accent); color-scheme: var(--media-color-scheme); display: grid; grid-template-rows: auto minmax(0,1fr); width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; background: var(--torrent-bg); color: var(--media-text); font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
.torrent-tools *, .torrent-confirm-dialog * { box-sizing: border-box; }
.torrent-tools [hidden], .torrent-confirm-dialog [hidden] { display: none !important; }
.torrent-tools h1, .torrent-tools h2, .torrent-tools h3, .torrent-tools p { margin: 0; }
.torrent-tools h1, .torrent-tools h2 { font-size: clamp(24px,2.4vw,34px); font-weight: 650; letter-spacing: -.8px; line-height: 1.2; }
.torrent-tools h3 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.torrent-tools .muted { color: var(--torrent-muted); font-size: 13px; line-height: 1.55; }
.torrent-tools .button, .torrent-confirm-dialog .button { min-height: 42px; padding: 10px 15px; border: 1px solid var(--media-line); border-radius: 10px; color: var(--media-text); background: var(--media-raised); font: inherit; font-size: 13px; font-weight: 550; line-height: 1.35; white-space: normal; box-shadow: none; cursor: pointer; touch-action: manipulation; }
.torrent-tools .button-primary, .torrent-confirm-dialog .button-primary { color: var(--media-on-primary); background: var(--media-primary); border-color: var(--media-accent); font-weight: 650; }
.torrent-tools .button:hover, .torrent-confirm-dialog .button:hover { background: var(--media-hover); }
.torrent-tools .button-primary:hover, .torrent-confirm-dialog .button-primary:hover { background: var(--media-primary-hover); border-color: var(--media-accent); }
.torrent-tools .button:disabled, .torrent-confirm-dialog .button:disabled { opacity: .45; cursor: default; }
.torrent-tools :is(button, input, select, a, summary):focus-visible, .torrent-confirm-dialog :focus-visible { outline: 3px solid var(--media-focus); outline-offset: 3px; }
.torrent-tools .torrent-eyebrow { color: var(--media-faint); font-size: 10px; font-weight: 650; letter-spacing: 1.7px; text-transform: uppercase; line-height: 1.4; }
.torrent-header { display: flex; align-items: center; gap: 18px; min-height: 78px; padding: 13px 30px; border-bottom: 1px solid var(--torrent-line); background: var(--media-panel); }
.torrent-header .torrent-back { width: 38px; min-height: 38px; padding: 7px; border: 0; background: transparent; color: var(--media-muted); font-size: 24px; }
.torrent-brand { display: flex; align-items: center; gap: 10px; }
.torrent-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--media-primary); color: var(--media-on-primary); border-radius: 11px; font-size: 23px; font-weight: 800; }
.torrent-brand-name { font-size: 22px; font-weight: 700; letter-spacing: -.8px; }
.torrent-tabs { display: flex; justify-content: center; gap: 6px; flex: 1; }
.torrent-tabs .button { border: 0; background: transparent; color: var(--media-muted); padding-inline: 20px; }
.torrent-tabs .button[aria-current="page"] { color: var(--media-accent); background: var(--media-accent-soft); }
.torrent-account-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--media-muted); font-size: 11px; }
.torrent-account-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--media-faint); }
.torrent-account-state[data-connected="true"]::before { background: var(--media-success); }
.torrent-workspace { display: flex; min-width: 0; min-height: 0; }
.torrent-sidebar { flex: 0 0 220px; display: flex; flex-direction: column; gap: 19px; min-height: 0; overflow: auto; padding: 30px 20px 22px; border-right: 1px solid var(--torrent-line); background: var(--media-panel); }
.torrent-sidebar > .torrent-eyebrow { padding-inline: 12px; }
.torrent-categories { display: grid; gap: 5px; }
.torrent-categories .button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 11px 12px; text-align: left; background: none; border: 1px solid transparent; color: var(--media-muted); }
.torrent-categories .button[aria-current="true"] { background: var(--media-accent-soft); color: var(--media-accent); }
.torrent-category-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; font-size: 18px; color: var(--media-faint); text-align: center; }
.torrent-categories .button[aria-current="true"] .torrent-category-icon { color: var(--media-accent); }
.torrent-sidebar-note { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--torrent-line); }
.torrent-sidebar-note strong { font-size: 12px; color: var(--media-text); font-weight: 550; }
.torrent-sidebar-note p { margin-top: 7px; color: var(--media-faint); font-size: 11px; line-height: 1.7; }
.torrent-content { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 32px clamp(20px,3vw,48px) 38px; overscroll-behavior: contain; scrollbar-color: var(--media-border-strong) transparent; scrollbar-width: thin; }
.torrent-content > section { width: 100%; max-width: 1240px; margin-inline: auto; min-width: 0; }
/* Transmission owns this download view. Keep its scrolling and controls inside
   one frame; the surrounding C411 navigation remains reachable. */
.torrent-tools[data-torrent-section="transfers"] .torrent-content { display: flex; flex-direction: column; overflow: hidden; }
.torrent-content > .torrent-transfers { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; max-width: none; }
.torrent-downloads-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px 22px; flex: none; }
.torrent-downloads-toolbar > p { max-width: 640px; }
.torrent-downloads-toolbar .torrent-import { flex: 0 1 440px; margin: 0; padding: 12px 15px; border-radius: 10px; max-height: min(34vh,250px); overflow: auto; }
.torrent-downloads-toolbar .torrent-import:not([open]) { flex-basis: auto; }
.torrent-transmission-view { position: relative; flex: 1; min-height: 0; border: 1px solid var(--media-line); border-radius: 12px; overflow: hidden; background: var(--media-panel); }
.torrent-transmission-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--media-panel); }
.torrent-transmission-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; overflow: auto; background: var(--media-panel); }
.torrent-transmission-recovery { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.torrent-transmission-recovery a { text-decoration: none; }
.torrent-transfers > [data-torrent-field="delivery-notice"] { flex: none; max-height: 100px; overflow: auto; }
@media (max-width:700px) {
 .torrent-downloads-toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
 .torrent-downloads-toolbar > p { font-size: 11px; line-height: 1.4; }
 .torrent-downloads-toolbar .torrent-import { flex: none; padding: 10px 12px; }
 .torrent-content > .torrent-transfers { gap: 9px; }
}
.torrent-catalogue-heading { margin-bottom: 25px; }
.torrent-catalogue-heading h1, .torrent-catalogue-heading h2 { margin: 7px 0 9px; overflow-wrap: anywhere; }
.torrent-search-form > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.torrent-input-row, .torrent-search-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.torrent-tools input, .torrent-tools select { min-width: 0; min-height: 46px; padding: 12px 14px; border: 1px solid var(--media-line); border-radius: 11px; background: var(--media-input); color: var(--media-text); font: inherit; font-size: 13px; }
.torrent-tools input { flex: 1; width: 100%; }
.torrent-tools input::placeholder { color: var(--media-faint); }
.torrent-tools select { max-width: 190px; }
.torrent-search-row select { display: none; }
.torrent-search-row .button { min-height: 46px; padding-inline: 23px; }
.torrent-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 9px; min-height: 30px; }
.torrent-results-heading .button { min-height: 30px; padding: 5px 0 5px 12px; border: none; background: transparent; font-size: 11px; color: var(--media-muted); }
.torrent-status { overflow-wrap: anywhere; }
.torrent-status:empty { display: none; }
.torrent-status[data-error="true"], .torrent-job-error { color: var(--media-error) !important; }
.torrent-results { display: grid; gap: 9px; }
.torrent-result { display: grid; grid-template-columns: minmax(0,1fr) 78px auto; align-items: center; gap: 18px; padding: 16px 18px 16px 12px; min-width: 0; border: 1px solid var(--media-line); border-radius: 13px; background: var(--media-surface); }
.torrent-result:hover { border-color: var(--media-border-strong); }
.torrent-result .torrent-result-details { display: flex; align-items: center; gap: 13px; text-align: left; min-width: 0; padding: 4px; border: 0; background: transparent; }
.torrent-result .torrent-result-details:hover { background: transparent; }
.torrent-result-mark { display: grid; place-items: center; width: 45px; height: 50px; flex: none; border: 1px solid var(--media-line); border-radius: 10px; color: var(--media-faint); background: var(--media-raised); font-size: 24px; }
.torrent-result-copy { display: grid; gap: 9px; min-width: 0; }
.torrent-result strong { color: var(--media-text); font-size: 13px; line-height: 1.45; font-weight: 550; overflow-wrap: anywhere; }
.torrent-result-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--media-muted); font-size: 11px; line-height: 1.4; }
.torrent-result-meta > span:first-child { color: var(--media-accent); }
.torrent-availability { display: grid; justify-items: end; gap: 3px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.torrent-availability strong { color: var(--media-success); font-size: 13px; }
.torrent-availability small { color: var(--media-faint); font-size: 10px; }
.torrent-availability .torrent-leechers { color: var(--media-muted); margin-top: 3px; }
.torrent-result > .button-primary { min-height: 38px; font-size: 11px; padding: 9px 13px; background: var(--media-accent-soft); color: var(--media-accent); border-color: var(--media-accent-border); }
.torrent-result > .button-primary:hover { background: var(--media-accent-soft); }
.torrent-tools [data-torrent-action="more"] { display: block; margin: 20px auto 0; min-width: 190px; }
.torrent-heading, .torrent-job-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.torrent-heading > div { min-width: 0; }
.torrent-heading p { margin: 6px 0 0; }
.torrent-empty-state { padding: 42px 26px; border: 1px solid var(--media-line); border-radius: 18px; background: var(--media-surface); }
.torrent-empty-state p { margin: 10px 0 20px; max-width: 520px; }
.torrent-jobs-list { display: grid; gap: 12px; margin-top: 16px; }
.torrent-jobs > .torrent-status { margin-top: 22px; padding: 20px; border: 1px dashed var(--media-line); border-radius: 12px; }
.torrent-job { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 16px; padding: 20px; border: 1px solid var(--media-line); border-radius: 14px; min-width: 0; background: var(--media-surface); }
.torrent-job-heading, .torrent-job progress, .torrent-job-error { grid-column: 1/-1; }
.torrent-job-heading strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; font-weight: 550; }
.torrent-job-state { flex: none; color: var(--media-muted); font-size: 11px; }
.torrent-job[data-status="completed"] .torrent-job-state { color: var(--media-success); }
.torrent-job progress { width: 100%; height: 5px; border: 0; border-radius: 5px; overflow: hidden; accent-color: var(--media-accent); appearance: none; background: var(--media-raised); }
.torrent-job small { grid-column: 1; overflow-wrap: anywhere; }
.torrent-job small:empty { display: none; }
.torrent-job .button { grid-column: 2; grid-row: 3/span 3; align-self: center; }
.torrent-job-error { margin: 0; font-size: 12px; line-height: 1.4; }
.torrent-job progress::-moz-progress-bar, .torrent-job progress::-webkit-progress-value { border-radius: 5px; background: var(--media-accent); }
.torrent-job progress::-webkit-progress-bar { border-radius: 5px; background: var(--media-raised); }
.torrent-import { margin-top: 28px; padding: 20px; border: 1px solid var(--media-line); border-radius: 14px; }
.torrent-import summary { cursor: pointer; color: var(--media-text); font-size: 13px; font-weight: 550; }
.torrent-tools label { display: block; margin: 17px 0 8px; color: var(--media-muted); font-size: 12px; font-weight: 550; }
.torrent-import .muted { margin-top: 12px; }
.torrent-tools input[type="file"] { padding: 9px; font-size: 12px; }
.torrent-tools input[type="file"]::file-selector-button { padding: 5px 7px; margin-inline-end: 9px; border: 1px solid var(--media-line); border-radius: 7px; background: var(--media-raised); color: inherit; cursor: pointer; }
.torrent-transfer-notice:not(:empty) { max-width: 1240px; margin: 0 auto 20px; padding: 13px 16px; border: 1px solid var(--media-line); border-radius: 11px; background: var(--media-surface); }
.torrent-account { max-width: 780px !important; padding-top: 12px; }
.torrent-account .torrent-heading { margin-bottom: 27px; }
.torrent-account h2 { margin: 8px 0 12px; }
.torrent-integration-link { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--media-accent); text-underline-offset: 4px; }
.torrent-inline-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.torrent-explainer { margin-top: 35px; padding: 24px; border-radius: 15px; background: var(--media-surface); border: 1px solid var(--media-line); }
.torrent-explainer p { margin-top: 12px; color: var(--media-muted); line-height: 1.65; font-size: 13px; }
.torrent-confirm-dialog { color-scheme: var(--media-color-scheme); position: fixed; inset: 0; width: min(500px,calc(100vw - 28px)); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); margin: auto; padding: 26px; overflow: auto; border: 1px solid var(--media-line); border-radius: 20px; background: var(--media-surface); color: var(--media-text); box-shadow: var(--media-shadow); font: 14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.torrent-confirm-dialog::backdrop { background: var(--media-backdrop); }
.torrent-confirm-dialog h3 { margin: 0 0 18px; font-size: 23px; font-weight: 650; letter-spacing: -.5px; line-height: 1.25; }
.torrent-confirm-name { font-weight: 550; overflow-wrap: anywhere; line-height: 1.5; }
.torrent-confirm-dialog .muted { color: var(--media-muted); font-size: 12px; line-height: 1.6; }
.torrent-confirm-destination { padding: 14px; border: 1px solid var(--media-line); border-radius: 11px; background: var(--media-raised); color: var(--media-accent); overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.torrent-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.torrent-detail-dialog { width: min(820px,calc(100vw - 28px)); height: min(880px,calc(100vh - 48px)); height: min(880px,calc(100dvh - 48px)); padding: 0; overflow: hidden; }
.torrent-detail-dialog[open] { display: flex; flex-direction: column; }
.torrent-detail-heading { flex: none; padding: 18px 24px; border-bottom: 1px solid var(--media-line); }
.torrent-detail-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 24px 22px; }
.torrent-detail-actions { flex: none; padding: 15px 24px; border-top: 1px solid var(--media-line); }
.torrent-detail-actions > .button { width: 100%; }
.torrent-detail-presentation { padding-block: 22px; }
.torrent-detail-presentation > h3 { margin: 0 0 15px; font-size: 18px; letter-spacing: 0; }
.torrent-detail-presentation > .button { margin-top: 8px; }
.torrent-detail-metadata { padding: 0 0 20px; margin-bottom: 20px; border-top: 0; gap: 14px 20px; }
.torrent-description-content { font-size: 14px; line-height: 1.7; color: var(--media-text); overflow-wrap: anywhere; }
.torrent-description-content p, .torrent-description-content blockquote { margin: 0 0 16px; }
.torrent-description-content h3, .torrent-description-content h4 { margin: 22px 0 12px; font-size: 17px; line-height: 1.4; letter-spacing: 0; }
.torrent-description-content img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
.torrent-description-content img[hidden] { display: none; }
.torrent-description-content [data-align="center"] { text-align: center; }
.torrent-description-content [data-align="left"] { text-align: left; }
.torrent-description-content [data-align="right"] { text-align: right; }
.torrent-description-content pre, .torrent-detail-nfo pre { margin: 12px 0; padding: 14px; overflow: auto; border-radius: 9px; background: var(--media-raised); font: 12px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.torrent-description-content blockquote { padding-left: 15px; border-left: 2px solid var(--media-border-strong); color: var(--media-muted); }
.torrent-description-content table { display: block; max-width: 100%; width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 16px; font-size: 13px; }
.torrent-description-content td, .torrent-description-content th { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--media-line); min-width: 80px; }
.torrent-description-content th { color: var(--media-muted); font-weight: 550; }
.torrent-detail-nfo { margin-top: 20px; }
.torrent-detail-nfo summary { cursor: pointer; color: var(--media-muted); padding-block: 10px; }
.torrent-detail-body > .torrent-integration-link { color: var(--media-accent); font-size: 12px; }
.torrent-detail-dialog .torrent-eyebrow { color: var(--media-muted); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; }
.torrent-detail-dialog .torrent-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.torrent-detail-title { margin: 22px 0; font-size: 23px; font-weight: 600; letter-spacing: -.4px; line-height: 1.4; overflow-wrap: anywhere; }
.torrent-detail-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 0; padding: 20px 0; border-block: 1px solid var(--media-line); }
.torrent-detail-facts dt { color: var(--media-muted); font-size: 11px; }
.torrent-detail-facts dd { margin: 7px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.torrent-detail-workflow { margin: 22px 0; }
.torrent-detail-workflow strong { font-size: 14px; font-weight: 550; }
.torrent-detail-workflow p { margin-bottom: 0; }
.torrent-detail-dialog > .button-primary { width: 100%; margin-top: 16px; }
.torrent-detail-dialog > .torrent-integration-link { margin: 0 0 5px; color: var(--media-accent); font-size: 12px; }
body.tv-mode .torrent-header { min-height: 84px; }
body.tv-mode .torrent-tools .button, body.tv-mode .torrent-tools input, body.tv-mode .torrent-tools select { min-height: 48px; font-size: 15px; }
body.tv-mode .torrent-result strong, body.tv-mode .torrent-job-heading strong { font-size: 16px; }
body.tv-mode .torrent-result-meta, body.tv-mode .torrent-tools .muted, body.tv-mode .torrent-job-state { font-size: 13px; }
body.tv-mode .torrent-sidebar { flex-basis: 244px; }
body.tv-mode .torrent-result { padding-block: 19px; }
body.tv-mode .torrent-confirm-dialog { width: min(620px,calc(100vw - 48px)); font-size: 17px; }
body.tv-mode .torrent-confirm-dialog .button { min-height: 48px; font-size: 16px; }
body.tv-mode .torrent-detail-dialog { width: min(880px,calc(100vw - 48px)); }
body.tv-mode .torrent-description-content { font-size: 17px; }
@media (max-width: 500px) {
 .torrent-detail-heading { padding: 13px 16px; }
 .torrent-detail-body { padding: 0 16px 18px; }
 .torrent-detail-actions { padding: 12px 16px max(12px,env(safe-area-inset-bottom)); }
 .torrent-detail-title { font-size: 19px; }
 .torrent-detail-facts { gap: 15px; }
 .torrent-description-content { font-size: 13px; }
}
@media (max-width: 1000px) {
 .torrent-header { padding-inline: 20px; gap: 13px; }
 .torrent-sidebar { flex-basis: 185px; padding-inline: 12px; }
 .torrent-categories .button { font-size: 12px; gap: 8px; }
 .torrent-content { padding-inline: 22px; }
 .torrent-result { gap: 12px; grid-template-columns: minmax(0,1fr) 60px auto; padding-right: 13px; }
 .torrent-result-mark { display: none; }
 .torrent-result strong { font-size: 12px; }
 .torrent-tabs .button { padding-inline: 14px; }
}
@media (max-width: 700px) {
 .torrent-header { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; padding: max(12px,env(safe-area-inset-top)) 16px 10px; }
 .torrent-header .torrent-back { width: 32px; min-height: 34px; padding: 3px; }
 .torrent-brand { gap: 8px; }
 .torrent-brand-mark { width: 28px; height: 28px; font-size: 20px; border-radius: 9px; }
 .torrent-brand-name { font-size: 20px; }
 .torrent-account-state { font-size: 10px; }
 .torrent-tabs { grid-column: 1/-1; justify-content: stretch; gap: 4px; padding-top: 5px; }
 .torrent-tabs .button { flex: 1; min-height: 40px; padding: 8px; font-size: 12px; }
 .torrent-workspace { flex-direction: column; }
 .torrent-sidebar { flex: none; min-height: 0; padding: 11px 15px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--torrent-line); }
 .torrent-sidebar > .torrent-eyebrow, .torrent-sidebar-note { display: none; }
 .torrent-categories { display: flex; gap: 7px; }
 .torrent-categories .button { flex: none; width: auto; min-height: 34px; padding: 7px 12px; white-space: nowrap; font-size: 11px; border: 1px solid var(--media-line); border-radius: 20px; }
 .torrent-category-icon { display: none; }
 .torrent-content { padding: 23px 16px calc(24px + env(safe-area-inset-bottom)); }
 .torrent-catalogue-heading { margin-bottom: 20px; }
 .torrent-tools h1, .torrent-tools h2 { font-size: 25px; }
 .torrent-tools .muted { font-size: 12px; }
 .torrent-search-row { gap: 8px; }
 .torrent-search-row input { min-height: 44px; font-size: 16px; padding-inline: 11px; }
 .torrent-search-row .button { min-height: 44px; padding-inline: 12px; font-size: 11px; }
 .torrent-result { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 13px; }
 .torrent-result .torrent-result-details { grid-column: 1/-1; padding: 0; }
 .torrent-result strong { font-size: 13px; }
 .torrent-result-copy { gap: 8px; }
 .torrent-result-meta { gap: 5px 11px; font-size: 10px; }
 .torrent-availability { display: flex; align-items: center; gap: 5px; justify-self: start; }
 .torrent-availability .torrent-leechers { margin: 0 0 0 8px; }
 .torrent-result > .button-primary { justify-self: end; min-height: 35px; }
 .torrent-results-heading .button { font-size: 10px; }
 .torrent-input-row { flex-wrap: wrap; }
 .torrent-input-row input { flex-basis: 100%; }
 .torrent-input-row .button { width: 100%; }
 .torrent-job-heading { align-items: flex-start; flex-wrap: wrap; gap: 7px; }
 .torrent-job { grid-template-columns: minmax(0,1fr); padding: 17px; }
 .torrent-job .button { grid-column: 1; grid-row: auto; justify-self: start; }
 .torrent-empty-state { padding: 28px 20px; }
 .torrent-explainer { padding: 19px; }
 .torrent-confirm-dialog { padding: 21px; }
 .torrent-detail-title { font-size: 20px; }
 .torrent-detail-facts { gap: 17px; }
}

/* Browsing C411 must keep ongoing music controls reachable. Leave scroll room
   even on older TV engines without :has(), then tighten it when supported. */
body.torrent-reader-open .torrent-content { padding-bottom: 132px; }
body.torrent-reader-open .mini-player, body.torrent-reader-open .youtube-mini-player { bottom: max(12px,env(safe-area-inset-bottom)); }
@supports selector(body:has(#mini-player)) {
 body.torrent-reader-open:not(:has(#mini-player:not([hidden]))):not(:has(#youtube-mini-player:not([hidden]))) .torrent-content { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
}
.torrent-settings-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 24px; padding: 24px; border: 1px solid var(--media-line); border-radius: 18px; background: var(--media-accent-soft); }
.torrent-settings-entry > div:first-child { flex: 1; min-width: min(240px,100%); }
.torrent-settings-entry h3 { margin: 0 0 8px; font-size: 18px; }
.torrent-settings-entry p { margin: 0; max-width: 460px; color: var(--media-muted); font-size: 13px; line-height: 1.6; }
.torrent-settings-shortcuts { display: flex; flex-wrap: wrap; gap: 10px; flex-basis: 100%; padding-top: 18px; border-top: 1px solid var(--media-line); }
@media (max-width:700px) { .torrent-settings-entry { padding: 18px; gap: 18px; }.torrent-settings-entry > .button { width: 100%; }.torrent-settings-shortcuts .button { flex: 1; } }
/* Reset the host application's generic button children typography/alignment. */
.torrent-tools .button span, .torrent-confirm-dialog .button span { font-size: inherit; }
.torrent-tools .button:hover, .torrent-tools .button:active, .torrent-confirm-dialog .button:hover, .torrent-confirm-dialog .button:active { transform: none; }
.torrent-tools .torrent-result-details, .torrent-tools .torrent-categories .button { justify-content: flex-start; }
.torrent-tools .torrent-result-copy { flex: 1; }
.torrent-tools .button .torrent-result-meta { font-size: 11px; }
.torrent-tools .button .torrent-result-meta > span { font-size: inherit; }
.torrent-tools .button .torrent-category-icon { font-size: 18px; }
.torrent-tools .button .torrent-result-mark { font-size: 24px; }
@media (max-width:700px) { .torrent-tools .button .torrent-result-meta { font-size: 10px; } }
body.tv-mode .torrent-tools .button .torrent-result-meta { font-size: 13px; }
/* Publication periods request their corresponding C411 catalogue. */
.torrent-period-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.torrent-period-tabs .button { min-height: 34px; padding: 7px 12px; border-color: transparent; background: transparent; font-size: 12px; color: var(--media-muted); }
.torrent-period-tabs .button[aria-pressed="true"] { color: var(--media-accent); background: var(--media-accent-soft); border-color: var(--media-accent-border); }
.torrent-tools .torrent-period-help { margin-top: 9px; color: var(--media-faint); font-size: 10px; }
.torrent-catalogue-empty { margin: 18px 0 !important; padding: 20px; border: 1px dashed var(--media-border-strong); border-radius: 12px; }
.torrent-live-transfers { flex: 0 0 270px; display: flex; flex-direction: column; align-items: stretch; gap: 15px; min-width: 0; overflow: auto; padding: 30px 20px 132px; border-left: 1px solid var(--media-line); background: var(--media-panel); }
.torrent-live-transfers .torrent-heading h3 { font-size: 17px; }
.torrent-live-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 3px 7px; background: var(--media-raised); border-radius: 8px; color: var(--media-text); font-size: 11px; }
.torrent-tools .torrent-live-status { font-size: 11px; }
.torrent-live-list { display: grid; gap: 10px; }
.torrent-tools .torrent-live-item { display: grid; justify-content: stretch; text-align: left; gap: 9px; width: 100%; padding: 13px; background: var(--media-raised); border: 1px solid var(--media-line); }
.torrent-live-item strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--media-text); font-size: 12px; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.torrent-tools .button .torrent-live-item-state { color: var(--media-muted); font-size: 10px; }
.torrent-live-item progress { width: 100%; height: 4px; border: 0; border-radius: 4px; overflow: hidden; accent-color: var(--media-accent); appearance: none; background: var(--media-raised); }
.torrent-live-item progress::-moz-progress-bar { border-radius: 4px; background: var(--media-accent); }
.torrent-live-item progress::-webkit-progress-value { border-radius: 4px; background: var(--media-accent); }
.torrent-live-item progress::-webkit-progress-bar { border-radius: 4px; background: var(--media-raised); }
.torrent-live-item .muted { font-size: 10px; }
.torrent-live-item small:empty { display: none; }
.torrent-live-transfers > .button { min-height: 38px; font-size: 11px; }
.torrent-tools .torrent-live-help { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--media-line); color: var(--media-faint); font-size: 10px; line-height: 1.7; }
@media (max-width:1250px) { .torrent-live-transfers { display: none; } }
@media (min-width:1251px) and (max-width:1450px) { .torrent-sidebar { flex-basis: 185px; padding-inline: 12px; }.torrent-live-transfers { flex-basis: 235px; padding-inline: 16px; }.torrent-result { grid-template-columns: minmax(0,1fr) 55px auto; gap: 10px; }.torrent-result-mark { display: none; }.torrent-content { padding-inline: 24px; } }
@media (max-width:700px) {
 .torrent-account-state { grid-column: 3; grid-row: 1; }
 .torrent-tabs { grid-row: 2; }
 .torrent-period-tabs { flex-wrap: nowrap; gap: 3px; }
 .torrent-period-tabs .button { flex: 1; padding-inline: 6px; font-size: 10px; }
 .torrent-tools .torrent-period-help { line-height: 1.5; }
}
/* Catalogue artwork comes from an exact provider identifier; missing art stays neutral. */
.torrent-tools .torrent-result-mark { display: grid; position: relative; width: 58px; height: 78px; overflow: hidden; flex: none; border: 1px solid var(--media-line); }
.torrent-artwork-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: var(--media-raised); color: var(--media-faint); }
.torrent-result-mark img, .torrent-detail-artwork img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.torrent-detail-identity { display: flex; align-items: center; gap: 20px; margin: 22px 0; }
.torrent-detail-artwork { position: relative; display: grid; width: 88px; height: 120px; border-radius: 12px; overflow: hidden; flex: none; border: 1px solid var(--media-line); font-size: 32px; }
.torrent-detail-identity .torrent-detail-title { margin: 0; }
.torrent-result-tools { display: flex; align-items: center; gap: 10px; }
.torrent-result-tools select { min-height: 34px; max-width: 165px; padding: 7px 10px; font-size: 11px; }
.torrent-filters { border: 1px solid var(--media-line); border-radius: 12px; padding: 11px 14px; margin-top: 15px; }
.torrent-filters summary { color: var(--media-muted); font-size: 12px; cursor: pointer; }
.torrent-filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; padding-bottom: 14px; }
.torrent-filter-grid select { width: 100%; max-width: none; min-height: 40px; font-size: 12px; }
.torrent-tools .torrent-quota-note { margin: 10px 0 14px; max-width: 700px; color: var(--media-faint); font-size: 10px; line-height: 1.5; }
.torrent-tools .torrent-pagination { margin: 17px 0 0; color: var(--media-faint); font-size: 10px; text-align: center; }
.torrent-jobs-updated { display: block; margin: 10px 0 0; }
.torrent-selection-summary { display: block; margin-top: 8px; font-weight: 400; color: var(--media-muted); font-size: 12px; }
.torrent-preparation-dialog { width: min(720px,calc(100vw - 28px)); }
.torrent-preparation-dialog > label { display: block; margin: 18px 0 8px; font-size: 12px; color: var(--media-muted); }
.torrent-preparation-dialog > input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--media-border-strong); border-radius: 10px; background: var(--media-input); color: var(--media-text); font: inherit; }
.torrent-preparation-dialog [hidden], .torrent-confirm-dialog .torrent-output-preview[hidden] { display: none !important; }
.torrent-preparation-dialog > .torrent-folder-option { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0; padding: 14px; border: 1px solid var(--media-line); border-radius: 11px; background: var(--media-raised); cursor: pointer; }
.torrent-folder-option input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--media-accent); }
.torrent-folder-option > span { min-width: 0; }
.torrent-folder-option strong { display: block; color: var(--media-text); font-size: 14px; line-height: 1.5; font-weight: 550; }
.torrent-folder-option small { display: block; margin-top: 4px; color: var(--media-muted); font-size: 12px; line-height: 1.5; }
.torrent-folder-option:focus-within { outline: 2px solid var(--media-accent); outline-offset: 3px; }
.torrent-output-preview { display: grid; gap: 6px; margin-top: 14px; padding: 12px 14px; border-left: 2px solid var(--media-accent); background: var(--media-raised); border-radius: 0 9px 9px 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.torrent-output-preview > span { color: var(--media-text); }
body.tv-mode .torrent-folder-option input { width: 24px; height: 24px; }
body.tv-mode .torrent-folder-option strong, body.tv-mode .torrent-output-preview { font-size: 16px; }
body.tv-mode .torrent-folder-option small { font-size: 13px; }
.torrent-file-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.torrent-file-choices .button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.torrent-file-list { max-height: min(38vh,340px); overflow: auto; margin: 15px 0; border: 1px solid var(--media-line); border-radius: 11px; }
.torrent-file-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border-bottom: 1px solid var(--media-line); cursor: pointer; }
.torrent-file-row:last-child { border: 0; }
.torrent-file-row input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--media-accent); }
.torrent-file-row .torrent-file-path { min-width: 0; flex: 1; color: var(--media-text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.torrent-file-row small { flex: none; font-size: 10px; }
.torrent-preparation-dialog > .torrent-status { margin: 12px 0; }
.torrent-preparation-dialog [data-torrent-action="files-more"] { margin: 0 auto; min-height: 36px; font-size: 12px; }
@media (max-width:1000px) { .torrent-tools .torrent-result-mark { display: grid; width: 48px; height: 65px; } }
@media (min-width:1251px) and (max-width:1450px) { .torrent-tools .torrent-result-mark { display: grid; width: 48px; height: 65px; } }
@media (max-width:700px) {
 .torrent-tools .torrent-result-mark { width: 49px; height: 66px; border-radius: 8px; }
 .torrent-result-tools { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
 .torrent-result-tools select { max-width: 145px; font-size: 10px; }
 .torrent-results-heading { align-items: flex-start; }
 .torrent-results-heading .torrent-status { padding-top: 8px; }
 .torrent-result-tools .button { padding: 0; }
 .torrent-filter-grid { gap: 0 10px; }
 .torrent-filter-grid label { font-size: 10px; }
 .torrent-detail-identity { align-items: flex-start; gap: 13px; }
 .torrent-detail-artwork { width: 66px; height: 90px; }
 .torrent-detail-identity .torrent-detail-title { font-size: 18px; }
 .torrent-preparation-dialog { padding: 19px; }
 .torrent-preparation-dialog > input { font-size: 16px; }
 .torrent-file-row { gap: 8px; padding: 11px 9px; flex-wrap: wrap; }
 .torrent-file-row .torrent-file-path { flex-basis: calc(100% - 30px); }
 .torrent-file-row small { padding-left: 26px; }
 .torrent-preparation-dialog .torrent-confirm-actions .button { flex: 1; }
}
body.tv-mode .torrent-file-row .torrent-file-path { font-size: 15px; }
body.tv-mode .torrent-file-row input { width: 24px; height: 24px; }

.torrent-priority-note { margin: 12px 0 !important; padding: 10px 12px; border: 1px solid var(--media-warning); border-radius: 9px; color: var(--media-warning); background: var(--media-warning-soft); font-size: 11px; line-height: 1.5; }

/* Changing the view only changes layout: loaded artwork and focus are retained. */
.torrent-result-tools { flex-wrap: wrap; justify-content: flex-end; }
.torrent-layout-picker { display: inline-flex; flex: none; gap: 3px; padding: 3px; border: 1px solid var(--media-line); border-radius: 10px; background: var(--media-raised); }
.torrent-tools .torrent-layout-picker .button { min-height: 30px; padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--media-muted); font-size: 11px; }
.torrent-tools .torrent-layout-picker .button[aria-pressed="true"] { background: var(--media-accent-soft); color: var(--media-accent); }
.torrent-quality-label { color: var(--media-text); }
.torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 18px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result { grid-template-columns: minmax(0,1fr) auto; grid-template-rows: minmax(0,1fr) auto; align-items: end; gap: 12px 6px; padding: 10px; border-radius: 15px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-details { display: flex; flex-direction: column; align-items: stretch; align-self: stretch; grid-column: 1/-1; width: 100%; gap: 13px; padding: 0; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-mark { width: 100%; height: auto; aspect-ratio: 2/3; border: 0; border-radius: 9px; font-size: 44px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-artwork-fallback { background: var(--media-artwork); color: var(--media-faint); }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-copy { display: flex; flex-direction: column; flex: 1; gap: 10px; width: 100%; padding: 0 2px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 1.45; min-height: 3.9em; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-meta { margin-top: auto; gap: 5px 8px; font-size: 10px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-meta > span:nth-child(3) { display: none; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-meta .torrent-quality-label { display: inline; }
.torrent-tools[data-torrent-layout="covers"] .torrent-availability { display: flex; flex-wrap: wrap; align-items: baseline; justify-self: start; justify-content: flex-start; gap: 3px 5px; padding-left: 2px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-availability strong { font-size: 11px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-availability small { font-size: 9px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-leechers { display: none; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result > .button-primary { justify-self: stretch; padding: 8px 10px; min-height: 35px; font-size: 11px; }
@media (min-width:1750px) { .torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (min-width:1251px) and (max-width:1499px), (min-width:701px) and (max-width:999px) { .torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) {
 .torrent-content { padding-top: 16px; }
 .torrent-catalogue-heading { margin-bottom: 14px; }
 .torrent-catalogue-heading > .torrent-eyebrow, .torrent-catalogue-heading > .muted { display: none; }
 .torrent-catalogue-heading h1, .torrent-catalogue-heading h2 { margin: 0; font-size: 22px; }
 .torrent-period-tabs { margin-top: 12px; }
 .torrent-filters { margin-top: 10px; }
 .torrent-results-heading { flex-wrap: wrap; gap: 6px; }
 .torrent-results-heading .torrent-status { flex: 1 1 100%; padding-top: 0; font-size: 10px; }
 .torrent-result-tools { width: 100%; justify-content: space-between; gap: 7px; }
 .torrent-result-tools select { max-width: 145px; }
 .torrent-result-tools > [data-torrent-action="latest"] { display: none; }
 .torrent-tools .torrent-layout-picker .button { min-height: 32px; padding-inline: 8px; font-size: 10px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result { gap: 10px 4px; padding: 7px; border-radius: 12px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result-details { gap: 10px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result-copy { gap: 7px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { font-size: 11px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result-meta { font-size: 9px; gap: 4px 7px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-availability { grid-column: 1/-1; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result > .button-primary { grid-column: 1/-1; width: 100%; min-height: 35px; }
}
@media (max-width:379px) { .torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: minmax(0,1fr); }.torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { font-size: 13px; } }
body.tv-mode .torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { font-size: 16px; }
body.tv-mode .torrent-tools[data-torrent-layout="covers"] .torrent-result > .button-primary, body.tv-mode .torrent-tools .torrent-layout-picker .button { min-height: 42px; font-size: 13px; }

/* A catalogue remains browsable at laptop widths, independent of the outer viewport. */
.torrent-header { min-height: 64px; padding-block: 9px; }
.torrent-content { padding-top: 20px; }
.torrent-catalogue-heading { margin-bottom: 14px; }
.torrent-catalogue-heading > .torrent-eyebrow { display: none; }
.torrent-tools .torrent-catalogue-heading h1, .torrent-tools .torrent-catalogue-heading h2 { margin: 0 0 5px; font-size: 28px; line-height: 1.15; }
.torrent-tools .torrent-catalogue-heading > .muted { font-size: 11px; }
.torrent-search { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 10px; row-gap: 9px; }
.torrent-search > * { grid-column: 1/-1; min-width: 0; }
.torrent-search .torrent-search-row input, .torrent-search .torrent-search-row .button { min-height: 44px; padding-block: 9px; }
.torrent-search .torrent-period-tabs { grid-column: 1; align-self: center; margin: 0; gap: 3px; }
.torrent-tools .torrent-period-tabs .button { min-height: 32px; padding: 6px 9px; font-size: 11px; }
.torrent-search .torrent-filters { grid-column: 2; align-self: start; margin: 0; padding: 8px 11px; }
.torrent-search .torrent-filters[open] { grid-column: 1/-1; }
.torrent-search .torrent-filters summary { font-size: 11px; }
.torrent-tools .torrent-search .torrent-period-help { margin: 0; font-size: 9px; line-height: 1.4; }
.torrent-search .torrent-results-heading { margin: 0; min-height: 32px; gap: 8px; }
.torrent-tools .torrent-search .torrent-quota-note { margin: 0 0 3px; max-width: none; font-size: 9px; line-height: 1.4; }
.torrent-tools .torrent-search .torrent-status { font-size: 10px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: repeat(auto-fill,minmax(max(155px,calc((100% - 42px)/4)),1fr)); gap: 14px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-mark { height: clamp(200px,18vw,260px); max-height: 260px; aspect-ratio: auto; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-mark img { object-fit: contain; background: var(--media-raised); }
.torrent-tools[data-torrent-layout="covers"] .torrent-result { padding: 8px; gap: 9px 5px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-details { gap: 10px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-copy { gap: 7px; }
.torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { font-size: 12px; }
/* Host dark-theme button rules must not tint every navigation item as selected. */
.torrent-tools .torrent-tabs .button,
.torrent-tools .torrent-categories .button,
.torrent-tools .torrent-period-tabs .button { background: transparent !important; border-color: transparent !important; color: var(--media-muted) !important; }
.torrent-tools .torrent-tabs .button:hover,
.torrent-tools .torrent-categories .button:hover,
.torrent-tools .torrent-period-tabs .button:hover { background: var(--media-hover) !important; color: var(--media-text) !important; }
.torrent-tools .torrent-tabs .button[aria-current="page"],
.torrent-tools .torrent-period-tabs .button[aria-pressed="true"] { background: var(--media-accent-soft) !important; border-color: var(--media-accent-border) !important; color: var(--media-accent) !important; }
.torrent-tools .torrent-categories .button[aria-current="true"] { background: var(--media-accent-soft) !important; border-color: var(--media-accent-border) !important; color: var(--media-accent) !important; }
.torrent-tools .torrent-result-details { background: transparent !important; border-color: transparent !important; color: var(--media-text) !important; }
.torrent-tools .torrent-layout-picker .button { background: transparent !important; border-color: transparent !important; color: var(--media-muted) !important; }
.torrent-tools .torrent-layout-picker .button[aria-pressed="true"] { background: var(--media-accent-soft) !important; color: var(--media-accent) !important; }
@media (max-width:700px) {
 .torrent-header { padding-top: max(9px,env(safe-area-inset-top)); padding-bottom: 7px; }
 .torrent-content { padding-top: 14px; }
 .torrent-tools .torrent-catalogue-heading h1, .torrent-tools .torrent-catalogue-heading h2 { margin: 0; font-size: 22px; }
 .torrent-search { grid-template-columns: minmax(0,1fr); row-gap: 8px; }
 .torrent-search .torrent-period-tabs, .torrent-search .torrent-filters { grid-column: 1/-1; }
 .torrent-search .torrent-filters { padding-block: 8px; }
 .torrent-search .torrent-results-heading { gap: 5px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result-mark { height: clamp(190px,52vw,220px); max-height: 220px; }
 .torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { font-size: 11px; }
}
@media (max-width:379px) { .torrent-tools[data-torrent-layout="covers"] .torrent-results { grid-template-columns: minmax(0,1fr); }.torrent-tools[data-torrent-layout="covers"] .torrent-result-mark { height: 220px; } }
body.tv-mode .torrent-tools .torrent-catalogue-heading h1 { font-size: 30px; }
body.tv-mode .torrent-tools[data-torrent-layout="covers"] .torrent-result-copy > strong { font-size: 15px; }
body.tv-mode .torrent-tools .torrent-period-tabs .button { min-height: 42px; font-size: 13px; }

/* Native C411 taxonomy: the sidebar keeps the site's groups; subcategories
   remain directly accessible above the results, including on touch screens. */
.torrent-native-category-filters { display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.torrent-native-category-filters select { width:auto; max-width:100%; flex:1 1 180px; min-height:40px; }
.torrent-native-category-filters select[hidden] { display:none!important; }
.torrent-categories .button > span:last-child { white-space:normal; overflow-wrap:anywhere; }
@media(max-width:760px) {
 .torrent-native-category-filters { gap:8px; }
 .torrent-native-category-filters select { flex-basis:145px; min-height:44px; font-size:14px; }
 .torrent-categories .button > span:last-child { white-space:nowrap; }
}
.torrent-availability .torrent-completions { font-variant-numeric:tabular-nums; }
.torrent-tools[data-torrent-layout="covers"] .torrent-completions { flex-basis:100%; }
@media(max-width:760px) { .torrent-availability { flex-wrap:wrap; } }

/* Keep catalogue filters legible while the search stays an optional action. */
.torrent-native-category-filters { margin-bottom: 10px; }
.torrent-filter-help { margin: 10px 0; font-size: 11px; line-height: 1.5; color: var(--media-muted); }
.torrent-category-icon > svg { flex: 0 0 auto; width: 20px; height: 20px; vertical-align: middle; }

/* Safari's native select bezel ignores the visual height of these controls.
   Keep the native option picker and keyboard behaviour, with a sized field. */
.torrent-tools select {
 -webkit-appearance: none;
 appearance: none;
 box-sizing: border-box;
 height: 44px;
 min-height: 44px;
 padding: 9px 36px 9px 12px;
 line-height: 1.35;
 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%238a8a94' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-position: right 12px center;
 background-repeat: no-repeat;
 background-size: 16px 16px;
}
@media (forced-colors: active) {
 .torrent-tools select { -webkit-appearance: auto; appearance: auto; background-image: none; padding-inline-end: 12px; }
}
