

#tonkanime-view {

    --tka-gutter: 50px;
    --tka-card-w: 176px;
    --tka-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --tka-mood: var(--primary-rgb);
    position: relative;
    min-height: 100vh;

    background: transparent;
    padding-bottom: 32px;
}

@media (min-width: 1600px) {
    #tonkanime-view { --tka-card-w: 190px; }
}

@media (min-width: 769px) and (max-width: 1150px) {
    #tonkanime-view {
        --tka-gutter: max(34px, env(safe-area-inset-left), env(safe-area-inset-right));
        --tka-card-w: 160px;
    }
}

@media (max-width: 768px) {
    #tonkanime-view {
        --tka-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
        --tka-card-w: 132px;
    }
}

@media (min-width: 601px) and (max-width: 768px) {
    #tonkanime-view {
        --tka-gutter: max(24px, env(safe-area-inset-left), env(safe-area-inset-right));
        --tka-card-w: 144px;
    }
}

@media (max-width: 380px) {
    #tonkanime-view { --tka-card-w: 118px; }
}

#tonkanime-view [hidden],
#tka-modal [hidden] {
    display: none !important;
}

#tonkanime-view .tka-shell {
    max-width: none;
    margin: 0;
    padding: 0;
}

#tonkanime-view #tka-featured[hidden] + .tka-shell {
    padding-top: 96px;
}

#tonkanime-view button {
    font-family: inherit;
}

.tka-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.tka-hero {
    --tka-thumb-w: 64px;
    --tka-dock-bottom: 46px;

    --tka-content-bottom: calc(var(--tka-dock-bottom) + var(--tka-thumb-w) * 1.5 + 54px);
    position: relative;
    height: 88vh;
    height: clamp(620px, 88svh, 900px);
    min-height: 620px;
    overflow: hidden;
    isolation: isolate;
}

.tka-hero-stage {
    position: absolute;
    inset: 0;
}

.tka-hero[data-state="wait"] {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 62vh;
    height: clamp(420px, 62svh, 640px);
    min-height: 0;
}

.tka-hero-wait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 48px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.tka-hero-wait p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
}

.tka-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s linear 0.95s, visibility 0s linear 0.95s;

    touch-action: pan-y pinch-zoom;
}

.tka-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

.tka-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background:
        radial-gradient(ellipse 46% 36% at 12% 66%, rgba(var(--tka-mood), 0.2), transparent 70%),
        radial-gradient(ellipse 62% 22% at 62% 64%, rgba(var(--tka-mood), 0.08), transparent 70%);
}

html.no-ambient .tka-slide::before {
    content: none;
}

.tka-slide-media {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 0;
    height: min(100%, 46vw);
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 56%, rgba(0, 0, 0, 0.74) 72%, rgba(0, 0, 0, 0.32) 87%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 56%, rgba(0, 0, 0, 0.74) 72%, rgba(0, 0, 0, 0.32) 87%, transparent 100%);
}

.tka-slide-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 62% 32%;
    opacity: 0;
    transform: scale(1.04);
    transform-origin: 60% 40%;

    transition: opacity 0.6s ease, transform 0s linear 1s;
}

.tka-slide-img[data-loaded="1"] {
    opacity: 1;
}

.tka-slide.is-active .tka-slide-img {
    transform: none;
    transition: opacity 0.6s ease, transform 1.8s var(--tka-ease);
}

.tka-slide[data-art="cover"] .tka-slide-img {
    filter: blur(28px) saturate(1.15) brightness(0.62);
    transform: scale(1.2);
}

.tka-slide-key {
    display: none;
}

@media (orientation: landscape) {
    .tka-slide[data-art="cover"] .tka-slide-key {
        position: absolute;
        right: max(var(--tka-gutter), 6vw);
        top: 50%;
        z-index: 2;
        display: block;
        width: auto;
        height: min(62%, 460px);
        aspect-ratio: 2 / 3;
        object-fit: cover;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3);
        transform: translateY(-50%);
    }
}

.tka-slide-media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 72% 84% at 0% 100%, rgba(6, 7, 13, 0.8) 0%, rgba(6, 7, 13, 0.46) 50%, rgba(6, 7, 13, 0) 82%),
        linear-gradient(90deg, rgba(6, 7, 13, 0.84) 0%, rgba(6, 7, 13, 0.52) 26%, rgba(6, 7, 13, 0.14) 52%, rgba(6, 7, 13, 0) 70%),
        linear-gradient(180deg, rgba(6, 7, 13, 0.55) 0%, rgba(6, 7, 13, 0) 24%);
}

.tka-slide-body {
    position: relative;
    z-index: 3;
    width: min(640px, 52%);
    margin: 0 0 0 var(--tka-gutter);
    padding: 104px 0 var(--tka-content-bottom);
}

.tka-slide-body > * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0s linear 0.2s;
}

.tka-slide.is-active .tka-slide-body > * {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.42s ease var(--tka-d, 0.2s),
        transform 0.5s var(--tka-ease) var(--tka-d, 0.2s);
}

.tka-slide-body > :nth-child(2) { --tka-d: 0.25s; }
.tka-slide-body > :nth-child(3) { --tka-d: 0.29s; }
.tka-slide-body > :nth-child(4) { --tka-d: 0.33s; }
.tka-slide-body > :nth-child(5) { --tka-d: 0.37s; }
.tka-slide-body > :nth-child(n+6) { --tka-d: 0.41s; }

.tka-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0 0 14px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-soft, #b7a9ff);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.tka-kicker i {
    font-size: 0.8rem;
}

.tka-kicker .tka-sep {
    color: rgba(255, 255, 255, 0.4);
}

.tka-slide-title {
    margin: 0;
    padding-bottom: 0.06em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.2vw, 4.1rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.022em;
    text-wrap: balance;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.tka-slide-title.is-mid { font-size: clamp(2.15rem, 3.3vw, 3.25rem); }
.tka-slide-title.is-long { font-size: clamp(1.85rem, 2.6vw, 2.6rem); }

.tka-slide-alt {
    margin: 8px 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    font-style: italic;
    color: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.tka-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.tka-meta-item {
    position: relative;
    white-space: nowrap;
}

.tka-meta-item + .tka-meta-item::before {
    content: '';
    position: absolute;
    left: -10.5px;
    top: calc(50% - 1.5px);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.tka-score,
.tka-air {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-shadow: none;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.tka-score {
    margin-right: -4px;
}

.tka-score i {
    font-size: 0.68rem;
    color: #f5c518;
}

.tka-air i {
    font-size: 0.72rem;
    color: var(--primary-soft, #b7a9ff);
}

.tka-slide-desc {
    max-width: 34em;
    margin: 16px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}

.tka-slide.is-active .tka-slide-desc[data-fresh] {
    animation: tka-fade-in 0.4s ease backwards;
}

.tka-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

#tonkanime-view .tka-play.btn-premium,
#tka-modal .tka-play.btn-premium {
    height: 52px;
    min-width: 0;
    padding: 0 32px 0 24px !important;
    gap: 9px;
    justify-content: center !important;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 1rem !important;
    letter-spacing: 0.04em;
    white-space: nowrap;
    box-shadow: 0 12px 34px rgba(var(--primary-rgb), 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#tonkanime-view .tka-play.btn-premium:hover,
#tka-modal .tka-play.btn-premium:hover {
    box-shadow: 0 16px 40px rgba(var(--primary-rgb), 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tka-play-ico {
    flex: none;
    width: 20px;
    height: 20px;
    margin-left: -2px;
}

#tonkanime-view .tka-play.btn-premium[aria-busy="true"],
#tka-modal .tka-play.btn-premium[aria-busy="true"] {
    cursor: progress;
    opacity: 0.86;
}

#tonkanime-view .tka-glass.btn-premium,
#tka-modal .tka-glass.btn-premium {
    height: 52px;
    min-width: 0;
    padding: 0 24px 0 20px !important;
    gap: 9px;
    justify-content: center !important;
    border-radius: 999px;
    color: #fff;
    font-size: 0.95rem !important;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

#tonkanime-view .tka-round.btn-premium,
#tka-modal .tka-round.btn-premium {
    width: 52px !important;
    min-width: 52px;
    height: 52px;
    flex: none;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem !important;
    letter-spacing: 0;
}

@media (hover: hover) {
    #tonkanime-view .tka-glass.btn-premium:hover,
    #tka-modal .tka-glass.btn-premium:hover,
    #tonkanime-view .tka-round.btn-premium:hover {
        transform: translateY(-2px);
    }
}

@media (hover: none) {
    #tonkanime-view .btn-premium:hover,
    #tka-modal .btn-premium:hover {
        transform: none;
    }
}

#tonkanime-view .tka-hero button:focus-visible {
    outline: 2px solid var(--primary-tint, #d9d2ff);
    outline-offset: 4px;
}

.tka-dock {
    position: absolute;
    z-index: 6;
    left: var(--tka-gutter);
    right: var(--tka-gutter);
    bottom: var(--tka-dock-bottom);
    display: flex;
    align-items: center;
    gap: 20px;
}

.tka-rail {

    position: relative;
    display: flex;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
    padding: 12px 6px 10px;
    margin: -12px -6px -10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 6px;
    overscroll-behavior-x: contain;
    scrollbar-width: none !important;
}

.tka-rail::-webkit-scrollbar {
    display: none !important;
}

.tka-thumb {
    position: relative;
    flex: none;
    width: var(--tka-thumb-w);
    aspect-ratio: 2 / 3;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
    opacity: 0.62;
    cursor: pointer;
    scroll-snap-align: start;
    transition:
        opacity 0.3s ease,
        transform 0.3s var(--tka-ease),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.tka-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    filter: saturate(0.8) brightness(0.86);
    transition: filter 0.3s ease;
}

@media (hover: hover) {
    .tka-thumb:hover {
        opacity: 0.94;
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.26);
    }
}

.tka-thumb.is-active {
    opacity: 1;
    transform: translateY(-3px);
    border-color: rgba(var(--primary-rgb), 0.95);
    box-shadow:
        0 0 0 1px rgba(var(--primary-rgb), 0.32),
        0 14px 30px rgba(0, 0, 0, 0.45);
}

.tka-thumb.is-active img {
    filter: none;
}

.tka-thumb-bar {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.24);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tka-thumb.is-active .tka-thumb-bar {
    opacity: 1;
}

.tka-thumb-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-tint, #d9d2ff), var(--primary));
    transform: scaleX(0);
    transform-origin: left center;
}

.tka-thumb.is-active .tka-thumb-bar::after {
    animation: tka-hero-progress 9s linear forwards;
}

@keyframes tka-hero-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.tka-hero[data-paused] .tka-thumb-bar::after,
.tka-hero[data-offscreen] .tka-thumb-bar::after,
html.tc-scroll-locked .tka-hero .tka-thumb-bar::after {
    animation-play-state: paused;
}

.tka-hero:has(:focus-visible) .tka-thumb-bar::after {
    animation-play-state: paused;
}

.tka-hero[data-paused] .tka-thumb.is-active .tka-thumb-bar::after {
    opacity: 0.45;
}

.tka-hero-ctrl {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
}

.tka-count {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

#tonkanime-view .tka-pause.btn-premium {
    width: 44px !important;
    min-width: 44px;
    height: 44px;
    font-size: 0.84rem !important;
}

.tka-browse {
    position: relative;
    z-index: 2;
    padding: 0 var(--tka-gutter);
    margin-top: 8px;

    scroll-margin-top: 84px;
}

.tka-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.tka-head-text {
    min-width: 0;
}

.tka-head-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-soft, #b7a9ff);
}

.tka-head-kicker i {
    font-size: 0.8rem;
}

.tka-head-title {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1.05rem + 1.2vw, 2.05rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.012em;
    color: #fff;
}

.tka-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(400px, 100%);
    height: 48px;
    padding: 0 6px 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px rgba(0, 0, 0, 0.26);
    cursor: text;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tka-search:focus-within {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(var(--primary-rgb), 0.55);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16), 0 10px 26px rgba(0, 0, 0, 0.26);
}

.tka-search-ico {
    flex: none;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.tka-search:focus-within .tka-search-ico {
    color: var(--primary-soft, #b7a9ff);
}

#tonkanime-view .tka-search #tka-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
}

#tonkanime-view .tka-search #tka-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#tonkanime-view .tka-search #tka-search-input::-webkit-search-cancel-button,
#tonkanime-view .tka-search #tka-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.tka-search-clear {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

@media (hover: hover) {
    .tka-search-clear:hover { background: rgba(255, 255, 255, 0.16); }
}

.tka-search-clear:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.tka-genrebar {

    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 4px 0 6px;

    overflow: visible;
}

.tka-chip {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, scale 0.14s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.tka-chip i {
    font-size: 0.8rem;
    color: var(--primary-soft, #b7a9ff);
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .tka-chip:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
        transform: translateY(-1px);
    }
}

.tka-chip:active {
    scale: 0.96;
}

.tka-chip[aria-pressed="true"] {
    background: var(--btn-bg, var(--primary));
    border-color: transparent;
    color: var(--on-primary, #fff);
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.35);
}

.tka-chip[aria-pressed="true"] i {
    color: var(--on-primary, #fff);
}

.tka-chip:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (hover: none), (max-width: 768px) {
    .tka-genrebar {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        margin-left: calc(-1 * var(--tka-gutter));
        margin-right: calc(-1 * var(--tka-gutter));
        padding: 4px var(--tka-gutter) 8px;
        scroll-padding-inline: var(--tka-gutter);
        overscroll-behavior-x: contain;
        scrollbar-width: none !important;
    }

    .tka-genrebar::-webkit-scrollbar {
        display: none !important;
    }
}

.tka-row {
    position: relative;
    margin-top: 44px;
}

.tka-rows > .tka-row:first-child {
    margin-top: 36px;
}

.tka-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;

    margin: 0;
    padding: 0 var(--tka-gutter);
    font: inherit;
    letter-spacing: normal;
}

.tka-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: #fff;
}

.tka-row-title i {
    flex: none;
    width: 1.25em;
    font-size: 0.88rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);

    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
}

.tka-row-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tka-row-note {
    flex: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tka-row-nav {
    display: none;
    flex: none;
    gap: 8px;
}

@media (hover: hover) and (min-width: 769px) {
    .tka-row-nav {
        display: flex;
    }
}

.tka-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.tka-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tka-arrow:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.tka-row[data-edge="start"] .tka-arrow[data-tka-scroll="-1"],
.tka-row[data-edge="end"] .tka-arrow[data-tka-scroll="1"],
.tka-row[data-edge="none"] .tka-arrow {
    opacity: 0.3;
    pointer-events: none;
}

.tka-scroller {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 18px var(--tka-gutter) 40px;
    margin-bottom: -20px;
    scroll-padding-inline: var(--tka-gutter);
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scrollbar-width: none !important;
}

.tka-scroller::-webkit-scrollbar {
    display: none !important;
}

.tka-card {
    position: relative;
    display: block;
    flex: none;
    width: var(--tka-card-w);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;

    transform: none;
    transition: none;
}

.tka-card:hover {
    transform: none;
}

.tka-card-frame {
    position: relative;
    display: block;
    padding: 3px;
    border-radius: 22px;
    background: rgba(16, 17, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.02);
    transition:
        transform 0.35s var(--tka-ease),
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease,
        scale 0.14s ease-out;
}

.tka-card-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.04);
    transition: filter 0.35s ease;
}

.tka-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    margin: 12px 4px 0;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
}

.tka-card-sub {
    display: block;
    margin: 4px 4px 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.76rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tka-card-sub .fa-star {
    margin-right: 3px;
    color: #f5c518;
    font-size: 0.64rem;
}

@media (hover: hover) {
    .tka-card:hover .tka-card-frame {
        transform: translateY(-6px);
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.15);
        border-top-color: rgba(var(--primary-rgb), 0.45);
        box-shadow: 0 22px 44px rgba(0, 0, 0, 0.66);
    }

    .tka-card:hover .tka-card-img {
        filter: brightness(1.06) saturate(1.04);
    }
}

.tka-card:active .tka-card-frame {
    scale: 0.98;
}

.tka-card:focus-visible {
    outline: none;
}

.tka-card:focus-visible .tka-card-frame {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.tka-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 255, 255, 0.22);
    color: #efecff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.tka-badge i {
    flex: none;
    font-size: 0.62rem;
    color: var(--primary-soft, #b7a9ff);
}

.tka-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tka-card-w), 1fr));
    gap: 28px 16px;
    padding: 18px var(--tka-gutter) 8px;
}

.tka-grid .tka-card {
    width: auto;
    min-width: 0;
}

@media (max-width: 600px) {

    .tka-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px 10px;
    }

    .tka-grid .tka-card-title {
        font-size: 0.8rem;
    }

    .tka-grid .tka-badge {
        left: 6px;
        bottom: 6px;
        max-width: calc(100% - 12px);
        padding: 4px 7px;
        font-size: 0.62rem;
    }
}

@media (max-width: 340px) {
    .tka-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#tonkanime-view .tka-state,
#tka-modal .tka-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 72px var(--tka-gutter);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

#tonkanime-view .tka-state p,
#tka-modal .tka-state p {
    max-width: 42ch;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
}

.tka-state-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.26);
    color: var(--primary-soft, #b7a9ff);
    font-size: 1.5rem;
}

.tka-state .tka-state-title {
    margin: 4px 0 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    opacity: 1;
}

#tonkanime-view .tka-state .btn-premium,
#tka-modal .tka-state .btn-premium {
    height: 46px;
    margin-top: 8px;
    padding: 0 24px 0 20px;
    border-radius: 999px;
    justify-content: center;
}

#tonkanime-view .tka-state--inline {
    padding: 40px var(--tka-gutter) 24px;
}

.tka-wait {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.tka-wait--sm {
    min-height: 120px;
}

#tka-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;

    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overscroll-behavior: contain;
}

#tka-modal-overlay[hidden] {
    display: none;
}

#tka-modal-overlay[data-state="closing"] {
    pointer-events: none;
}

.tka-ov-scrim {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 10, 0.72);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
}

#tka-modal {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border-radius: 24px;
    background: #0b0c14;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
    outline: none;
}

.tka-ov-close {
    position: absolute;
    z-index: 6;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.26);

    background: rgba(10, 11, 19, 0.78);
    color: #fff;
    font-size: 1.05rem;
    cursor: pointer;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .tka-ov-close:hover {
        background: rgba(255, 255, 255, 0.16);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.tka-ov-close:focus-visible,
#tka-modal button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.tka-ov-scroll {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.tka-m {
    position: relative;
    min-height: 100%;
    background: radial-gradient(ellipse 80% 44% at 18% 0%, rgba(var(--tka-mood), 0.12), transparent 72%);
}

.tka-m-stage {
    position: relative;
    height: clamp(220px, 30vw, 340px);
    overflow: hidden;
    background: #0b0c14;
}

.tka-m-stage-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 60% 30%;
}

.tka-m-stage[data-art="cover"] .tka-m-stage-img {
    object-position: 50% 22%;
    filter: blur(26px) saturate(1.2) brightness(0.68);
    transform: scale(1.2);
}

.tka-m-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 12, 20, 0.3) 0%, rgba(11, 12, 20, 0) 24%, rgba(11, 12, 20, 0.5) 52%, rgba(11, 12, 20, 0.88) 80%, #0b0c14 100%),
        radial-gradient(ellipse 60% 90% at 14% 100%, rgba(var(--tka-mood), 0.2), transparent 70%);
}

.tka-m-stage[data-trailer] {
    height: auto;
    padding-top: 66px;
    background: #05050a;
}

.tka-m-stage[data-trailer]::after,
.tka-m-stage[data-trailer] .tka-m-stage-img {
    display: none;
}

.tka-m-video {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 220px);
    max-height: calc(100dvh - 220px);
    border: 0;
    background: #000;
}

.tka-m-ident {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 28px;
    margin-top: -118px;
    padding: 0 36px;
}

.tka-m-stage[data-trailer] + .tka-m-ident {
    margin-top: 24px;
}

.tka-m-cover {
    flex: none;
    display: block;
    width: 168px;
    height: auto;
    max-width: none;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #14151f;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.tka-m-head {
    flex: 1;
    min-width: 0;
    padding-bottom: 2px;
}

.tka-m-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-soft, #b7a9ff);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

.tka-m-kicker .tka-sep {
    color: rgba(255, 255, 255, 0.35);
}

.tka-m-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.018em;
    text-wrap: balance;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.tka-m-alt {
    margin: 6px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.92rem;
    font-weight: 500;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.tka-m-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tka-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tka-pill .fa-star {
    font-size: 0.7rem;
    color: #f5c518;
}

.tka-pill--air i {
    font-size: 0.74rem;
    color: var(--primary-soft, #b7a9ff);
}

.tka-m-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

#tka-modal .tka-m-actions .tka-play.btn-premium {
    min-width: 180px;
}

.tka-play-sub {
    opacity: 0.78;
    font-size: 0.82em;
    letter-spacing: 0.06em;
}

.tka-na {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 8px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.tka-na i {
    color: var(--primary-soft, #b7a9ff);
}

.tka-m-body {
    padding: 28px 36px 44px;
}

.tka-m-desc {
    max-width: 74ch;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.98rem;
    line-height: 1.7;
}

.tka-m-desc[data-open] {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: none;
    overflow: visible;
}

.tka-m-desc[data-fresh],
.tka-m[data-fresh] {
    animation: tka-fade-in 0.35s ease backwards;
}

.tka-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary-soft, #b7a9ff);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.tka-more-btn i {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.tka-more-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.tka-skel {
    display: grid;
    gap: 10px;
    max-width: 74ch;
}

.tka-skel span {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    animation: tka-pulse 1.4s ease-in-out infinite;
}

.tka-skel span:nth-child(2) { width: 92%; animation-delay: 0.12s; }
.tka-skel span:nth-child(3) { width: 64%; animation-delay: 0.24s; }

@keyframes tka-pulse {
    50% { opacity: 0.45; }
}

.tka-m-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.tka-m-tags .tka-chip {
    height: 36px;
    padding: 0 14px;
    font-size: 0.82rem;
}

.tka-m-studio {
    margin: 16px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.86rem;
    font-weight: 600;
}

.tka-m-studio i {
    color: rgba(255, 255, 255, 0.4);
}

.tka-m-error {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

.tka-m-error i {
    color: var(--primary-soft, #b7a9ff);
}

#tka-modal .tka-m-error .btn-premium {
    height: 40px;
    margin-left: auto;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.tka-m-section {
    margin-top: 40px;
}

.tka-m-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.tka-m-sec-title {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.tka-m-sec-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    font-weight: 600;
}

.tka-seasons {
    position: relative;
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px;
    margin: -3px;
    overscroll-behavior-x: contain;
    scrollbar-width: none !important;
}

.tka-seasons::-webkit-scrollbar {
    display: none !important;
}

.tka-seasons .tka-chip {
    max-width: 240px;
    height: 40px;
    padding: 0 16px;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tka-ep-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tka-ep {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, scale 0.14s ease-out;
    -webkit-tap-highlight-color: transparent;
}

#tka-modal .tka-ep:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
}

@media (hover: hover) {
    #tka-modal .tka-ep:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.14);
    }

    .tka-ep:hover .tka-ep-play {
        opacity: 1;
    }
}

.tka-ep:active {
    scale: 0.99;
}

.tka-ep[aria-current="true"] {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.45);
}

.tka-ep[aria-disabled="true"] {
    cursor: default;
    opacity: 0.55;
}

.tka-ep[aria-disabled="true"]:active {
    scale: none;
}

.tka-ep-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
}

.tka-ep-thumb img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.tka-ep-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 7, 13, 0.38);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tka-ep-play svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.tka-ep[aria-current="true"] .tka-ep-play {
    opacity: 1;
}

.tka-ep-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tka-ep-num {
    color: var(--primary-soft, #b7a9ff);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.tka-ep-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.tka-ep-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    line-height: 1.45;
}

.tka-ep-flag {
    flex: none;
    margin-right: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.16);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: var(--primary-tint, #d9d2ff);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

#tka-modal .tka-ep-more.btn-premium {
    width: 100%;
    height: 46px;
    margin-top: 12px;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
}

.tka-chars {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 8px;
    margin: -4px -2px 0;
    overscroll-behavior-x: contain;
    scrollbar-width: none !important;
}

.tka-chars::-webkit-scrollbar {
    display: none !important;
}

.tka-char {
    flex: none;
    width: 92px;
    margin: 0;
    text-align: center;
}

.tka-char img {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.tka-char figcaption {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
}

.tka-m-wait {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

#tka-modal-overlay[data-state="open"] .tka-ov-scrim {
    animation: tka-fade-in 0.3s ease-out backwards;
}

#tka-modal-overlay[data-state="open"] #tka-modal {
    animation: tka-dlg-in 0.44s cubic-bezier(0.38, 0, 0.18, 1) backwards;
}

#tka-modal-overlay[data-anim] .tka-m-cover {
    animation: tka-rise 0.4s cubic-bezier(0.2, 0.75, 0.25, 1) 0.08s backwards;
}

#tka-modal-overlay[data-anim] .tka-m-head > * {
    animation: tka-rise 0.34s cubic-bezier(0.2, 0.75, 0.25, 1) 0.12s backwards;
}

#tka-modal-overlay[data-anim] .tka-m-head > :nth-child(2) { animation-delay: 0.15s; }
#tka-modal-overlay[data-anim] .tka-m-head > :nth-child(3) { animation-delay: 0.17s; }
#tka-modal-overlay[data-anim] .tka-m-head > :nth-child(4) { animation-delay: 0.19s; }
#tka-modal-overlay[data-anim] .tka-m-head > :nth-child(n+5) { animation-delay: 0.22s; }

#tka-modal-overlay[data-anim] .tka-m-body {
    animation: tka-fade-in 0.36s ease-out 0.22s backwards;
}

#tka-modal-overlay[data-fly] .tka-m-cover {
    animation: none;
}

#tka-modal-overlay[data-dragged][data-state="closing"] #tka-modal {
    animation: none;
}

#tka-modal-overlay[data-state="closing"] .tka-ov-scrim {
    animation: tka-fade-out 0.24s ease-in forwards;
}

#tka-modal-overlay[data-state="closing"] #tka-modal {
    animation: tka-dlg-out 0.22s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes tka-fade-in {
    from { opacity: 0; }
}

@keyframes tka-fade-out {
    to { opacity: 0; }
}

@keyframes tka-dlg-in {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); }
}

@keyframes tka-dlg-out {
    to { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.985); }
}

@keyframes tka-rise {
    from { opacity: 0; transform: translate3d(0, 12px, 0); }
}

@keyframes tka-sheet-in {
    from { transform: translate3d(0, 100%, 0); }
}

@keyframes tka-sheet-out {
    to { transform: translate3d(0, 100%, 0); }
}

.tka-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 4001;
    display: block;
    max-width: none;
    margin: 0;
    object-fit: cover;
    border-radius: 16px;
    pointer-events: none;
    transform-origin: 0 0;
    will-change: transform;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}

[data-tka-hide] {
    opacity: 0 !important;
    transition: none !important;
}

@media (max-width: 1150px) {
    .tka-slide-body { width: min(600px, 60%); }
}

@media (orientation: portrait) {
    .tka-slide-media {
        height: 76%;
        -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.55) 76%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.55) 76%, transparent 100%);
    }

    .tka-slide-img,
    .tka-slide[data-art="cover"] .tka-slide-img {
        object-position: 50% 14%;
        filter: none;
        transform: none;
    }

    .tka-slide-media::after {
        background:
            linear-gradient(0deg, rgba(6, 7, 13, 0.92) 4%, rgba(6, 7, 13, 0.58) 30%, rgba(6, 7, 13, 0) 58%),
            linear-gradient(180deg, rgba(6, 7, 13, 0.5) 0%, rgba(6, 7, 13, 0) 20%);
    }

    .tka-slide::before {
        background: radial-gradient(ellipse 80% 28% at 36% 70%, rgba(var(--tka-mood), 0.2), transparent 72%);
    }
}

@media (min-width: 601px) and (max-width: 1100px) and (orientation: portrait) {
    .tka-hero {
        height: 860px;
        height: min(860px, 80svh);
        min-height: 640px;
    }

    .tka-slide-body {
        width: min(600px, calc(100% - 2 * var(--tka-gutter)));
        padding-top: 96px;
    }

    .tka-slide-title { font-size: clamp(2.4rem, 6.4vw, 3.4rem); }
    .tka-slide-title.is-mid { font-size: clamp(2.1rem, 5.2vw, 2.8rem); }
    .tka-slide-title.is-long { font-size: clamp(1.8rem, 4.2vw, 2.3rem); }

    .tka-slide-desc {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media (max-width: 768px) {
    #tonkanime-view .tka-play.btn-premium,
    #tka-modal .tka-play.btn-premium,
    #tonkanime-view .tka-glass.btn-premium,
    #tka-modal .tka-glass.btn-premium {
        height: 48px;
        font-size: 0.92rem !important;
    }

    #tonkanime-view .tka-play.btn-premium,
    #tka-modal .tka-play.btn-premium {
        padding: 0 28px 0 20px !important;
    }

    #tonkanime-view .tka-round.btn-premium,
    #tka-modal .tka-round.btn-premium {
        width: 48px !important;
        min-width: 48px;
        height: 48px;
    }

    .tka-row {
        margin-top: 34px;
    }

    .tka-row-title {
        font-size: 1.06rem;
        letter-spacing: 0.04em;
    }

    .tka-scroller {
        gap: 12px;
        padding-top: 14px;
    }

    .tka-head {
        align-items: stretch;
        flex-direction: column;
    }

    .tka-search {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .tka-hero {
        --tka-thumb-w: 48px;
        --tka-dock-bottom: 14px;
        --tka-content-bottom: calc(var(--tka-dock-bottom) + var(--tka-thumb-w) * 1.5 + 78px);
        height: 740px;
        height: clamp(580px, 88svh, 760px);
        min-height: 0;
    }

    .tka-slide-body {
        width: calc(100% - 2 * var(--tka-gutter));
        max-width: none;
        margin: 0 var(--tka-gutter);
        padding: 0 0 var(--tka-content-bottom);
        text-align: center;
    }

    .tka-kicker,
    .tka-meta,
    .tka-actions {
        justify-content: center;
    }

    .tka-kicker {
        margin-bottom: 10px;
        font-size: 0.66rem;
        letter-spacing: 0.16em;
    }

    .tka-slide-title { font-size: 2.05rem; }
    .tka-slide-title.is-mid { font-size: 1.75rem; }
    .tka-slide-title.is-long { font-size: 1.45rem; }

    .tka-slide-alt {
        font-size: 0.84rem;
    }

    .tka-meta {
        gap: 6px 16px;
        margin-top: 12px;
        font-size: 0.8rem;
    }

    .tka-score,
    .tka-air {
        height: 26px;
        font-size: 0.74rem;
    }

    .tka-slide-desc {
        display: none;
    }

    .tka-actions {
        flex-wrap: nowrap;
        gap: 10px;
        margin-top: 18px;
    }

    #tonkanime-view .tka-actions .tka-play.btn-premium {
        flex: 0 1 220px;
    }

    #tonkanime-view .tka-actions .tka-glass.btn-premium {
        flex: none;
        width: 48px !important;
        min-width: 48px;
        padding: 0 !important;
        border-radius: 50%;
    }

    #tonkanime-view .tka-actions .tka-glass.btn-premium > span {
        display: none;
    }

    .tka-dock {
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tka-hero-ctrl {
        order: -1;
        justify-content: space-between;
        padding: 0 var(--tka-gutter);
    }

    .tka-rail {
        flex: none;
        gap: 10px;
        margin: -10px 0 -8px;
        padding: 10px var(--tka-gutter) 8px;
        scroll-padding-inline: var(--tka-gutter);
    }

    .tka-thumb {
        border-radius: 10px;
    }

    .tka-browse {
        margin-top: 4px;
    }

    .tka-search {
        height: 48px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .tka-hero {
        --tka-thumb-w: 40px;
        --tka-dock-bottom: 12px;
        --tka-content-bottom: calc(var(--tka-dock-bottom) + var(--tka-thumb-w) * 1.5 + 30px);
        height: 100vh;
        height: 100svh;
        min-height: 320px;
    }

    .tka-slide-media {
        height: 100%;
    }

    .tka-slide-body {
        width: min(460px, 58%);
        padding: 64px 0 var(--tka-content-bottom);
    }

    .tka-kicker {
        margin-bottom: 8px;
        font-size: 0.64rem;
    }

    .tka-slide-title { font-size: 1.75rem; }
    .tka-slide-title.is-mid { font-size: 1.5rem; }
    .tka-slide-title.is-long { font-size: 1.3rem; }

    .tka-slide-alt,
    .tka-slide-desc {
        display: none;
    }

    .tka-meta {
        margin-top: 10px;
        gap: 6px 16px;
        font-size: 0.78rem;
    }

    .tka-actions {
        margin-top: 12px;
        gap: 10px;
    }

    #tonkanime-view .tka-actions .tka-play.btn-premium,
    #tonkanime-view .tka-actions .tka-glass.btn-premium {
        height: 44px;
        font-size: 0.86rem !important;
    }

    .tka-dock {
        gap: 12px;
    }
}

@media (max-width: 600px) {
    #tka-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    #tka-modal {
        width: 100%;
        height: calc(100vh - 28px);
        height: calc(100dvh - 28px);
        max-height: none;
        border-radius: 22px 22px 0 0;
        border-bottom: 0;
    }

    #tka-modal::before {
        content: '';
        position: absolute;
        z-index: 7;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 5px;
        margin-left: -20px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.5);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    #tka-modal-overlay[data-scrolled] #tka-modal::before {
        opacity: 0;
    }

    #tka-modal-overlay[data-state="open"] #tka-modal {
        animation: tka-sheet-in 0.42s cubic-bezier(0.32, 0.72, 0, 1) backwards;
    }

    #tka-modal-overlay[data-state="closing"] #tka-modal {
        animation: tka-sheet-out 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
    }

    .tka-ov-close {
        top: 14px;
        right: 12px;
    }

    .tka-m-stage {
        height: 200px;
    }

    .tka-m-ident {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        grid-template-rows: 1fr auto auto auto auto;

        gap: 0 16px;
        align-items: end;
        margin-top: -76px;
        padding: 0 16px;
    }

    .tka-m-head {
        display: contents;
    }

    .tka-m-cover {
        grid-column: 1;
        grid-row: 1 / span 3;
        align-self: end;
        width: 104px;
        border-radius: 12px;
    }

    .tka-m-kicker {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        margin-bottom: 6px;
        font-size: 0.64rem;
        letter-spacing: 0.14em;
    }

    .tka-m-title {
        grid-column: 2;
        grid-row: 2;
        font-size: 1.42rem;
    }

    .tka-m-alt {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
        font-size: 0.82rem;
    }

    .tka-m-meta {
        grid-column: 1 / -1;
        grid-row: 4;
        margin-top: 16px;
    }

    .tka-m-actions {
        grid-column: 1 / -1;
        grid-row: 5;
        flex-wrap: nowrap;
        margin-top: 16px;
        gap: 10px;
    }

    #tka-modal .tka-m-actions .tka-play.btn-premium {
        flex: 1 1 auto;
        min-width: 0;
    }

    #tka-modal .tka-m-actions .tka-glass.btn-premium {
        flex: none;
    }

    .tka-na {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 48px;
        font-size: 0.84rem;
    }

    .tka-m-body {
        padding: 24px 16px 36px;
    }

    .tka-m-desc {
        font-size: 0.92rem;
        line-height: 1.65;
    }

    .tka-m-section {
        margin-top: 32px;
    }

    .tka-ep {
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 12px;
        padding: 8px;
        border-radius: 14px;
    }

    .tka-ep-flag {
        display: none;
    }

    .tka-ep-name {
        font-size: 0.88rem;
    }

    .tka-ep-desc {
        font-size: 0.78rem;
    }

    .tka-char {
        width: 80px;
    }

    .tka-char img {
        width: 68px;
        height: 68px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    #tka-modal-overlay {
        padding: 0;
    }

    #tka-modal {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        border: 0;
    }

    .tka-m-stage {
        height: 170px;
    }

    .tka-m-ident {
        margin-top: -86px;
        gap: 20px;
        padding: 0 max(24px, env(safe-area-inset-left)) 0 max(24px, env(safe-area-inset-left));
    }

    .tka-m-cover {
        width: 112px;
    }

    .tka-m-title {
        font-size: 1.5rem;
    }

    .tka-m-body {
        padding: 22px max(24px, env(safe-area-inset-left)) 32px;
    }
}

@media (pointer: coarse) {
    .tka-chip {
        min-height: 44px;
    }

    .tka-seasons .tka-chip,
    .tka-m-tags .tka-chip {
        height: 44px;
    }

    .tka-more-btn {
        min-height: 44px;
    }

    .tka-search-clear {
        width: 40px;
        height: 40px;
    }
}

html.no-gpu .tka-score,
html.no-gpu .tka-air,
html.no-gpu .tka-badge,
html.no-gpu .tka-ov-close,
html.no-gpu .tka-ov-scrim,
html.no-gpu #tonkanime-view .tka-glass.btn-premium,
html.no-gpu #tonkanime-view .tka-round.btn-premium,
html.no-gpu #tka-modal .tka-glass.btn-premium,
html.no-gpu #tka-modal .btn-premium.secondary {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html.no-gpu .tka-score,
html.no-gpu .tka-air { background: rgba(24, 25, 38, 0.88); }
html.no-gpu .tka-badge { background: rgba(12, 12, 18, 0.92); }
html.no-gpu .tka-ov-close { background: rgba(16, 17, 26, 0.92); }
html.no-gpu .tka-ov-scrim { background: rgba(4, 5, 10, 0.9); }

html.no-gpu #tonkanime-view .tka-glass.btn-premium,
html.no-gpu #tonkanime-view .tka-round.btn-premium,
html.no-gpu #tka-modal .tka-glass.btn-premium {
    background: rgba(26, 27, 40, 0.88);
}

html.no-gpu .tka-slide-img,
html.no-gpu .tka-slide.is-active .tka-slide-img {
    transform: none;
    transition: opacity 0.5s ease;
}

html.no-gpu .tka-slide[data-art="cover"] .tka-slide-img {
    transform: scale(1.2);
}

html.no-gpu .tka-slide-body > *,
html.no-gpu .tka-slide.is-active .tka-slide-body > * {
    transform: none;
}

html.no-gpu .tka-card:hover .tka-card-frame,
html.no-gpu .tka-thumb:hover,
html.no-gpu .tka-thumb.is-active,
html.no-gpu .tka-chip:hover {
    transform: none;
}

html.no-gpu .tka-card-img,
html.no-gpu .tka-thumb img {
    transition: none;
}

html.reduce-motion #tonkanime-view .tka-thumb.is-active .tka-thumb-bar::after {
    animation-duration: 9s !important;
}

html.reduce-motion .tka-slide { transform: none !important; transition: opacity 0s linear 0.6s, visibility 0s linear 0.6s !important; }
html.reduce-motion .tka-slide.is-active { transition: opacity 0.6s ease, visibility 0s linear 0s !important; }

html.reduce-motion .tka-slide-img,
html.reduce-motion .tka-slide.is-active .tka-slide-img {
    transform: none !important;
    transition: opacity 0.4s ease !important;
}

html.reduce-motion .tka-slide[data-art="cover"] .tka-slide-img {
    transform: scale(1.2) !important;
}

html.reduce-motion .tka-slide-body > * {
    transform: none !important;
    transition: opacity 0.15s ease !important;
}

html.reduce-motion .tka-slide.is-active .tka-slide-body > * {
    transform: none !important;
    transition: opacity 0.3s ease 0.15s !important;
}

html.reduce-motion .tka-card-frame,
html.reduce-motion .tka-thumb,
html.reduce-motion .tka-chip {
    transition: none !important;
}

html.reduce-motion .tka-card:hover .tka-card-frame,
html.reduce-motion .tka-thumb:hover,
html.reduce-motion .tka-thumb.is-active,
html.reduce-motion .tka-chip:hover {
    transform: none;
}

html.reduce-motion #tka-modal-overlay[data-state="open"] #tka-modal,
html.reduce-motion #tka-modal-overlay[data-state="open"] .tka-ov-scrim {
    animation: tka-fade-in 0.14s ease-out backwards !important;
}

html.reduce-motion #tka-modal-overlay[data-state="closing"] #tka-modal,
html.reduce-motion #tka-modal-overlay[data-state="closing"] .tka-ov-scrim {
    animation: tka-fade-out 0.14s ease-in forwards !important;
}

html.reduce-motion #tka-modal-overlay[data-anim] .tka-m-cover,
html.reduce-motion #tka-modal-overlay[data-anim] .tka-m-head > *,
html.reduce-motion #tka-modal-overlay[data-anim] .tka-m-body,
html.reduce-motion .tka-skel span {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .tka-slide { transition: opacity 0s linear 0.6s, visibility 0s linear 0.6s !important; }
    .tka-slide.is-active { transition: opacity 0.6s ease, visibility 0s linear 0s !important; }

    .tka-slide-img,
    .tka-slide.is-active .tka-slide-img {
        transform: none !important;
        transition: opacity 0.4s ease !important;
    }

    .tka-slide[data-art="cover"] .tka-slide-img {
        transform: scale(1.2) !important;
    }

    .tka-slide-body > * {
        transform: none !important;
        transition: opacity 0.15s ease !important;
    }

    .tka-slide.is-active .tka-slide-body > * {
        transform: none !important;
        transition: opacity 0.3s ease 0.15s !important;
    }

    .tka-card-frame,
    .tka-thumb,
    .tka-chip {
        transition: none !important;
    }

    .tka-card:hover .tka-card-frame,
    .tka-thumb:hover,
    .tka-thumb.is-active,
    .tka-chip:hover {
        transform: none;
    }

    #tka-modal-overlay[data-state="open"] #tka-modal,
    #tka-modal-overlay[data-state="open"] .tka-ov-scrim {
        animation: tka-fade-in 0.14s ease-out backwards !important;
    }

    #tka-modal-overlay[data-state="closing"] #tka-modal,
    #tka-modal-overlay[data-state="closing"] .tka-ov-scrim {
        animation: tka-fade-out 0.14s ease-in forwards !important;
    }

    #tka-modal-overlay[data-anim] .tka-m-cover,
    #tka-modal-overlay[data-anim] .tka-m-head > *,
    #tka-modal-overlay[data-anim] .tka-m-body,
    .tka-skel span {
        animation: none !important;
    }
}

.nav-logo.tka-logo .logo-accent {
    background: linear-gradient(120deg, #ffb3d9 0%, var(--primary-soft, #b7a9ff) 48%, var(--primary, #8b76ff) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
