video::cue { font-size:var(--subtitle-size,1em); }
/* Let settings grow naturally instead of clipping controls inside a fixed strip. */
#sk-controls-tools .media-settings,.offline-viewer .media-settings {
  display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:flex-start;
  gap:14px 12px; padding:16px 20px; max-height:none; min-height:0; overflow:visible;
  background:var(--surface,#16161e); border-top:1px solid var(--border,#2d2e38);
}
#sk-controls-tools .media-settings .sk-ctl-tool,.offline-viewer .media-settings .sk-ctl-tool {
  display:flex; flex-direction:column; align-items:stretch; gap:7px; margin:0; min-width:0; max-width:none;
  flex:1 1 138px;
}
#sk-controls-tools .media-settings .sk-quality { flex:1.4 1 182px; }
#sk-controls-tools .media-settings .sk-subtitles { flex:1.2 1 155px; }
#sk-controls-tools .media-settings .sk-speed { flex:.6 1 84px; order:4; }
#sk-controls-tools .media-settings .sk-subtitle-size { order:3; }
#sk-controls-tools .media-settings .sk-ctl-label,.offline-viewer .media-settings .sk-ctl-label {
  display:block; margin:0; font-size:11px; line-height:1.3; font-weight:600; letter-spacing:.02em;
  text-transform:none; white-space:normal; color:var(--muted,#a7a4b0);
}
#sk-controls-tools .media-settings .sk-ctl select,.offline-viewer .media-settings .sk-ctl select,
.download-quality select,.offline-viewer > label select {
  width:100%; min-width:0; max-width:none; height:42px; min-height:42px; box-sizing:border-box;
  padding:0 30px 0 12px; border:1px solid var(--border,#34333e); border-radius:9px;
  color:var(--text,#f4f3f7); background-color:var(--surface2,#22222c);
  line-height:1.4; font-family:inherit; font-size:13px; font-weight:500;
  appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa7b1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;
  cursor:pointer; transition:border-color .18s,background-color .18s;
}
#sk-controls-tools .media-settings select:hover,.offline-viewer .media-settings select:hover,.download-quality select:hover { border-color:#66616f; }
#sk-controls-tools .media-settings select:focus-visible,.offline-viewer .media-settings select:focus-visible,.download-quality select:focus-visible { outline:2px solid var(--accent,#dc3b69); outline-offset:2px; box-shadow:none; }
.subtitle-file-tool { display:flex; flex-direction:column; gap:7px; flex:0 0 138px; min-width:0; order:5; }
.subtitle-upload {
  position:relative; display:flex; gap:8px; align-items:center; justify-content:center;
  height:42px; box-sizing:border-box; padding:0 12px; border:1px dashed #55515f; border-radius:9px;
  color:var(--text,#f4f3f7); background:transparent; font-size:12px; font-weight:600; white-space:nowrap; cursor:pointer;
}
.subtitle-upload:hover { background:#ffffff06; border-color:var(--accent,#dc3b69); }
.subtitle-upload svg { width:16px; height:16px; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.subtitle-upload input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.subtitle-upload:focus-within { outline:2px solid var(--accent,#dc3b69); outline-offset:3px; }
.subtitle-status { width:100%; order:10; font-size:12px; color:var(--muted,#aaa7b1); line-height:1.5; }
.subtitle-status:empty { display:none; }
#player-root .player-foot { padding:11px 20px 15px; background:transparent; }
#player-root .player-foot .player-status { font-size:12px; color:var(--muted,#97939f); }
.download-panel { margin:0 16px 16px; border:1px solid var(--border,#32313c); border-radius:14px; background:var(--surface,#17171f); overflow:hidden; }
.download-panel > summary { display:flex; align-items:center; gap:13px; list-style:none; padding:18px 20px; cursor:pointer; border-radius:13px; transition:background .18s; }
.download-panel > summary::-webkit-details-marker { display:none; }
.download-panel > summary::marker { content:''; }
.download-panel > summary:hover { background:#ffffff03; }
.download-panel > summary:focus:not(:focus-visible) { outline:none; }
.download-panel > summary:focus-visible { outline:2px solid var(--accent,#dc3b69); outline-offset:-4px; }
.download-panel svg { width:18px; height:18px; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.download-emblem { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:12px; color:var(--accent,#dc3b69); background:var(--accent-dim,#dc3b6918); }
.download-emblem svg { width:21px; height:21px; }
.download-summary-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }
.download-title { font-size:15px; font-weight:700; line-height:1.4; color:var(--text,#f4f3f7); }
.download-subtitle { color:var(--muted,#aaa7b1); font-size:12px; line-height:1.4; }
.download-panel .download-chevron { margin-left:auto; width:16px; height:16px; color:var(--muted,#aaa7b1); transition:transform .18s; }
.download-panel[open] .download-chevron { transform:rotate(180deg); }
.download-content { padding:0 20px 18px; }
.download-toolbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px 16px; padding-top:18px; border-top:1px solid var(--border,#32313c); }
.download-quality { display:flex; flex-direction:column; gap:7px; flex:0 1 190px; min-width:150px; }
.download-quality > span { color:var(--muted,#aaa7b1); font-size:11px; font-weight:600; }
.download-primary-actions { display:flex; flex-wrap:wrap; gap:10px; }
.download-panel .download-primary-actions .btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:42px; padding:10px 17px; border-radius:9px; font-size:13px; line-height:20px; font-weight:650; white-space:nowrap; }
.download-panel .download-primary-actions .primary { box-shadow:0 3px 14px #0002; }
.download-panel .download-hint { margin:11px 0 0; font-size:12px; line-height:1.6; color:var(--muted,#aaa7b1); }
.download-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--border,#32313c); margin-top:18px; padding-top:15px; }
.download-library-link { display:inline-flex; gap:8px; align-items:center; font-size:12px; font-weight:650; color:var(--text,#f4f3f7); text-decoration:none; }
.download-library-link > span { color:var(--muted,#aaa7b1); margin-left:5px; }
.download-library-link:hover { color:var(--accent,#dc3b69); }
.download-resume { background:transparent; border:0; padding:4px 0; color:var(--muted,#aaa7b1); font-weight:600; line-height:1.5; font-size:12px; font-family:inherit; cursor:pointer; }
.download-resume:hover { color:var(--text,#f4f3f7); }
.download-resume[hidden] { display:none; }
.download-panel .download-note { margin:12px 0 0; font-size:11px; line-height:1.7; color:var(--muted,#96929e); }
.download-feedback:empty { display:none; }
.download-feedback { margin:14px 0; padding:10px 12px; border-radius:8px; background:#ffffff05; font-size:12px; line-height:1.5; }
.download-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin:12px 0 0; }
.download-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; padding:15px; margin-top:12px; border:1px solid var(--border,#32313c); border-radius:11px; background:#ffffff02; }
.download-row-info { flex:1 1 200px; min-width:0; }
.download-row h3 { margin:0; font-size:14px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
.download-row .download-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0 0; font-size:11px; color:var(--muted,#aaa7b1); }
.download-state { display:inline-flex; gap:5px; align-items:center; font-size:11px; }
.download-state::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; }
.download-state[data-state="ready"] { color:#81cba6; }
.download-state[data-state="downloading"] { color:var(--accent,#dc3b69); }
.download-state[data-state="error"] { color:#f29393; }
.download-row .download-error { font-size:12px; color:#f29393; margin:8px 0 0; }
.download-row .download-actions { margin:0; gap:8px; }
.download-row .download-actions .btn { min-height:36px; padding:8px 12px; font-size:12px; line-height:18px; border-radius:8px; }
.download-row progress { display:block; width:100%; height:4px; margin-top:12px; border:0; border-radius:4px; overflow:hidden; background:#ffffff0d; accent-color:var(--accent,#dc3b69); }
.download-row progress::-webkit-progress-bar { background:#ffffff0d; }
.download-row progress::-webkit-progress-value { background:var(--accent,#dc3b69); border-radius:4px; }
.download-row progress::-moz-progress-bar { background:var(--accent,#dc3b69); border-radius:4px; }
.download-empty { padding:22px 0; font-size:14px; color:var(--muted,#aaa7b1); }
.download-note { color:var(--muted,#aaa7b1); font-size:13px; line-height:1.7; }
.offline-viewer { padding:22px; }
.offline-viewer[hidden] { display:none !important; }
.offline-viewer video { width:100%; max-height:72vh; background:#000; margin:18px 0; }
.offline-viewer .media-settings { padding:16px 0 0; background:transparent; }
@media(max-width:640px) {
  #sk-controls-tools .media-settings,.offline-viewer .media-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px 10px; padding:15px; }
  #sk-controls-tools .media-settings .sk-quality,#sk-controls-tools .media-settings .sk-audio { grid-column:1/-1; }
  #sk-controls-tools .media-settings .sk-subtitles { order:2; }
  #sk-controls-tools .media-settings .sk-ctl select,.offline-viewer .media-settings .sk-ctl select { height:44px; min-height:44px; font-size:16px; padding-left:10px; padding-right:26px; background-position:right 9px center; }
  .subtitle-upload { height:44px; }
  .subtitle-status { grid-column:1/-1; }
  #player-root .player-foot { padding:10px 15px 13px; }
  .download-panel { margin:0 10px 12px; border-radius:12px; }
  .download-panel > summary { gap:10px; padding:15px 13px; }
  .download-emblem { width:36px; height:36px; border-radius:10px; }
  .download-title { font-size:14px; }
  .download-subtitle { font-size:11px; }
  .download-content { padding:0 13px 15px; }
  .download-toolbar { gap:12px; padding-top:15px; }
  .download-quality { flex:1 1 100%; }
  .download-quality select { font-size:16px; min-height:44px; height:44px; }
  .download-primary-actions { width:100%; }
  .download-primary-actions .btn { flex:1; }
  .download-row { padding:12px; }
  .download-row .download-actions { width:100%; }
  .download-row .download-actions .btn { flex:1; white-space:nowrap; }
  .download-row .download-actions .btn.primary { flex:1.4; }
  .offline-viewer { padding:14px; }
  .offline-viewer .media-settings { padding:15px 0 0; }
}
@media(prefers-reduced-motion:reduce) { .download-panel > summary,.download-chevron,#sk-controls-tools .media-settings select { transition:none; } }

/* A single quiet action row; detailed controls appear only on request. */
.player-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); flex:0 0 auto; width:100%; background:var(--surface,#17171f); border-top:1px solid var(--border,#32313c); }
.player-actions #sk-controls-tools,.player-actions > .download-panel {
  display:block; position:static; width:auto; min-width:0; max-width:none; min-height:0; max-height:none;
  padding:0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible;
  opacity:1; pointer-events:auto;
}
.player-actions > details > summary { display:flex; align-items:center; justify-content:center; gap:8px; height:44px; box-sizing:border-box; padding:0 12px; margin:0; list-style:none; border-radius:0; color:var(--muted,#aaa7b1); font:600 12px/1.4 Manrope,system-ui,sans-serif; cursor:pointer; }
.player-actions > details > summary::-webkit-details-marker { display:none; }
.player-actions > details > summary::marker { content:''; }
.player-actions > details > summary:hover,.player-actions > details[open] > summary { color:var(--text,#fff); background:#ffffff04; }
.player-actions > details > summary:focus-visible { outline:2px solid var(--accent,#dc3b69); outline-offset:-3px; }
.player-actions > details > summary svg { width:16px; height:16px; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.player-actions > details > summary .panel-chevron { width:12px; height:12px; margin-left:4px; }
.player-actions > details[open] { grid-column:1/-1; }
.player-actions > details[open] > summary .panel-chevron { transform:rotate(180deg); }
.player-actions > .download-panel:not([open]) { border-left:1px solid var(--border,#32313c); }
.player-actions > details[open] ~ details { grid-column:1/-1; border-top:1px solid var(--border,#32313c); border-left:0; }
#sk-controls-tools:not([open]) > .media-settings,.player-actions > .download-panel:not([open]) > .download-content { display:none; }
.player-actions #sk-controls-tools .media-settings { padding:14px 16px; border-top:1px solid var(--border,#32313c); }
.player-actions .download-content { padding:0 16px 14px; }
.player-actions .download-toolbar { padding-top:14px; }
.player-actions .download-bottom { margin-top:12px; padding-top:12px; }
.player-actions .download-note { font-size:11px; }
#player-root .player-foot[hidden] { display:none; }
#player-root .player-foot .player-status.error { color:#f29393; }
.sk-player.has-open-panel:not(:fullscreen):not(.sk-pseudo-fullscreen) { max-height:none; }
.sk-player:fullscreen .player-actions,.sk-player.sk-pseudo-fullscreen .player-actions {
  position:absolute; top:10px; right:10px; z-index:13; width:min(520px,calc(100% - 20px)); display:block; border:1px solid #ffffff24; border-radius:10px; background:#101016ed; max-height:calc(100% - 104px); min-height:44px; overflow-y:auto; overscroll-behavior:contain;
}
.sk-player:fullscreen .player-actions > .download-panel,.sk-player.sk-pseudo-fullscreen .player-actions > .download-panel { display:none; }
.sk-player:fullscreen.is-idle:not(.has-open-panel) .player-actions,.sk-player.sk-pseudo-fullscreen.is-idle:not(.has-open-panel) .player-actions { opacity:0; pointer-events:none; }
.sk-player.has-open-panel .player-actions #sk-controls-tools { opacity:1; pointer-events:auto; }
@media(max-width:640px){.player-actions #sk-controls-tools .media-settings {padding:12px;gap:10px;}.player-actions .download-content{padding:0 12px 12px}.player-actions .download-row{padding:10px}}
.sk-player.has-open-panel .player-actions { grid-template-columns:minmax(0,1fr); }

.sk-player:fullscreen .player-settings > summary,.sk-player.sk-pseudo-fullscreen .player-settings > summary { position:sticky; top:0; z-index:1; background:#17171f; }
