/* =========================================================
   ANIWHAT THEME
========================================================= */

:root {
    --bg: #080808;
    --panel: #0d0d0e;
    --panel-2: #121213;
    --panel-3: #171719;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f4f4f5;
    --muted: #a1a1a6;
    --muted-2: #74747a;
    --accent: #9b2d2d;
    --accent-hover: #b33a3a;
    --accent-soft: rgba(155, 45, 45, 0.12);
    --accent-border: rgba(155, 45, 45, 0.45);
    --site-background-top: #2d2d2d;
    --site-background-bottom: #151515;
    --site-background-stripe: rgba(0, 0, 0, 0.1);
    --site-background-stripe-size: 7px;
    --site-background-stripe-width: 4px;
    --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

@media (min-width: 651px) {
    #aniwhatUpdateDialog {
        display: none !important;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #141417;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding-top: 62px;
    padding-bottom: 82px;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background-color: var(--site-background-bottom);
    background-image:
        repeating-linear-gradient(
            45deg,
            var(--site-background-stripe) 0,
            var(--site-background-stripe) var(--site-background-stripe-width),
            transparent var(--site-background-stripe-width),
            transparent var(--site-background-stripe-size)
        ),
        linear-gradient(
            to bottom,
            var(--site-background-top) 0%,
            var(--site-background-bottom) 100%
        );
    background-repeat: repeat, no-repeat;
    background-size: auto, 100% 100vh;
    background-position: 0 0, 0 0;
    background-origin: border-box;
    background-attachment: fixed, fixed;
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
    overflow-y: scroll;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   NAVIGATION
   Matches the index navbar, without its search bar
========================================================= */

.anime-topbar {
    height: 62px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background-color: #202020;
    border-bottom: 1px solid rgba(155, 45, 45, 0.35);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #c2c2c2;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-button:hover {
    color: #ffffff;
    transform: translateX(-3px);
}

.back-button span:first-child {
    font-size: 20px;
}

.anime-brand {
    flex: 0 0 auto;
    margin-left: auto;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
}

/* =========================================================
   INDEX-STYLE CONTENT AREA
========================================================= */

.content-area {
    width: min(calc(100% - 40px), 1600px);
    min-width: 0;
    min-height: calc(100vh - 144px);
    margin: 20px auto;
    padding: 0 0 32px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    flex: 1 0 auto;
}

#animePage {
    width: 100%;
    min-width: 0;
}

/* =========================================================
   ANIME HERO
========================================================= */

.anime-hero {
    width: 100%;
    min-height: 610px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 12px;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(0);
    transform: scale(1.02);
}

.hero-background.has-image {
    filter: saturate(0.8);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 8, 8, 0.25) 0%,
        rgba(8, 8, 8, 0.45) 35%,
        rgba(8, 8, 8, 0.92) 82%,
        #080808 100%
    );
}

.hero-content {
    width: 100%;
    margin: 0;
    padding: 0 40px 55px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 34px;
}

.anime-poster {
    width: 230px;
    min-width: 230px;
    height: 330px;
    background: #151515;
    border: 1px solid #303030;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.anime-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 14px;
}

.anime-heading {
    max-width: 780px;
    min-width: 0;
    padding-bottom: 8px;
}

.anime-type {
    color: #a7a7a7;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 9px;
}

.anime-heading h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -3px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.anime-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.anime-meta span {
    color: #c6c6c6;
    font-size: 14px;
}

.anime-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 9px;
    color: #555;
}

.anime-rating {
    margin-top: 22px;
}

.rating-number {
    font-size: 27px;
    font-weight: 800;
}

.rating-total {
    color: #777;
    font-size: 16px;
}

.anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.anime-genres span {
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 5px;
    color: #d7d7d7;
    font-size: 12px;
}

/* =========================================================
   REVIEW AND INFORMATION LAYOUT
========================================================= */

.anime-content {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 35px;
    padding: 20px 30px 30px;
}

.anime-main-column {
    min-width: 0;
}

.review-section {
    padding-top: 15px;
}

.installment-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.installment-selector[hidden] {
    display: none;
}

.installment-button,
.installment-tag {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.installment-button {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.installment-button:hover,
.installment-button.is-selected {
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

.section-label {
    color: #777;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.review-section h2 {
    margin: 0 0 28px;
    font-size: 30px;
    letter-spacing: -1px;
}

.anime-opinion {
    width: 100%;
    color: #c8c8c8;
    font-size: 17px;
    line-height: 1.85;
    max-width: none;
    overflow-wrap: anywhere;
}

.review-edit-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 8px;
    color: #9b2d2d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.review-edit-divider::before,
.review-edit-divider::after {
    height: 1px;
    flex: 1;
    background: #9b2d2d;
    content: "";
    opacity: 0.75;
}

.review-edit-text {
    margin-top: 0;
}

.anime-sidebar {
    min-width: 0;
    padding-top: 15px;
}

.info-card {
    background: #101010;
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 25px;
}

.info-card h2 {
    margin: 0 0 20px;
    font-size: 17px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid #222;
    font-size: 13px;
}

.info-row span {
    color: #777;
}

.info-row strong {
    color: #ddd;
    text-align: right;
    overflow-wrap: anywhere;
}

/* =========================================================
   STREAMING SERVICES
========================================================= */

.watch-divider {
    width: 100%;
    height: 1px;
    background: #252525;
    margin: 30px 0;
}

.watch-section h2 {
    margin: 0 0 16px;
    font-size: 17px;
}

.anime-kofi-support {
    width: 100%;
    margin-top: 18px;
}

.monthly-viewers-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(155, 45, 45, 0.15);
    border: 1px solid rgba(155, 45, 45, 0.35);
    color: #c97a7a;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.monthly-viewers-tag::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9b2d2d;
    flex-shrink: 0;
}

.watch-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.watch-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #2c2c2c;
    border-radius: 9px;
    background: #111111;
    color: #ededed;
    overflow: hidden;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.watch-button:hover {
    background: #181818;
    border-color: #464646;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.watch-button:active {
    transform: translateY(0);
}

.watch-button-logo-wrap {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watch-button-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.watch-button-content {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-left: 13px;
}

.watch-button-service {
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.watch-button-arrow {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease, transform 0.2s ease;
}

.watch-button-arrow svg {
    display: block;
    width: 100%;
    height: 100%;
}

.watch-button:hover .watch-button-arrow {
    color: #aaa;
    transform: translate(2px, -2px);
}

.review-poll {
    width: 100%;
    margin-top: 28px;
}

.review-poll h2 {
    margin: 0 0 13px;
    font-size: 17px;
}

.review-poll-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #272727;
}

.review-poll-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #9b2d2d;
    transition: width 240ms ease;
}

.review-poll-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 9px;
}

.review-poll-button {
    min-width: 76px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #353535;
    border-radius: 6px;
    background: #171717;
    color: #dedede;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.review-poll-button:hover:not(:disabled) {
    border-color: #9b2d2d;
    background: #241717;
}

.review-poll-button.is-selected {
    border-color: #9b2d2d;
    background: #9b2d2d;
    color: #fff;
}

.review-poll-button:disabled {
    cursor: default;
}

.review-poll-summary {
    min-height: 14px;
    margin: 8px 0 0;
    color: #8b8b8b;
    font-size: 11px;
    line-height: 1.4;
}

.review-poll-notice {
    margin: 5px 0 0;
    color: #a1a1a6;
    font-size: 11px;
    line-height: 1.4;
}

.review-score-details-button {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b7b7bc;
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.review-score-details-button:hover {
    color: #f4f4f5;
}

.score-details-backdrop[hidden] {
    display: none !important;
}

.score-details-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(6px);
}

.score-details-dialog {
    position: relative;
    width: min(100%, 500px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(155, 45, 45, 0.55);
    border-radius: 12px;
    background: #141414;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.score-details-dialog h2 {
    margin: 0 28px 12px 0;
    color: #f4f4f5;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.score-details-dialog > p {
    color: #b2b2b7;
    font-size: 14px;
    line-height: 1.65;
}

.score-details-dialog .score-details-total {
    margin: 20px 0 10px;
    color: #f4f4f5;
}

.score-details-total strong {
    color: #fff;
}

.score-details-close {
    position: absolute;
    top: 18px;
    right: 20px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #aaa;
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.score-details-close:hover {
    color: #fff;
}

.score-details-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.score-details-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #101010;
    color: #c5c5ca;
    font-size: 13px;
}

.score-details-list strong {
    color: #f4f4f5;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .score-details-dialog {
        padding: 24px 20px;
    }
}

.cookies-page {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: clamp(32px, 5vw, 72px) clamp(18px, 4vw, 54px) 55px;
}

.cookies-page > .section-label {
    margin-bottom: 12px;
}

.cookies-page h1 {
    margin: 0 0 16px;
    color: #f4f4f5;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.cookies-page h2 {
    margin: 0 0 14px;
    color: #f4f4f5;
    font-size: 20px;
}

.cookies-page h3 {
    margin: 20px 0 8px;
    color: #e6e6e8;
    font-size: 15px;
}

.cookies-page ul {
    padding-left: 22px;
    color: #b0b0b5;
}

.cookies-page li {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.7;
}

.cookies-page p {
    color: #b0b0b5;
    font-size: 14px;
    line-height: 1.7;
}

.cookies-intro {
    max-width: 790px;
    margin: 0 0 28px;
    font-size: 16px !important;
}

.cookies-card {
    margin-top: 18px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(13, 13, 14, 0.78);
}

.cookies-card p:last-child {
    margin-bottom: 0;
}

.cookies-card a {
    color: #d77b7b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookies-page code {
    color: #f1c5c5;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}

.cookies-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.cookies-table {
    width: 100%;
    border-collapse: collapse;
    color: #c7c7cb;
    font-size: 13px;
    line-height: 1.6;
}

.cookies-table th,
.cookies-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    text-align: left;
    vertical-align: top;
}

.cookies-table th {
    color: #e6e6e8;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cookies-table td:first-child {
    min-width: 190px;
    color: #f0d0d0;
}

.cookies-table td:nth-child(2) {
    min-width: 130px;
    white-space: nowrap;
}

.cookies-table code {
    color: #f1c5c5;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.cookies-note {
    margin: 16px 0 0;
}

.cookies-updated {
    margin: 20px 0 0;
    color: #7e7e84 !important;
    font-size: 11px !important;
}

.watch-button-fallback-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #202020;
    color: #d5d5d5;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================================
   NOT FOUND SCREEN
========================================================= */

.anime-not-found {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}

.anime-not-found[hidden] {
    display: none !important;
}

.anime-not-found h1 {
    margin: 0 0 10px;
    font-size: 38px;
}

.anime-not-found p {
    color: #888;
    margin-bottom: 25px;
}

.anime-not-found a {
    padding: 11px 16px;
    border: 1px solid #333;
    border-radius: 5px;
    color: #ddd;
}

.anime-not-found a:hover {
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

/* =========================================================
   FOOTER
   Match the index footer and keep the AUX logo beside POWERED BY
========================================================= */

.site-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    height: 62px;
    flex: 0 0 62px;
    box-sizing: border-box;
    padding: 10px 20px;
    font-size: 14px;
    color: #888888;
    background-color: rgb(14 14 14 / 55%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(155, 45, 45, 0.28);
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 990;
}

.site-footer > div {
    display: flex;
    align-items: center;
}

.site-footer .footer-contact-links {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.site-footer .footer-legal-links {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.site-footer a {
    color: #888888;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-hover);
}

.site-footer .cookie-settings-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.site-footer .cookie-settings-trigger:hover {
    color: var(--accent-hover);
}

.cookie-consent-backdrop[hidden] {
    display: none !important;
}

.cookie-consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(6px);
}

.cookie-consent-dialog {
    width: min(100%, 500px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(155, 45, 45, 0.55);
    border-radius: 12px;
    background: #141414;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.cookie-consent-dialog h2 {
    margin: 0 0 12px;
    color: #f4f4f5;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.cookie-consent-dialog p {
    margin: 0;
    color: #b2b2b7;
    font-size: 14px;
    line-height: 1.65;
}

.cookie-consent-dialog .cookie-consent-third-party {
    margin-top: 10px;
    color: #85858b;
    font-size: 12px;
}

.cookie-consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.cookie-consent-actions button {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 6px;
    font-family: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cookie-choice-button {
    width: 100%;
}

.cookie-accept-button {
    border: 1px solid #454545;
    background: #1c1c1c;
    color: #dedede;
}

.cookie-accept-button:hover {
    border-color: #777;
    background: #252525;
}

.cookie-deny-button {
    border: 1px solid #454545;
    background: #1c1c1c;
    color: #dedede;
}

.cookie-deny-button:hover {
    border-color: #777;
    background: #252525;
}

.cookie-policy-link {
    margin-top: 16px !important;
    text-align: center;
    font-size: 12px !important;
}

.cookie-policy-link a {
    color: #dedede;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-policy-link a:hover {
    color: #b33a3a;
}

.cookie-customize-button,
.cookie-save-button {
    border: 1px solid #454545;
    background: #1c1c1c;
    color: #dedede;
}

.cookie-customize-button:hover,
.cookie-save-button:hover {
    border-color: #777;
    background: #252525;
}

.cookie-preferences-panel {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-preferences-panel[hidden] {
    display: none !important;
}

.cookie-preferences-panel h3 {
    margin: 0 0 12px;
    color: #eee;
    font-size: 15px;
}

.cookie-consent-dialog .cookie-preferences-panel p {
    margin: 8px 0;
    font-size: 12px;
}

.cookie-poll-toggle label,
.cookie-kofi-toggle label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #dedee2;
    cursor: pointer;
}

.cookie-poll-toggle input,
.cookie-kofi-toggle input {
    flex: 0 0 auto;
    margin: 3px 0 0;
    accent-color: #9b2d2d;
}

.cookie-save-button {
    min-height: 38px;
    margin-top: 9px;
    padding: 0 14px;
    border-radius: 6px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.site-footer span {
    display: inline;
}

.site-footer .footer-powered-by {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.site-footer .footer-powered-by span {
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
}

.site-footer .footer-powered-by img {
    display: block;
    width: auto;
    height: 18px;
    max-width: none;
    object-fit: contain;
    flex: 0 0 auto;
    vertical-align: middle;
}

/* =========================================================
   RESPONSIVE LAYOUT
========================================================= */

@media (max-width: 1200px) {
    .content-area {
        width: min(calc(100% - 30px), 1400px);
    }

    .anime-content {
        gap: 35px;
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .hero-content {
        width: 100%;
    }
}

@media (max-width: 850px) {
    .anime-topbar {
        padding: 0 18px;
    }

    .back-button span:last-child {
        display: inline;
    }

    .content-area {
        width: calc(100% - 24px);
        margin-top: 12px;
        padding: 0 0 25px;
    }

    .anime-hero {
        min-height: auto;
    }

    .hero-content {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 70px 18px 35px;
        gap: 25px;
    }

    .anime-poster {
        width: 170px;
        min-width: 170px;
        height: 245px;
    }

    .anime-heading {
        width: 100%;
    }

    .anime-heading h1 {
        font-size: 44px;
        letter-spacing: -2px;
    }

    .anime-content {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 35px;
        padding: 20px 18px 25px;
    }

    .anime-sidebar {
        padding-top: 0;
    }

    .site-footer {
        gap: 14px;
        font-size: 11px;
    }

    .site-footer .footer-powered-by img {
        height: 16px;
    }
}

@media (max-width: 600px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .content-area {
        width: calc(100% - 16px);
        margin-top: 10px;
        padding: 0 0 20px;
        border-radius: 12px;
    }

    .anime-topbar {
        padding: 0 15px;
    }

    .anime-brand {
        font-size: 18px;
    }

    .back-button {
        gap: 6px;
        font-size: 12px;
    }

    .back-button span:last-child {
        display: inline;
    }

    .anime-hero {
        border-radius: 9px;
    }

    .hero-content {
        width: 100%;
        padding: 45px 14px 28px;
        gap: 20px;
    }

    .anime-poster {
        width: 145px;
        min-width: 145px;
        height: 218px;
    }

    .anime-heading h1 {
        font-size: 37px;
        letter-spacing: -1.5px;
    }

    .anime-meta {
        margin-top: 14px;
    }

    .anime-meta span {
        font-size: 12px;
    }

    .anime-rating {
        margin-top: 16px;
    }

    .anime-genres {
        margin-top: 14px;
    }

    .anime-content {
        width: 100%;
        gap: 28px;
        padding: 10px 10px 25px;
    }

    .review-section h2 {
        font-size: 26px;
    }

    .anime-opinion {
        font-size: 15px;
        line-height: 1.8;
    }

    .info-card {
        padding: 20px;
    }

    .site-footer {
        gap: 10px;
        padding: 8px 10px;
        font-size: 10px;
    }

    .site-footer .footer-powered-by {
        gap: 4px;
        font-size: 9px;
    }

    .site-footer .footer-powered-by img {
        height: 15px;
    }
}

@media (max-width: 420px) {
    .anime-topbar {
        padding: 0 12px;
    }

    .back-button {
        gap: 5px;
        font-size: 11px;
    }

    .anime-brand {
        font-size: 17px;
    }

    .site-footer {
        gap: 8px;
        padding: 8px;
        font-size: 9px;
    }

    .site-footer .footer-powered-by {
        font-size: 8px;
    }

    .site-footer .footer-powered-by img {
        height: 13px;
    }
}

@media (max-width: 560px) {
    .cookie-consent-dialog {
        padding: 22px;
    }

    .cookie-consent-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

/* Shared mobile app navigation */
.mobile-app-nav {
    display: none;
}

.mobile-footer-drawer {
    display: none;
}

@media (max-width: 600px) {
    html,
    body,
    * {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar,
    *::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .cookie-consent-backdrop {
        z-index: 2400;
    }

    body {
        padding-top: calc(68px + max(0px, env(safe-area-inset-top) - 12px));
        padding-bottom: 96px;
    }

    .content-area {
        width: 100%;
        margin: 0;
        padding: 0 0 24px;
        border-radius: 0;
        background: transparent;
    }

    .anime-topbar {
        height: 68px;
        top: 0;
        box-sizing: border-box;
        height: calc(68px + max(0px, env(safe-area-inset-top) - 12px));
        padding-top: max(0px, calc(env(safe-area-inset-top) - 12px));
        background: #141417;
        border-bottom-color: rgba(255, 255, 255, .08);
        backdrop-filter: none;
    }

    .anime-topbar .back-button {
        min-height: 38px;
        padding: 0 10px;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 9px;
        background: rgba(255, 255, 255, .05);
    }

    .anime-hero {
        border-radius: 0;
    }

    .site-footer {
        display: none;
    }

    .mobile-app-nav {
        position: fixed;
        right: 10px;
        bottom: 16px;
        left: 10px;
        z-index: 1000;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        padding: 8px 5px 7px;
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 18px;
        background: rgba(20, 20, 24, .94);
        box-shadow: 0 14px 38px rgba(0, 0, 0, .42);
        backdrop-filter: blur(18px);
    }

    .mobile-app-nav-item {
        min-width: 0;
        padding: 3px 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        border-radius: 12px;
        color: #85858e;
        font-size: 18px;
        text-decoration: none;
    }

    .mobile-app-nav-item svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-app-nav-item small {
        font-size: 9px;
        font-weight: 700;
    }

    .mobile-app-nav-item:hover,
    .mobile-app-nav-item:focus-visible {
        color: #fff;
        background: rgba(255, 255, 255, .08);
    }

    .mobile-app-nav-item.is-active {
        color: #9b2d2d;
    }

    .mobile-footer-drawer {
        position: fixed;
        inset: 0;
        z-index: 2200;
        display: flex;
        flex-direction: column;
        gap: 22px;
        padding: calc(env(safe-area-inset-top) + 24px) 22px calc(env(safe-area-inset-bottom) + 24px);
        background: #111114;
        box-shadow: 18px 0 45px rgba(0, 0, 0, .42);
        transform: translateX(-102%);
        transition: transform .28s ease;
        will-change: transform;
        backface-visibility: hidden;
        visibility: hidden;
        pointer-events: none;
        touch-action: pan-y;
    }

    body.mobile-footer-drawer-open .mobile-footer-drawer {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    body.mobile-footer-drawer-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 2199;
        background: rgba(0, 0, 0, .62);
    }

    .mobile-footer-drawer-close {
        position: absolute;
        top: calc(env(safe-area-inset-top) + 16px);
        right: 18px;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 50%;
        color: #f4f4f5;
        background: #17171b;
        font-size: 25px;
    }

    .mobile-footer-drawer-heading {
        padding-top: 34px;
    }

    .mobile-footer-drawer-heading h2 {
        margin: 5px 0 0;
        color: #f4f4f5;
        font-size: 30px;
    }

    .mobile-footer-drawer-links {
        display: grid;
        gap: 10px;
    }

    .mobile-footer-drawer-links a,
    .mobile-footer-drawer-links button {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0 14px;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 10px;
        color: #f4f4f5;
        background: #17171b;
        font: inherit;
        text-decoration: none;
    }

    .mobile-footer-drawer-bottom {
        display: grid;
        gap: 5px;
        margin-top: auto;
        color: #85858e;
        font-size: 10px;
    }

    .mobile-footer-powered-by {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

    .mobile-footer-powered-by img {
        width: auto;
        height: 18px;
    }
}
* {
    user-select: none;
    -webkit-user-select: none;
}

@media (min-width: 651px) {
    .anime-completion-toggle {
        display: grid;
        place-items: center;
        line-height: 1;
    }
}

