/* AniHoshi — watch page */

.hs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--hs-tx-4); }
.hs-crumbs a { color: #8097B2; }
.hs-crumbs [aria-current] { color: var(--hs-tx-2); font-weight: 700; }

.hs-wl { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.hs-wl-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* player */
#w-player { position: relative; }
#player-wrapper { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
#player { position: relative; aspect-ratio: 16 / 9; background-color: #0A1220; background-size: cover; background-position: center; }
#player::before { content: ""; position: absolute; inset: 0; background: rgba(6, 12, 22, 0.55); }
#player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; background: #000; }
#player .play { position: absolute; inset: 0; z-index: 1; display: none; align-items: center; justify-content: center; cursor: pointer; }
#player .play span { width: 84px; height: 84px; border-radius: 50%; background: var(--hs-ac-fill); color: var(--hs-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 12px rgba(38, 163, 214, 0.18); transition: transform 0.2s; }
#player .play:hover span { transform: scale(1.06); }
#player .loading { position: absolute; inset: 0; z-index: 3; min-height: 0; }
#player .message { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: var(--hs-tx-2); font-weight: 600; }
.layout-page-watchtv.expand .hs-wl { grid-template-columns: 1fr; }
.layout-page-watchtv.expand .hs-eps { max-height: 420px; }

/* controls (.ctrl = main.js) */
.hs-ctrls { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 8px; }
.hs-ctrls .left, .hs-ctrls .right { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; }
.hs-ctrls .right { margin-left: auto; }
.hs-ctrls .left::after { content: ""; width: 1px; height: 20px; margin: 0 6px; background: var(--hs-line); flex-shrink: 0; }
.hs-ctrls .ctrl { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px; border-radius: 6px; color: #B6C6D8; font: 700 12.5px var(--hs-f-body); cursor: pointer; white-space: nowrap; user-select: none; flex-shrink: 0; }
.hs-ctrls .ctrl:hover { background: var(--hs-raise); color: var(--hs-tx); }
.hs-ctrls .ctrl .sw { position: relative; width: 24px; height: 14px; border-radius: 7px; background: #2F4664; transition: background 0.2s; flex-shrink: 0; }
.hs-ctrls .ctrl .sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #8097B2; transition: transform 0.2s, background 0.2s; }
.hs-ctrls .ctrl .sw.on { background: var(--hs-ac); }
.hs-ctrls .ctrl .sw.on::after { transform: translateX(10px); background: #fff; }
.hs-ctrls .ctrl.check:has(.sw.on) { color: var(--hs-tx); }
@media (max-width: 1360px) and (min-width: 1151px) { .hs-ctrls .ctrl .lb { display: none; } }
.hs-ctrls .ctrl.report { color: var(--hs-danger); }
.hs-ctrls .ctrl.favourite > [data-toggle] { display: inline-flex; align-items: center; gap: 7px; }
.hs-ctrls .ctrl.favourite .dropdown-menu { top: calc(100% + 6px); }
body.light-on, .hs .light-overlay { }

/* servers */
#w-servers { overflow: hidden; }
.hs-srv { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.hs-srv-tip { padding: 18px; background: var(--hs-bg-3); border-right: 1px solid var(--hs-line); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.hs-srv-tip .a { font-size: 13px; color: #8097B2; }
.hs-srv-tip .b { font-size: 20px; font-weight: 800; color: var(--hs-ac); }
.hs-srv-tip .c { font-size: 12.5px; line-height: 1.45; color: var(--hs-tx-4); }
.hs-srv .servers { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.hs-srv .type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hs-srv .type label { width: 58px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--hs-ac-tx); }
.hs-srv .type[data-type="dub"] label { color: var(--hs-dub-tx); }
.hs-srv .type[data-type="raw"] label { color: var(--hs-tx-3); }
.hs-srv .type ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hs-srv .type li { height: 38px; padding: 0 15px; border-radius: 6px; border: 1px solid var(--hs-line); background: var(--hs-field); color: var(--hs-tx-2); font: 700 13px var(--hs-f-body); cursor: pointer; display: inline-flex; align-items: center; }
.hs-srv .type li:hover { border-color: var(--hs-ac); color: var(--hs-tx); }
.hs-srv .type li.active { background: var(--hs-ac-fill); border-color: var(--hs-ac-fill); color: var(--hs-ink); }
.hs-srv .type[data-type="dub"] li.active { background: var(--hs-dub); border-color: var(--hs-dub); color: var(--hs-dub-ink); }
.hs-srv-empty { color: var(--hs-tx-4); padding: 6px 0; }
.hs-srv .mapper-dl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--hs-line); }
.hs-srv .mapper-dl-row > label { width: 58px; margin: 0; font-size: 12px; font-weight: 800; color: var(--hs-tx-3); }
.hs-srv .mapper-dl-chip { height: 30px; padding: 0 12px; border-radius: 6px; background: var(--hs-field) !important; border: 1px solid var(--hs-line) !important; color: var(--hs-tx-2) !important; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; }
.hs-srv .mapper-dl-chip:hover { border-color: var(--hs-ac) !important; color: var(--hs-tx) !important; }

.hs-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; border-radius: 8px; background: rgba(38, 163, 214, 0.08); border: 1px solid var(--hs-line-ac); font-size: 13.5px; color: var(--hs-tx-2); }
.hs-next svg { color: var(--hs-ac); flex-shrink: 0; }
.hs-next strong { color: var(--hs-tx); }
.hs-next-cd { margin-left: auto; height: 26px; padding: 0 10px; border-radius: 6px; background: var(--hs-raise); color: var(--hs-ac); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; }

/* episodes: see the EP1 episode panel section at the end of this file */

/* info */
.hs-info { margin-top: 22px; padding: 22px; display: grid; grid-template-columns: 210px minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
.hs-info .poster { width: 210px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--hs-field); }
.hs-info .poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-info .main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hs-info .hd { display: flex; flex-direction: column; gap: 4px; }
.hs-info .title { font-size: 44px; line-height: 1.04; letter-spacing: 0.01em; text-transform: uppercase; color: #fff; }
.hs-info .names { font-size: 16px; font-weight: 600; color: #8097B2; }
.hs-info .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-info .synopsis { max-width: 760px; font-size: 14px; line-height: 1.65; color: #A9BACD; }
.hs-info .shorting .content { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hs-info .shorting.expand .content { display: block; }
.hs-info .shorting .toggle { display: inline-block; margin-top: 4px; color: var(--hs-ac); font-weight: 800; font-size: 13px; cursor: pointer; }
.hs-info .meta { margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 28px; font-size: 13px; }
.hs-info .meta > div { display: flex; gap: 10px; min-width: 0; }
.hs-info .meta > div.wide { grid-column: 1 / -1; }
.hs-info .meta dt { width: 92px; flex-shrink: 0; color: var(--hs-tx-4); }
.hs-info .meta dd { margin: 0; color: var(--hs-tx-2); min-width: 0; }
.hs-info .meta dd a:hover { color: var(--hs-ac); }
.hs-info .meta dd.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* rating — "R3 half-star row". main.js Rating rewrites each .stars > span's class to full / half
   (star n = steps 2n-1 | 2n) and the .message text; watch.js adds #w-rating.hs-rated / .hs-hov and the
   N/10 in .hs-r3-n. Until the viewer hovers or has rated, the big stars stay empty (the left block shows
   the average). */
.hs-rate { display: block; --hs-star-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.84 5.76 6.36.92-4.6 4.49 1.09 6.33L12 17.31l-5.69 2.99 1.09-6.33-4.6-4.49 6.36-.92z'/%3E%3C/svg%3E"); --hs-seg: color-mix(in srgb, var(--hs-tx) 13%, transparent); }
.hs-rate #w-rating.hs-r3 { display: grid; grid-template-columns: auto minmax(0, 1fr); border-radius: 4px; border: 1px solid var(--hs-line); background: var(--hs-bg-3); }
.hs-r3-l { padding: 14px 14px 12px; border-right: 1px solid var(--hs-line); display: flex; flex-direction: column; align-items: flex-start; }
.hs-r3-l .sc { font: 700 32px/1 var(--hs-f-head); letter-spacing: -0.03em; color: var(--hs-tx); white-space: nowrap; }
.hs-r3-l .sc small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--hs-tx-4); }
.hs-r3-l .mini { display: block; width: 65px; height: 13px; margin: 8px 0 6px; background: linear-gradient(90deg, var(--hs-star) var(--p, 0%), var(--hs-seg) var(--p, 0%)); -webkit-mask: var(--hs-star-m) 0 0 / 13px 13px repeat-x; mask: var(--hs-star-m) 0 0 / 13px 13px repeat-x; }
.hs-r3-l .src { font-size: 11.5px; color: var(--hs-tx-4); white-space: nowrap; }
.hs-r3-r { min-width: 0; padding: 12px 14px 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.hs-r3-r .kick { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hs-tx-4); }
.hs-r3-r .kick .mine { display: none; color: var(--hs-ac); }
.hs-r3.hs-rated .hs-r3-r .kick .def { display: none; }
.hs-r3.hs-rated .hs-r3-r .kick .mine { display: inline; }
/* stars touch (no gap) so the pointer never falls between two spans; the gap is inside each span */
.hs-rate .hs-r3 .stars { --st: 26px; display: flex; margin-left: -2px; cursor: pointer; touch-action: manipulation; }
.hs-rate .hs-r3 .stars span { position: relative; width: calc(var(--st) + 4px); height: var(--st); flex: none; }
.hs-rate .hs-r3 .stars span::before, .hs-rate .hs-r3 .stars span i { content: ""; position: absolute; top: 0; left: 2px; height: var(--st); pointer-events: none; -webkit-mask: var(--hs-star-m) left center / var(--st) var(--st) no-repeat; mask: var(--hs-star-m) left center / var(--st) var(--st) no-repeat; }
.hs-rate .hs-r3 .stars span::before { width: var(--st); background: var(--hs-seg); }
.hs-rate .hs-r3 .stars span i { display: block; width: 0; background: var(--hs-star); }
.hs-rate .hs-r3.hs-hov .stars span.half i, .hs-rate .hs-r3.hs-rated .stars span.half i { width: calc(var(--st) / 2); }
.hs-rate .hs-r3.hs-hov .stars span.full i, .hs-rate .hs-r3.hs-rated .stars span.full i { width: var(--st); }
.hs-rate .hs-r3.hs-hov:not(.hs-rated) .stars span i { background: color-mix(in srgb, var(--hs-star) 72%, var(--hs-bg-3)); }
.hs-rate .hs-r3.hs-rated .stars { cursor: default; }
.hs-r3-r .lab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; min-height: 17px; line-height: 1.35; font-size: 12px; color: var(--hs-tx-4); }
.hs-rate .hs-r3 .message { min-width: 0; font-size: 12px; font-weight: 500; color: var(--hs-tx-4); }
.hs-rate .hs-r3.hs-hov .message, .hs-rate .hs-r3.hs-rated .message { color: var(--hs-tx); font-weight: 600; }
.hs-r3-n { flex-shrink: 0; font-weight: 600; color: var(--hs-tx-2); white-space: nowrap; }
.hs-r3-n:not(:empty)::before { content: "\00a0·\00a0"; font-weight: 500; color: var(--hs-tx-4); }
.hs-r3-n:empty { display: none; }
.hs-r3.hs-rated .hs-r3-n { color: var(--hs-star); }
.hs-r3-f { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--hs-line); font-size: 11.5px; color: var(--hs-tx-4); }
.hs-r3-f .ft { min-width: 0; }
.hs-r3-share { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--hs-line-2); background: transparent; color: var(--hs-tx-2); font: 500 12.5px var(--hs-f-body); cursor: pointer; white-space: nowrap; }
.hs-r3-share:hover { color: var(--hs-tx); border-color: var(--hs-tx-4); }

/* seasons swiper */
.hs-seasons { overflow: hidden; padding-bottom: 22px !important; }
.hs-seasons .season { width: 220px !important; }
.hs-seasons .season a { position: relative; display: flex; align-items: flex-end; height: 88px; padding: 12px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--hs-field); }
.hs-seasons .season a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hs-seasons .season a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 22, 34, 0.92) 0%, rgba(11, 22, 34, 0.35) 100%); }
.hs-seasons .season a:hover { border-color: var(--hs-line-2); }
.hs-seasons .season.active a { border-color: var(--hs-ac); }
.hs-seasons .nm { position: relative; z-index: 2; display: flex; flex-direction: column; min-width: 0; }
.hs-seasons .nm .t { font-size: 14.5px; font-weight: 800; color: #fff; }
.hs-seasons .nm .s { font-size: 12px; font-weight: 700; color: #B6C6D8; }
.hs-seasons .season.active .nm .s { color: var(--hs-ac); }
.hs-seasons .swiper-pagination { bottom: 0 !important; }
.hs-seasons .swiper-pagination-bullet { background: var(--hs-tx-4); opacity: 0.5; }
.hs-seasons .swiper-pagination-bullet-active { background: var(--hs-ac); opacity: 1; }

/* bottom */
.hs-wbottom { margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.hs-wbottom-main { min-width: 0; }
.hs-wbottom-side { display: flex; flex-direction: column; gap: 18px; }
.hs-rel .hs-row { padding: 8px; }
.hs-rel .relation { text-transform: capitalize; }
.rel-collapse-hidden { display: none !important; }

/* report modal */
.hs-rep-who { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; background: var(--hs-field); }
.hs-rep-who img { border-radius: 6px; object-fit: cover; }
.hs-rep-who div { min-width: 0; display: flex; flex-direction: column; }
.hs-rep-who span { font-size: 13px; color: var(--hs-tx-3); }
.hs-rep-grid { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hs-rep-opt { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--hs-line); background: var(--hs-field); font-size: 13px; font-weight: 600; color: var(--hs-tx-2); cursor: pointer; }
.hs-rep-opt input { width: 16px; height: 16px; accent-color: var(--hs-ac); }
.hs-rep-opt:has(input:checked) { border-color: var(--hs-ac); color: var(--hs-tx); }

/* comments.css retint (dark navy) */
.hs-comments { --cm-bg: var(--hs-bg-2); }
.hs-comments .cm-reactions:empty { display: none; }
.hs-comments .cm-reactions { margin-bottom: 14px; }
.hs-comments .cm-rx { background: var(--hs-field) !important; border-color: var(--hs-line) !important; color: var(--hs-tx-2) !important; border-radius: 8px !important; }
.hs-comments .cm-rx.active, .hs-comments .cm-rx.is-active { border-color: var(--hs-ac) !important; color: var(--hs-tx) !important; }
.hs-comments textarea, .hs-comments .form-control { background: var(--hs-field) !important; border: 1px solid var(--hs-line) !important; color: var(--hs-tx) !important; border-radius: 8px !important; }
.hs-comments .btn-primary, .hs-comments button[type=submit] { background: var(--hs-ac-fill) !important; border-color: var(--hs-ac-fill) !important; color: var(--hs-ink) !important; border-radius: 8px !important; font-weight: 800 !important; }
.hs-comments a { color: var(--hs-tx-2); }
.hs-comments a:hover { color: var(--hs-ac); }

@media (max-width: 1150px) {
    .hs-wl, .hs-wbottom { grid-template-columns: 1fr; }
    .hs-eps { max-height: 520px; }
    .hs-info { grid-template-columns: 160px minmax(0, 1fr); }
    .hs-info .poster { width: 160px; }
    .hs-rate { grid-column: 1 / -1; max-width: 480px; }
}
@media (max-width: 760px) {
    .hs-watch .hs-main { padding-top: 10px; }
    #player-wrapper { border-radius: 0; margin: 0 -16px; }
    .hs-crumbs { display: none; }
    .hs-ctrls { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .hs-ctrls .left, .hs-ctrls .right { flex-wrap: nowrap; }
    .hs-srv { grid-template-columns: 1fr; }
    .hs-srv-tip { border-right: 0; border-bottom: 1px solid var(--hs-line); padding: 12px 14px; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
    .hs-srv-tip .b { font-size: 16px; }
    .hs-srv .type { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .hs-srv .type ul { flex-wrap: nowrap; }
    .hs-srv .type li { flex-shrink: 0; }
    .hs-info { grid-template-columns: 1fr; padding: 16px; }
    .hs-info .poster { width: 130px; }
    .hs-info .title { font-size: 30px; }
    .hs-info .meta { grid-template-columns: 1fr; }
    .hs-rep-grid { grid-template-columns: 1fr; }
}
.hs-wl > *, .hs-wbottom > *, .hs-info > * { min-width: 0; }

/* review fixes */
#player .play[style*="block"] { display: flex !important; }
.hs-eps { overflow: visible; }
.hs-eps > .body { overflow: hidden; border-radius: 0 0 10px 10px; }
.hs-eps .ep-range li:has(> a[style*="display: none"]) { display: none; }
@media (max-width: 760px) {
    .hs-ctrls { flex-wrap: wrap; overflow: visible; }
    .hs-ctrls .left, .hs-ctrls .right { flex-wrap: wrap; }
    .hs-ctrls .right { margin-left: 0; }
    .hs-ctrls .left::after { display: none; }
}

/* ---------- loading states (loader-options L5 / L7 / L8; components live in hoshi-ui.css) ---------- */
/* The player's own loading state (main.js puts <div class="loading"> in #player) is now the L13 Hoshi Intro
   (#hs-pi, see the "L13 player intro" section at the end). While it runs, the plain .loading spinner and the
   idle play button underneath are hidden; without player-intro.js the hoshi-ui L3 spinner still shows. */
#player-wrapper:has(.hs-pi.is-on) #player .loading::before,
#player-wrapper:has(.hs-pi.is-on) #player .loading::after { display: none; }
#player-wrapper:has(.hs-pi.is-on) #player .play { visibility: hidden; }
/* L7 equalizer: a small one inside the server button that is being switched to */
#watch-main:has(#player .loading) .hs-srv .type li.active::before {
    content: ""; flex: none; --hs-eqw: 0.136em; font-size: 12px; width: 1.045em; height: 1em; margin-right: 7px;
    background: var(--hs-eq-cur); background-repeat: no-repeat; background-size: var(--hs-eqw) 40%; animation: hs-eq 1s linear infinite;
}
/* L7 over the server list while main.js fetches /ajax/server/list for another episode (watch.js sets data-hs-busy) */
#w-servers { position: relative; }
#w-servers .hs-srv { transition: opacity 0.2s; }
#w-servers[data-hs-busy] .hs-srv { opacity: 0.22; pointer-events: none; }
#w-servers[data-hs-busy]::before, #w-servers[data-hs-busy]::after { content: ""; position: absolute; left: 50%; z-index: 2; pointer-events: none; animation: hs-ld-in 0.2s ease-out both; }
#w-servers[data-hs-busy]::before {
    --hs-eqw: 0.136em; font-size: 26px; width: 1.045em; height: 1em; top: calc(50% - 28px); margin-left: -0.52em;
    background: var(--hs-eq-bg); background-repeat: no-repeat; background-size: var(--hs-eqw) 40%; animation: hs-eq 1s linear infinite, hs-ld-in 0.2s ease-out both;
}
#w-servers[data-hs-busy]::after { content: "Loading servers…"; top: calc(50% + 6px); transform: translateX(-50%); white-space: nowrap; font: 600 12.5px var(--hs-f-body); color: var(--hs-tx-2); }
@keyframes hs-ld-in { from { opacity: 0; } }

/* L5 film reel in the episodes head: main.js re-fetching the list on load, or watch.js polling stills */
.hs-eps-status { display: none; flex: 0 1 auto; align-items: center; gap: 6px; min-width: 0; overflow: hidden; font-size: 11.5px; font-weight: 600; color: var(--hs-tx-4); }
.hs-eps-top .hs-h2 { flex-shrink: 0; }
.hs-eps-top .hs-epv { flex-shrink: 0; }
.hs-eps-status .hs-film.mini { width: 40px; height: 22px; }
.hs-eps-status [data-for] { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#w-episodes[data-hs-busy~="eps"] .hs-eps-status,
#w-episodes[data-view="thumb"][data-hs-busy~="thumbs"] .hs-eps-status { display: inline-flex; animation: hs-ld-in 0.25s ease-out 0.3s both; }
#w-episodes[data-hs-busy~="eps"] .hs-eps-status [data-for="eps"],
#w-episodes[data-view="thumb"][data-hs-busy~="thumbs"]:not([data-hs-busy~="eps"]) .hs-eps-status [data-for="thumbs"] { display: inline; }

/* L8 star beads: comments placeholder */
.hs-cm-load { flex-direction: row; gap: 14px; padding: 30px 12px; }
.hs-cm-load .hs-ltxt { font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
    #w-servers[data-hs-busy]::before, #watch-main:has(#player .loading) .hs-srv .type li.active::before { animation-duration: 3s; }
}
/* R3 in the narrow (280px) info column */
@media (min-width: 1151px) {
    .hs-r3-l { padding: 14px 12px 12px; }
    .hs-r3-r { padding: 12px 12px 12px 14px; }
    .hs-rate .hs-r3 .stars { --st: 22px; }
}


/* ===== EP1 episode panel ===== */
/* "One-line toolbar" (watch-options-v3 EP1). Markup: partials/watch/episodes.blade.php; behaviour: js/watch.js.
   Views on #w-episodes[data-view]: btn (grid) | list | thumb. Sort: #w-episodes[data-hs-sort="desc"].
   Search: #w-episodes.hs-searching (+ .hs-qt title filter / .hs-qn number jump). main.js toggles
   a.active / a.highlight, hides filtered <a> inline and hides ul.ep-range of other ranges inline.
   Selectors carry #w-episodes.hs-eps + 2 classes so they beat cinema.css' light-mode episode rules. */
#w-episodes.hs-eps { display: flex; flex-direction: column; max-height: 780px; overflow: visible; container-type: inline-size; container-name: hs-eps; }
#w-episodes [hidden] { display: none !important; }
#w-episodes .hs-ep1-hidden, #w-episodes .filter.range.hs-hide { display: none !important; }

/* toolbar */
#w-episodes .hs-ep1-h { padding: 10px; border-bottom: 1px solid var(--hs-line); }
#w-episodes .hs-ep1-bar { position: relative; display: flex; align-items: center; gap: 6px; min-height: 30px; }
#w-episodes .hs-ep1-sp { flex: 1; min-width: 0; display: flex; justify-content: center; }
#w-episodes .hs-ep1-sp .hs-eps-status { max-width: 100%; }
#w-episodes .hs-ep1-ib { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-bg-3); color: var(--hs-tx-3); cursor: pointer; transition: color 0.12s, border-color 0.12s; }
#w-episodes .hs-ep1-ib:hover { color: var(--hs-tx); border-color: var(--hs-tx-4); }
#w-episodes .hs-ep1-ib svg { display: block; width: 15px; height: 15px; }
#w-episodes .hs-ep1-ib.flip svg { animation: hs-ep1-flip 0.22s ease; }
@keyframes hs-ep1-flip { from { transform: rotate(-90deg) scale(0.6); opacity: 0; } }
#w-episodes [data-hs-ep="sort"] .i-desc, #w-episodes[data-hs-sort="desc"] [data-hs-ep="sort"] .i-asc, #w-episodes [data-hs-ep="view"] svg { display: none; }
#w-episodes[data-hs-sort="desc"] [data-hs-ep="sort"] .i-desc,
#w-episodes:not([data-view]) [data-hs-ep="view"] .i-btn, #w-episodes[data-view="btn"] [data-hs-ep="view"] .i-btn,
#w-episodes[data-view="list"] [data-hs-ep="view"] .i-list, #w-episodes[data-view="thumb"] [data-hs-ep="view"] .i-thumb { display: block; }
#w-episodes .hs-ep1-bar button:focus-visible, #w-episodes .hs-ep1-next:focus-visible { outline: 2px solid var(--hs-ac); outline-offset: 1px; }

/* range (main.js Bootstrap dropdown, restyled as a compact select) */
#w-episodes .hs-ep1-range { position: relative; flex: none; }
#w-episodes .hs-ep1-rsel { height: 30px; display: inline-flex; align-items: center; gap: 9px; padding: 0 9px; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-bg-3); color: var(--hs-tx); font: 600 12.5px var(--hs-f-body); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
#w-episodes .hs-ep1-rsel:hover { border-color: var(--hs-tx-4); }
#w-episodes .hs-ep1-rsel::after { content: ""; display: block; width: 5px; height: 5px; margin: 0 0 3px; border: 0; border-right: 1.8px solid var(--hs-tx-4); border-bottom: 1.8px solid var(--hs-tx-4); transform: rotate(45deg); vertical-align: 0; }
#w-episodes .hs-ep1-range .dropdown-menu { min-width: 128px; max-height: 300px; overflow-y: auto; margin-top: 4px; padding: 4px; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-bg-2); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32); z-index: 40; scrollbar-width: thin; }
#w-episodes .hs-ep1-range .dropdown-item { padding: 6px 9px; border-radius: 3px; background: none; color: var(--hs-tx-2); font: 600 12.5px var(--hs-f-body); font-variant-numeric: tabular-nums; cursor: pointer; }
#w-episodes .hs-ep1-range .dropdown-item:hover { background: var(--hs-hover); color: var(--hs-tx); }
#w-episodes.hs-eps .hs-ep1-range .dropdown-item.active { background: var(--hs-ac-soft); color: var(--hs-ac) !important; }

/* All / Sub / Dub */
#w-episodes .hs-ep1-seg { display: inline-flex; flex: none; height: 30px; padding: 2px; gap: 1px; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-bg-3); }
#w-episodes .hs-ep1-seg button { padding: 0 9px; border: 0; border-radius: 3px; background: none; color: var(--hs-tx-3); font: 500 12px var(--hs-f-body); cursor: pointer; }
#w-episodes .hs-ep1-seg button:hover { color: var(--hs-tx); }
#w-episodes .hs-ep1-seg button.on { background: var(--hs-ac-2); color: #fff; }

/* search overlay (covers the toolbar row) */
#w-episodes .hs-ep1-q { display: none; position: absolute; inset: 0; z-index: 3; align-items: center; gap: 6px; background: var(--hs-bg-2); }
#w-episodes.hs-searching .hs-ep1-q { display: flex; animation: hs-ep1-qopen 0.16s ease-out; }
@keyframes hs-ep1-qopen { from { clip-path: inset(0 0 0 70%); opacity: 0.3; } to { clip-path: inset(0); opacity: 1; } }
#w-episodes .hs-ep1-q .qf { position: relative; flex: 1; min-width: 0; margin: 0; }
#w-episodes .hs-ep1-q .qf svg { position: absolute; left: 9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; color: var(--hs-ac); pointer-events: none; }
#w-episodes .hs-ep1-q input { width: 100%; height: 30px; padding: 0 10px 0 30px; border: 1px solid var(--hs-ac); border-radius: 4px; background: var(--hs-bg-3); color: var(--hs-tx); font: 500 13px var(--hs-f-body); outline: none; box-shadow: 0 0 0 3px var(--hs-ac-soft); }
#w-episodes .hs-ep1-q input::placeholder { color: var(--hs-tx-4); }

/* body */
#w-episodes.hs-eps > .body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 0 0 4px 4px; }
#w-episodes.hs-eps .episodes { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 10px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--hs-line-2) transparent; }
#w-episodes .ep-range { list-style: none; margin: 0; padding: 0; }
#w-episodes.hs-eps .episodes .ep-range[style*="none"] { display: none !important; }
#w-episodes .ep-range li:has(> a[style*="display: none"]), #w-episodes .ep-range li.hs-qx, #w-episodes .ep-range li.hs-dup { display: none; }
#w-episodes .hs-ep1-pl { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 4px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hs-tx-4); }
#w-episodes .hs-ep1-pl span + span { font-weight: 500; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
#w-episodes .hs-ep1-qh { padding: 6px 4px 4px; font-size: 12px; color: var(--hs-tx-3); }
#w-episodes .hs-ep1-qh b { color: var(--hs-tx); font-weight: 600; }
#w-episodes .hs-ep1-emp { margin-top: 4px; padding: 22px 10px; border: 1px dashed var(--hs-line-2); border-radius: 4px; text-align: center; font-size: 12.5px; color: var(--hs-tx-4); }
#w-episodes .hs-ep1-caught { padding: 8px 4px; font-size: 12px; color: var(--hs-tx-4); }
#w-episodes .hs-ep1-leg { display: none; flex-wrap: wrap; gap: 4px 12px; padding: 10px 2px 2px; font-size: 11px; color: var(--hs-tx-4); }
#w-episodes:is([data-view="btn"], :not([data-view])):not(.hs-qt) .hs-ep1-leg { display: flex; }
#w-episodes .hs-ep1-leg span { display: inline-flex; align-items: center; gap: 5px; }
#w-episodes .hs-ep1-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
#w-episodes .hs-ep1-leg i.now { background: var(--hs-ac-2); }
#w-episodes .hs-ep1-leg i.nx { border: 1px solid var(--hs-ac); }
#w-episodes .hs-ep1-leg i.fl { height: 2px; background: var(--hs-dub); }

/* episode links — shared */
#w-episodes.hs-eps .episodes .ep-range a { position: relative; display: block; border: 0; border-radius: 4px; background: none; color: var(--hs-tx); text-decoration: none; }
#w-episodes.hs-eps .episodes .ep-range a[enabled="0"] { opacity: 0.35; pointer-events: none; }
#w-episodes.hs-eps .episodes .ep-range a .pl, #w-episodes.hs-eps .episodes .ep-range a .th .pg { display: none; }
#w-episodes.hs-eps .episodes .ep-range a .n { font-weight: 600; font-variant-numeric: tabular-nums; }
#w-episodes.hs-eps .episodes .ep-range a .lg { display: inline-flex; flex: none; align-items: center; gap: 7px; color: var(--hs-tx-4); }
#w-episodes.hs-eps .episodes .ep-range a .lg i { display: inline-flex; align-items: center; padding: 0; border-radius: 0; background: none; font-style: normal; }
#w-episodes.hs-eps .episodes .ep-range a .lg i.d { color: var(--hs-dub); }
#w-episodes.hs-eps .episodes .ep-range a .lg i.f, #w-episodes .hs-ep1-ctx .tg { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 3px; background: color-mix(in srgb, var(--hs-dub) 15%, transparent); color: var(--hs-dub-tx); font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; font-style: normal; }
#w-episodes.hs-eps .episodes .ep-range a.highlight { box-shadow: 0 0 0 2px var(--hs-star); animation: hs-ep1-flash 1.8s ease-out; }
@keyframes hs-ep1-flash { 0%, 55% { box-shadow: 0 0 0 2px var(--hs-star), 0 0 0 5px color-mix(in srgb, var(--hs-star) 25%, transparent); } }

/* 1) grid */
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; }
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range a { height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-bg-3); color: var(--hs-tx); font: 600 12px var(--hs-f-body); }
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range a :is(.th, .tx, .z) { display: none; }
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range a:hover,
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range a.hs-nx { border-color: var(--hs-ac); color: var(--hs-ac); }
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range a.active { border-color: var(--hs-ac-2); background: var(--hs-ac-2); color: #fff; }
#w-episodes.hs-eps:is([data-view="btn"], :not([data-view])) .episodes .ep-range a.filler::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 3px; height: 2px; border-radius: 1px; background: var(--hs-dub); }

/* 2) list */
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range { display: grid; gap: 1px; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 34px; padding: 0 8px; font: 500 13px var(--hs-f-body); }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range li:nth-child(even) a { background: color-mix(in srgb, var(--hs-bg-3) 60%, transparent); }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a:hover { background: var(--hs-hover); }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a .th { display: none; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a .n { font-size: 12px; color: var(--hs-tx-4); }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a .tx { display: flex; align-items: center; gap: 8px; min-width: 0; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.active { background: var(--hs-ac-soft); box-shadow: inset 2px 0 0 var(--hs-ac); }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.active .n, #w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.active .t { color: var(--hs-ac); font-weight: 600; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.active .lg :is(.s, .d) { display: none; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.active .pl { display: block; font-size: 11px; color: var(--hs-ac); }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.hs-nx .lg :is(.s, .d) { display: none; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.hs-nx .lg::after { content: "Next"; display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 3px; background: var(--hs-ac-soft); color: var(--hs-ac); font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
#w-episodes.hs-eps[data-view="list"] .episodes .ep-range a.hs-nx .t { font-weight: 600; }
/* now-playing equalizer (L7 bars, currentColor) */
#w-episodes.hs-eps .episodes .ep-range a.active .pl, #w-episodes .hs-ep1-hero .hs-eq { --hs-eqw: 0.136em; width: 1.045em; height: 1em; background: var(--hs-eq-cur); background-repeat: no-repeat; background-size: var(--hs-eqw) 40%; animation: hs-eq 1s linear infinite; }

/* 3) thumbnails: compact rows under the Now playing / Up next cards */
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range { display: grid; gap: 1px; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a { display: grid; grid-template-columns: 64px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 5px 6px; font: 500 13px var(--hs-f-body); }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a:hover { background: var(--hs-hover); }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a .n { min-width: 30px; margin-right: -4px; font-size: 11.5px; color: var(--hs-tx-4); }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a .tx { display: flex; align-items: center; gap: 8px; min-width: 0; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a .pl { display: block; position: absolute; left: 6px; top: 5px; width: 64px; height: 36px; border-radius: 3px; background: rgba(5, 8, 12, 0.45); opacity: 0; transition: opacity 0.15s; pointer-events: none; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a .pl::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 4px; background: var(--hs-ac-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5.5v13a1 1 0 0 0 1.5.86l10.2-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5z'/%3E%3C/svg%3E") center / 11px no-repeat; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a:hover .pl { opacity: 1; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a.active { background: var(--hs-ac-soft); box-shadow: inset 2px 0 0 var(--hs-ac); }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a.active .n, #w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a.active .t { color: var(--hs-ac); font-weight: 600; }
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a.active .pl { opacity: 1; width: 64px; height: 36px; font-size: inherit; animation: none; background: rgba(5, 8, 12, 0.45); }

/* stills (row thumbs + cards): L5 film reel (.hs-film-box) until watch.js marks them .ok */
#w-episodes.hs-eps[data-view="thumb"] .episodes .ep-range a .th { position: relative; display: block; width: 64px; height: 36px; border-radius: 3px; overflow: hidden; }
#w-episodes.hs-eps .episodes .th:not(.hs-film-box), #w-episodes.hs-eps .episodes .th.ok { animation: none; background: var(--hs-bg-3); }
#w-episodes.hs-eps .episodes .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; opacity: 0; transition: opacity 0.25s; }
#w-episodes.hs-eps .episodes .th img.ld { opacity: 1; }
#w-episodes.hs-eps .episodes .th.fb img { filter: saturate(0.6) brightness(0.55); }

/* Now playing */
#w-episodes .hs-ep1-hero { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--hs-bg-3); color: #fff; }
#w-episodes .hs-ep1-hero .th { position: absolute; inset: 0; display: block; }
#w-episodes .hs-ep1-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(4, 7, 11, 0) 35%, rgba(4, 7, 11, 0.9) 100%); pointer-events: none; }
#w-episodes .hs-ep1-hero::before { content: ""; position: absolute; inset: 0; z-index: 3; border: 2px solid var(--hs-ac); border-radius: 4px; pointer-events: none; }
#w-episodes .hs-ep1-hero .in { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 2; display: flex; flex-direction: column; gap: 3px; }
#w-episodes .hs-ep1-hero .k { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: color-mix(in srgb, var(--hs-ac) 45%, #fff); }
#w-episodes .hs-ep1-hero .so { font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, 0.75); }
#w-episodes .hs-ep1-hero .tg { background: rgba(5, 8, 12, 0.7); color: color-mix(in srgb, var(--hs-dub) 60%, #fff); }
#w-episodes .hs-ep1-hero .tt { font-size: 17px; font-weight: 600; line-height: 1.25; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#w-episodes .hs-ep1-hero .lg { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; gap: 4px; }
#w-episodes .hs-ep1-ctx .lg i { display: inline-flex; align-items: center; justify-content: center; height: 18px; min-width: 22px; padding: 0 5px; border-radius: 3px; font-style: normal; }
#w-episodes .hs-ep1-hero .lg i { background: rgba(5, 8, 12, 0.7); }
#w-episodes .hs-ep1-hero .lg i.s { color: color-mix(in srgb, var(--hs-ac) 50%, #fff); }
#w-episodes .hs-ep1-hero .lg i.d { color: color-mix(in srgb, var(--hs-dub) 60%, #fff); }

/* Up next */
#w-episodes .hs-ep1-next { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 11px; padding: 8px; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-bg-3); cursor: pointer; transition: border-color 0.12s; }
#w-episodes .hs-ep1-next:hover { border-color: var(--hs-tx-4); }
#w-episodes .hs-ep1-next .th { position: relative; display: block; align-self: start; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; }
#w-episodes .hs-ep1-next .bd { display: flex; flex-direction: column; min-width: 0; }
#w-episodes .hs-ep1-next .n { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--hs-tx-3); }
#w-episodes .hs-ep1-next .tt { margin: 1px 0 7px; font-size: 14px; font-weight: 600; color: var(--hs-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#w-episodes .hs-ep1-next .act { display: flex; align-items: center; gap: 8px; margin-top: auto; }
#w-episodes .hs-ep1-next .lg { display: inline-flex; gap: 4px; }
#w-episodes .hs-ep1-next .lg i.s { background: var(--hs-ac-soft); color: var(--hs-ac); }
#w-episodes .hs-ep1-next .lg i.d { background: color-mix(in srgb, var(--hs-dub) 15%, transparent); color: var(--hs-dub-tx); }
#w-episodes .hs-ep1-play { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: 4px; background: var(--hs-ac-2); color: #fff; font: 500 12px var(--hs-f-body); cursor: pointer; }
#w-episodes .hs-ep1-play:hover { background: var(--hs-ac); }
html[data-theme="light"] #w-episodes .hs-ep1-play:hover { background: var(--hs-ac-fill-h); }
#w-episodes .hs-ep1-play svg { width: 13px; height: 13px; }
#w-episodes .hs-ep1-ctx .lg svg { display: block; }

/* wide panel (stacked under the player, tablets): cards side by side */
@container hs-eps (min-width: 560px) {
    #w-episodes .hs-ep1-ctx:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 12px; align-items: start; }
    #w-episodes .hs-ep1-next { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 1150px) { #w-episodes.hs-eps { max-height: 640px; } }
@media (max-width: 420px) {
    #w-episodes .hs-ep1-bar { gap: 4px; }
    #w-episodes .hs-ep1-ib { width: 28px; }
    #w-episodes .hs-ep1-seg button { padding: 0 7px; }
    #w-episodes .hs-ep1-rsel { padding: 0 7px; gap: 6px; }
    #w-episodes .hs-eps-status [data-for] { display: none !important; }
    #w-episodes .hs-ep1-next { grid-template-columns: 112px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    #w-episodes .hs-ep1-ib.flip svg, #w-episodes.hs-searching .hs-ep1-q, #w-episodes.hs-eps .episodes .ep-range a.highlight { animation: none; }
    #w-episodes.hs-eps .episodes .ep-range a.active .pl, #w-episodes .hs-ep1-hero .hs-eq { animation-duration: 3s; }
}

/* ===== L13 player intro ===== */
/* loader-options-v3 L13 "Hoshi Intro" as the player's loading sequence (markup #hs-pi in watch.blade.php,
   driven by js/player-intro.js): frame fades in -> play pulses -> morphs into Hoshi-chan with glow and
   sparkles -> AniHoshi wordmark + thin progress line, then holds (breathing mascot) until the embed loads.
   The player is dark in both colour modes, so colours here are fixed brand values. Sizes are em-based on a
   container-relative font-size: 10px at phone width, up to 15px on the desktop player. */
.hs-pi {
    position: absolute; inset: 0; z-index: 4; display: none; align-items: center; justify-content: center;
    container-type: size; overflow: hidden; pointer-events: none; color: #E8EEF5; font-family: var(--hs-f-body);
    background:
        radial-gradient(60% 70% at 28% 32%, rgba(46, 197, 232, 0.16), transparent 70%),
        radial-gradient(50% 60% at 78% 70%, rgba(138, 124, 255, 0.16), transparent 70%),
        linear-gradient(180deg, rgba(9, 15, 25, 0.93), rgba(4, 7, 12, 0.97));
}
.hs-pi::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 4px); }
.hs-pi.is-on { display: flex; animation: hs-pi-in 0.25s ease-out both; }
.hs-pi.is-out { animation: hs-pi-out 0.35s ease-in both; }
.hs-pi-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hs-pi-badge, .hs-pi-srv {
    position: absolute; top: clamp(9px, 3.2cqh, 16px); z-index: 1; font-size: clamp(10.5px, 2.6cqh, 12.5px); line-height: 1.3;
    letter-spacing: 0.3px; color: rgba(232, 238, 245, 0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    animation: hs-pi-in 0.4s ease-out 0.1s both;
}
.hs-pi-badge { left: clamp(10px, 2.4cqw, 18px); max-width: 62%; }
.hs-pi-badge b { color: #fff; font-weight: 700; }
.hs-pi-badge b:not(:empty) + span:not(:empty)::before { content: " · "; }
.hs-pi-srv { right: clamp(10px, 2.4cqw, 18px); max-width: 32%; font-weight: 600; color: #8FDDF0; }
.hs-pi-srv:empty, .hs-pi-badge:has(b:empty):has(span:empty) { display: none; }
.hs-pi-col { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.9em; font-size: clamp(10px, 3.1cqh, 15px); }
.hs-pi-fig { position: relative; width: 8.4em; height: 7.6em; animation: hs-pi-fig 0.35s cubic-bezier(0.4, 0, 0.2, 1) 1.05s both; }
.hs-pi-fig > * { position: absolute; left: 50%; top: 50%; }
.hs-pi-play { width: 6em; height: 6em; margin: -3em 0 0 -3em; overflow: visible; animation: hs-pi-play 1.05s ease-in-out both; }
.hs-pi-play .disc { fill: rgba(7, 11, 17, 0.55); stroke: rgba(255, 255, 255, 0.14); }
.hs-pi-glow {
    width: 13.2em; height: 13.2em; margin: -6.6em 0 0 -6.6em; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(46, 197, 232, 0.42), rgba(138, 124, 255, 0.14) 55%, transparent);
    animation: hs-pi-glow 0.6s ease-out 0.8s both, hs-pi-glowp 2.4s ease-in-out 1.4s infinite;
}
.hs-pi-masc {
    width: 8em; height: 8em; max-width: none; margin: -4.2em 0 0 -4em; filter: drop-shadow(0 0 1em rgba(46, 197, 232, 0.45));
    animation: hs-pi-masc 0.4s cubic-bezier(0.3, 1.4, 0.5, 1) 0.8s both, hs-pi-breathe 2.8s ease-in-out 1.6s infinite;
}
.hs-pi-spk {
    width: 0.9em; height: 0.9em; background: #FFD166; opacity: 0;
    clip-path: polygon(50% 0%, 61.8% 35.3%, 98.5% 35.3%, 68.7% 57.1%, 79.4% 91.6%, 50% 70.5%, 20.6% 91.6%, 31.3% 57.1%, 1.5% 35.3%, 38.2% 35.3%);
    animation: hs-pi-twk 2.6s ease-out 1.05s infinite both;
}
.hs-pi-spk.a { margin: -4em 0 0 3em; }
.hs-pi-spk.b { margin: 0.6em 0 0 -4.6em; width: 0.7em; height: 0.7em; background: #2EC5E8; animation-delay: 1.2s; }
.hs-pi-spk.c { margin: -3.4em 0 0 -4em; width: 0.6em; height: 0.6em; background: #8A7CFF; animation-delay: 1.35s; }
.hs-pi-wm {
    display: inline-flex; align-items: center; font: 700 2.2em/1 "Fredoka", var(--hs-f-head), sans-serif; color: #fff;
    letter-spacing: 0.2px; white-space: nowrap; animation: hs-pi-rise 0.3s ease-out 1.25s both;
}
.hs-pi-wm .g { display: inline-flex; align-items: center; background: linear-gradient(90deg, #2EC5E8, #8A7CFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hs-pi-wm img { width: 0.8em; height: 0.8em; margin: 0 0.03em; transform: translateY(0.03em); }
.hs-pi-line { width: 10.8em; height: 2px; background: rgba(255, 255, 255, 0.12); border-radius: 1px; overflow: hidden; animation: hs-pi-rise 0.3s ease-out 1.3s both; }
.hs-pi-line i { display: block; height: 100%; background: linear-gradient(90deg, #2EC5E8, #8A7CFF); transform-origin: left; transform: scaleX(0); }
@keyframes hs-pi-in { from { opacity: 0; } }
@keyframes hs-pi-out { to { opacity: 0; } }
@keyframes hs-pi-fig { from { transform: translateY(2.2em); } to { transform: translateY(0); } }
@keyframes hs-pi-play {
    0% { transform: scale(0.85); opacity: 1; } 19% { transform: scale(1); } 33% { transform: scale(1.12); } 48% { transform: scale(1); }
    62% { transform: scale(1.12); } 76% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; }
}
@keyframes hs-pi-glow { 0% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.75; transform: scale(1); } }
@keyframes hs-pi-glowp { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.94); } }
@keyframes hs-pi-masc { 0% { opacity: 0; transform: scale(0.25) rotate(-20deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes hs-pi-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-0.25em) scale(1.04); } }
@keyframes hs-pi-twk { 0% { opacity: 0; transform: scale(0.2) rotate(0); } 8% { opacity: 1; transform: scale(1.1) rotate(45deg); } 22%, 100% { opacity: 0; transform: scale(0.3) rotate(90deg); } }
@keyframes hs-pi-rise { from { opacity: 0; transform: translateY(6px); } }
/* reduced motion: a static mascot + wordmark + progress line, no pulsing/morphing */
@media (prefers-reduced-motion: reduce) {
    .hs-pi.is-on, .hs-pi.is-out, .hs-pi-badge, .hs-pi-srv, .hs-pi-fig, .hs-pi-glow, .hs-pi-masc, .hs-pi-wm, .hs-pi-line { animation: none; }
    .hs-pi.is-out { opacity: 0; transition: opacity 0.15s; }
    .hs-pi-play, .hs-pi-spk { display: none; }
    .hs-pi-glow { opacity: 0.6; }
}
.layout-page-watchtv.expand #w-episodes.hs-eps { max-height: 460px; }

/* Desktop: the episode list is exactly as tall as the player column (player + toolbar + servers)
   and scrolls inside. height:0 + min-height:100% keeps it from stretching the row itself. */
@media (min-width: 1151px) {
    .layout-page-watchtv:not(.expand) .hs-wl { align-items: stretch; }
    .layout-page-watchtv:not(.expand) #w-episodes.hs-eps { height: 0; min-height: 100%; max-height: none; }
}
/* the info title and breadcrumb link to the anime page (/anime/...) */
.hs-i5-ti a { color: inherit; }
.hs-i5-ti a:hover { color: var(--hs-ac); }
