/* =====================================================================
   AniHoshi — "Kiss Classic" theme
   A classic streaming-portal skin: bar header with tabs and a green strip,
   boxed content with green title bars, a sidebar of link boxes.
   Loaded after hoshi.css / hoshi-ui.css / refine.css, so it also re-skins
   every AniHoshi page this theme does not override (they use the tokens).
   ===================================================================== */

/* ---------- tokens ---------- */
:root, html[data-theme="dark"] {
    --hs-bg: #161616; --hs-bg-2: #111111; --hs-bg-3: #1A1A1A; --hs-field: #222222; --hs-raise: #262626; --hs-hover: #1F2318;
    --hs-line: #2A2A2A; --hs-line-2: #3A3A3A; --hs-line-ac: #3D5A12;
    --hs-tx: #E8E8E8; --hs-tx-2: #D2D2D2; --hs-tx-3: #ADADAD; --hs-tx-4: #888888; --hs-tx-5: #6C6C6C;
    --hs-ac: #8CC63F; --hs-ac-2: #6AA51D; --hs-ac-soft: rgba(140, 198, 63, 0.14); --hs-ac-tx: #C9E86A;
    --hs-ink: #FFFFFF; --hs-ac-fill: #4F7D0E; --hs-ac-fill-h: #5D9112;
    --hs-dub: #F0A640; --hs-dub-ink: #2A1A02; --hs-dub-tx: #F6C27A; --hs-star: #F5C451; --hs-ok: #8CC63F; --hs-hot: #FF7A6B; --hs-danger: #FF9C8F;
    --hs-radius: 4px; --hs-wrap: 1240px;
    --hs-f-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --hs-f-head: 'Outfit', system-ui, sans-serif;
    --ks-link: #CFE84E; --ks-link-h: #FFFFFF;
    --ks-bar1: #5E8E13; --ks-bar2: #456F09; --ks-bar-tx: #FFFFFF;
    --ks-top: #151515; --ks-band1: #2E2E2E; --ks-band2: #202020;
    --ks-tab1: #DADADA; --ks-tab2: #B4B4B4; --ks-tab-tx: #1C1C1C;
    --ks-spot1: #2A2A2A; --ks-spot2: #171717;
    --ks-row: #181818; --ks-rk: #3D8FD6; --ks-strip-on: #E6FF8A;
    color-scheme: dark;
}
html[data-theme="light"] {
    --hs-bg: #ECECE6; --hs-bg-2: #FFFFFF; --hs-bg-3: #F6F6F1; --hs-field: #FFFFFF; --hs-raise: #F0F0EA; --hs-hover: #F2F7E8;
    --hs-line: #DCDCD3; --hs-line-2: #C8C8BE; --hs-line-ac: #B9D58A;
    --hs-tx: #1B1B1B; --hs-tx-2: #2D2D2D; --hs-tx-3: #555555; --hs-tx-4: #737373; --hs-tx-5: #949494;
    --hs-ac: #4F8A0B; --hs-ac-2: #3F7008; --hs-ac-soft: rgba(79, 138, 11, 0.12); --hs-ac-tx: #3F7008;
    --hs-ac-fill: #4A7D0C; --hs-ac-fill-h: #3D6A08;
    --hs-dub: #DB8A1C; --hs-dub-tx: #A9650A; --hs-star: #C98A00; --hs-ok: #3F8A0B;
    --ks-link: #3A6C00; --ks-link-h: #1B1B1B;
    --ks-top: #FAFAF6; --ks-band1: #E4E4DC; --ks-band2: #D6D6CC;
    --ks-tab1: #FFFFFF; --ks-tab2: #E6E6DE; --ks-tab-tx: #222222;
    --ks-spot1: #FFFFFF; --ks-spot2: #F2F2EC;
    --ks-row: #F7F7F2; --ks-rk: #2F7BC0; --ks-strip-on: #FFFFFF;
    color-scheme: light;
}

body.hs.ks { background: var(--hs-bg); color: var(--hs-tx); font: 500 13.5px/1.5 var(--hs-f-body); }
.ks a:hover { color: var(--ks-link-h); }
.ks .hs-wrap { max-width: var(--hs-wrap); padding-left: 20px; padding-right: 20px; }
.ks ::selection { background: var(--hs-ac-fill); color: #fff; }

/* ---------- shared atoms ---------- */
.ks-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 30px; padding: 0 14px; border: 0; border-radius: 4px; background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--hs-ac-fill)); color: #fff !important; font: 700 12.5px var(--hs-f-body); letter-spacing: 0.02em; cursor: pointer; white-space: nowrap; }
.ks-btn:hover { background: linear-gradient(180deg, var(--ks-grad-h, #82C22E), var(--hs-ac-fill-h)); color: #fff !important; }
.ks-btn-o { background: transparent; border: 1px solid var(--hs-line-2); color: var(--hs-tx-2) !important; }
.ks-btn-o:hover { background: var(--hs-raise); border-color: var(--hs-ac); color: var(--hs-tx) !important; }
.ks-q { display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 3px; font: 700 10px/1 var(--hs-f-body); letter-spacing: 0.03em; white-space: nowrap; vertical-align: middle; }
.ks-q.s { background: var(--hs-ac-fill); color: #fff; }
.ks-q.d { background: var(--hs-dub); color: var(--hs-dub-ink); }
.ks-sc { color: var(--hs-star); font-weight: 700; }
.ks-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; font-size: 12.5px; color: var(--hs-tx-2); }
.ks-meta i { font-style: normal; color: var(--hs-tx-4); }
.ks-meta a { color: var(--ks-link); font-weight: 600; }
.ks-meta em { font-style: normal; color: var(--hs-tx-4); }

/* Boxes with a green title bar */
.ks-box { position: relative; margin-bottom: 16px; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-radius: 4px; }
.ks-bh { position: relative; display: flex; align-items: center; gap: 10px; min-height: 31px; padding: 0 10px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--ks-bar1), var(--ks-bar2)); color: var(--ks-bar-tx); }
.ks-bh::after { content: ""; position: absolute; left: 12px; top: 100%; border: 6px solid transparent; border-top-color: var(--ks-bar2); border-bottom: 0; }
.ks-bh h1, .ks-bh h2, .ks-bh h3 { flex: 1; min-width: 0; margin: 0; font: 600 14px/1.3 var(--hs-f-body); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-bh h1 b, .ks-bh h2 b { color: var(--ks-strip-on); }
.ks-bh-r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ks-bh-a { flex-shrink: 0; color: rgba(255, 255, 255, 0.85) !important; font-size: 12px; font-weight: 600; }
.ks-bh-a:hover { color: #fff !important; text-decoration: underline; }
.ks-bb { padding: 14px 10px 10px; }
.ks-more { padding: 6px 12px 10px; text-align: right; }
.ks-more a { color: var(--ks-link); font-weight: 600; font-size: 14px; }
.ks-none { padding: 14px 10px; color: var(--hs-tx-4); font-size: 13px; }

/* ---------- header ---------- */
.ks .ks-header { position: relative; z-index: 60; background: var(--ks-top); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ks .ks-header .hs-wrap { height: auto; display: flex; gap: 16px; }
.ks .ks-top-in { align-items: center; justify-content: space-between; min-height: 108px; padding-top: 8px; padding-bottom: 8px; }
.ks .ks-logo { gap: 8px; }
.ks .ks-logo .hs-logo-mark { width: 64px; height: 64px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
.ks .ks-logo .hs-logo-text { color: var(--hs-tx); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.ks .ks-logo .hs-logo-text span { color: var(--hs-ac); }
.ks-top-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 410px; max-width: 48%; }
.ks-acc { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 4px 3px 8px; border-radius: 4px; background: var(--hs-raise); border: 1px solid var(--hs-line); }
.ks-mode { width: 28px; height: 28px; 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-2); color: var(--hs-tx-3); cursor: pointer; }
.ks-mode:hover { color: var(--hs-ac); border-color: var(--hs-ac); }
.ks-mode .sun, html[data-theme="light"] .ks-mode .moon { display: none; }
html[data-theme="light"] .ks-mode .sun { display: block; }
.ks .ks-user .sign-in { height: 28px; padding: 0 12px; border-radius: 4px; font-size: 12.5px; font-weight: 700; }
.ks .ks-user .hs-user-ph { width: 70px; height: 28px; }
.ks .ks-search { flex: none; width: 100%; max-width: none; margin: 0; }
.ks .ks-search form { gap: 6px; }
.ks .ks-search input { height: 30px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--hs-line-2); background: var(--hs-field); font-size: 13px; }
.ks .ks-search input:focus { border-color: var(--hs-ac); }
.ks .ks-go { flex-shrink: 0; height: 30px; padding: 0 14px; border: 0; border-radius: 4px; background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--hs-ac-fill)); color: #fff; font: 700 12px var(--hs-f-body); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.ks .ks-go:hover { background: linear-gradient(180deg, var(--ks-grad-h, #82C22E), var(--hs-ac-fill-h)); }
.ks .ks-search .search-popup { top: calc(100% + 6px); border-radius: 4px; }
.ks-adv { display: inline-flex; align-items: center; gap: 6px; color: var(--ks-link) !important; font-size: 13px; font-weight: 600; }
.ks-adv svg { color: var(--hs-ac); }
.ks-adv:hover { text-decoration: underline; }
.ks .ks-stog { display: none; }

.ks-bar { background: linear-gradient(180deg, var(--ks-band1), var(--ks-band2)); }
.ks .ks-bar-in { align-items: flex-end; justify-content: space-between; padding-top: 14px; }
.ks .ks-tabs { display: flex; align-items: flex-end; gap: 3px; min-width: 0; }
.ks .ks-tabs .ks-tab, .ks .ks-tabs .hs-dd > .ks-tab { position: relative; height: 28px; padding: 0 15px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--ks-tab1), var(--ks-tab2)); color: var(--ks-tab-tx); font: 600 12.5px var(--hs-f-body); white-space: nowrap; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.ks .ks-tabs .ks-tab:hover, .ks .ks-tabs .hs-dd:hover > .ks-tab, .ks .ks-tabs .hs-dd.open > .ks-tab { background: linear-gradient(180deg, #FFFFFF, #D8D8D0); color: #111; }
.ks .ks-tabs .ks-tab.on, .ks .ks-tabs .hs-dd > .ks-tab.on { background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--ks-bar1)); color: #fff; box-shadow: none; }
.ks .ks-tabs > a.on::after { display: none; }
.ks .ks-tabs .ks-tab svg { opacity: 0.7; }
.ks .ks-dd .hs-dd-menu { top: 100%; left: 0; min-width: 200px; padding: 0 0 6px; border-radius: 0 4px 4px 4px; background: var(--hs-bg-2); border: 1px solid var(--hs-line-2); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45); }
.ks .ks-dd .hs-dd-menu.grid { width: 560px; padding: 0 6px 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 4px; }
.ks-menu-hd { grid-column: 1 / -1; margin: 0 -6px 6px; padding: 7px 12px; background: linear-gradient(180deg, var(--ks-bar1), var(--ks-bar2)); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.ks-dd .hs-dd-menu:not(.grid) .ks-menu-hd { margin: 0 0 4px; }
.ks .ks-dd .hs-dd-menu a { padding: 5px 12px; border-radius: 3px; color: var(--ks-link); font-weight: 600; font-size: 13px; }
.ks .ks-dd .hs-dd-menu a:hover { background: var(--hs-ac-soft); color: var(--ks-link-h); }
.ks-tools { display: flex; align-items: center; gap: 10px; padding-bottom: 5px; flex-shrink: 0; }
.ks .ks-lang { height: 22px; padding: 2px; border-radius: 4px; background: var(--hs-bg-2); border: 1px solid var(--hs-line-2); }
.ks .ks-lang span { height: 16px; padding: 0 6px; border-radius: 3px; font-size: 10.5px; display: inline-flex; align-items: center; }
.ks-rand { display: inline-flex; align-items: center; gap: 5px; color: var(--hs-tx-3) !important; font-size: 12px; font-weight: 600; }
.ks-rand:hover { color: var(--hs-ac) !important; }

.ks-strip { background: linear-gradient(180deg, var(--ks-bar1), var(--ks-bar2)); border-bottom: 1px solid rgba(0, 0, 0, 0.25); }
.ks .ks-strip-in { align-items: center; gap: 0; min-height: 26px; overflow-x: auto; scrollbar-width: none; }
.ks-strip-in::-webkit-scrollbar { display: none; }
.ks-strip a, .ks-strip-t { flex-shrink: 0; padding: 0 11px; color: #fff !important; font-size: 12.5px; font-weight: 600; line-height: 14px; white-space: nowrap; }
.ks-strip a + a { border-left: 1px solid rgba(255, 255, 255, 0.4); }
.ks-strip a:first-child, .ks-strip-t { padding-left: 2px; }
.ks-strip a:hover { text-decoration: underline; }
.ks-strip a.on { color: var(--ks-strip-on) !important; text-decoration: underline; text-underline-offset: 3px; }
.ks-strip-t b { color: #fff; }

/* mobile drawer */
.ks .ks-drawer .in { background: var(--hs-bg-2); }
.ks .ks-drawer a { min-height: 38px; border-radius: 4px; font-size: 13.5px; font-weight: 600; color: var(--ks-link); }
.ks .ks-drawer .gen a { color: var(--hs-tx-2); }
.ks .hs-drawer-lang { border-radius: 4px; }

/* ---------- page grid ---------- */
.ks-main { padding-top: 16px; }
.ks-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ks-col, .ks-side { min-width: 0; }

/* ---------- home: spotlight ---------- */
.ks-spot { position: relative; margin-bottom: 16px; padding: 10px; border: 1px solid var(--hs-line-2); border-radius: 4px; background: linear-gradient(180deg, var(--ks-spot1), var(--ks-spot2)); }
.ks-spot-i { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; min-height: 210px; }
.ks-spot-i[hidden] { display: none; }
.ks-spot-po { display: block; align-self: start; }
.ks-spot-po img { display: block; width: 150px; aspect-ratio: 5 / 7; object-fit: cover; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-field); }
.ks-spot-tx { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 2px 0 34px; }
.ks-spot-tx h2 { margin: 0; font: 500 25px/1.15 var(--hs-f-body); letter-spacing: -0.01em; }
.ks-spot-tx h2 a { color: var(--ks-link); }
.ks-spot-tx h2 a:hover { color: var(--ks-link-h); }
.ks-spot-d { margin: 0; color: var(--hs-tx-2); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ks-spot-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ks-spot-nav { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hs-tx-4); }
.ks-spot-nav b { color: var(--hs-tx); }
.ks-spot-nav button, .ks-pg > span { width: 22px; height: 22px; 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-2); color: var(--hs-tx-2); cursor: pointer; }
.ks-spot-nav button:hover { border-color: var(--hs-ac); color: var(--hs-ac); }

/* ---------- home: latest update ---------- */
.ks-tt { display: flex; gap: 2px; }
.ks-tt .tab { padding: 2px 8px; border-radius: 3px; color: rgba(255, 255, 255, 0.78); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ks-tt .tab:hover { color: #fff; }
.ks-tt .tab.active { background: rgba(0, 0, 0, 0.28); color: #fff; }
.ks-pg { display: flex; gap: 4px; }
.ks-pg > span { border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.22); color: #fff; }
.ks-pg > span:hover { background: rgba(0, 0, 0, 0.4); }
.ks-pg > span.disabled { opacity: 0.4; cursor: default; }
#recent-update .body { transition: opacity 0.15s; }
.ks .ks-covers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 10px; }
.ks-cover { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.ks-cover .frame { position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; margin-bottom: 4px; overflow: hidden; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-field); }
.ks-cover .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.ks-cover:hover .frame { border-color: var(--hs-ac); }
.ks-cover:hover .frame img { transform: scale(1.04); }
.ks-cq { position: absolute; left: 4px; bottom: 4px; display: flex; gap: 3px; }
.ks-cq b { height: 16px; padding: 0 4px; border-radius: 3px; display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 700; }
.ks-cq b.s { background: var(--hs-ac-fill); color: #fff; }
.ks-cq b.d { background: var(--hs-dub); color: var(--hs-dub-ink); }
.ks-cover .t { width: 100%; color: var(--ks-link); font-size: 12.5px; font-weight: 600; }
.ks-cover:hover .t { color: var(--ks-link-h); }
.ks-cover .e { color: var(--hs-tx-4); font-size: 12px; }
.ks .hs-skel { gap: 16px 10px !important; }

/* ---------- home: tab box (New & hot …) ---------- */
.ks-tabbox { margin-bottom: 16px; }
.ks-ftabs { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.ks-ftabs::-webkit-scrollbar { display: none; }
.ks-ftabs .tab, .ks-ftabs a { flex-shrink: 0; height: 27px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--ks-tab1), var(--ks-tab2)); color: var(--ks-tab-tx); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ks-ftabs .tab.active { background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--ks-bar1)); color: #fff; }
.ks-box-flat { border-top-left-radius: 0; }
.ks-rank { list-style: none; margin: 0; padding: 0; }
.ks-rank li { display: grid; grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 14px; align-items: start; padding: 10px 12px; border-bottom: 1px solid var(--hs-line); }
.ks-rank li:nth-child(even) { background: var(--ks-row); }
.ks-rank-po { display: block; }
.ks-rank-po img { display: block; width: 64px; height: 88px; object-fit: cover; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-field); }
.ks-rank-tx { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.ks-rank-tx .t { color: var(--ks-link); font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-rank-tx .t:hover { color: var(--ks-link-h); }
.ks-rank-n { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--ks-rk); color: #fff; font-size: 11.5px; font-weight: 800; }
.ks-rank-n.r1, .ks-rank-n.r2, .ks-rank-n.r3 { background: var(--hs-dub); color: var(--hs-dub-ink); }

/* ---------- sidebar widgets ---------- */
.ks-wg .ks-bb { padding: 14px 10px 10px; }
.ks-mtabs { display: flex; margin: 8px 8px 0; border-bottom: 1px solid var(--hs-line); }
.ks-mtabs .tab { flex: 1; padding: 6px 4px; text-align: center; color: var(--hs-tx-3); font-size: 12px; font-weight: 600; cursor: pointer; }
.ks-mtabs .tab:hover { color: var(--hs-tx); }
.ks-mtabs .tab.active { color: var(--ks-link); box-shadow: inset 0 -2px 0 var(--hs-ac); }
.ks-mini { list-style: none; margin: 0; padding: 4px 0; }
.ks-mini li { display: grid; grid-template-columns: 18px 36px minmax(0, 1fr); gap: 9px; align-items: center; padding: 6px 10px; border-bottom: 1px dashed var(--hs-line); }
.ks-mini li:last-child { border-bottom: 0; }
.ks-mini .n { font-size: 12px; font-weight: 800; color: var(--hs-tx-4); text-align: center; }
.ks-mini .n.r1, .ks-mini .n.r2, .ks-mini .n.r3 { color: var(--hs-dub); }
.ks-mini .ps img { display: block; width: 36px; height: 50px; object-fit: cover; border-radius: 3px; background: var(--hs-field); }
.ks-mini .tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ks-mini .t { display: block; color: var(--ks-link); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-mini .t:hover { color: var(--ks-link-h); }
.ks-mini small { color: var(--hs-tx-4); font-size: 11.5px; }
.ks-links { list-style: none; margin: 0; padding: 10px 10px 4px; }
.ks-links li { position: relative; padding: 3px 0 3px 16px; font-size: 13px; line-height: 1.4; color: var(--hs-tx-3); }
.ks-links li::before { content: ""; position: absolute; left: 2px; top: 9px; border: 4px solid transparent; border-left: 6px solid var(--hs-ac); border-right: 0; }
.ks-links a { color: var(--ks-link); font-weight: 600; }
.ks-links a.on { color: var(--ks-link-h); text-decoration: underline; }
.ks-links-plain { padding-bottom: 10px; }
.ks-gen { list-style: none; margin: 0; padding: 10px 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px; }
.ks-gen a { display: block; padding: 3px 6px; border-radius: 3px; color: var(--ks-link); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-gen a:hover { background: var(--hs-ac-soft); color: var(--ks-link-h); }
.ks-gen a.on { background: var(--hs-ac-fill); color: #fff; }
.ks-w2g p { margin: 0 0 10px; color: var(--hs-tx-3); font-size: 13px; }

/* schedule widget (AniHoshi markup injected by main.js) */
.ks #schedule-block { font-size: 13px; }
.ks #schedule-block a { color: var(--ks-link); }

/* ---------- listing ---------- */
.ks-az { display: flex; flex-wrap: wrap; gap: 4px; }
.ks-az a { min-width: 28px; height: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--hs-line-2); border-radius: 3px; color: var(--ks-link); font-size: 12.5px; font-weight: 700; }
.ks-az a:hover { border-color: var(--hs-ac); color: var(--ks-link-h); }
.ks-az a.on { background: var(--hs-ac-fill); border-color: var(--hs-ac-fill); color: #fff; }
details.ks-box > summary { list-style: none; cursor: pointer; }
details.ks-box > summary::-webkit-details-marker { display: none; }
details.ks-box:not([open]) > summary { border-radius: 3px; }
details.ks-box:not([open]) > summary::after { display: none; }
.ks-tg .c, details[open] .ks-tg .o { display: none; }
details[open] .ks-tg .c { display: inline; }
.ks-adv-box .ks-bb { padding-top: 16px; }
.ks .ks-adv-box .hs-filters { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.ks-count { font-size: 12px; color: rgba(255, 255, 255, 0.85); white-space: nowrap; }
.ks-vt { display: flex; gap: 3px; }
.ks-vt button { width: 26px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 3px; background: rgba(0, 0, 0, 0.2); color: rgba(255, 255, 255, 0.8); cursor: pointer; }
.ks-vt button[aria-pressed="true"] { background: rgba(0, 0, 0, 0.45); color: #fff; }
.ks-intro { margin: 0 0 10px; color: var(--hs-tx-3); font-size: 12.5px; }
.ks-thead, .ks-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 190px 76px; gap: 12px; align-items: center; }
.ks-thead { padding: 0 8px 6px; border-bottom: 1px solid var(--hs-tx-4); font-weight: 700; font-size: 14px; color: var(--hs-tx); }
.ks-thead span:first-child { grid-column: 1 / 3; }
.ks-thead span:last-child { grid-column: 3 / 5; }
.ks-row { padding: 6px 8px; border-bottom: 1px solid var(--hs-line); }
.ks-row:nth-child(odd) { background: var(--ks-row); }
.ks-row:hover { background: var(--hs-hover); }
.ks-row-po img { display: block; width: 44px; height: 60px; object-fit: cover; border-radius: 3px; background: var(--hs-field); }
.ks-row-tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ks-row-tx .t { color: var(--ks-link); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-row-tx .t:hover { color: var(--ks-link-h); }
.ks-row-tx .m { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--hs-tx-4); }
.ks-row-tx .m b { color: var(--hs-tx-3); font-weight: 700; }
.ks-row-tx .m .g { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ks-row-ep { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.ks-row-ep > a { color: var(--ks-link); font-weight: 600; }
.ks-row-ep .qs { display: inline-flex; gap: 3px; }
.ks-done { color: var(--hs-tx-2); font-weight: 600; }
.ks-up { color: var(--hs-tx-4); font-weight: 600; }
.ks-row-st { font-size: 11.5px; font-weight: 600; color: var(--hs-tx-4); text-align: right; }
.ks-row-st.on { color: var(--hs-ac); }
.ks-list .hs-empty strong { display: block; margin-bottom: 4px; font-size: 16px; color: var(--hs-tx-2); }
/* cover view */
.ks-list.is-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 12px; }
.ks-list.is-grid .ks-thead { display: none; }
.ks-list.is-grid .ks-row { grid-template-columns: 1fr; gap: 6px; align-items: start; align-content: start; padding: 0; border: 0; background: none !important; }
.ks-list.is-grid .ks-row-po img { width: 100%; height: auto; aspect-ratio: 5 / 7; border: 1px solid var(--hs-line-2); }
.ks-list.is-grid .ks-row-po:hover img { border-color: var(--hs-ac); }
.ks-list.is-grid .ks-row-tx .t { font-size: 13px; }
.ks-list.is-grid .ks-row-tx .m .g, .ks-list.is-grid .ks-row-st { display: none; }
.ks-list.is-grid .ks-row-ep { font-size: 12px; }
.ks-list.is-grid .hs-empty { grid-column: 1 / -1; }

/* pagination */
.ks .hs-pgu { margin-top: 18px; justify-content: flex-end; gap: 6px; }
.ks .hs-pgu .nums { gap: 4px; }
.ks .hs-pgu .nv, .ks .hs-pgu .nums > a, .ks .hs-pgu .nums > .on, .ks .hs-pgu .nums > .gap { min-width: 30px; height: 28px; padding: 0 9px !important; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--hs-line-2) !important; border-radius: 3px; background: linear-gradient(180deg, var(--ks-tab1), var(--ks-tab2)) !important; color: var(--ks-tab-tx); font: 700 12.5px var(--hs-f-body); }
.ks .hs-pgu .nums > .on { background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--ks-bar1)) !important; border-color: var(--ks-bar1) !important; color: #fff; }
.ks .hs-pgu .nums > .on::after, .ks .hs-pgu .nums > a::after { display: none; }
.ks .hs-pgu .nums > .gap { background: none !important; border-color: transparent !important; color: var(--hs-tx-4); }
.ks .hs-pgu .nv.off { opacity: 0.35; }
.ks .hs-pgu a:hover { color: #000; border-color: var(--hs-ac) !important; }

/* ---------- footer ---------- */
.ks .ks-footer { margin-top: 24px; border-top: 0; background: var(--ks-top); }
.ks .ks-footer .hs-wrap { padding-top: 0; padding-bottom: 0; display: flex; }
.ks .ks-foot-az { align-items: center; gap: 12px; padding-top: 12px !important; padding-bottom: 12px !important; border-bottom: 1px solid var(--hs-line); flex-wrap: nowrap; }
.ks-foot-lbl { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--hs-tx-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ks-az-sm { flex-wrap: wrap; gap: 3px; }
.ks-az-sm a { min-width: 24px; height: 22px; font-size: 11.5px; }
.ks-foot-main { background: var(--hs-bg); }
.ks .ks-foot-in { flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 30px; padding-top: 16px !important; padding-bottom: 18px !important; }
.ks-foot-brand { max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.ks-foot-brand p { margin: 0; color: var(--hs-tx-5); font-size: 12px; line-height: 1.55; }
.ks-foot-brand p b { color: var(--hs-tx-2); }
.ks-foot-brand .hs-logo-mark { width: 30px; height: 30px; }
.ks .ks-foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 0; max-width: 560px; font-size: 12.5px; }
.ks .ks-foot-links a { padding: 0 9px; color: var(--hs-tx-2); border-left: 1px solid var(--hs-line-2); line-height: 14px; margin: 3px 0; }
.ks .ks-foot-links a:hover { color: var(--ks-link); }

/* ---------- 404 / errors ---------- */
.ks-err { max-width: 860px; margin: 10px auto 16px; }
.ks-err-in { display: flex; gap: 24px; align-items: center; padding: 26px 24px; }
.ks-err-m { width: 120px; height: 120px; flex-shrink: 0; }
.ks-err-c { display: block; font: 800 64px/1 var(--hs-f-body); color: var(--hs-ac); letter-spacing: -0.02em; }
.ks-err h1 { margin: 6px 0 6px; font-size: 22px; font-weight: 700; }
.ks-err p { margin: 0 0 14px; color: var(--hs-tx-3); }
.ks-err-s { display: flex; gap: 6px; max-width: 460px; margin-bottom: 12px; }
.ks-err-s input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--hs-line-2); border-radius: 4px; background: var(--hs-field); color: var(--hs-tx); font: 500 13px var(--hs-f-body); outline: none; }
.ks-err-s input:focus { border-color: var(--hs-ac); }

/* =====================================================================
   Re-skin of AniHoshi pages and partials this theme does not override
   ===================================================================== */
.ks .hs-panel { border-radius: 4px; background: var(--hs-bg-2); border-color: var(--hs-line); }
.ks .hs-btn { height: 34px; padding: 0 14px; border-radius: 4px; font-size: 13px; font-weight: 700; gap: 7px; }
.ks .hs-btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.ks .hs-btn-p { background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--hs-ac-fill)); border-color: transparent; color: #fff !important; box-shadow: none; }
.ks .hs-btn-p:hover { background: linear-gradient(180deg, var(--ks-grad-h, #82C22E), var(--hs-ac-fill-h)); }
.ks .hs-btn-o { background: var(--hs-bg-2); border-color: var(--hs-line-2); color: var(--hs-tx) !important; }
.ks .hs-btn-o:hover { border-color: var(--hs-ac); }
.ks .hs-ib, .ks .hs-lang, .ks .hs-seg, .ks .hs-chip { border-radius: 4px; }
.ks .hs-tab { border-radius: 3px; }
.ks .hs-tab.active, .ks .hs-tab.on { background: var(--hs-ac-fill); color: #fff; }
.ks .hs-b { border-radius: 3px; }
.ks .hs-b-sub { background: var(--hs-ac-fill); color: #fff; }
.ks .hs-b-subsoft { background: var(--hs-ac-soft); color: var(--hs-ac-tx); }
.ks .hs-card .frame { border-radius: 3px; border: 1px solid var(--hs-line-2); }
.ks .hs-card:hover .frame { box-shadow: none; border-color: var(--hs-ac); }
.ks .hs-card .ttl { color: var(--ks-link); font-size: 13px; font-weight: 600; }
.ks .hs-card:hover .ttl { color: var(--ks-link-h); }
.ks .hs-card .frame::after { background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 45%); }
.ks .hs-crumbs { margin-bottom: 12px; font-size: 12.5px; }
.ks .hs-crumbs a { color: var(--ks-link); }
.ks .hs-row { border-radius: 4px; }
.ks .hs-row .th { border-radius: 3px; }
.ks .hs-dd-menu, .ks .hs-search .search-popup, .ks .hs-tip, .ks .dropdown-menu { border-radius: 4px; }
.ks .hs-sh h2, .ks .hs-h2 { font-size: 17px; font-weight: 700; }

/* Section heads on AniHoshi pages become green title bars */
.ks .hs-pad > .hs-sh:first-child { margin: -20px -20px 14px; min-height: 31px; padding: 4px 10px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--ks-bar1), var(--ks-bar2)); color: #fff; }
.ks .hs-pad > .hs-sh:first-child :is(h2, h3, .hs-h2) { font-size: 14px !important; font-weight: 600; color: #fff; }
.ks .hs-pad > .hs-sh:first-child :is(a, span, small) { color: rgba(255, 255, 255, 0.85) !important; }
.ks .hs-pad > .hs-sh:first-child svg { color: #fff; fill: currentColor; }
.ks .hs-sec > .hs-sh:first-child { margin-bottom: 0; min-height: 31px; padding: 4px 10px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--ks-bar1), var(--ks-bar2)); color: #fff; }
.ks .hs-sec > .hs-sh:first-child :is(h2, h3, .hs-h2) { font-size: 14px !important; font-weight: 600; color: #fff; }
.ks .hs-sec > .hs-sh:first-child :is(a, span) { color: rgba(255, 255, 255, 0.85) !important; }
.ks .hs-sec > .hs-sh:first-child + * { padding: 12px 10px; background: var(--hs-bg-2); border: 1px solid var(--hs-line); border-top: 0; border-radius: 0 0 4px 4px; }
.ks .hs-sec { margin-top: 16px; }

/* mobile bottom nav */
@media (max-width: 760px) {
    .ks .hs-bnav { background: var(--hs-bg-2); border-top: 2px solid var(--ks-bar1); backdrop-filter: none; height: 62px; padding-bottom: 4px; }
    .ks .hs-bnav a { height: 52px; color: var(--hs-tx-4); font-size: 10.5px; }
    .ks .hs-bnav a.on { color: var(--hs-ac); }
    body.hs.ks { padding-bottom: 62px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1150px) {
    .ks .ks-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
    .ks .ks-tabs::-webkit-scrollbar { display: none; }
    .ks .ks-tabs .hs-dd { display: none; }
    .ks .ks-burger { display: inline-flex; margin-left: -6px; }
    .ks .ks-covers { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .ks-list.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .ks-cols { grid-template-columns: minmax(0, 1fr); }
    .ks-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
    .ks .ks-covers { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .ks .ks-foot-in { flex-wrap: wrap; }
    .ks .ks-foot-links { justify-content: flex-start; }
}
@media (max-width: 760px) {
    .ks .hs-wrap { padding-left: 12px; padding-right: 12px; }
    .ks .ks-top { position: relative; }
    .ks .ks-top-in { min-height: 56px; gap: 6px; padding-top: 4px; padding-bottom: 4px; }
    .ks .ks-logo .hs-logo-mark { width: 38px; height: 38px; }
    .ks .ks-logo .hs-logo-text { font-size: 21px !important; }
    .ks-top-r { flex-direction: row; align-items: center; width: auto; max-width: none; margin-left: auto; gap: 4px; }
    .ks-adv { display: none; }
    .ks-acc { padding: 0; background: none; border: 0; gap: 4px; }
    .ks .ks-search { display: none; }
    .ks .ks-search.open { display: block; position: absolute; left: 10px; right: 10px; top: 12px; z-index: 5; width: auto; }
    .ks .ks-stog { display: inline-flex; width: 34px; height: 34px; order: 3; }
    .ks .ks-bar-in { padding-top: 8px; padding-left: 8px; padding-right: 8px; }
    .ks .ks-tabs .ks-tab { height: 27px; padding: 0 11px; font-size: 12px; }
    .ks-tools { display: none; }
    .ks-main { padding-top: 12px; }
    .ks-side { display: block; }
    .ks-spot-i { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; min-height: 0; }
    .ks-spot-po img { width: 96px; }
    .ks-spot-tx { gap: 6px; padding-bottom: 0; }
    .ks-spot-tx h2 { font-size: 18px; }
    .ks-spot-d { -webkit-line-clamp: 3; font-size: 12.5px; }
    .ks-spot-b { margin-top: 4px; }
    .ks-spot-nav { position: static; justify-content: flex-end; margin-top: 8px; }
    .ks-bh { flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; row-gap: 4px; }
    .ks-bh-r { flex-wrap: wrap; }
    #recent-update .ks-bh-r { width: 100%; justify-content: space-between; }
    .ks-tt { overflow-x: auto; scrollbar-width: none; }
    .ks .ks-covers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
    .ks-rank li { grid-template-columns: 54px minmax(0, 1fr) 22px; gap: 10px; padding: 8px; }
    .ks-rank-po img { width: 54px; height: 74px; }
    .ks-rank-tx .t { font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .ks-meta { gap: 2px 10px; font-size: 12px; }
    .ks-gen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ks-thead, .ks-row { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 10px; }
    .ks-thead span:last-child, .ks-row-st { display: none; }
    .ks-row-po { grid-row: span 2; }
    .ks-row-ep { grid-column: 2; font-size: 12.5px; }
    .ks-list.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
    .ks-list.is-grid .ks-row-po { grid-row: auto; }
    .ks-list.is-grid .ks-row-ep { grid-column: auto; }
    .ks .hs-pgu { justify-content: center; flex-wrap: wrap; }
    .ks .hs-pgu .nv span { display: none; }
    .ks .ks-foot-az { flex-wrap: wrap; }
    .ks-err-in { flex-direction: column; text-align: center; padding: 18px 14px; }
    .ks-err-s { margin-left: auto; margin-right: auto; }
    .ks-err .ks-spot-b { justify-content: center; }
    .ks .ks-dd .hs-dd-menu.grid { width: min(560px, 92vw); }
}
@media (max-width: 380px) {
    .ks .ks-logo .hs-logo-text { font-size: 18px !important; }
    .ks .ks-logo .hs-logo-mark { width: 32px; height: 32px; }
}

/* ---------- sidebar schedule (own partial) ---------- */
.ks-sched { display: flex; flex-direction: column; gap: 8px; }
.ks-days { display: flex; align-items: center; gap: 4px; }
.ks-days .prev, .ks-days .next { flex-shrink: 0; width: 22px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-bg-3); color: var(--hs-tx-3); cursor: pointer; }
.ks-days .prev:hover, .ks-days .next:hover { color: var(--hs-ac); border-color: var(--hs-ac); }
.ks-days .swiper-container { flex: 1; min-width: 0; overflow: hidden; }
.ks-days .items { display: flex; }
.ks-days .day { flex-shrink: 0; width: calc(100% / 5); padding: 0 2px; }
.ks-days .inner { height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-bg-3); cursor: pointer; line-height: 1.1; }
.ks-days .inner .wd { font-size: 10px; font-weight: 700; color: var(--hs-tx-4); letter-spacing: 0.04em; }
.ks-days .inner b { font-size: 14px; color: var(--hs-tx); }
.ks-days .day.active .inner { background: linear-gradient(180deg, var(--ks-grad, #74B126), var(--hs-ac-fill)); border-color: var(--hs-ac-fill); }
.ks-days .day.active .inner :is(.wd, b) { color: #fff; }
.ks-now { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--hs-tx-4); }
.ks-now .timenow { color: var(--hs-tx-2); font-weight: 600; }
.ks-sl { list-style: none; margin: 0; padding: 0; max-height: 330px; overflow-y: auto; }
.ks-sl li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px dashed var(--hs-line); font-size: 12.5px; }
.ks-sl li:last-child { border-bottom: 0; }
.ks-sl time { color: var(--hs-tx-4); font-variant-numeric: tabular-nums; font-size: 12px; }
.ks-sl a { min-width: 0; color: var(--ks-link); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-sl em { font-style: normal; color: var(--hs-tx-3); font-size: 11.5px; font-weight: 600; }
.ks-sl li.old { opacity: 0.6; }
.ks-sl li.nx { background: var(--hs-ac-soft); }
.ks-sl li.nx time { color: var(--hs-ac); font-weight: 700; }

/* fixes after first pass */
.ks .ks-footer nav.ks-az { gap: 3px; font-size: 11.5px; }
.ks .ks-footer nav.ks-az a { color: var(--ks-link); }
.ks .ks-covers > .ks-cover:nth-child(6n+1):last-child { display: none; }
@media (max-width: 1150px) { .ks .ks-covers > .ks-cover:nth-child(6n+1):last-child { display: flex; } .ks .ks-covers > .ks-cover:nth-child(5n+1):last-child { display: none; } }
@media (max-width: 980px) { .ks .ks-covers > .ks-cover:nth-child(5n+1):last-child { display: flex; } .ks .ks-covers > .ks-cover:nth-child(6n+1):last-child { display: none; } }
@media (max-width: 760px) { .ks .ks-covers > .ks-cover:nth-child(6n+1):last-child { display: flex; } .ks .ks-covers > .ks-cover:nth-child(3n+1):last-child { display: none; } }

/* AniHoshi refine.css uses fixed navy shades in a few places — map them to this theme */
.ks .hs-f-kw input { background: var(--hs-field); box-shadow: inset 0 0 0 1px var(--hs-line-2); color: var(--hs-tx); }
.ks .hs-f-kw input:focus { box-shadow: inset 0 0 0 1px var(--hs-ac); }
.ks .hs-fb { background: var(--hs-bg-3); box-shadow: inset 0 0 0 1px var(--hs-line-2); color: var(--hs-tx-2); }
.ks .hs-fb:hover { background: var(--hs-raise); color: var(--hs-tx); }
.ks .hs-filters .dropdown.show .hs-fb { background: var(--hs-raise); box-shadow: inset 0 0 0 1px var(--hs-ac); color: var(--hs-tx); }
.ks .hs-f-go .hs-btn-o { background: transparent; border-color: var(--hs-line-2); color: var(--hs-tx-2) !important; }
.ks .hs-filters .dropdown-menu { background: var(--hs-bg-2); border-color: var(--hs-line-2); }
.ks .hs-card .sub { color: var(--hs-tx-4); }
.ks .hs-cb-eps .s, .ks .hs-pill-sm .s { color: var(--hs-ac) !important; }
.ks .hs-vt button[aria-pressed="true"] { background: var(--hs-raise); }
.ks .hs-srv .type li { background: var(--hs-bg-3); color: var(--hs-tx-2); }
.ks .hs-srv .type li:hover { background: var(--hs-raise); color: var(--hs-tx); }
.ks .hs-results.is-list .hs-card { background: var(--hs-bg-2); }
.ks .hs-results.is-list .hs-card:hover { background: var(--hs-hover); }
.ks .hs-btitle { color: var(--hs-tx); }
.ks .hs-nav > a .ni { color: var(--hs-tx-4); }
.ks .hs-logo-text { color: var(--hs-tx); }
.ks .hs-tr .hs-pill-sm { backdrop-filter: none; } /* segments keep their filled colours (white-icon badges) */
.ks .hs-tr .hs-pill-sm > span, .ks .hs-tr .hs-pill-sm > span em { color: #fff !important; }
.ks .ks-foot-links a:first-child { border-left: 0; }
@media (max-width: 760px) { .ks .ks-search.open { z-index: 80; } }

/* =====================================================================
   Classic loaders: the AniHoshi-branded loaders (star spinner, sparkle,
   constellation, poster skeleton, comet, beads, film reel, equalizer)
   become one plain green ring and "Loading…" text in this theme.
   ===================================================================== */
@keyframes ks-spin { to { transform: rotate(360deg); } }
.ks { --ks-ring: 3px solid var(--hs-line-2); }
/* main.js .loading blocks (player, lists) + .hs-spin */
.ks .loading::before, .ks .hs-spin::before {
    content: ""; position: absolute; left: 50%; top: 50%; z-index: 5; width: 30px; height: 30px; margin: -22px 0 0 -15px;
    border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; background: none; -webkit-mask: none; mask: none; animation: ks-spin 0.8s linear infinite;
}
.ks .loading::after {
    content: "Loading…"; position: absolute; left: 50%; top: 50%; z-index: 5; width: auto; height: auto; margin: 16px 0 0; transform: translateX(-50%);
    background: none; clip-path: none; animation: none; color: var(--hs-ac); font: 600 12.5px var(--hs-f-body); white-space: nowrap; font-size: 12.5px;
}
.ks .hs-spin { font-size: 22px !important; width: 22px; height: 22px; }
.ks .hs-spin::before { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.ks .hs-spin::after { display: none; }
.ks #player .loading { background: #000; }
.ks .hs-loading { color: var(--hs-ac); }
.ks .hs-ltxt { color: var(--hs-ac); }
/* tooltip loader (sparkle + skeleton lines) */
.ks .hs-spark i, .ks .hs-twk-l, .ks .hs-twk-h .sub { display: none; }
.ks .hs-spark { width: 18px; height: 18px; border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; animation: ks-spin 0.8s linear infinite; }
.ks .hs-twk { min-width: 180px; padding: 12px 14px; }
/* live search loader (constellation) */
.ks .hs-cst { display: none; }
.ks .hs-cst-load::before { content: ""; flex: none; width: 22px; height: 22px; border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; animation: ks-spin 0.8s linear infinite; }
/* latest-update reload: no poster skeleton, just dim the grid under a ring */
.ks .hs-skel { display: none !important; }
.ks .hs-skel-host > :not(.hs-skel) { visibility: visible; opacity: 0.4; }
.ks .hs-skel-host::after { content: ""; position: absolute; left: 50%; top: 120px; z-index: 6; width: 34px; height: 34px; margin-left: -17px; border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; animation: ks-spin 0.8s linear infinite; }
/* page-change bar: plain green line, no star */
.ks .hs-comet i::after { display: none; }
.ks .hs-comet i::before, .ks .hs-comet.done i::before { background: var(--hs-ac); border-radius: 0; }
/* beads (comments, busy buttons) */
.ks .hs-beads i { display: none; }
.ks .hs-beads::before { content: ""; width: 20px; height: 20px; border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; animation: ks-spin 0.8s linear infinite; }
.ks .hs-beads.sm::before { width: 12px; height: 12px; border-width: 2px; }
/* film reel: episode-list status + pending episode stills */
.ks .hs-film, .ks .hs-film.mini { width: 14px !important; height: 14px !important; border: 2px solid var(--hs-line-2); border-top-color: var(--hs-ac); border-radius: 50%; background: none; -webkit-mask: none; mask: none; animation: ks-spin 0.8s linear infinite; }
.ks .hs-film-box { background-image: none; background-color: var(--hs-bg-3); animation: none; }
.ks .hs-eps-status { color: var(--hs-ac); }
/* equalizer: server list reload + the server being switched to */
.ks #w-servers[data-hs-busy]::before { width: 26px; height: 26px; margin-left: -13px; border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; background: none; animation: ks-spin 0.8s linear infinite; }
.ks #w-servers[data-hs-busy]::after { color: var(--hs-ac); }
.ks #watch-main:has(#player .loading) .type li.active::before { width: 10px; height: 10px; margin-right: 6px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; background: none; animation: ks-spin 0.8s linear infinite; }
.ks .hs-eq, .ks .hs-eq-box { width: 18px; height: 18px; border: var(--ks-ring); border-top-color: var(--hs-ac); border-radius: 50%; background: none; animation: ks-spin 0.8s linear infinite; }

/* ---------- home: continue watching (own partial) ---------- */
.ks-cw .ks-bh-a { padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--hs-f-body); }
.ks-cw .ks-bh-r { gap: 0; }
.ks-cw .ks-bh-r .ks-bh-a + .ks-bh-a { margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.4); }
.ks-cwl { list-style: none; margin: 0; padding: 12px 10px 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.ks-cwi { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) 20px; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px dashed var(--hs-line); }
.ks-cwi .ps { position: relative; display: block; width: 46px; height: 64px; overflow: hidden; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-field); }
.ks-cwi .ps img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-cwi .ps .pl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.45); color: #fff; opacity: 0; transition: opacity 0.15s; }
.ks-cwi:hover .ps .pl { opacity: 1; }
.ks-cwi:hover .ps { border-color: var(--hs-ac); }
.ks-cwi .tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ks-cwi .t { color: var(--ks-link); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-cwi .t:hover { color: var(--ks-link-h); }
.ks-cwi .m { font-size: 12px; color: var(--hs-tx-4); }
.ks-cwi .m a { color: var(--hs-tx-2); font-weight: 600; }
.ks-cwi .pg { display: flex; align-items: center; gap: 8px; }
.ks-cwi .bar { flex: 1; height: 4px; border-radius: 2px; background: var(--hs-line-2); overflow: hidden; }
.ks-cwi .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--hs-ac-2), var(--hs-ac)); }
.ks-cwi .pg b { flex: none; min-width: 30px; text-align: right; font-size: 11px; color: var(--hs-tx-3); }
.ks-cwx { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--hs-line-2); border-radius: 3px; background: var(--hs-bg-3); color: var(--hs-tx-4); cursor: pointer; }
.ks-cwx:hover { border-color: var(--hs-hot); color: var(--hs-hot); }
@media (max-width: 760px) { .ks-cwl { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Badges: the poster-card treatment everywhere (score/type chips on top,
   CC / mic / EPS split strip along the bottom, the same strip inline)
   ===================================================================== */
.ks .hs-cb-top { left: 5px; top: 5px; right: 5px; gap: 3px; }
.ks .hs-cb-top > span { height: 18px; padding: 0 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.78); border-color: rgba(255, 255, 255, 0.1); color: #EDEDED; font-size: 10px; }
.ks .hs-cb-top .sc { color: #F5C451; }
.ks .hs-cb-top .ty { color: #fff; }
.ks .hs-cb-eps { height: 22px; background: rgba(0, 0, 0, 0.86) !important; border-top: 1px solid rgba(255, 255, 255, 0.08) !important; font-size: 10.5px; }
.ks .hs-cb-eps .s { color: #A6DB55 !important; }
.ks .hs-cb-eps .d { color: #F6B95A !important; }
.ks .hs-cb-eps .t { color: #E2E2E2 !important; }
.ks .hs-cb-eps .t em { color: #A9A9A9 !important; }
.ks .hs-pill-sm { height: 19px; background: var(--hs-bg-3) !important; border: 1px solid var(--hs-line-2) !important; border-radius: 3px; vertical-align: middle; }
.ks .hs-pill-sm > span + span { border-left: 1px solid var(--hs-line-2) !important; }
.ks .hs-pill-sm .s { color: var(--hs-ac) !important; }
.ks .hs-pill-sm .d { color: var(--hs-dub-tx) !important; }
.ks .hs-pill-sm .t { color: var(--hs-tx-2) !important; }
.ks .hs-pill-sm .t em { color: var(--hs-tx-4) !important; }
html[data-theme="light"] .ks .hs-pill-sm .d { color: #A9650A !important; }
.ks .hs-tr .hs-pill-sm { transform: none; }
.ks-cover .frame .hs-cb-eps { left: 0; right: 0; bottom: 0; }
/* listing: poster strip only in cover view, inline strip in the table */
.ks-row-po { position: relative; display: block; }
.ks-row-po .hs-cb-eps { display: none; }
.ks-list.is-grid .ks-row-po { overflow: hidden; border-radius: 3px; }
.ks-list.is-grid .ks-row-po .hs-cb-eps { display: flex; }
.ks-list.is-grid .ks-row-ep .qs { display: none; }
.ks-key { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ks-key.s { color: var(--hs-ac); }
.ks-key.d { color: var(--hs-dub-tx); }

/* =====================================================================
   Badges v2 (owner): white icon + white count on filled segments.
   Fills chosen for >= 4.5:1 with white: green #4A7A0C (~5.1:1),
   amber #9E5A00 (~5.3:1), EPS #2E2E2E. Same in dark and light mode.
   ===================================================================== */
.ks { --ks-b-sub: #4A7A0C; --ks-b-dub: #9E5A00; --ks-b-eps: #2E2E2E; }
.ks .hs-cb-eps, .ks .hs-pill-sm { background: transparent !important; border: 0 !important; gap: 0; overflow: hidden; }
.ks .hs-cb-eps > span, .ks .hs-pill-sm > span { color: #fff !important; }
.ks .hs-cb-eps > span + span, .ks .hs-pill-sm > span + span { border-left: 1px solid rgba(0, 0, 0, 0.28) !important; }
.ks .hs-cb-eps > span.s, .ks .hs-pill-sm > span.s { background: var(--ks-b-sub) !important; }
.ks .hs-cb-eps > span.d, .ks .hs-pill-sm > span.d { background: var(--ks-b-dub) !important; }
.ks .hs-cb-eps > span.t, .ks .hs-pill-sm > span.t { background: var(--ks-b-eps) !important; }
.ks .hs-cb-eps .t em, .ks .hs-pill-sm .t em { color: rgba(255, 255, 255, 0.82) !important; }
.ks .hs-cb-eps svg, .ks .hs-pill-sm svg { color: #fff !important; }
html[data-theme="light"] .ks .hs-pill-sm .d, html[data-theme="light"] .ks .hs-pill-sm .s { color: #fff !important; }
.ks .hs-pill-sm { border-radius: 3px; }
/* poster strip: filled segments sit flush along the bottom */
.ks .hs-cb-eps { border-top: 0 !important; }
/* type / score chips: dark with white text */
.ks .hs-cb-top > span { background: rgba(20, 20, 20, 0.88); color: #fff; border-color: rgba(255, 255, 255, 0.12); }
.ks .hs-cb-top .sc { color: #fff; }
.ks .hs-cb-top .sc svg { color: #F5C451; }
/* legend keys above the listing */
.ks-key { height: 18px; padding: 0 6px; border-radius: 3px; color: #fff !important; font-size: 11px; vertical-align: middle; }
.ks-key.s { background: var(--ks-b-sub); }
.ks-key.d { background: var(--ks-b-dub); }
.ks-key svg { color: #fff; }

/* ===== round 5: chips, header "More" links, classic icons, pager ===== */
/* inline chips (info box, tooltip): dark with white text, like the poster chips */
.ks .ks-chip { height: 19px; padding: 0 6px; gap: 3px; border: 0; border-radius: 3px; background: #2E2E2E; color: #fff !important; font-size: 10.5px; }
.ks a.ks-chip:hover { background: #3A3A3A; }
.ks .ks-chip.ks-st.is-releasing { background: var(--ks-b-sub); color: #fff !important; }
.ks .ks-chip-sc svg { color: #F5C451; }
.ks .hs-tipc .bd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* listing posters: chips only in cover view */
.ks-row-po .hs-cb-top { display: none; }
.ks-list.is-grid .ks-row-po .hs-cb-top { display: flex; }
/* kiss poster card (recommended, zero-episode page, bookmarks) */
.ks .ks-card { gap: 2px; }
.ks .ks-card .frame { aspect-ratio: 5 / 7; border-radius: 3px; }
.ks .ks-card .frame::after { display: none; }
.ks .ks-card .ttl { margin-top: 4px; text-align: center; }
/* W2G language tag: filled like the badges */
.ks .w2-lang { padding: 0 5px; border-radius: 3px; color: #fff !important; background: var(--ks-b-eps); }
.ks .w2-lang.sub { background: var(--ks-b-sub); }
.ks .w2-lang.dub { background: var(--ks-b-dub); }
.ks .ks-wl-ep { display: flex; }

/* "More" in the title bar instead of a bottom row */
.ks-bh .ks-bh-a span[aria-hidden] { margin-left: 2px; }
.ks-tabhead { display: flex; align-items: flex-end; gap: 8px; }
.ks-tabhead .ks-ftabs { flex: 1; min-width: 0; }
.ks-tabmore { flex-shrink: 0; padding: 0 2px 5px; color: var(--ks-link) !important; font-size: 12.5px; font-weight: 700; }
.ks-tabmore:hover { text-decoration: underline; }
.ks-wg .ks-mini, .ks-wg .ks-links { padding-bottom: 6px; }

/* header: classic guest line + EN/JP slider */
.ks .ks-guest { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: var(--hs-tx); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ks .ks-guest a { color: var(--ks-link); }
.ks .ks-guest a:hover { text-decoration: underline; }
.ks .ks-guest .ks-i-user { flex: none; }
.ks .ks-acc:has(.ks-guest) { padding-right: 8px; }
.ks .ks-adv .ks-i-adv { flex: none; }
.ks .ks-lang { position: relative; height: 14px; width: 28px; padding: 0; border: 0; border-radius: 7px; background: #555; overflow: visible; cursor: pointer; }
.ks .ks-lang span { position: absolute; top: 1px; width: 12px; height: 12px; padding: 0; border-radius: 50%; font-size: 0; background: transparent; cursor: pointer; }
.ks .ks-lang span[data-value="en"] { left: 1px; }
.ks .ks-lang span[data-value="jp"] { right: 1px; }
.ks .ks-lang span.active { background: #B266F2; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5); }
.ks .ks-lang::after { content: "EN/JP NAME"; position: absolute; left: 34px; top: 1px; color: var(--hs-tx-2); font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; pointer-events: none; }
.ks .ks-tools { gap: 78px; }
.ks .ks-tools .ks-lang { margin-right: 0; }

/* sidebar link lists: the classic small pencil bullet */
.ks-links li { padding-left: 18px; }
.ks-links li::before { content: "\f303"; left: 1px; top: 4px; border: 0; font: 900 10px/1.4 "Font Awesome 6 Free"; color: var(--hs-tx-4); }

/* player bar glyphs: white-ish icons, yellow report, green prev/next arrows */
.ks-watch .hs-ctrls .ctrl .ks-fa { width: 15px; font-size: 13px; text-align: center; color: var(--hs-tx-2); }
.ks-watch .hs-ctrls .ctrl.prev .ks-fa, .ks-watch .hs-ctrls .ctrl.next .ks-fa { color: var(--hs-ac); }
.ks-watch .hs-ctrls .ctrl.report .ks-fa { color: var(--hs-star); }
.ks-watch .hs-ctrls .ctrl:hover .ks-fa { color: var(--ks-link); }
.ks-bm i { font-size: 10px; }

/* pager: grey squares, "<<" / ">>", items count on the left */
.ks .ks-pager { justify-content: flex-end; align-items: center; }
.ks .ks-pg-info { margin-right: auto; color: var(--hs-tx-4); font-size: 12px; font-weight: 600; }
.ks .ks-pager .nv { font-family: var(--hs-f-body); letter-spacing: -0.05em; }
@media (max-width: 760px) { .ks .ks-pg-info { flex-basis: 100%; text-align: center; margin: 0 0 6px; } .ks .ks-tools { gap: 10px; } }
@media (max-width: 760px) {
    .ks .ks-guest { gap: 4px; padding: 0 2px; font-size: 0; }
    .ks .ks-guest .sign-in { font-size: 12.5px; text-transform: capitalize; }
    .ks .ks-guest .ks-reg { display: none; }
}
@media (max-width: 760px) {
    .ks .ks-acc .ks-mode { display: none; }
    .ks .ks-logo .hs-logo-text { font-size: 20px !important; }
    .ks .ks-logo .hs-logo-mark { width: 34px; height: 34px; }
}
@media (max-width: 760px) { .ks .ks-top-in { gap: 2px; padding-left: 8px; padding-right: 8px; } .ks .ks-burger { margin-left: -4px; } }
@media (max-width: 760px) { .ks .ks-logo { min-width: 0; flex-shrink: 1; overflow: hidden; } .ks .ks-top-r, .ks .ks-stog { flex-shrink: 0; } }

/* icon pass 2 (closer to the archived reference) */
.ks .ks-guest .sign-in, .ks .ks-guest .ks-reg { display: inline; height: auto; padding: 0; border: 0; border-radius: 0; background: none !important; box-shadow: none; color: var(--ks-link) !important; font: inherit; line-height: inherit; }
.ks .ks-go { font-weight: 500; font-size: 13.5px; letter-spacing: 0.01em; }
.ks-bm { border: 0 !important; background: none !important; padding: 0 2px !important; font-size: 12.5px !important; }
.ks-bm:hover span { text-decoration: underline; }
.ks-bm i { font-size: 11px; }
.ks-watch .hs-ctrls .ctrl.report { font-weight: 800; color: var(--hs-star); }
.ks-watch .hs-ctrls .ctrl .ks-oo { font-weight: 700; color: var(--hs-tx-4); }
.ks-watch .hs-ctrls .ctrl.check .ks-fa { color: var(--hs-tx-2); }
/* badge text: white on every filled segment (beats the v1 coloured-text rules) */
.ks .hs-pill-sm > span.s, .ks .hs-pill-sm > span.d, .ks .hs-pill-sm > span.t,
.ks .hs-cb-eps > span.s, .ks .hs-cb-eps > span.d, .ks .hs-cb-eps > span.t { color: #fff !important; }
.ks .hs-pill-sm > span.t em, .ks .hs-cb-eps > span.t em { color: rgba(255, 255, 255, 0.8) !important; }
/* tooltip text follows the theme (light mode) */
.ks .hs-tipc .hd .t { color: var(--hs-tx); }
.ks .hs-tipc .hd .j, .ks .hs-tipc .ds { color: var(--hs-tx-3); }

/* ---------- comments in light mode ----------
   comments.css is dark-only (white text tokens on its own vars, plus a few hard-coded whites), so the
   episode picker, "Comment as", Sort, Close/Spoil, names and bodies were near-invisible on the light page.
   Re-point its tokens at the theme's and fix the hard-coded rules (scoped to light mode). */
html[data-theme="light"] .ks #comments.block_area-comment, html[data-theme="light"] .ks .block_area.block_area-comment {
    --cm-body: var(--hs-bg-2); --cm-text: var(--hs-tx); --cm-mute: var(--hs-tx-3); --cm-mute-2: var(--hs-tx-4);
    --cm-line: var(--hs-line); --cm-line-strong: var(--hs-line-2); --cm-soft: rgba(27, 27, 27, 0.04); --cm-soft-hov: var(--hs-hover);
    --cm-acc2: var(--hs-ac-tx); --cm-acc2-rgb: 63, 112, 8; --cm-good: #2E7D32; --cm-bad: #C62828; --cm-danger: #C62828;
    color: var(--hs-tx);
}
html[data-theme="light"] .ks .block_area-comment { --cm-mute: #555555; --cm-mute-2: #666666; }
html[data-theme="light"] .ks .block_area-comment .cw_l-line .ihead .user-name { color: var(--hs-tx) !important; }
html[data-theme="light"] .ks .block_area-comment .cw_l-line .ihead .user-name:hover { color: var(--hs-ac) !important; }
html[data-theme="light"] .ks .block_area-comment .cw_l-line .ihead .user-name.is-level-a { color: #A35F00 !important; }
html[data-theme="light"] .ks .block_area-comment .cw_l-line .ihead .user-name span:not(.badg-level):not(.badg-aura):not(.ak-title-eq) { background: rgba(91, 63, 209, 0.1); color: #4B32B8; border-color: rgba(91, 63, 209, 0.3); }
html[data-theme="light"] .ks .block_area-comment .ci-buttons .btn-primary { background: var(--hs-ac-fill) !important; color: #fff !important; }
html[data-theme="light"] .ks .block_area-comment .ci-buttons .btn-primary:hover { background: var(--hs-ac-fill-h) !important; filter: none; }
html[data-theme="light"] .ks .block_area-comment .no-result { color: var(--hs-tx-3); }

/* filled surfaces carrying white text: >= 4.5:1 in dark and light */
.ks .block_area-comment .ci-buttons .btn-primary { background: var(--hs-ac-fill) !important; border-color: var(--hs-ac-fill) !important; color: #fff !important; }
.ks .block_area-comment .ci-buttons .btn-primary:hover { background: var(--hs-ac-fill-h) !important; filter: none; }
.ks .mapper-dl-chip:hover, .ks .hs-srv .mapper-dl-chip:hover { background: var(--hs-ac-fill) !important; border-color: var(--hs-ac-fill) !important; color: #fff !important; }
.ks .mapper-dl-grp.is-open .mapper-dl-grp-toggle { background: var(--hs-ac-fill); color: #fff; }
.ks .hs-srv .type[data-type="dub"] li.active, .ks .hs-srv .type[data-type="adub"] li.active { background: #A85A06; border-color: #A85A06; color: #fff; }
.ks .rq-guide .rq-steps > li::before { background: var(--hs-ac-fill); color: #fff; }
html[data-theme="light"] .ks .hs-b-hd { background: var(--hs-tx); color: #fff; }
html[data-theme="light"] .ks-foot-brand p { color: var(--hs-tx-4); }
