/* Download chooser */
.dlc-modal { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.66); }
.dlc-card { width: min(480px, 100%); max-height: 92vh; overflow: auto; background: var(--surface, #0f0d09); color: var(--ink, #f5f0df); border: 1px solid var(--line, #3a2f12); border-radius: 16px; padding: 1rem 1.1rem 1.1rem; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); }
.dlc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dlc-head h3 { margin: 0; font-size: 1.1rem; }
.dlc-sub { font-size: 0.8rem; color: var(--muted, #b2a47c); margin-top: 0.15rem; word-break: break-word; }
.dlc-x { appearance: none; width: 34px; height: 34px; padding: 0; border-radius: 9px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; }
.dlc-x:hover { background: rgba(255, 255, 255, 0.07); }
.dlc-lead { margin: 0.5rem 0 0.7rem; font-size: 0.86rem; color: var(--muted, #b2a47c); line-height: 1.45; }
.dlc-list { display: grid; gap: 0.4rem; }
.dlc-row { border: 1px solid var(--line, #2a2517); border-radius: 12px; padding: 0.55rem 0.65rem; display: grid; gap: 0.5rem; }
.dlc-row:has(input:checked) { border-color: color-mix(in srgb, var(--accent, #b88916) 65%, #1a1309); background: color-mix(in srgb, var(--accent, #b88916) 8%, transparent); }
.dlc-main { display: grid; grid-template-columns: auto 34px minmax(0, 1fr); gap: 0.65rem; align-items: center; cursor: pointer; }
.dlc-main input { width: 18px; height: 18px; accent-color: #d4aa32; margin: 0; }
.dlc-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, #b88916) 16%, #0e0d09); color: var(--accent-2, #d4aa32); }
.dlc-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dlc-txt { display: grid; gap: 0.1rem; min-width: 0; }
.dlc-txt b { font-size: 0.9rem; }
.dlc-txt small { font-size: 0.76rem; color: var(--muted, #b2a47c); }
.dlc-opts { display: flex; gap: 0.5rem; flex-wrap: wrap; padding-left: calc(18px + 34px + 1.3rem); }
.dlc-opts select { background: #0b0a08; color: var(--ink, #f5f0df); border: 1px solid #2c2313; border-radius: 8px; padding: 0.3rem 0.5rem; font: inherit; font-size: 0.8rem; max-width: 100%; }
.dlc-opts select[hidden] { display: none; }
.dlc-note { margin-top: 0.7rem; font-size: 0.76rem; color: var(--muted, #b2a47c); }
.dlc-note[hidden] { display: none; }
.dlc-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; }
.dlc-btn { appearance: none; width: auto; border: 1px solid #2c2313; background: #15120b; color: inherit; border-radius: 9px; padding: 0.55rem 0.95rem; font: inherit; font-size: 0.86rem; cursor: pointer; }
.dlc-btn:hover { border-color: #4a3912; }
.dlc-btn.is-primary { background: #d4aa32; color: #130e03; border-color: #d4aa32; font-weight: 650; }
.dlc-btn:disabled { opacity: 0.5; cursor: default; }

/* Quality menu (player: choose which proxy / the original plays) */
.qm-menu { position: fixed; z-index: 1600; min-width: 220px; max-width: min(320px, calc(100vw - 16px)); padding: 0.3rem; border-radius: 12px; background: var(--surface, #0f0d09); color: var(--ink, #f5f0df); border: 1px solid var(--line, #3a2f12); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.qm-title { padding: 0.3rem 0.55rem 0.25rem; font-size: 0.64rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted, #b2a47c); }
.qm-item { appearance: none; -webkit-appearance: none; display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.42rem 0.55rem; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.qm-item:hover, .qm-item:focus-visible { background: color-mix(in srgb, var(--accent, #b88916) 14%, transparent); outline: none; }
.qm-item:disabled { opacity: 0.5; cursor: default; }
.qm-dot { flex: none; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--muted, #b2a47c) 70%, transparent); box-sizing: border-box; }
.qm-item[aria-checked="true"] .qm-dot { border-color: var(--accent-2, #d4aa32); box-shadow: inset 0 0 0 2.5px var(--surface, #0f0d09), inset 0 0 0 10px var(--accent-2, #d4aa32); }
.qm-item.is-action .qm-dot { border-style: dashed; }
.qm-txt { display: grid; gap: 0.05rem; min-width: 0; }
.qm-txt b { font-size: 0.82rem; font-weight: 400; line-height: 1.25; }
.qm-item[aria-checked="true"] .qm-txt b { font-weight: 500; }
.qm-txt small { font-size: 0.7rem; font-weight: 300; color: var(--muted, #b2a47c); }
