/* =========================================================================
   TioAnime – anime portal (dark violet / pink). Dark only.
   ========================================================================= */

:root {
    --bg: #120b20;
    --bg-2: #170e29;
    --surface: #1e1433;
    --surface-2: #261a40;
    --surface-3: #2f2150;
    --line: #33264f;
    --line-2: #46356c;
    --text: #f2edfb;
    --muted: #aea4c8;
    --dim: #7e7499;
    --pink: #ff4f9a;
    --pink-2: #ff7cb6;
    --pink-soft: rgba(255, 79, 154, .14);
    --violet: #9a6bff;
    --live: #3ee08f;
    --b-sub: #ffc4de;
    --b-sub-t: #4a0f2b;
    --b-lat: #bfe6ff;
    --b-lat-t: #08263a;
    --b-cast: #ffe1a6;
    --b-cast-t: #3d2700;
    --radius: 12px;
    --radius-sm: 8px;
    --wrap: 1440px;
    --gutter: 24px;
    --hd: 64px;
    --shadow: 0 10px 30px rgba(5, 2, 12, .45);
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: dark;
}

@media (max-width: 700px) {
    :root { --gutter: 16px; --hd: 58px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hd) + 12px); }

body.tio {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    background-image: radial-gradient(1200px 600px at 85% -10%, rgba(154, 107, 255, .12), transparent 60%), radial-gradient(900px 500px at -10% 30%, rgba(255, 79, 154, .06), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    font: 400 15px/1.55 var(--font);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pink-2); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.tio-i { width: 1.15em; height: 1.15em; flex: none; }
.tio-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tio-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--pink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.tio-skip:focus { top: 12px; color: #fff; }

.tio-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.tio-main { display: block; min-height: 60vh; }

/* ---------- Buttons, pills, badges ---------- */

.tio-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .15s;
    background: var(--surface-2); color: var(--text);
}
.tio-btn:hover { color: #fff; transform: translateY(-1px); }
.tio-btn--pink { background: var(--pink); color: #fff; box-shadow: 0 8px 22px rgba(255, 79, 154, .32); }
.tio-btn--pink:hover { background: var(--pink-2); }
.tio-btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.tio-btn--ghost:hover { border-color: var(--pink); color: var(--pink-2); }
.tio-btn--glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.tio-btn--glass:hover { background: rgba(255, 255, 255, .18); }
.tio-btn--lg { height: 46px; padding: 0 24px; font-size: 15px; }
.tio-btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }

.tio-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tio-b {
    display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px;
    font-size: 11px; font-weight: 800; letter-spacing: .02em; line-height: 1;
}
.tio-b--sub { background: var(--b-sub); color: var(--b-sub-t); }
.tio-b--lat { background: var(--b-lat); color: var(--b-lat-t); }
.tio-b--cast { background: var(--b-cast); color: var(--b-cast-t); }
.tio-b--ep { background: rgba(255, 255, 255, .2); color: #fff; backdrop-filter: blur(4px); }
.tio-b--x { background: var(--surface-3); color: var(--muted); }

.tio-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 12px; font-weight: 700; color: var(--text); }
.tio-pill--live { background: rgba(62, 224, 143, .15); color: var(--live); }
.tio-pill--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; }

.tio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgba(62, 224, 143, .18); display: inline-block; }

.tio-chip {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.tio-chip:hover { color: var(--text); border-color: var(--line-2); }
.tio-chip.is-on { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-2); }
.tio-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tio-chip:has(input:focus-visible) { outline: 2px solid var(--pink); outline-offset: 2px; }

.tio-empty { color: var(--muted); padding: 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; }
.tio-empty--big { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 24px; }
.tio-empty--big .tio-i { width: 40px; height: 40px; color: var(--pink); }

/* ---------- Header ---------- */

.tio-hd {
    position: sticky; top: 0; z-index: 100; height: var(--hd);
    background: rgba(18, 11, 32, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.tio-hd.is-scrolled { background: rgba(18, 11, 32, .96); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.tio-hd__in { display: flex; align-items: center; gap: 18px; height: 100%; }
.tio-hd__menu, .tio-hd__s {
    display: none; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text);
    align-items: center; justify-content: center;
}
.tio-hd__menu:hover, .tio-hd__s:hover { background: var(--surface-2); }
.tio-hd__menu .tio-i, .tio-hd__s .tio-i { width: 22px; height: 22px; }

.tio-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--text); }
.tio-logo__img { height: 38px; width: auto; }
.tio-logo__img + .tio-logo__txt { display: none; }
.tio-logo__txt { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.tio-logo__txt b { color: var(--pink); }
.tio-logo:hover { color: var(--text); }

.tio-nav { display: flex; gap: 4px; }
.tio-nav__a { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tio-nav__a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.tio-nav__a.is-on { color: #fff; background: var(--pink-soft); box-shadow: inset 0 0 0 1px rgba(255, 79, 154, .35); }

.tio-search { position: relative; margin-left: auto; width: min(420px, 34vw); }
.tio-search input {
    width: 100%; height: 42px; padding: 0 44px 0 42px; border-radius: 999px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: var(--text); outline: none;
    transition: border-color .2s, background .2s;
}
.tio-search input::placeholder { color: var(--dim); }
.tio-search input:focus { border-color: var(--pink); background: rgba(255, 255, 255, .1); }
.tio-search input::-webkit-search-cancel-button { display: none; }
.tio-search__ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.tio-search__go { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--pink); color: #fff; display: grid; place-items: center; }

.tio-suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 110;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.tio-suggest__it { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tio-suggest__it:hover, .tio-suggest__it.is-on { background: var(--surface-2); color: var(--text); }
.tio-suggest__it img { width: 42px; height: 60px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.tio-suggest__t { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tio-suggest__m { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.tio-suggest__all { display: block; text-align: center; padding: 11px; font-weight: 700; font-size: 13px; color: var(--pink-2); background: var(--bg-2); }
.tio-suggest__empty { padding: 16px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 1180px) {
    .tio-nav__a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 1020px) {
    .tio-nav { display: none; }
    .tio-hd__menu { display: inline-flex; }
    .tio-search { width: min(420px, 50vw); }
}
@media (max-width: 700px) {
    .tio-hd__in { gap: 8px; }
    .tio-hd__s { display: inline-flex; margin-left: auto; }
    .tio-logo__img { height: 30px; }
    .tio-search { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--hd) - 2px); width: auto; margin: 0; }
    .tio-hd.is-search .tio-search { display: block; }
    .tio-search input { background: var(--surface); }
}

/* ---------- Drawer ---------- */

.tio-drawer { position: fixed; inset: 0; z-index: 150; }
.tio-drawer__bg { position: absolute; inset: 0; background: rgba(5, 2, 12, .6); backdrop-filter: blur(2px); animation: tio-fade .2s; }
.tio-drawer__panel {
    position: absolute; left: 0; top: 0; bottom: 0; width: min(320px, 86vw); overflow-y: auto;
    background: var(--bg-2); border-right: 1px solid var(--line); padding: 16px; animation: tio-slide .25s ease-out;
}
.tio-drawer__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tio-drawer__x { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; }
.tio-drawer__nav { display: grid; gap: 4px; }
.tio-drawer__nav a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; font-weight: 700; }
.tio-drawer__nav a:hover, .tio-drawer__nav a.is-on { background: var(--pink-soft); color: var(--pink-2); }
.tio-drawer__lbl { margin: 22px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.tio-drawer__genres { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.tio-drawer__genres a { padding: 7px 4px; font-size: 14px; color: var(--muted); }
@keyframes tio-fade { from { opacity: 0; } }
@keyframes tio-slide { from { transform: translateX(-100%); } }

/* ---------- Section heads ---------- */

.tio-sec { margin: 34px 0; }
.tio-sh { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.tio-sh__t { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.tio-sh__t .tio-i { color: var(--pink); width: 22px; height: 22px; }
.tio-sh__more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tio-sh__more:hover { color: var(--pink-2); }
.tio-sec__foot { margin-top: 18px; display: flex; justify-content: center; }

.tio-phead { padding: 28px 0 18px; }
.tio-phead__t { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.tio-phead__t .tio-i { color: var(--pink); width: 28px; height: 28px; }
.tio-phead__s { color: var(--muted); margin-top: 6px; font-size: 14px; }
.tio-page { padding-bottom: 48px; }

/* ---------- Spotlight ---------- */

.tio-spot { position: relative; overflow: hidden; margin-top: calc(var(--hd) * -1); touch-action: pan-y; }
.tio-spot__track { position: relative; height: clamp(440px, 46vw, 620px); }
.tio-spot__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.tio-spot__slide.is-on { opacity: 1; visibility: visible; z-index: 1; }
.tio-spot__bg { position: absolute; inset: 0 0 0 28%; }
.tio-spot__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s ease; }
.tio-spot__slide.is-on .tio-spot__bg img { transform: scale(1); }
.tio-spot__bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--bg) 0%, rgba(18, 11, 32, .86) 22%, rgba(18, 11, 32, .2) 60%, rgba(18, 11, 32, .35) 100%),
                linear-gradient(0deg, var(--bg) 0%, rgba(18, 11, 32, 0) 38%),
                linear-gradient(180deg, rgba(18, 11, 32, .7) 0%, rgba(18, 11, 32, 0) 22%);
}
.tio-spot__in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 86px; padding-top: calc(var(--hd) + 20px); }
.tio-spot__in > * { max-width: 620px; }
.tio-spot__rank { color: var(--pink-2); font-weight: 800; font-size: 15px; margin-bottom: 10px; letter-spacing: .02em; }
.tio-spot__t { font-size: clamp(28px, 4vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tio-spot__t a:hover { color: var(--text); }
.tio-spot__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.tio-spot__meta li { display: inline-flex; align-items: center; gap: 6px; }
.tio-spot__live { color: var(--live); }
.tio-spot__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tio-spot__syn { color: #d6cfe8; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 22px; }
.tio-spot__act { display: flex; gap: 12px; flex-wrap: wrap; }
.tio-spot__ctl { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 3; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.tio-spot__ctl > * { pointer-events: auto; }
.tio-spot__dots { display: flex; gap: 8px; }
.tio-spot__dot { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .3); transition: width .3s, background .3s; }
.tio-spot__dot.is-on { width: 30px; background: var(--pink); }
.tio-spot__arrows { display: flex; gap: 8px; }
.tio-spot__arr { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.tio-spot__arr:hover { background: var(--pink); border-color: var(--pink); }

@media (max-width: 700px) {
    .tio-spot__track { height: 520px; }
    .tio-spot__bg { inset: 0; }
    .tio-spot__bg::after { background: linear-gradient(0deg, var(--bg) 4%, rgba(18, 11, 32, .78) 46%, rgba(18, 11, 32, .2) 100%); }
    .tio-spot__in { padding-bottom: 70px; }
    .tio-spot__syn { -webkit-line-clamp: 2; font-size: 14px; margin-bottom: 16px; }
    .tio-spot__meta { font-size: 13px; gap: 6px 12px; }
    .tio-spot__arrows { display: none; }
    .tio-spot__ctl { justify-content: center; bottom: 26px; }
    .tio-spot__act .tio-btn--lg { height: 42px; padding: 0 18px; font-size: 14px; }
}

/* ---------- Home layout ---------- */

.tio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.tio-layout__aside { position: sticky; top: calc(var(--hd) + 16px); margin-top: 34px; display: grid; gap: 22px; }
@media (max-width: 1100px) {
    .tio-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .tio-layout__aside { position: static; margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 40px; }
}

/* ---------- Episode cards ---------- */

.tio-epgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 16px; }
.tio-epgrid--wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 560px) {
    .tio-epgrid, .tio-epgrid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}
.tio-ep { min-width: 0; }
.tio-ep__img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.tio-ep__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .35s; }
.tio-ep__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 5, 20, .78) 0%, rgba(10, 5, 20, 0) 55%); }
.tio-ep__img:hover img { transform: scale(1.06); filter: brightness(.75); }
.tio-ep__num { position: absolute; left: 8px; top: 8px; z-index: 1; background: var(--pink); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 6px; box-shadow: 0 4px 12px rgba(255, 79, 154, .4); }
.tio-ep__badges { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
.tio-ep__play { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; opacity: 0; transition: opacity .25s; }
.tio-ep__play .tio-i { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: var(--pink); color: #fff; box-shadow: 0 6px 20px rgba(255, 79, 154, .5); }
.tio-ep__img:hover .tio-ep__play { opacity: 1; }
.tio-ep__seen { position: absolute; right: 8px; top: 8px; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--live); color: #062614; display: none; place-items: center; }
.tio-ep__seen .tio-i { width: 14px; height: 14px; stroke-width: 3; }
.tio-ep.is-seen .tio-ep__seen { display: grid; }
.tio-ep.is-seen .tio-ep__img img { filter: saturate(.6) brightness(.8); }
.tio-ep__body { padding: 10px 2px 0; }
.tio-ep__t { font-size: 14.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tio-ep__m { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.tio-ep__m > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tio-ep__m time { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--dim); }
.tio-ep__m time .tio-i { width: 13px; height: 13px; }
@media (max-width: 560px) {
    .tio-ep__m { flex-direction: column; gap: 1px; }
}

/* ---------- Cover cards ---------- */

.tio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.tio-grid--wide { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
@media (max-width: 560px) {
    .tio-grid, .tio-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
}
.tio-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.tio-row > * { scroll-snap-align: start; }
.tio-row--eps { grid-auto-columns: 260px; }
@media (max-width: 560px) {
    .tio-row { grid-auto-columns: 138px; gap: 12px; }
    .tio-row--eps { grid-auto-columns: 220px; }
}

.tio-card { min-width: 0; position: relative; }
.tio-card__img { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.tio-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .35s; }
.tio-card__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 5, 20, .75) 0%, rgba(10, 5, 20, 0) 40%); pointer-events: none; }
.tio-card__link:hover .tio-card__img img { transform: scale(1.06); filter: brightness(.7); }
.tio-card__badges { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
.tio-card__live { position: absolute; left: 8px; top: 8px; z-index: 1; background: rgba(10, 5, 20, .72); color: var(--live); font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; backdrop-filter: blur(4px); }
.tio-card__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tio-card__play { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; opacity: 0; transition: opacity .25s; }
.tio-card__play .tio-i { width: 50px; height: 50px; padding: 14px; border-radius: 50%; background: var(--pink); color: #fff; box-shadow: 0 6px 20px rgba(255, 79, 154, .5); }
.tio-card__link:hover .tio-card__play { opacity: 1; }
.tio-card__t { font-size: 14.5px; font-weight: 700; line-height: 1.35; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tio-card__m { color: var(--dim); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tio-card__rm {
    position: absolute; right: 6px; top: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 0;
    background: rgba(10, 5, 20, .78); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px);
}
.tio-card__rm:hover { background: var(--pink); }
.tio-card__rm .tio-i { width: 15px; height: 15px; }

/* Continue watching card */
.tio-cw { position: relative; min-width: 0; }
.tio-cw__img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.tio-cw__img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); }
.tio-cw__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 5, 20, .85), rgba(10, 5, 20, 0) 60%); }
.tio-cw__ep { position: absolute; left: 10px; bottom: 12px; z-index: 1; font-weight: 800; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.tio-cw__ep .tio-i { width: 26px; height: 26px; padding: 7px; border-radius: 50%; background: var(--pink); }
.tio-cw__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); z-index: 1; }
.tio-cw__bar span { display: block; height: 100%; background: var(--pink); }
.tio-cw__t { margin-top: 9px; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tio-cw__m { font-size: 12px; color: var(--dim); }

/* ---------- Aside boxes ---------- */

.tio-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.tio-box__hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tio-box__hd h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; }
.tio-box__hd h2 .tio-i { color: var(--pink); }
.tio-box__more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--muted); }

.tio-tabs { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; border: 1px solid var(--line); flex-wrap: wrap; }
.tio-tab { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.tio-tab:hover { color: var(--text); }
.tio-tab.is-on { background: var(--pink); color: #fff; }
.tio-tab small { opacity: .75; font-weight: 600; margin-left: 2px; }

.tio-ranks { display: grid; gap: 4px; counter-reset: r; }
.tio-rank { display: grid; grid-template-columns: 34px 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.tio-rank:hover { background: var(--surface-2); }
.tio-rank__n { font-size: 20px; font-weight: 800; color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.tio-rank--top .tio-rank__n { color: var(--pink); }
.tio-rank__img img { width: 48px; height: 68px; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.tio-rank__t { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tio-rank__m { display: flex; gap: 8px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.tio-rank__v { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--dim); }
.tio-rank__v .tio-i { width: 13px; height: 13px; }
.tio-rank .tio-b--ep { background: var(--surface-3); }

.tio-minis { display: grid; gap: 4px; }
.tio-mini { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 6px; border-radius: 10px; }
.tio-mini:hover { background: var(--surface-2); }
.tio-mini__img img { width: 46px; height: 64px; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.tio-mini__t { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tio-mini__m { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.tio-mini__m .tio-b--ep { background: var(--surface-3); }
.tio-mini__x { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tio-mini__ep { color: var(--pink-2); font-weight: 800; }

.tio-gencloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tio-gencloud a { padding: 6px 11px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); }
.tio-gencloud a:nth-child(5n+1) { color: #ff9cc8; }
.tio-gencloud a:nth-child(5n+2) { color: #c4a8ff; }
.tio-gencloud a:nth-child(5n+3) { color: #9fd8ff; }
.tio-gencloud a:nth-child(5n+4) { color: #ffd59a; }
.tio-gencloud a:hover { background: var(--pink-soft); color: var(--pink-2); }

/* ---------- Pagination ---------- */

.tio-pag { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 34px 0 10px; }
.tio-pag__a { min-width: 40px; height: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.tio-pag__a:hover { border-color: var(--pink); color: var(--pink-2); }
.tio-pag__a.is-on { background: var(--pink); border-color: var(--pink); color: #fff; }
.tio-pag__gap { align-self: center; color: var(--dim); padding: 0 4px; }

/* ---------- Directory ---------- */

.tio-filters { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.tio-filters__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.tio-field { display: grid; gap: 6px; }
.tio-field > span { font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.tio-field select {
    height: 42px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); padding: 0 34px 0 12px; color: var(--text); appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aea4c8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.tio-field select:focus { border-color: var(--pink); outline: none; }
.tio-filters__act { display: flex; gap: 8px; }
.tio-filters__act .tio-btn { height: 42px; }
.tio-genres { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.tio-genres summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); list-style: none; user-select: none; }
.tio-genres summary::-webkit-details-marker { display: none; }
.tio-genres summary b { background: var(--pink); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.tio-genres[open] .tio-genres__chev { transform: rotate(180deg); }
.tio-genres__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tio-genres__list .tio-chip { position: relative; }

.tio-az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.tio-az__a { min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--muted); }
.tio-az__a:hover { color: var(--pink-2); border-color: var(--pink); }
.tio-az__a.is-on { background: var(--pink); border-color: var(--pink); color: #fff; }

@media (max-width: 900px) {
    .tio-filters__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tio-filters__act { grid-column: 1 / -1; }
    .tio-filters__act .tio-btn { flex: 1; }
}
@media (max-width: 560px) {
    .tio-az { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
    .tio-az__a { flex: none; }
}

/* ---------- Schedule ---------- */

.tio-week__tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.tio-week__tab {
    position: relative; display: grid; gap: 2px; justify-items: center; padding: 14px 6px; border-radius: 14px !important;
    background: var(--surface) !important; border: 1px solid var(--line) !important; color: var(--muted);
}
.tio-week__tab:hover { border-color: var(--line-2) !important; color: var(--text); }
.tio-week__tab.is-on { background: linear-gradient(160deg, var(--pink), #c93bff) !important; border-color: transparent !important; color: #fff; box-shadow: 0 10px 26px rgba(255, 79, 154, .3); }
.tio-week__d { font-weight: 800; font-size: 15px; }
.tio-week__n { font-size: 12px; opacity: .8; }
.tio-week__c { font-size: 11px; font-weight: 800; background: rgba(255, 255, 255, .12); padding: 1px 8px; border-radius: 999px; margin-top: 4px; }
.tio-week__today { position: absolute; top: -8px; right: 8px; background: var(--live); color: #062614; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.tio-week__h { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.tio-week__h small { color: var(--pink-2); font-size: 14px; }
.tio-sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.tio-sched__it { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tio-sched__it:hover { border-color: var(--line-2); }
.tio-sched__img img { width: 56px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.tio-sched__t { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tio-sched__m { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--dim); }
.tio-sched__ep { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-3); font-weight: 800; font-size: 13px; white-space: nowrap; }
.tio-sched__ep .tio-i { width: 14px; height: 14px; }
.tio-sched__ep:hover, .tio-sched__ep.is-new { background: var(--pink); color: #fff; }
@media (max-width: 900px) {
    .tio-week__tabs { display: flex; overflow-x: auto; padding: 10px 0 6px; margin-top: -10px; }
    .tio-week__tab { flex: 0 0 96px; }
    .tio-sched { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .tio-sched__it { grid-template-columns: 48px minmax(0, 1fr); }
    .tio-sched__img img { width: 48px; height: 68px; }
    .tio-sched__ep { grid-column: 2; justify-self: start; height: 32px; }
}

/* ---------- Banner (anime detail) ---------- */

.tio-banner { position: relative; overflow: hidden; margin-top: calc(var(--hd) * -1); padding: calc(var(--hd) + 40px) 0 40px; }
.tio-banner__bg { position: absolute; inset: 0; }
.tio-banner__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(1.2) brightness(.55); transform: scale(1.15); }
.tio-banner__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, rgba(18, 11, 32, .55) 45%, rgba(18, 11, 32, .45) 100%); }
.tio-banner__in { position: relative; z-index: 1; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.tio-banner__cover { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 2 / 3; background: var(--surface-2); }
.tio-banner__cover img { width: 100%; height: 100%; object-fit: cover; }
.tio-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.tio-crumbs span[aria-hidden] { color: var(--dim); }
.tio-crumbs [aria-current] { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.tio-banner__t { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
.tio-banner__alt { color: var(--muted); font-size: 15px; margin-top: 6px; }
.tio-banner__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 16px; color: var(--muted); font-size: 14px; font-weight: 600; }
.tio-banner__meta li { display: inline-flex; align-items: center; gap: 6px; }
.tio-score { color: #ffd166; }
.tio-banner__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tio-banner__genres a { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); font-size: 13px; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, .05); }
.tio-banner__genres a:hover { border-color: var(--pink); color: var(--pink-2); }
.tio-syn { margin-top: 16px; max-width: 860px; }
.tio-syn__txt { color: #d9d2ea; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tio-syn.is-open .tio-syn__txt { -webkit-line-clamp: unset; display: block; }
.tio-syn__btn { border: 0; background: none; color: var(--pink-2); font-weight: 700; padding: 4px 0; margin-top: 4px; }
.tio-banner__act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.tio-follow__on { display: none; align-items: center; gap: 8px; }
.tio-follow__off { display: inline-flex; align-items: center; gap: 8px; }
.tio-follow.is-on .tio-follow__on { display: inline-flex; }
.tio-follow.is-on .tio-follow__off { display: none; }
.tio-follow.is-on { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-2); }

@media (max-width: 760px) {
    .tio-banner { padding: calc(var(--hd) + 20px) 0 24px; }
    .tio-banner__in { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
    .tio-banner__info { display: contents; }
    .tio-crumbs { grid-column: 1 / -1; grid-row: 1; margin-bottom: 0; }
    .tio-banner__cover { grid-column: 1; grid-row: 2 / span 2; }
    .tio-banner__t { grid-column: 2; grid-row: 2; font-size: 22px; align-self: end; }
    .tio-banner__alt { grid-column: 2; grid-row: 3; margin: 0; font-size: 13px; align-self: start; }
    .tio-banner__meta, .tio-banner__genres, .tio-syn, .tio-banner__act { grid-column: 1 / -1; margin-top: 0; }
    .tio-banner__meta { font-size: 13px; gap: 6px 12px; }
    .tio-banner__act .tio-btn { flex: 1; }
}

.tio-detail__body { padding-bottom: 48px; }

/* ---------- Episode list (series page) ---------- */

.tio-eps .tio-sh { margin-bottom: 18px; }
.tio-tabs--seasons { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.tio-tabs--seasons .tio-tab { white-space: nowrap; }
.tio-eplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tio-epi { display: block; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; height: 100%; transition: border-color .2s, transform .2s; }
.tio-epi:hover { border-color: var(--pink); color: var(--text); transform: translateY(-2px); }
.tio-epi.is-current { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.tio-epi__img { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.tio-epi__img img { width: 100%; height: 100%; object-fit: cover; }
.tio-epi__n { position: absolute; left: 8px; top: 8px; background: rgba(10, 5, 20, .78); font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(4px); }
.tio-epi__play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(10, 5, 20, .35); }
.tio-epi__play .tio-i { width: 42px; height: 42px; padding: 11px; border-radius: 50%; background: var(--pink); color: #fff; }
.tio-epi:hover .tio-epi__play { opacity: 1; }
.tio-epi__seen { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--live); color: #062614; display: none; place-items: center; }
.tio-epi__seen .tio-i { width: 14px; height: 14px; stroke-width: 3; }
.tio-epi.is-seen .tio-epi__seen { display: grid; }
.tio-epi.is-seen .tio-epi__img img { filter: saturate(.55) brightness(.75); }
.tio-epi__b { display: grid; gap: 4px; padding: 10px 12px 12px; }
.tio-epi__t { font-weight: 700; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tio-epi__d { font-size: 12px; color: var(--dim); }
@media (max-width: 560px) {
    .tio-eplist { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .tio-epi { display: grid; grid-template-columns: 140px minmax(0, 1fr); }
    .tio-epi__img { aspect-ratio: auto; min-height: 80px; }
    .tio-epi__img img { position: absolute; inset: 0; }
}

.tio-numtools { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tio-ranges { display: flex; flex-wrap: wrap; gap: 6px; }
.tio-range { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; }
.tio-range:hover { color: var(--text); border-color: var(--line-2); }
.tio-range.is-on { background: var(--pink); border-color: var(--pink); color: #fff; }
.tio-goto { display: flex; gap: 6px; }
.tio-goto input { width: 150px; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 14px; color: var(--text); outline: none; }
.tio-goto input:focus { border-color: var(--pink); }
.tio-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.tio-num { position: relative; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tio-num:hover { border-color: var(--pink); color: var(--text); }
.tio-num.is-seen { background: rgba(62, 224, 143, .1); border-color: rgba(62, 224, 143, .35); color: var(--live); }
.tio-num.is-current { background: var(--pink); border-color: var(--pink); color: #fff; }
.tio-num.is-flash { animation: tio-flash 1.2s ease 2; }
@keyframes tio-flash { 50% { box-shadow: 0 0 0 3px var(--pink); } }

/* ---------- Watch page ---------- */

.tio-watchpage { padding: 18px 0 48px; }
.tio-crumbs--watch { margin-bottom: 14px; }
.tio-watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.tio-watch--movie { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.tio-watch__main { min-width: 0; display: grid; gap: 16px; }
.tio-watch__stage { position: relative; }
@media (max-width: 1100px) {
    .tio-watch { grid-template-columns: minmax(0, 1fr); }
}

.tio-player { background: #07040d; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.tio-player__screen { position: relative; aspect-ratio: 16 / 9; background: #000; }
.tio-player__screen .video { position: absolute; inset: 0; display: none; }
.tio-player__screen .video.on { display: block; }
.tio-player__screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.tio-player--empty .tio-player__screen { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.tio-player--empty p { display: grid; gap: 10px; justify-items: center; }
.tio-player--empty .tio-i { width: 40px; height: 40px; color: var(--pink); }
.tio-player__bar { display: grid; gap: 12px; padding: 14px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.tio-player__langs { display: flex; gap: 8px; flex-wrap: wrap; }
.tio-ptab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font-weight: 700; font-size: 14px; }
.tio-ptab:hover { color: var(--text); }
.tio-ptab.active { border-color: var(--pink); color: var(--text); background: var(--pink-soft); }
.tio-player__servers { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tio-player__lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.tio-player__servers ul { display: flex; gap: 8px; flex-wrap: wrap; }
.tio-srv { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--surface-3); font-weight: 700; font-size: 13px; color: var(--text); border: 1px solid transparent; }
.tio-srv:hover { border-color: var(--pink); color: var(--text); }
.tio-srv.on { background: var(--pink); color: #fff; box-shadow: 0 6px 16px rgba(255, 79, 154, .35); }

.tio-next {
    position: absolute; right: 16px; bottom: 16px; z-index: 5; display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px;
    background: rgba(18, 11, 32, .94); border: 1px solid var(--pink); box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
.tio-next p { font-size: 14px; }
.tio-next div { display: flex; gap: 8px; }
.tio-next [data-count] { color: var(--pink-2); font-weight: 800; }

.tio-ctl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.tio-ctl__nav { display: flex; flex-wrap: wrap; gap: 8px; }
.tio-ctl__btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.tio-ctl__btn small { color: var(--dim); font-weight: 700; font-size: 12px; margin-left: 2px; }
.tio-ctl__btn:hover { background: var(--pink); color: #fff; }
.tio-ctl__btn:hover small { color: rgba(255, 255, 255, .8); }
.tio-ctl__btn.is-off { opacity: .4; pointer-events: none; }
.tio-ctl__btn--next { background: var(--pink-soft); color: var(--pink-2); }

.tio-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 0 6px; }
.tio-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tio-switch__ui { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.tio-switch__ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tio-switch input:checked + .tio-switch__ui { background: var(--pink); }
.tio-switch input:checked + .tio-switch__ui::after { transform: translateX(18px); }
.tio-switch input:checked ~ span:last-child { color: var(--text); }
.tio-switch input:focus-visible + .tio-switch__ui { outline: 2px solid var(--pink); outline-offset: 2px; }
.tio-switch input:disabled ~ * { opacity: .45; }

.tio-epinfo { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.tio-epinfo__k { color: var(--pink-2); font-weight: 700; font-size: 14px; }
.tio-epinfo__t { font-size: clamp(19px, 2.2vw, 24px); font-weight: 800; line-height: 1.25; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.tio-epinfo__n { background: var(--pink); color: #fff; font-size: 13px; padding: 3px 9px; border-radius: 7px; }
.tio-epinfo__m { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.tio-epinfo__m > span { display: inline-flex; align-items: center; gap: 6px; }
.tio-epinfo__note { font-size: 13px; color: var(--dim); margin-top: 10px; }
.tio-epinfo__note a { color: var(--pink-2); font-weight: 700; }
.tio-epinfo__over { margin-top: 12px; color: #d4cce6; font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; }

.tio-dl { position: relative; border-radius: 16px; padding: 18px; background: linear-gradient(140deg, rgba(255, 79, 154, .16), rgba(154, 107, 255, .12) 60%, rgba(30, 20, 51, .9)); border: 1px solid rgba(255, 79, 154, .45); }
.tio-dl__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tio-dl__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--pink); display: grid; place-items: center; flex: none; box-shadow: 0 8px 20px rgba(255, 79, 154, .4); }
.tio-dl__ic .tio-i { width: 22px; height: 22px; color: #fff; }
.tio-dl__head h2 { font-size: 19px; font-weight: 800; }
.tio-dl__head p { color: var(--muted); font-size: 13px; }
.tio-dl__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tio-dl__btn { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(18, 11, 32, .7); border: 1px solid var(--line-2); }
.tio-dl__btn:hover { border-color: var(--pink); background: rgba(255, 79, 154, .12); color: var(--text); }
.tio-dl__srv { font-weight: 800; font-size: 15px; }
.tio-dl__meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); grid-row: 2; }
.tio-dl__btn > .tio-i { grid-row: 1 / span 2; grid-column: 2; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--surface-3); color: var(--pink-2); }
.tio-dl__btn:hover > .tio-i { background: var(--pink); color: #fff; }

.tio-animebox { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tio-animebox__img img { width: 110px; height: 160px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.tio-animebox h2 { font-size: 18px; font-weight: 800; line-height: 1.25; }
.tio-animebox__m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.tio-animebox__syn { color: var(--muted); font-size: 13.5px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tio-animebox__act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.tio-watch__aside { position: sticky; top: calc(var(--hd) + 14px); }
.tio-cl { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - var(--hd) - 28px); }
.tio-cl__hd { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tio-cl__hd h2 { font-size: 16px; font-weight: 800; }
.tio-cl__hd span { font-size: 12px; color: var(--dim); font-weight: 700; }
.tio-cl__seasons { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.tio-cl__seasons .tio-chip { height: 28px; font-size: 12px; }
.tio-cl__tools { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tio-cl__tools select { flex: 1; min-width: 0; height: 34px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); padding: 0 12px; color: var(--text); }
.tio-cl__tools .tio-goto input { width: 70px; }
.tio-cl__scroll { overflow-y: auto; padding: 6px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.tio-cl__list { display: grid; gap: 2px; }
.tio-cl__a { display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: var(--muted); }
.tio-cl__list > li:nth-child(odd) .tio-cl__a { background: rgba(255, 255, 255, .02); }
.tio-cl__a:hover { background: var(--surface-2) !important; color: var(--text); }
.tio-cl__n { font-weight: 800; color: var(--dim); font-variant-numeric: tabular-nums; }
.tio-cl__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tio-cl__ic { display: none; color: var(--live); }
.tio-cl__ic .tio-i { width: 15px; height: 15px; }
.tio-cl__a.is-seen .tio-cl__ic { display: block; }
.tio-cl__a.is-seen .tio-cl__t { color: var(--dim); }
.tio-cl__a.is-current { background: var(--pink) !important; color: #fff; }
.tio-cl__a.is-current .tio-cl__n { color: #fff; }
.tio-cl__a.is-current .tio-cl__ic { display: block; color: #fff; }
.tio-cl__list--nums { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 4px; }
.tio-cl__list--nums .tio-cl__a { grid-template-columns: 1fr; text-align: center; padding: 8px 0; background: var(--surface-2) !important; }
.tio-cl__list--nums .tio-cl__t, .tio-cl__list--nums .tio-cl__ic { display: none !important; }
.tio-cl__list--nums .tio-cl__a.is-seen { background: rgba(62, 224, 143, .12) !important; }
.tio-cl__list--nums .tio-cl__a.is-seen .tio-cl__n { color: var(--live); }
.tio-cl__list--nums .tio-cl__a.is-current { background: var(--pink) !important; }
@media (max-width: 1100px) {
    .tio-watch__aside { position: static; }
    .tio-cl { max-height: 520px; }
}
@media (max-width: 560px) {
    .tio-ctl { padding: 8px; }
    .tio-ctl__nav { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; }
    .tio-ctl__btn { justify-content: center; padding: 0 10px; font-size: 13px; }
    .tio-ctl__btn small { display: none; }
    .tio-ctl__btn--list { font-size: 0; gap: 0; }
    .tio-ctl__btn--list .tio-i { width: 20px; height: 20px; }
    .tio-player { border-radius: 12px; margin: 0 calc(var(--gutter) * -1); border-left: 0; border-right: 0; border-radius: 0; }
    .tio-player__bar { padding: 12px var(--gutter); }
    .tio-animebox { grid-template-columns: 80px minmax(0, 1fr); }
    .tio-animebox__img img { width: 80px; height: 116px; }
    .tio-dl__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 404 / prose ---------- */

.tio-404__box { text-align: center; padding: 64px 0 24px; display: grid; gap: 14px; justify-items: center; }
.tio-404__code { font-size: clamp(80px, 14vw, 150px); font-weight: 800; line-height: 1; letter-spacing: -.05em; background: linear-gradient(135deg, var(--pink), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tio-404__box h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.tio-404__box > p { color: var(--muted); max-width: 520px; }
.tio-404__s { display: flex; gap: 8px; width: min(520px, 100%); }
.tio-404__s input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); padding: 0 18px; color: var(--text); outline: none; }
.tio-404__s input:focus { border-color: var(--pink); }
.tio-404__s .tio-btn { height: 44px; }
.tio-prose__body { max-width: 820px; color: #d7d0e8; }
.tio-prose__body p { margin: 0 0 1em; }
.tio-prose__body a { color: var(--pink-2); text-decoration: underline; }

/* ---------- Footer ---------- */

.tio-ft { margin-top: 40px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), #0d0718); padding: 34px 0 40px; }
.tio-ft__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.tio-ft__links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 600; color: var(--muted); font-size: 14px; }
.tio-ft__az { padding: 22px 0; }
.tio-ft__lbl { font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.tio-ft__lbl span { color: var(--dim); font-weight: 500; font-size: 13px; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.tio-ft__letters { display: flex; flex-wrap: wrap; gap: 6px; }
.tio-ft__letters a { min-width: 34px; height: 32px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 7px; background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--muted); }
.tio-ft__letters a:hover { background: var(--pink); color: #fff; }
.tio-ft__legal { color: var(--dim); font-size: 13px; }

.tio-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--pink); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(255, 79, 154, .4); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.tio-cl__a.is-current .tio-cl__t { color: #fff; }
@media (max-width: 560px) {
    .tio-sec--eps .tio-ep:nth-child(n+13) { display: none; }
}
