/* Blue Grey Cinema menus and controls share the site's surface and type tokens. */
.artplayer-host { position:absolute;inset:0;width:100%;height:100%; }
.screen.artplayer-active,.screen.artplayer-active video { background:#08090a; }
.screen.artplayer-active .fullscreen-exit { display:none; }
.screen.artplayer-active~.playback-tools .playback-option:has(#speed) { display:none; }
.screen.artplayer-active~.playback-tools #quality-label { display:none; }
.artplayer-active .screen-message { z-index:35;background:#0b0c0ecc;color:var(--cinema-ink); }
.artplayer-active .screen-message[data-kind=play] { inset:calc(50% + 43px) 16px auto;width:max-content;max-width:calc(100% - 32px);margin-inline:auto;padding:5px 12px;border-radius:6px;background:#0b0c0ee8;font-size:13px;line-height:1.6; }
.artplayer-active.resuming .screen-message { background:var(--cinema-bg); }
.artplayer-active .art-video-player { --art-theme:var(--cinema-accent);--art-font-family:var(--font-body);--art-font-size:15px;--art-control-icon-scale:1;--art-progress-height:4px;--art-indicator-scale:.85;--art-hover-color:var(--accent-soft);--art-subtitle-bottom:8px;--art-subtitle-font-size:19px;--cinema-subtitle-lift:58px; }
/* 字幕让开底部玻璃控制条：ArtPlayer 的 --art-control-height 由脚本写入，只能按实际值再加一段抬升 */
.artplayer-active .art-video-player.art-control-show .art-subtitle { bottom:calc(var(--art-control-height) + var(--cinema-subtitle-lift)); }
.screen.artplayer-active .art-bottom { container:art-controls / size;padding:0 28px 14px;background:none; }
.artplayer-active .art-bottom::before { content:"";position:absolute;left:14px;right:14px;bottom:14px;height:82px;border:1px solid var(--cinema-rim);border-radius:14px;background:var(--cinema-bg);box-shadow:inset 0 1px var(--cinema-highlight),0 12px 28px #00000040;pointer-events:none; }
.artplayer-active .art-controls { align-items:center;gap:8px;min-height:54px; }
.artplayer-active .art-controls-left,.artplayer-active .art-controls-right { align-items:center; }
.artplayer-active .art-controls-right { gap:10px; }
.artplayer-active .art-control-time { font-size:14px;font-variant-numeric:tabular-nums;letter-spacing:0; }
.artplayer-active .art-control-playAndPause,.artplayer-active .art-icon-volume,.artplayer-active .art-icon-volumeClose { border-radius:5px; }
.artplayer-active .art-video-player:focus-within .art-bottom { opacity:1;transform:translateY(0); }
.artplayer-active .art-control-volume .art-volume-panel {
  left:50%;
  right:auto;
  margin-left:calc(var(--art-control-height) / -2);
}
.artplayer-active .art-control-volume:focus-within .art-volume-panel { opacity:1;transform:none;pointer-events:auto; }
.artplayer-active [role=button]:focus-visible,.artplayer-active [role=slider]:focus-visible { outline:1px solid #ffffffa0;outline-offset:2px; }
.artplayer-active .art-video-player .art-mask .art-state { width:58px;height:58px;border:1px solid #ffffff35;border-radius:50%;background:#0b0c0eda; }
.artplayer-active .art-video-player .art-mask .art-state svg { width:28px;height:28px; }
.art-site-button { display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:0;border:0;border-radius:5px;background:transparent;color:#fff;cursor:pointer; }
.art-site-button:hover { background:#ffffff12; }.art-site-button:focus-visible { outline:1px solid #ffffffa0;outline-offset:1px; }
.artplayer-active .art-site-button svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.artplayer-active .art-site-button svg rect { fill:none; }
.art-site-rate { position:relative; }.art-site-rate .choice-trigger { height:34px;min-height:34px;min-width:64px;justify-content:center;padding:0 8px;border:0;background:transparent;color:#fff;font-size:12px;gap:7px; }
.art-site-rate .choice-trigger:hover { background:#ffffff12; }.art-site-rate .choice-trigger:focus-visible { outline:1px solid #ffffffa0;outline-offset:1px; }
.art-site-rate .choice-value { color:inherit; }.art-site-rate .choice-chevron { width:5px;height:5px; }
.art-site-rate .choice-menu { top:auto;bottom:calc(100% + 10px);right:0;min-width:128px;max-height:min(360px,var(--player-menu-height,360px));overflow:auto;overscroll-behavior:contain;padding:6px;border:1px solid var(--glass-rim);border-radius:var(--radius-panel);background:var(--paper);color:var(--ink);box-shadow:0 8px 30px #0003; }
.art-site-rate .choice-item { min-height:36px;border-radius:var(--radius-control); }
.art-site-rate .choice-item { color:var(--ink); }.art-site-rate .choice-item[aria-checked=true] { color:var(--accent);background:var(--accent-soft); }
.art-site-rate .choice-item:hover,.art-site-rate .choice-item:focus-visible { background:var(--paper-warm); }
.art-site-quality .choice-trigger { min-width:64px;max-width:162px; }.art-site-quality .choice-value { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.art-site-quality .choice-menu { min-width:188px;max-width:246px; }
.art-quality-current { display:flex;align-items:center;height:34px;padding:0 8px;color:#ffffffb3;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap; }
.art-quality-note { margin:6px 8px 4px;padding-top:9px;border-top:1px solid var(--line);font-size:11px;line-height:1.6;white-space:pre-line;color:var(--muted); }
.art-site-seek { position:absolute;inset:-10px 0 auto;margin:0;padding:0;border:0;width:100%;height:24px;appearance:none;background:transparent;cursor:pointer;z-index:3; }
.art-site-seek::-webkit-slider-runnable-track { height:3px;background:transparent; }.art-site-seek::-webkit-slider-thumb { appearance:none;width:10px;height:10px;border-radius:50%;margin-top:-3.5px;background:var(--cinema-accent);opacity:0; }
.art-site-seek::-moz-range-track { height:3px;background:transparent; }.art-site-seek::-moz-range-thumb { border:0;width:10px;height:10px;border-radius:50%;background:var(--cinema-accent); }
.art-site-seek:hover::-webkit-slider-thumb,.art-site-seek:focus-visible::-webkit-slider-thumb { opacity:1; }
.art-site-seek:focus-visible { outline:1px solid #ffffff80;outline-offset:1px;border-radius:3px; }
.artplayer-active .art-progress-tip,.artplayer-active .art-progress-indicator { display:none!important; }
.art-site-time-preview { position:absolute;bottom:17px;transform:translateX(-50%);padding:4px 8px;border:1px solid #ffffff20;border-radius:5px;background:#18151ef0;color:#fff;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;pointer-events:none;z-index:4; }
.frame-preview-decoder { position:fixed;left:-10000px;top:0;width:192px;height:108px;pointer-events:none; }
.art-site-frame { position:absolute;bottom:48px;width:192px;height:108px;max-width:calc(100% - 4px);object-fit:contain;transform:translateX(-50%);border:1px solid var(--line);border-radius:7px;background:#161519;box-shadow:0 8px 24px #0005;pointer-events:none;z-index:4; }
.art-site-frame-caption { position:absolute;bottom:52px;transform:translateX(-50%);padding:2px 6px;border-radius:3px;background:#161519c9;color:#fff;font-size:11px;white-space:nowrap;pointer-events:none;z-index:4; }
.watch-layout.theater-mode { grid-template-columns:minmax(0,1fr); }
.watch-layout.theater-mode .screen:not(:fullscreen) { max-height:calc(100vh - 64px);scroll-margin-top:24px; }
.watch-layout.theater-mode .episodes { grid-template-columns:repeat(10,minmax(0,1fr));max-height:240px; }
.art-site-theater[aria-pressed=true] { color:var(--cinema-accent);background:#ffffff12; }
.screen:fullscreen .art-site-theater { display:none; }
.watch-layout:not(:has(.artplayer-active)) .art-only-hint { display:none; }
.artplayer-active .art-notice { top:20px;left:20px;padding:7px 12px;border:1px solid #ffffff20;border-radius:7px;background:#18151edb;font-size:12px; }
.art-auto-next { position:absolute;right:20px;bottom:66px;z-index:90;width:258px;max-width:calc(100% - 32px);padding:16px;border:0;border-radius:var(--radius-panel);background:var(--paper);color:var(--ink);box-shadow:0 8px 30px #0004;text-align:left; }
.art-auto-next-status { margin:0;font-size:13px;font-weight:600; }.art-auto-next-label { margin:6px 0 14px;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.art-auto-next-actions { display:flex;gap:8px; }.art-auto-next-actions button { min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:6px;background:transparent;color:var(--muted);font-size:12px;cursor:pointer; }
.art-auto-next-actions button:first-child { border-color:var(--accent);background:var(--accent);color:var(--button-ink); }.art-auto-next-actions button:hover { filter:brightness(.95); }.art-auto-next-actions button:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
.art-player-recovery { position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:90;width:360px;max-width:calc(100% - 32px);max-height:calc(100% - 76px);overflow:auto;overscroll-behavior:contain;padding:20px;border:0;border-radius:var(--radius-panel);background:var(--paper);color:var(--ink);box-shadow:0 12px 36px #0005;text-align:left; }
.art-recovery-title { margin:0 0 8px;font-size:16px;font-weight:600; }.art-recovery-message { margin:0 0 16px;font-size:12px;color:var(--muted);line-height:1.8; }
.art-player-recovery .playback-feedback { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0; }.art-player-recovery #retry-play { background:var(--accent);border-color:var(--accent);color:var(--button-ink); }.art-player-recovery #failed-watch-back { grid-column:1/-1;justify-self:start;min-height:28px;font-size:12px; }
.art-player-recovery .playback-feedback .button { padding-inline:8px;font-size:12px; }
.art-player-recovery.is-retrying #playback-feedback[hidden] { display:grid!important; }
.screen.playback-recovery-open .screen-message,.screen.playback-recovery-open .art-mask .art-state { visibility:hidden; }.screen.episode-drawer-open .art-player-recovery { visibility:hidden; }
@media (max-width:700px) { .screen:not(:fullscreen) .art-player-recovery { top:12px;transform:translateX(-50%);max-height:calc(100% - 62px);padding:12px; }.art-recovery-title { font-size:14px; }.art-recovery-message { margin-bottom:8px; } }
@media (max-width:600px) { .art-auto-next { right:12px;bottom:50px;padding:10px 12px; }.art-auto-next-label { margin-bottom:8px; } }
.art-site-button:disabled { opacity:.35;cursor:default; }
.art-site-pip[aria-pressed=true],.art-site-episodes[aria-expanded=true] { color:var(--cinema-accent);background:#ffffff12; }
.art-site-episodes { width:auto;padding:0 8px;font-size:12px;white-space:nowrap; }
.art-site-next { display:none; }.screen:fullscreen .art-site-next { display:flex; }
.art-episode-backdrop { position:absolute;inset:0;z-index:100;border:0;background:#0002;cursor:default; }
.art-episode-dialog { position:absolute;top:12px;right:12px;bottom:58px;z-index:101;display:flex;flex-direction:column;width:min(344px,calc(100% - 24px));overflow:hidden;border:1px solid var(--glass-rim);border-radius:var(--radius-panel);background:var(--paper);color:var(--ink);box-shadow:0 12px 36px #0005;text-align:left;font-family:inherit; }
.art-episode-header { display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;min-height:46px;padding:4px 12px 4px 16px;border-bottom:1px solid var(--line); }
.art-episode-title { overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;color:var(--muted); }
.art-episode-header .art-site-button { color:var(--ink); }.art-episode-header .art-site-button:hover { background:var(--accent-soft); }
.art-episode-header .art-site-button:focus-visible { outline-color:var(--accent); }
.art-episode-dialog .episode-panel { min-height:0;align-self:stretch;flex:1;overflow:auto;overscroll-behavior:contain;border:0;border-radius:0;box-shadow:none;padding:14px 16px;margin:0; }
.art-episode-dialog .episode-panel::before,.art-episode-dialog .episode-panel::after,.art-episode-dialog .eyebrow,.art-episode-dialog .mobile-player-action { display:none; }
.art-episode-dialog .episode-heading h2 { font-size:16px; }.art-episode-dialog .episodes { grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;overflow:visible; }
.art-episode-placeholder-title { margin:4px 0;font-size:14px;font-weight:600;color:var(--ink); }.art-episode-placeholder .secondary { font-size:12px;line-height:1.8; }
.screen.episode-drawer-open .art-video-player .art-bottom { opacity:1;transform:translateY(0); }
.screen.episode-drawer-open .art-site-time-preview,.screen.episode-drawer-open .art-site-frame,.screen.episode-drawer-open .art-site-frame-caption { display:none; }
@media (max-width:700px) {
  .art-episode-placeholder { display:none; }
  .screen:not(:fullscreen) .art-episode-backdrop { position:fixed; }
  .screen:not(:fullscreen) .art-episode-dialog { position:fixed;top:auto;left:12px;right:12px;bottom:16px;width:auto;height:min(72vh,560px);height:min(72dvh,560px); }
}
@media (max-width:999px) { .art-site-theater { display:none; } }
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .artplayer-active .art-bottom::before { background:linear-gradient(115deg,#ffffff14,transparent 38%),#0b0c0eb8;-webkit-backdrop-filter:blur(24px) saturate(1.2);backdrop-filter:blur(24px) saturate(1.2);box-shadow:inset 0 1px #ffffff24,inset 0 -1px #00000080,0 16px 36px -12px #00000080; }
  .art-site-rate .choice-menu,.art-episode-dialog { background:var(--glass-surface);-webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));box-shadow:inset 0 1px var(--glass-highlight),0 12px 32px #00000040; }
}
@media (prefers-reduced-transparency:reduce) {
  .artplayer-active .art-bottom::before,.art-site-rate .choice-menu,.art-episode-dialog { -webkit-backdrop-filter:none;backdrop-filter:none; }
  .artplayer-active .art-bottom::before { background:var(--cinema-bg); }
  .art-site-rate .choice-menu,.art-episode-dialog { background:var(--paper); }
}
@media (max-width:600px) { .screen.artplayer-active .art-bottom { padding:0 12px 6px; }.artplayer-active .art-bottom::before { left:6px;right:6px;bottom:6px;height:65px;border-radius:8px; }.artplayer-active .art-controls{min-height:40px;gap:4px}.artplayer-active .art-controls-right { gap:0; }.artplayer-active .art-video-player{--art-control-icon-scale:.8;--art-subtitle-bottom:6px;--art-subtitle-font-size:15px;--cinema-subtitle-lift:36px}.art-site-button { width:32px; }.artplayer-active .art-control-time { font-size:11px; } }
@media (max-width:600px) {
  .screen:not(:fullscreen).playback-recovery-open { min-height:280px; }
  .art-site-rate .choice-trigger { min-width:44px;padding:0 4px;gap:5px; }.art-site-quality .choice-trigger { max-width:80px; }
  .art-site-rate .choice-item,.art-auto-next-actions button { min-height:44px; }
  .artplayer-active .art-control-time { font-size:0; }.artplayer-active .art-control-time::before { content:attr(data-current-time);font-size:11px; }
}
@media (prefers-reduced-motion:reduce) { .artplayer-active .art-bottom,.artplayer-active .art-state { transition:none; } }
/* Use the video width here so portrait video gets the same compact controls. */
@container art-controls (max-width:380px) {
  .artplayer-active .art-controls { gap:4px;min-height:40px; }
  .artplayer-active .art-controls-right { gap:0; }
  .artplayer-active .art-controls .art-controls-left .art-control { min-width:32px;padding-inline:4px; }
  .artplayer-active .art-control-volume .art-volume-panel {
    height:min(var(--art-volume-height),max(32px,calc(100cqh - 88px)));
  }
  .artplayer-active .art-control-volume .art-volume-inner { gap:4px;padding-block:5px; }
  .artplayer-active .art-controls .art-site-button { width:28px; }
  .artplayer-active .art-controls .art-site-episodes { width:auto;padding-inline:4px; }
  .art-site-rate .choice-trigger { min-width:36px;padding-inline:4px;gap:4px; }
  .art-site-quality .choice-trigger { min-width:42px;max-width:58px; }
  .artplayer-active .art-controls .art-site-rate { position:static; }
  .artplayer-active .art-controls .choice-menu {
    inset:auto 0 calc(100% + 6px) auto;
    width:min(136px,100%);
    min-width:0;
    max-height:min(360px,max(0px,calc(100cqh - 100% - 14px)));
  }
  .artplayer-active .art-controls .art-site-quality .choice-menu { width:min(208px,100%); }
  .art-quality-current { display:block;max-width:58px;padding-inline:4px;overflow:hidden;text-overflow:ellipsis;line-height:34px; }
  .artplayer-active .art-control-time { font-size:0; }
  .artplayer-active .art-control-time::before { content:attr(data-current-time);font-size:11px; }
}
/* A menu may use the screen while open when there is little space above the bar. */
@container art-controls (max-width:380px) and (max-height:210px) {
  .artplayer-active .art-controls .choice-menu {
    top:calc(100% - 100cqh + 8px);
    bottom:auto;
    max-height:calc(100cqh - 16px);
  }
}
@container art-controls (max-width:285px) {
  .artplayer-active .art-bottom::before { display:none; }
  .artplayer-active .art-bottom .art-controls {
    isolation:isolate;
    height:auto;
    flex-wrap:wrap;
    justify-content:center;
    row-gap:0;
  }
  .artplayer-active .art-bottom .art-controls .art-controls-left,
  .artplayer-active .art-bottom .art-controls .art-controls-right {
    max-width:100%;
    height:auto;
    min-height:36px;
    margin-inline:0;
    flex-wrap:wrap;
    justify-content:center;
  }
  .artplayer-active .art-controls::before {
    content:"";
    position:absolute;
    inset:-19px -5px 0;
    z-index:-1;
    border:1px solid var(--cinema-rim);
    border-radius:5px;
    background:var(--cinema-bg);
    pointer-events:none;
  }
  .artplayer-active .art-progress { z-index:1; }
}
@media (max-width:360px) {
  .art-quality-current,.art-site-pip:disabled { display:none; }
  .art-site-quality .choice-trigger { max-width:58px; }
}
