
* { margin: 0; padding: 0; box-sizing: border-box; }
        [v-cloak] { display: none; }

        :root {
            --navy: #20283b;
            --navy-2: #2c3650;
            --navy-3: #141a29;
            --accent: #ff7b16;
            --accent-dark: #ff7b16;
            --brand: #ff7b16;
            --brand-dark: #213aa8;
            --cyan: #16a8b7;
            --lime: #8fbd35;
            --bg: #f5f4f9;
            --card: #ffffff;
            --border: #e6e4ee;
            --border-strong: #d8d5e2;
            --text: #26272b;
            --text-2: #5f5f6a;
            --text-3: #70717c;
            --text-1: var(--text);
            --bg-2: #f0f1f6;
            --brand-light: #fff5e6;
            --amber: #b4550d;
            --radius: 8px;
            --ui-focus: #3157ed;
            --ui-focus-halo: rgba(49, 87, 237, .16);
            --shadow: 0 1px 2px rgba(20, 20, 40, 0.05), 0 4px 16px rgba(20, 20, 40, 0.05);
        }

        html { scroll-behavior: smooth; }
        @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

        body {
            font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans CJK SC', 'Noto Sans CJK JP', system-ui, sans-serif;
            color: var(--text);
            background-color: var(--bg);
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            background-repeat: no-repeat;
            min-height: 100vh;
            overflow-x: clip;
        }
        body.subpage-bg { background-image: url('/uma_tools/img/bg_texture_white.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461'); }

        #app {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            min-height: 100dvh;
        }
        #app[v-cloak] { display: none; }
        #app > .container { flex: 1 0 auto; width: 100%; }
        #app > .sub-header,
        #app > .home-layout,
        #app > .site-footer { flex-shrink: 0; }

        ::selection { background: rgba(255, 123, 22, 0.2); color: var(--navy-3); }
        :focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
        .entity-tabs button:focus-visible { outline: none; box-shadow: inset 0 -3px 0 var(--ui-focus); }

/* ===== UNIFIED DESIGN TOKENS: DAYLIGHT (UMAMUSUME.JP COBALT & STAGE ORANGE) =====
 * Single source of truth governed by DESIGN_SYSTEM.md.
 */
:root {
    /* Surface elevation ramp (tonal hierarchy replaces box-in-box borders) */
    --surface-canvas: #f3f5fb;
    --surface-panel: #ffffff;
    --surface-raised: #edf2fc;
    --surface-subtle: #f7f9fe;
    --surface-hover: rgba(49, 87, 237, 0.055);
    --surface-glass: rgba(255, 255, 255, 0.88);

    /* Ink hierarchy */
    --ink-1: #161f3d;
    --ink-2: #525f7d;
    --ink-3: #7b87a3;
    --ink-inverse: #ffffff;

    /* Official umamusume.jp Cobalt & Stage Orange */
    --accent-primary: #3157ed;
    --accent-primary-deep: #213aa8;
    --accent-primary-soft: rgba(49, 87, 237, 0.10);
    --accent-secondary: #ff7b16;
    --accent-secondary-end: #ffa932;
    --accent-secondary-soft: rgba(255, 123, 22, 0.12);
    --accent-ring: rgba(49, 87, 237, 0.22);

    /* Ultra-restrained hairlines */
    --hairline: rgba(22, 31, 61, 0.08);
    --hairline-strong: rgba(49, 87, 237, 0.16);

    /* Soft ambient shadows */
    --shadow-panel: 0 2px 6px rgba(22, 36, 92, 0.04), 0 12px 32px rgba(22, 36, 92, 0.065);
    --shadow-hover: 0 6px 16px rgba(22, 36, 92, 0.08), 0 18px 40px rgba(49, 87, 237, 0.13);
    --shadow-control: 0 2px 8px rgba(22, 36, 92, 0.055), 0 1px 2px rgba(22, 36, 92, 0.04);
    --shadow-float: 0 14px 36px rgba(18, 30, 74, 0.16);

    /* Strict 3-Tier Typography Scale (see DESIGN_SYSTEM.md) */
    --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Yu Gothic UI", "Yu Gothic", system-ui, -apple-system, sans-serif;
    --text-display: clamp(1.375rem, 2vw, 1.625rem);
    --text-body: 0.9375rem;
    --text-meta: 0.8125rem;
    /* Semantic aliases mapped strictly to the 3 tiers */
    --text-h1: var(--text-display);
    --text-h2: var(--text-body);
    --text-sub: var(--text-meta);
    --text-label: var(--text-meta);
    --text-badge: var(--text-meta);

    /* Concentric Continuous Radii */
    --radius-panel: 20px;
    --radius-card: 14px;
    --radius-control: 10px;
    --radius-badge: 6px;
    --radius-pill: 999px;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;

    /* Standardized Spring & Glide Physics */
    --spring-drag: cubic-bezier(0.22, 1, 0.36, 1);       /* 1200/80 critically damped, zero bounce */
    --spring-pop: cubic-bezier(0.34, 1.56, 0.64, 1);     /* 380/18 tactile micro-rebound */
    --ease-uma: cubic-bezier(0.19, 1, 0.22, 1);          /* Editorial glide */
    --ease-spring: var(--spring-pop);
    --dur-fast: 160ms;
    --dur-drag: 200ms;
    --dur-base: 280ms;
    --dur-pop: 340ms;
    --dur-slow: 460ms;
    --toast-duration: 2500ms;

    /* Legacy token aliases mapped cleanly to single source of truth */
    --bg: var(--surface-canvas);
    --bg-2: var(--surface-raised);
    --card: var(--surface-panel);
    --text: var(--ink-1);
    --text-1: var(--ink-1);
    --text-2: var(--ink-2);
    --text-3: var(--ink-3);
    --border: var(--hairline);
    --border-strong: var(--hairline-strong);
    --surface-line: var(--hairline);
    --surface-muted: var(--surface-subtle);
    --ui-line: var(--hairline);
    --ui-soft: var(--surface-raised);
    --ui-navy: var(--ink-1);
    --ui-cobalt: var(--accent-primary);
    --ui-cobalt-deep: var(--accent-primary-deep);
    --ui-cobalt-soft: var(--accent-primary-soft);
    --ui-orange: var(--accent-secondary);
    --ui-orange-end: var(--accent-secondary-end);
    --ui-orange-deep: var(--accent-secondary);
    --ui-focus: var(--accent-primary);
    --ui-focus-halo: var(--accent-ring);
    --ui-ease: var(--ease-uma);
}



        /* ===== HOME (KEY VISUAL) LAYOUT ===== */
        .home-layout {
            position: relative;
            display: flex; min-height: 100vh; height: 100vh;
            background: #fff; overflow: hidden;
        }
        .home-nav {
            flex: 0 0 220px; width: 220px; max-width: 32vw;
            display: flex; flex-direction: column; color: #fff;
            padding: 150px 0 20px;
            background-image: url('/uma_tools/img/bg_kv_nav.png?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461');
            background-size: 100% auto;
            background-repeat: repeat-y;
            background-position: left top;
            box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
        }
        .home-brand {
            position: absolute; top: 44px; left: 55px; z-index: 4;
            display: flex; flex-direction: column; gap: 6px;
            color: #fff; pointer-events: none;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
        }
        .home-brand .hl-zh { font-size: 2.3rem; font-weight: 800; letter-spacing: 0.14em; line-height: 1.15; }
        .home-brand .hl-en { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.34em; color: rgba(255, 255, 255, 0.92); }
        .home-stats {
            position: absolute; top: 44px; right: 36px; z-index: 4;
            display: flex; align-items: stretch; color: #fff;
            padding: 12px 20px;
            background: rgba(20, 26, 41, 0.42);
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 14px;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
            pointer-events: none;
            text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
        }
        .home-stat {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            padding: 0 24px; min-width: 96px;
        }
        .home-summary-error {
            position: absolute; top: 100%; right: 0; pointer-events: auto;
            color: #fff; text-shadow: none; margin-top: 8px; padding: 12px 16px;
            background: rgba(20, 26, 41, 0.9); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px;
        }
        .home-summary-error button { margin-left: 12px; padding: 4px 10px; color: inherit; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 4px; cursor: pointer; }
        @media (max-width: 900px) {
            .home-summary-error { position: static; flex-basis: 100%; margin: 8px 0 0; }
        }
        .home-stat + .home-stat { border-left: 1px solid rgba(255, 255, 255, 0.3); }
        .home-stat-number { font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.02em; }
        .home-stat-label { margin-top: 5px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; opacity: 0.85; }
        .home-tabs { display: flex; flex-direction: column; }
        .home-tab {
            position: relative; display: flex; align-items: center; gap: 10px;
            padding: 15px 22px; border: none; border-left: 3px solid transparent;
            background: rgba(0, 0, 0, 0); cursor: pointer; text-align: left;
            color: #fff; font-family: inherit; font-size: 1em; font-weight: 700;
            letter-spacing: 0.06em;
            transition: color 0.2s, background 0.2s, border-color 0.2s;
        }
        .home-tab svg { width: 18px; height: 18px; flex-shrink: 0; }
        .home-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.14); border-left-color: var(--accent); }
        .home-tab::after {
            content: '>>'; position: absolute; right: 18px; top: 50%;
            transform: translateY(-50%); font-weight: 800; font-size: 1em; letter-spacing: 0;
            opacity: 0; transition: opacity 0.2s, transform 0.2s;
        }
        .home-tab:hover::after { opacity: 1; transform: translate(6px, -50%); }
        .home-hero {
            flex: 1 1 auto; min-width: 0; position: relative;
            background-color: #20283b;
            background:
                linear-gradient(180deg, rgba(24, 30, 48, 0.25) 0%, rgba(20, 26, 41, 0.42) 100%),
                image-set(url('/uma_tools/img/hero_bg.avif?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') type('image/avif'), url('/uma_tools/img/hero_bg.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') type('image/webp')) center center / cover no-repeat;
        }
        .home-upcoming {
            position: absolute; right: 28px; bottom: 24px; z-index: 5;
            max-width: 360px; width: auto;
            display: flex; flex-direction: column; gap: 6px;
            padding: 14px 18px;
            color: #fff; cursor: pointer; text-decoration: none;
            background: rgba(20, 26, 41, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 14px;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
            text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
            transition: transform 0.2s, border-color 0.2s;
        }
        .home-upcoming:hover { transform: translateY(-3px); border-color: rgba(255, 199, 87, 0.7); }
        .home-upcoming .hu-badge {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 3px 10px; border-radius: 999px;
            background: linear-gradient(90deg, #ff7b16, #ffa932);
            color: #20283b; font-size: 0.72em; font-weight: 800; letter-spacing: 0.1em;
            text-shadow: none; align-self: flex-start;
        }
        .home-upcoming .hu-title {
            font-size: 1em; font-weight: 700; line-height: 1.4;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .home-upcoming .hu-meta { font-size: 0.8em; opacity: 0.88; letter-spacing: 0.02em; }
        .home-upcoming .hu-link {
            margin-top: 3px; font-size: 0.82em; font-weight: 700;
            color: #ffc657; letter-spacing: 0.04em;
        }

/* ===== DARING TACT 7-DAY CAMPAIGN ARTWORK & CONSTELLATION =====
 * Shared dark surfaces, controls, tabs, audio dock & footer live in theme-night.css.
 */

@font-face {
    font-family: "CinzelEditorial";
    src: url("/uma_tools/fonts/cinzel-editorial.woff2") format("woff2");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

/* Homepage Campaign Shell Overrides */
body.dt-home-theme .home-layout {
    background: #060a16;
}

body.dt-home-theme .home-nav {
    background-image: none;
    background: linear-gradient(180deg, #070d1e 0%, #091228 54%, #060b18 100%);
    box-shadow: inset -1px 0 0 rgba(121, 198, 219, 0.18);
    transition: background 0.85s var(--ease-uma), box-shadow 0.85s var(--ease-uma);
}

body.dt-home-theme.dt-crowned-theme .home-nav {
    background: linear-gradient(180deg, #0b1636 0%, #101f48 54%, #081026 100%);
    box-shadow: inset -1px 0 0 rgba(248, 212, 120, 0.34);
}

body.dt-home-theme .home-brand .hl-zh {
    letter-spacing: 0.16em;
    color: #f5fbff;
}

body.dt-home-theme .home-brand .hl-en,
body.dt-home-theme .site-footer .footer-brand-en,
body.dt-detail-theme .site-footer .footer-brand-en {
    font-family: "CinzelEditorial", Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.26em;
    color: var(--accent-primary-deep);
    transition: color 0.8s var(--ease-uma);
}

body.dt-home-theme .site-nav-home .site-nav-trigger {
    color: rgba(232, 245, 255, 0.86);
    transition: color 0.22s ease, background 0.22s ease;
}

body.dt-home-theme .site-nav-home .site-nav-trigger:hover,
body.dt-home-theme .site-nav-home .site-nav-item.open > .site-nav-trigger {
    color: #ffffff;
    background: var(--accent-primary-soft);
}

body.dt-home-theme .home-stats {
    background: rgba(7, 13, 30, 0.56);
    border-color: var(--hairline-strong);
    box-shadow: 0 14px 36px rgba(3, 6, 16, 0.45);
    transition: border-color 0.8s var(--ease-uma), background 0.8s var(--ease-uma);
}

body.dt-home-theme.dt-crowned-theme .home-stats {
    background: rgba(13, 24, 56, 0.62);
}

body.dt-home-theme .home-stat + .home-stat {
    border-left-color: var(--hairline-strong);
}

/* Editorial WebGL Stage */
.home-hero.home-hero-daring-tact {
    background: #060a16;
    overflow: hidden;
}

.dt-hero-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: radial-gradient(ellipse 66% 62% at 54% 48%, rgba(121, 198, 219, 0.16) 0%, #070d1e 60%, #050814 100%);
    isolation: isolate;
    font-family: inherit;
    transition: background 0.9s var(--ease-uma);
}

.dt-hero-stage.is-banner {
    cursor: default;
    border-radius: 0;
}

.dt-hero-gl,
.dt-hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.dt-hero-gl { z-index: 1; }
.dt-hero-particles { z-index: 2; pointer-events: none; }

.dt-hero-stage:not(.is-banner)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 190px;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(to top, rgba(5, 8, 20, 0.88) 0%, rgba(5, 8, 20, 0.44) 52%, rgba(5, 8, 20, 0) 100%);
    transition: background 0.9s var(--ease-uma);
}

.dt-hero-stage.is-crowned:not(.is-banner)::after {
    background: linear-gradient(to top, rgba(10, 19, 48, 0.86) 0%, rgba(16, 28, 66, 0.36) 52%, rgba(16, 28, 66, 0) 100%);
}

/* Magazine Cover Typography */
.dt-magazine-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.dt-mag-en {
    position: absolute;
    left: 3.5%;
    top: 16%;
    font-family: "CinzelEditorial", Georgia, serif;
    font-size: clamp(4.2rem, 10.6vw, 10.8rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 0.92;
    color: transparent;
    -webkit-text-stroke: 1.4px rgba(121, 198, 219, 0.28);
    white-space: nowrap;
    transform: translate3d(var(--dt-px, 0px), var(--dt-py, 0px), 0);
    transition: -webkit-text-stroke-color 0.8s var(--ease-uma), color 0.8s var(--ease-uma);
}

.dt-hero-stage.is-crowned .dt-mag-en {
    -webkit-text-stroke-color: rgba(248, 212, 120, 0.62);
    color: rgba(248, 212, 120, 0.07);
}

.dt-mag-year {
    position: absolute;
    left: 3.9%;
    top: calc(16% + clamp(4.2rem, 10.2vw, 10.4rem));
    font-family: "CinzelEditorial", Georgia, serif;
    font-size: clamp(2.0rem, 4.2vw, 4.2rem);
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1;
    color: rgba(121, 198, 219, 0.28);
    transition: color 0.8s var(--ease-uma);
}

.dt-hero-stage.is-crowned .dt-mag-year {
    color: rgba(248, 212, 120, 0.54);
}

.dt-mag-vertical {
    position: absolute;
    right: 34px;
    top: 152px;
    writing-mode: vertical-rl;
    font-size: clamp(2.2rem, 3.6vw, 3.6rem);
    font-weight: 900;
    letter-spacing: 0.28em;
    line-height: 1;
    color: rgba(245, 251, 255, 0.16);
    transition: color 0.8s var(--ease-uma), text-shadow 0.8s var(--ease-uma);
}

.dt-hero-stage.is-crowned .dt-mag-vertical {
    color: rgba(255, 232, 168, 0.38);
    text-shadow: 0 0 28px rgba(245, 197, 86, 0.34);
}

.dt-editorial-title {
    position: absolute;
    left: 36px;
    bottom: 32px;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: baseline;
    gap: 16px;
    color: #f5fbff;
}

.dt-ed-zh {
    font-size: clamp(1.9rem, 3.2vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1;
    text-shadow: 0 4px 22px rgba(4, 8, 20, 0.8);
}

.dt-ed-sub {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--accent-primary);
    transition: color 0.7s var(--ease-uma);
}

.dt-audio-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
    margin-left: 4px;
}

.dt-audio-eq span {
    width: 2.5px;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 1px;
    transform-origin: bottom center;
    animation: dt-eq-pulse 0.85s ease-in-out infinite;
}

.dt-audio-eq span:nth-child(2) { animation-delay: 0.18s; }
.dt-audio-eq span:nth-child(3) { animation-delay: 0.36s; }

@keyframes dt-eq-pulse {
    0%, 100% { transform: scaleY(0.28); opacity: 0.55; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Sequential Triple Tiara Constellation */
.dt-constellation {
    position: absolute;
    right: 36px;
    bottom: 30px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    cursor: default;
}

.dt-stars-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 4px 2px;
}

.dt-stars-row::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 50%;
    height: 1.5px;
    background: rgba(121, 198, 219, 0.26);
    pointer-events: none;
    transition: background 0.7s var(--ease-uma);
}

.dt-hero-stage.is-crowned .dt-stars-row::before {
    background: rgba(248, 212, 120, 0.78);
    box-shadow: 0 0 12px rgba(248, 212, 120, 0.55);
}

.dt-star-node {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1.5px solid rgba(121, 198, 219, 0.34);
    border-radius: 999px;
    background: rgba(6, 12, 28, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(166, 227, 245, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.28s var(--ease-uma), border-color 0.28s ease, color 0.28s ease, box-shadow 0.35s ease, opacity 0.28s ease, background 0.28s ease;
}

.dt-star-node.is-next {
    border-color: rgba(121, 198, 219, 0.92);
    color: #f5fbff;
    box-shadow: 0 0 18px rgba(121, 198, 219, 0.42);
    animation: dt-star-invite 2.1s ease-in-out infinite;
}

.dt-star-node.is-locked { opacity: 0.38; cursor: not-allowed; }
.dt-star-node:not(.is-locked):hover,
.dt-star-node:not(.is-locked):focus-visible {
    transform: translateY(-2px) scale(1.1);
    border-color: #f5fbff;
    color: #ffffff;
    outline: none;
}

.dt-star-node.is-lit {
    opacity: 1;
    border-color: #f8d478;
    background: rgba(44, 34, 14, 0.84);
    color: #ffe8a3;
    box-shadow: 0 0 24px rgba(245, 197, 86, 0.62), inset 0 0 10px rgba(248, 212, 120, 0.32);
    animation: none;
}

.dt-star-node.is-shake { animation: dt-star-shake 0.36s ease; }
.dt-star-node svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.5s var(--ease-uma); }
.dt-star-node.is-lit svg { transform: rotate(90deg) scale(1.14); }

.dt-constellation-label {
    min-height: 22px;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #eaf7ff;
    text-align: right;
    text-shadow: 0 2px 14px rgba(4, 8, 20, 0.9);
    transition: color 0.6s var(--ease-uma);
}

.dt-hero-stage.is-crowned .dt-constellation-label {
    color: #ffe49c;
    text-shadow: 0 0 20px rgba(245, 197, 86, 0.55);
}

.dt-constellation-label.is-resettable { cursor: pointer; }
.dt-constellation-label.is-resettable:hover { color: #ffffff; }

@keyframes dt-star-invite {
    0%, 100% { box-shadow: 0 0 12px rgba(121, 198, 219, 0.34); }
    50% { box-shadow: 0 0 24px rgba(121, 198, 219, 0.78); }
}

@keyframes dt-star-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
}

/* Cinematic Prism Curtain Transition */
.dt-transition-curtain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(90deg, rgba(121, 198, 219, 0.06) 0 18px, transparent 18px 36px),
        radial-gradient(circle at 50% 50%, #102046 0%, #060b19 68%);
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.24s var(--ease-uma), transform 0.45s var(--ease-uma);
}

.dt-transition-curtain.is-crowned {
    background:
        repeating-linear-gradient(90deg, rgba(248, 212, 120, 0.08) 0 18px, transparent 18px 36px),
        radial-gradient(circle at 50% 50%, #1a2d62 0%, #081129 68%);
}

.dt-transition-curtain.is-entering { opacity: 1; transform: scale(1); }
.dt-transition-curtain.is-leaving { opacity: 0; transform: scale(0.98); transition: opacity 0.48s var(--ease-uma), transform 0.48s var(--ease-uma); }

.dt-curtain-mark {
    font-family: "CinzelEditorial", Georgia, serif;
    font-size: clamp(2.2rem, 6vw, 5.2rem);
    font-weight: 900;
    letter-spacing: 0.24em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(154, 224, 244, 0.72);
    text-shadow: 0 0 38px rgba(121, 198, 219, 0.32);
}

.dt-transition-curtain.is-crowned .dt-curtain-mark {
    -webkit-text-stroke-color: rgba(255, 228, 156, 0.88);
    text-shadow: 0 0 42px rgba(245, 197, 86, 0.42);
}

/* Character Detail Frameless Campaign Hero Continuation */
.character-entity-detail.dt-celebration-detail .entity-hero {
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 18px;
    box-shadow: none;
    color: #f5fbff;
    padding: 36px 38px 40px;
}

.character-entity-detail.dt-celebration-detail .entity-hero::before,
.character-entity-detail.dt-celebration-detail .entity-hero::after {
    display: none;
}

.character-entity-detail.dt-celebration-detail .dt-detail-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.character-entity-detail.dt-celebration-detail .entity-hero > :not(.dt-detail-hero-bg) {
    position: relative;
    z-index: 2;
}

.character-entity-detail.dt-celebration-detail .entity-cover.character-cover {
    background: rgba(6, 11, 24, 0.35);
    border: 0;
    box-shadow: 0 22px 48px rgba(2, 5, 14, 0.62);
}

.character-entity-detail.dt-celebration-detail .entity-kind {
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
}

.character-entity-detail.dt-celebration-detail .entity-intro h1 {
    color: #ffffff;
    text-shadow: 0 6px 24px rgba(4, 8, 20, 0.65);
}

.character-entity-detail.dt-celebration-detail .entity-reading {
    color: rgba(214, 238, 250, 0.84);
}

.character-entity-detail.dt-celebration-detail .hero-video-aside {
    background: rgba(6, 11, 24, 0.42);
    border: 0;
    box-shadow: none;
    color: #e6f5ff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.character-entity-detail.dt-celebration-detail .hero-video-aside b {
    color: var(--accent-primary-deep);
}

.character-entity-detail.dt-celebration-detail .performer-chip.voice-chip {
    background: transparent;
    border: 0;
    padding: 0;
    color: #f5fbff;
}

.character-entity-detail.dt-celebration-detail .performer-chip.voice-chip:hover {
    color: var(--accent-primary-deep);
}

.character-entity-detail.dt-celebration-detail .horse-link-chip {
    background: rgba(8, 15, 34, 0.44);
    border: 0;
    border-radius: 999px;
    padding: 7px 14px;
    color: #f5fbff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.character-entity-detail.dt-celebration-detail .horse-link-chip:hover {
    background: var(--accent-primary-soft);
    color: #ffffff;
}

/* Mobile Campaign Adaptations */
@media (max-width: 900px) {
    .dt-editorial-title { left: 22px; bottom: 24px; }
    .dt-constellation { right: 22px; bottom: 22px; }
}

@media (max-width: 768px) {
    body.dt-home-theme .home-brand {
        background: linear-gradient(180deg, #070d1e 0%, #091228 100%);
        border-bottom: 1px solid var(--hairline);
    }
    body.dt-home-theme.dt-crowned-theme .home-brand {
        background: linear-gradient(180deg, #0b1636 0%, #101f48 100%);
    }
    .home-hero.home-hero-daring-tact {
        height: min(62vh, 460px);
        min-height: 360px;
    }
    body.dt-home-theme .home-nav {
        box-shadow: none;
        border-top: 1px solid var(--hairline);
    }
    .dt-mag-en { top: 6%; left: 4%; font-size: clamp(2.5rem, 12vw, 3.8rem); -webkit-text-stroke-width: 1px; }
    .dt-mag-year { top: calc(6% + clamp(2.4rem, 11vw, 3.6rem)); left: 4.5%; font-size: 1.55rem; }
    .dt-mag-vertical { right: 14px; top: 16%; font-size: 1.65rem; }
    .dt-editorial-title { left: 16px; bottom: 16px; flex-direction: column; gap: 4px; }
    .dt-ed-zh { font-size: 1.45rem; }
    .dt-ed-sub { font-size: 0.76rem; letter-spacing: 0.16em; }
    .dt-constellation { right: 16px; bottom: 14px; gap: 6px; }
    .dt-stars-row { gap: 12px; }
    .dt-star-node { width: 32px; height: 32px; }
    .dt-star-node svg { width: 15px; height: 15px; }
    .dt-constellation-label { font-size: 0.78rem; }
    .character-entity-detail.dt-celebration-detail .entity-hero { padding: 20px 16px 26px; }
    body.dt-detail-theme .character-entity-detail .entity-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    body.dt-detail-theme .character-entity-detail .entity-tabs::-webkit-scrollbar { display: none; }
    body.dt-detail-theme .character-entity-detail .entity-tabs button { flex: 0 0 auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    .dt-audio-eq span,
    .dt-star-node.is-next { animation: none; }
}


        .tab-content { display: none; }
        .tab-content.active { display: block; animation: fadeSlideIn 0.3s ease; }
        @keyframes fadeSlideIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .albums-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            gap: 18px; min-height: 70vh; align-content: start; padding-bottom: 84px;
        }

        .album-card {
            position: relative; display: block; width: 100%; padding: 0;
            aspect-ratio: 1;
            border-radius: 2px; overflow: hidden; cursor: pointer;
            background: var(--card);
            border: 1px solid var(--border);
            color: inherit; font: inherit; text-align: left;
            box-shadow: 0 4px 14px rgba(24,31,70,.1);
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }
        .album-card:hover {
            transform: translateY(-4px);
            border-color: var(--ui-orange);
            box-shadow: 0 10px 24px rgba(24,31,70,.15);
        }
        .album-cover { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f0eef6; }

        .album-info {
            position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
            padding: 26px 16px 16px; color: #fff;
            background: linear-gradient(180deg, rgba(20, 26, 41, 0) 0%, rgba(20, 26, 41, 0.5) 52%, rgba(20, 26, 41, 0.82) 100%);
        }
        .album-name {
            font-size: 1.04em; font-weight: 700; color: #fff;
            margin-bottom: 4px; line-height: 1.35; letter-spacing: 0.02em;
        }
        .album-count {
            font-size: 0.8em; color: rgba(255, 255, 255, 0.85);
            font-variant-numeric: tabular-nums;
        }

        /* ===== LIVE TAB ===== */
        .events-container { padding-bottom: 84px; }

        .event-group {
            border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
            background: var(--card);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            transition: box-shadow 0.2s, border-color 0.2s;
        }
        .event-group:hover {
            border-color: var(--border-strong);
            box-shadow: 0 6px 22px rgba(20, 20, 40, 0.1);
        }

        .event-group-header {
            background: #f2f0f8;
            border-bottom: 1px solid var(--border);
            padding: 16px 22px; color: var(--text); cursor: pointer;
            display: flex; justify-content: space-between; align-items: center;
            font-size: 1em; font-weight: 700; user-select: none; letter-spacing: 0.03em;
        }
        .event-group-header:hover { background: #ece9f4; }
        .event-group-title { flex: 1; }
        .event-group-header .collapse-icon { font-size: 0.72em; color: var(--text-3); transition: transform 0.25s; }
        .event-group.expanded .event-group-header .collapse-icon { transform: rotate(90deg); }

        .event-group-body { transition: opacity 0.2s ease; }
        .event-group.expanded .event-group-body { max-height: none !important; }

        .event-sub { border-bottom: 1px solid var(--border); }
        .event-sub:last-child { border-bottom: none; }

        .event-header {
            padding: 13px 22px; cursor: pointer; display: flex;
            justify-content: space-between; align-items: center;
            background: transparent; transition: background 0.2s; user-select: none;
        }
        .event-header:hover { background: #faf9fd; }
        .event-title { font-size: 0.95em; font-weight: 600; color: var(--text); flex: 1; }
        .event-date { font-size: 0.82em; color: var(--text-3); margin: 0 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
        .event-header .collapse-icon { font-size: 0.62em; color: var(--text-3); transition: transform 0.25s; }
        .event-sub.expanded .event-header .collapse-icon { transform: rotate(90deg); }

        .event-sub-body { transition: opacity 0.2s ease; }
        .event-sub.expanded .event-sub-body { max-height: none !important; }

        .event-body { padding: 15px 22px 20px; }
        .event-cast { font-size: 0.83em; color: var(--text-2); margin-bottom: 10px; line-height: 1.75; }
        .cast-line { margin-bottom: 2px; }
        .cast-label { font-weight: 700; color: var(--text); }

        .vid-link {
            display: inline-flex; align-items: center; gap: 6px;
            margin: 0;
            padding: 5px 13px;
            background: var(--card);
            border: 1px solid var(--border-strong); border-radius: 4px;
            text-decoration: none; color: var(--text-2); font-size: 0.82em; font-weight: 600;
            transition: all 0.2s;
        }
        .vid-link::before {
            content: ''; width: 0; height: 0;
            border-left: 6px solid currentColor;
            border-top: 4px solid transparent; border-bottom: 4px solid transparent;
        }
        .vid-link:hover {
            background: var(--brand);
            border-color: var(--brand); color: #fff;
        }

        .event-setlists { display: flex; gap: 18px; flex-wrap: wrap; }
        .setlist-day { flex: 1; min-width: 270px; }
        .setlist-day-title {
            font-size: 0.92em; color: var(--text); margin-bottom: 8px; padding: 7px 12px;
            background: #f6f5fa;
            border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
            display: flex; justify-content: space-between; align-items: center;
            user-select: none; font-weight: 600;
            transition: background 0.2s;
        }
        .setlist-day-title:hover { background: #efedf6; }
        .setlist-day-title .collapse-icon { font-size: 0.62em; color: var(--text-3); transition: transform 0.25s; }
        .setlist-day.expanded .setlist-day-title .collapse-icon { transform: rotate(90deg); }
        .setlist-body { transition: opacity 0.2s ease; }
        .setlist-day.expanded .setlist-body { max-height: none !important; }
        .setlist-empty { color: var(--text-3); font-size: 0.85em; padding: 8px; font-style: italic; }

        .setlist-table { width: 100%; border-collapse: collapse; font-size: 0.82em; }
        .setlist-table thead th {
            background: rgba(203, 223, 243, 0.85);
            padding: 8px 9px; text-align: left; font-weight: 700; color: var(--text);
            border-bottom: 1px solid var(--border);
            position: sticky; top: 0; z-index: 1;
        }
        .setlist-table tbody td { padding: 6px 9px; border-bottom: 1px solid var(--border); vertical-align: middle; }
        .setlist-no { width: 26px; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
        .setlist-song { font-weight: 600; color: var(--text); min-width: 110px; }
        .setlist-perf { color: var(--text-2); font-size: 0.95em; line-height: 1.75; }
        .setlist-src { color: var(--text-3); font-size: 0.9em; min-width: 80px; }
        .setlist-table tbody tr:hover { background: rgba(192, 216, 242, 0.55); }

        .char-avatar {
            width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
            vertical-align: middle; margin-right: 2px; border: 1px solid var(--border-strong);
            display: inline-block;
        }
        .perf-name { vertical-align: middle; font-size: 0.92em; }
        .perf-item { display: inline-block; white-space: nowrap; vertical-align: middle; margin-right: 4px; }
        .perf-sep { font-size: 0; line-height: 0; width: 0; overflow: hidden; color: transparent; }

        .event-tips { margin-top: 8px; font-size: 0.76em; color: var(--text-3); }

        @media (max-width: 900px) {
            .setlist-table { min-width: 0; }
            .setlist-table thead { display: none; }
            .setlist-table, .setlist-table tbody, .setlist-table tr, .setlist-table td { display: block; }
            .setlist-table tr {
                padding: 10px 4px;
                border-bottom: 1px solid var(--border);
            }
            .setlist-table tr:hover { background: transparent; }
            .setlist-table tbody td { padding: 0; border-bottom: none; vertical-align: baseline; }
            .setlist-table td.setlist-no {
                display: inline-block; width: 30px; margin-right: 8px;
                text-align: left; font-weight: 700; color: var(--text-2);
            }
            .setlist-table td.setlist-song { display: inline-block; min-width: 0; }
            .setlist-perf {
                margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border);
                font-size: 0.95em; line-height: 1.8;
            }
            .setlist-perf::before {
                content: '出演者：'; font-weight: 700; color: var(--text); margin-right: 8px;
            }
            .setlist-table td.setlist-perf.encore-hide { display: none; }
            .setlist-src {
                margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border);
                min-width: 0; font-size: 0.9em; line-height: 1.7;
            }
            .setlist-src:empty { display: none; }
            .setlist-src::before {
                content: '歌曲信息：'; font-weight: 700; color: var(--text); margin-right: 8px;
            }
        }
        .news-list { display: flex; flex-direction: column; gap: 14px; }

        .hidden { display: none !important; }
        @media (max-width: 768px) {
            .home-layout { flex-direction: column; height: auto; min-height: 100vh; position: relative; background: #141a29; overflow-x: hidden; }
            .home-brand { order: 1; position: relative; z-index: 2; top: 0; left: 0; width: 100%; padding: 20px 14px 12px; margin: 0; align-items: center; background: linear-gradient(180deg, #213aa8 0%, #1b318e 100%); box-sizing: border-box; }
            .home-brand .hl-zh { font-size: 1.55rem; letter-spacing: 0.08em; white-space: nowrap; max-width: 100%; }
            .home-brand .hl-en { font-size: 0.78rem; letter-spacing: 0.18em; white-space: nowrap; max-width: 100%; }
            .home-hero {
                order: 2;
                position: relative; inset: auto; z-index: 1;
                flex: 0 0 auto; width: 100%; height: min(50vh, 380px); min-height: 290px;
                background-image:
                    linear-gradient(180deg, rgba(20, 26, 41, 0.12) 0%, rgba(20, 26, 41, 0.38) 100%),
                    image-set(url('/uma_tools/img/hero_bg_tablet.avif?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') type('image/avif'), url('/uma_tools/img/hero_bg_tablet.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') type('image/webp'));
                background-position: center 22%;
                background-size: cover;
            }
            .home-stats { order: 3; position: relative; z-index: 2; top: 0; left: 0; right: 0; width: 100%; justify-content: center; flex-wrap: nowrap; padding: 10px 6px; margin: 0; border-radius: 0; border-left: none; border-right: none; background: rgba(14, 21, 38, 0.92); box-shadow: none; box-sizing: border-box; }
            .home-stat { flex: 1 1 0; min-width: 0; padding: 4px 6px; text-align: center; }
            .home-stat + .home-stat { border-left: 1px solid rgba(255, 255, 255, 0.18); }
            .home-stat-number { font-size: 1.15rem; }
            .home-stat-label { font-size: 0.72rem; letter-spacing: 0.04em; }
            .home-upcoming { order: 4; position: relative; left: auto; right: auto; bottom: auto; z-index: 2; max-width: none; margin: 14px 14px 4px; }
            .home-nav { order: 5; position: relative; z-index: 2; top: 0; flex: 1 1 auto; width: 100%; max-width: none; padding: 14px 12px 28px; background: #141a29; box-shadow: none; box-sizing: border-box; }
            .home-tabs { flex-direction: column; gap: 10px; }
            .home-tab { flex: none; justify-content: flex-start; padding: 14px 18px; border-left: none; border-bottom: none; border-radius: 12px; background: rgba(35, 65, 143, 0.45); border: 1px solid rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
            .home-tab:hover { border-left: none; border-bottom: none; background: rgba(58, 109, 240, 0.42); }
            .home-tab::after { display: none; }
            .albums-grid { grid-template-columns: 1fr; }
            .event-setlists { flex-direction: column; }
            .event-date { display: none; }
            .live-setlist { overflow-x: hidden; }
            .progress-bar { flex: 0 0 80px; }
        }
        @media (max-width: 480px) {
            .home-hero {
                height: min(52vh, 360px);
                min-height: 270px;
                background-image:
                    linear-gradient(180deg, rgba(20, 26, 41, 0.12) 0%, rgba(20, 26, 41, 0.38) 100%),
                    image-set(url('/uma_tools/img/hero_bg_phone.avif?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') type('image/avif'), url('/uma_tools/img/hero_bg_phone.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') type('image/webp'));
                background-position: center 20%;
            }
            .setlist-table { font-size: 0.78em; }
        }

        /* ===== REDUCED MOTION ===== */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        /* ===== SCROLLBAR ===== */
        ::-webkit-scrollbar { width: 9px; height: 9px; }
        ::-webkit-scrollbar-track { background: #f0eef6; }
        ::-webkit-scrollbar-thumb {
            background: #c6c3d2; border-radius: 5px;
            border: 2px solid transparent; background-clip: padding-box;
        }
        ::-webkit-scrollbar-thumb:hover { background: #a9a5ba; background-clip: padding-box; }


        @media (max-width: 720px) {
            .db-grid { grid-template-columns: 1fr; }
            .db-card { min-height: 120px; }
        }

        /* Catalog cards share one primary-colour hover treatment. */
        .card-veil {
            position: absolute; inset: 0; z-index: 3;
            display: flex; align-items: center; justify-content: center;
            background: var(--card-accent, var(--color-main, #3157ed));
            color: var(--card-veil-ink, #fff);
            opacity: 0; transition: opacity .3s ease;
            pointer-events: none;
        }
        :is(.album-card, .cio-card):is(:hover, :focus-visible) > .card-veil { opacity: .82; }
        .card-veil p {
            font-family: Georgia, "Times New Roman", serif;
            font-style: italic; font-size: 18px; font-weight: 400;
            letter-spacing: .04em; margin: 0;
        }
        .card-veil-arrow { margin-left: 8px; font-size: 20px; font-weight: 400; line-height: 1; }
        .album-entity-detail .entity-intro .entity-meta { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }


        /* ===== NEWS ===== */
        .news-detail-meta { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
        .news-detail-meta .news-detail-date { flex: 1; min-width: 0; margin: 4px 0 0; }
        .news-language { position: relative; flex: 0 0 76px; display: grid; grid-template-columns: 1fr 1fr; height: 28px; padding: 2px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-2); color: var(--text-2); font: inherit; font-size: 11px; line-height: 22px; cursor: pointer; }
        .news-language > span:not(.news-language-thumb) { position: relative; z-index: 1; text-align: center; }
        .news-language .active { color: var(--text); font-weight: 600; }
        .news-language-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 4px; background: var(--card); }
        .news-language-thumb.is-ja { transform: translateX(100%); }
        .news-language:hover { border-color: var(--border-strong); }
        .news-language:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
        .news-translation-status { color: var(--text-2); margin: 24px 0; line-height: 1.7; }
        .news-list { min-height: calc(100vh - 61px); padding-bottom: 84px; }
        .news-error { padding: 20px; text-align: center; color: var(--amber); font-size: 0.92em; }
        .news-hero-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 18px; margin-bottom: 22px;
        }
        .news-hero-card {
            position: relative; display: flex; flex-direction: column;
            border-radius: var(--radius); overflow: hidden; cursor: pointer;
            background: var(--card); border: 1px solid var(--border);
            box-shadow: 4px 6px 16px -4px rgba(20, 20, 40, 0.28);
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }
        .news-hero-card:hover { transform: translateY(-3px); border-color: var(--brand); }
        .news-hero-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #ecebf3; }
        .news-hero-body { flex: 1; padding: 13px 16px 15px; }
        .news-hero-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
        .news-hero-tag {
            display: inline-block; padding: 2px 9px; border-radius: 999px;
            font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: #fff;
        }
        .news-hero-tag.media { background: var(--brand); }
        .news-hero-tag.game { background: #5b7bd5; }
        .news-hero-tag.cd { background: #2a9d8f; }
        .news-hero-date { font-size: 0.74em; color: var(--text-3); font-variant-numeric: tabular-nums; margin-bottom: 5px; }
        .news-hero-title {
            font-size: 1em; font-weight: 700; color: var(--text); line-height: 1.45;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .news-hero-skeleton { pointer-events: none; box-shadow: none; }
        .news-hero-skeleton .news-hero-cover {
            background: linear-gradient(100deg, #ecebf3 20%, #f7f6fa 40%, #ecebf3 60%);
            background-size: 200% 100%; animation: newsSkeleton 1.4s ease-in-out infinite;
        }
        .news-skeleton-line {
            display: block; width: 88%; height: 12px; margin-top: 10px; border-radius: 999px;
            background: #ecebf3;
        }
        .news-skeleton-line.short { width: 38%; margin-top: 0; }
        @keyframes newsSkeleton { to { background-position-x: -200%; } }
        .news-rows { display: flex; flex-direction: column; }
        .news-row {
            display: grid;
            grid-template-columns: 110px 82px minmax(0,1fr);
            align-items: center;
            gap: 8px 18px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            cursor: pointer; transition: background 0.15s;
        }
        .news-row:last-child { border-bottom: none; }
        .news-row:hover { background: var(--card); }
        .news-row-head {
            cursor: default; padding-top: 4px; padding-bottom: 8px;
            border-bottom: 1px solid var(--border-strong);
            font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
            color: var(--text-3); text-transform: uppercase;
        }
        .news-row-head:hover { background: transparent; }
        .nw-d {
            font-size: 0.78rem; color: var(--text-3);
            font-variant-numeric: tabular-nums; white-space: nowrap;
        }
        .nw-t {
            display: inline-block; justify-self: start;
            padding: 2px 10px; border-radius: 999px;
            font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: #fff;
            white-space: nowrap;
        }
        .nw-t.media { background: var(--brand); }
        .nw-t.game { background: #5b7bd5; }
        .nw-t.cd { background: #2a9d8f; }
        .nw-title {
            font-size: 0.95rem; font-weight: 600; color: var(--text);
            line-height: 1.45; min-width: 0;
        }
        .news-row:hover .nw-title { color: var(--brand-dark, #b94c00); }
        .news-empty { padding: 60px 20px; text-align: center; color: var(--text-3); font-size: 0.95em; }

        @media (max-width: 900px) {
            .news-row {
                display: flex; flex-wrap: wrap; align-items: center;
                gap: 4px 12px; padding: 12px 14px;
            }
            .news-row-head { display: none; }
            .nw-d { flex: 0 0 auto; }
            .nw-t { flex: 0 0 auto; }
            .nw-title { flex: 1 1 100%; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; margin-top: 2px; }
        }

        /* song detail page */
        .song-back-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
        .song-back-row .back-btn { margin-bottom: 22px; }
        .song-detail-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
        .song-detail-thumb {
            flex: 0 0 80px; width: 80px; height: 80px; border-radius: 12px;
            background: linear-gradient(135deg, #3157ed 0%, #213aa8 100%);
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-size: 28px; font-weight: 700;
        }
        .song-detail-info { flex: 1; min-width: 0; }
        .song-detail-sub { font-size: 0.82em; color: var(--text-3); margin-bottom: 4px; }
        .song-detail-title { font-size: 1.5em; font-weight: 700; color: var(--text); margin: 0 0 8px; line-height: 1.3; }
        .song-detail-release { font-size: 0.88em; color: var(--text-2); }
        .song-detail-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 0.88em; }
        .song-detail-label { color: var(--text-3); font-weight: 600; }
        .song-detail-artist { color: var(--text-2); }
        .song-detail-link { color: var(--brand); text-decoration: none; font-weight: 600; }
        .song-detail-link:hover { text-decoration: none; }

        .song-section { margin-bottom: 24px; }
        .song-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
        .song-section-title {
            font-size: 1.1em; font-weight: 700; color: var(--text); margin: 0;
            padding-bottom: 6px; border-bottom: 2px solid var(--brand);
        }
        .song-section-more {
            font-size: 0.88em; color: var(--brand); text-decoration: none; font-weight: 600;
        }
        .song-section-more:hover { text-decoration: none; }
        .song-list { list-style: none; margin: 0; padding: 0; }
        .song-list-item {
            display: flex; align-items: center; gap: 12px; padding: 8px 0;
            border-bottom: 1px solid var(--border); font-size: 0.88em;
            transition: background 0.15s;
        }
        .song-list-item:last-child { border-bottom: none; }
        .song-list-item:hover { background: var(--bg-2); }
        .song-list-date { color: var(--text-3); font-size: 0.82em; min-width: 80px; }
        .song-list-artist {
            color: var(--text-2); font-size: 0.85em; flex: 0 1 auto;
            min-width: 0; max-width: 260px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .song-list-cnt { color: var(--brand); font-weight: 700; min-width: 40px; }
.song-list-link { color: var(--brand); text-decoration: none; flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
        .song-list-name { color: var(--text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .song-list-arrow { margin-left: auto; color: var(--brand); }
        .song-list-more { color: var(--text-3); font-size: 0.82em; margin-top: 8px; }
        .song-list-extra { margin-top: 12px; }
        .song-list-toggle {
            display: block; width: 100%; margin-top: 10px; padding: 10px 14px; cursor: pointer;
            color: var(--brand); border: 1px solid var(--border); border-radius: 8px; background: var(--card);
            font: 600 12px/1 "Microsoft YaHei", "PingFang SC", sans-serif; transition: all .15s;
        }
        .song-list-toggle:hover { border-color: var(--brand); background: var(--brand-light, #fff5e6); }

        .news-pager {
            display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
            gap: 12px; padding: 18px 4px 0; border-top: 1px solid var(--border); margin-top: 8px;
        }
        .news-pager-count { font-size: 0.82em; color: var(--text-3); font-variant-numeric: tabular-nums; }
        .news-pager-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
        .news-pager-btn {
            min-width: 34px; height: 32px; padding: 0 8px;
            display: inline-flex; align-items: center; justify-content: center;
            border-radius: 8px; cursor: pointer;
            font-family: inherit; font-size: 0.86em; font-weight: 600; color: var(--text-2);
            background: var(--card); border: 1px solid var(--border-strong);
            transition: all 0.15s;
        }
        .news-pager-btn:hover:not(:disabled):not(.active) { border-color: var(--brand); color: var(--brand); }
        .news-pager-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
        .news-pager-btn:disabled { opacity: 0.4; cursor: default; }
        .news-pager-ellipsis {
            min-width: 26px; height: 32px; border: none; background: transparent;
            font-size: 0.86em; color: var(--text-3);
        }

        .news-detail { padding-bottom: 84px; max-width: 860px; margin: 0 auto; }
        .news-detail-actions {
            display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
        }
        .news-detail-actions .ui-back { margin-bottom: 0; }
        .news-detail-external {
            display: inline-flex; align-items: center; gap: 6px;
            min-height: 40px; padding: 7px 16px;
            border: 1px solid #8aa0de; border-radius: 999px;
            background: var(--card);
            color: var(--navy); font-family: inherit; font-size: 0.84em; font-weight: 800;
            text-decoration: none; cursor: pointer;
            box-shadow: 0 5px 10px rgba(49, 87, 237, 0.12);
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
        }
        .news-detail-external:hover {
            color: var(--brand-dark); border-color: var(--brand);
            box-shadow: 0 7px 16px rgba(255, 123, 22, 0.17); transform: scale(.97);
        }
        .news-detail-cover { width: 100%; border-radius: var(--radius); margin-bottom: 18px; background: #ecebf3; }
        .news-detail-date { font-size: 0.8em; color: var(--text-3); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
        .news-detail-title { font-size: 1.5em; font-weight: 800; color: var(--text); line-height: 1.4; margin-bottom: 14px; }
        .news-detail-body { line-height: 1.9; font-size: 0.95em; color: var(--text); overflow-wrap: anywhere; }
        .news-detail-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
        .news-detail-body .news-embed {
            display: block; width: 100%; max-width: 720px; aspect-ratio: 16 / 9;
            height: auto; margin: 12px auto; border: 0; border-radius: 8px;
        }
        .news-detail-body a { color: var(--brand-dark, #b94c00); text-decoration: none; }
        .news-detail-body span[data-text-custom-color] { color: inherit; }
.news-topics { margin-top: 32px; }
.news-topics .cast-chip-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 14px;
    overflow-x: auto;
    padding: 4px 0;
}
:is(.news-topics,.related-news) .section-toolbar h2 { margin: 0; }
.related-news .history-list > a { grid-template-columns: 102px minmax(0,1fr); }
.related-news .history-list strong { min-width: 0; overflow-wrap: anywhere; }
.related-news .ui-pager { margin-top: 12px; }



        /* ===== FRIEND LINKS TAB ===== */
        .links-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
        .link-card {
            display: grid; grid-template-columns: 56px minmax(0,1fr) 20px; align-items: center; gap: 14px;
            min-height: 132px; padding: 22px 18px; border: 1px solid var(--ui-line); border-radius: 8px;
            background: var(--card); text-decoration: none; color: var(--ui-navy);
            transition: background 180ms ease;
        }
        .link-card:hover { background: var(--ui-cobalt-soft); }
        .link-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
        .link-card-copy { min-width: 0; }
        .link-card-copy h2 { margin: 0; color: var(--ui-navy); font-size: 1.08rem; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
        .link-card-copy p { margin: 7px 0 0; color: var(--text-2); font-size: .82rem; line-height: 1.65; }
        .link-card-arrow { width: 20px; height: 20px; fill: none; stroke: var(--ui-cobalt); stroke-width: 1.7; transition: transform 200ms var(--ui-ease),stroke 180ms ease; }
        .link-card:hover .link-card-arrow { transform: translateX(4px); stroke: var(--ui-orange-deep); }
        @media (max-width: 1100px) { .links-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
        @media (max-width: 700px) {
            .links-list { grid-template-columns: minmax(0,1fr); gap: 10px; }
            .link-card { min-height: 106px; padding: 18px; }
        }
        @media (max-width: 900px) {
            .events-rows { overflow-x: hidden; }
            .events-row {
                display: flex; flex-wrap: wrap; align-items: flex-start;
                gap: 6px 10px; padding: 12px 14px; min-width: 0;
            }
            .events-row-head { display: none; }
            .ev-d {
                flex: 1 1 100%; font-weight: 700; color: var(--text); font-size: 0.86em;
            }
            .ev-d::before { content: '日期：'; font-weight: 700; color: var(--text); margin-right: 6px; }
            .ev-t {
                flex: 1 1 100%; min-width: 0; align-items: flex-start;
                padding: 6px 0 2px;
            }
            .ev-t::before {
                content: '标题：'; font-weight: 700; color: var(--text); margin-right: 10px;
                flex: 0 0 auto; line-height: 1.45;
            }
            .ev-t-title { white-space: normal; overflow: visible; text-overflow: clip; }
            .ev-t-sub { display: none; }
            .ev-time {
                display: block; flex: 1 1 100%; min-width: 0;
                padding: 4px 0; font-size: 0.85em; color: var(--text-2);
                line-height: 1.7;
            }
            .ev-time::before { content: '时间：'; font-weight: 700; color: var(--text); margin-right: 6px; }
            .ev-v {
                display: block; flex: 1 1 100%; min-width: 0;
                padding: 4px 0; font-size: 0.84em; white-space: normal; overflow: visible; text-overflow: clip;
            }
            .ev-v::before { content: '会场：'; font-weight: 700; color: var(--text); margin-right: 6px; }
            .ev-l {
                display: flex; flex: 1 1 100%; align-items: center; gap: 8px;
                padding: 4px 0; min-width: 0;
            }
            .ev-l::before {
                content: '相关链接：'; font-weight: 700; color: var(--text);
                flex: 0 0 auto;
            }
        }

        /* Shared information-page language for contribution and legal routes. */
        .info-page { width: 100%; padding: 4px 0 48px; }
        .info-page > .entity-hero.music-archive-hero { grid-template-columns: minmax(0,1fr); min-height: 120px; }
        .info-page > .entity-hero::before { opacity: .08; }
        .info-page .entity-intro { padding-left: 0; }
        .fix-row { margin-bottom: 20px; }
        .fix-label { display: block; margin-bottom: 7px; color: var(--ui-navy); font-size: .86rem; font-weight: 850; }
        .fix-label .req { margin-left: 3px; color: var(--ui-orange-deep); }
        .fix-hint { margin-top: 7px; color: var(--text-3); font-size: .76rem; line-height: 1.6; }
        .fix-input, .fix-textarea { display: block; width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #cbd1e1; border-radius: 8px; outline: 0; background: #fff; color: var(--ui-navy); font: inherit; font-size: .86rem; transition: border-color 160ms ease, box-shadow 160ms ease; }
        .fix-input:focus, .fix-textarea:focus { border-color: var(--ui-orange); box-shadow: 0 0 0 3px rgba(245,130,32,.13); }
        .fix-textarea { min-height: 134px; resize: vertical; }
        .fix-chips > div { gap: 7px; }
        .fix-chips button { font-size: .81rem; cursor: pointer; }
        .fix-agreement { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 7px 14px; }
        .fix-check { display: flex; max-width: 610px; align-items: flex-start; gap: 9px; color: var(--text-2); font-size: .82rem; line-height: 1.6; cursor: pointer; }
        .info-inline-action, .fix-feedback a { border: 0; padding: 0; background: transparent; color: var(--ui-cobalt-deep); font: inherit; font-size: .82rem; font-weight: 800; text-decoration: none; cursor: pointer; }
        .info-inline-action:hover, .fix-feedback a:hover, .contact-v a:hover, .legal-text a:hover { color: var(--ui-orange-deep); text-decoration: none; }
        .fix-submit { min-height: 46px; padding: 0 22px; border: 1px solid var(--ui-cobalt-deep); border-radius: 7px; background: var(--ui-cobalt); color: #fff; font: inherit; font-size: .86rem; font-weight: 850; cursor: pointer; transition: background 160ms ease, transform 220ms var(--ui-ease); }
        .fix-submit:hover:not(:disabled) { background: var(--ui-cobalt-deep); transform: translateY(-2px); }
        .fix-submit:disabled { opacity: .55; cursor: not-allowed; }
        .fix-feedback { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; padding: 12px 14px; border-radius: 7px; font-size: .83rem; line-height: 1.5; }
        .fix-feedback.error { border: 1px solid #e6b9ab; background: #fff6f1; color: #903f24; }
        .fix-feedback.success { border: 1px solid #91bb9e; background: #f1fbf4; color: #256a3e; }
        .contact-section, .legal-section { margin-bottom: 22px; }
        .contact-sec-head, .legal-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
        .contact-sec-no, .legal-sec-no { color: var(--ui-orange-deep); font-size: .86rem; font-weight: 900; }
        .contact-sec-title, .legal-sec-title { color: var(--ui-navy); font-size: 1.02rem; font-weight: 900; }
        .contact-row { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 14px; padding: 11px 0; font-size: .86rem; line-height: 1.55; }
        .contact-row + .contact-row { border-top: 1px solid var(--ui-line); }
        .contact-k { color: var(--text-3); font-weight: 700; }
        .contact-v { min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
        .contact-v a, .legal-text a { display: inline-block; max-width: 100%; margin-right: 18px; color: var(--ui-cobalt-deep); font-weight: 750; overflow-wrap: anywhere; word-break: break-word; }
        .contact-text, .legal-text { color: var(--text-2); font-size: .87rem; line-height: 1.85; overflow-wrap: anywhere; }
        .legal-section { padding-bottom: 19px; border-bottom: 1px solid var(--ui-line); }
        .legal-text + .legal-text { margin-top: 10px; }
        .contact-updated, .legal-updated { margin-top: 22px; color: var(--text-3); font-size: .76rem; }

        #tab-characters { padding-bottom: 20px; }
        #tab-characters #c-intro { position: relative; }
        #tab-characters .cio-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
        #tab-characters .cio-sort { position: relative; display: flex; align-items: center; background: #fff; border: 1px solid #6f64ff; border-radius: 42px; height: 42px; overflow: hidden; }
        #tab-characters .cio-sort p { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #7c76cf; font-size: 13px; margin: 0; pointer-events: none; }
        #tab-characters .cio-sort select { appearance: none; border: none; background: transparent; height: 100%; padding: 0 34px 0 54px; font-size: 13px; color: #2c3650; cursor: pointer; outline: none; font-family: inherit; }
        #tab-characters .cio-sort .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; pointer-events: none; }
        #tab-characters .c-count { color: #7c7a8a; font-size: 13px; margin-bottom: 12px; }
        #tab-characters .cio-list ul.cio-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 26px 12px; }
        #tab-characters .cio-list ul.cio-grid li {
            margin: 0;
            content-visibility: auto;
            contain-intrinsic-size: auto 324px;
        }
        #tab-characters .cio-list ul.cio-grid .cio-group-title {
            grid-column: 1 / -1;
            margin-top: 24px;
            padding: 18px 2px 10px;
            border-top: 1px solid var(--ui-line);
            color: var(--ui-navy);
            font-size: .98rem;
            font-weight: 900;
            letter-spacing: .04em;
            content-visibility: visible;
            contain-intrinsic-size: auto;
        }
        #tab-characters .cio-card { display: block; text-decoration: none; color: inherit; --color-main: #8c83ff; --color-sub: #ece9ff; background-color: var(--color-sub); box-shadow: 0 3px 7px rgba(0, 0, 0, .2); position: relative; overflow: hidden; transition: transform .16s ease; }
        #tab-characters .cio-card:hover { transform: translateY(-3px); }
        #tab-characters .cio-card dl { background: #fff; margin: 0; position: relative; display: flex; flex-direction: column; }
        #tab-characters .cio-card dl::after { content: ""; border: 1px solid var(--color-main); position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; z-index: 10; }
        #tab-characters .cio-card dt { position: relative; }
        #tab-characters .cio-img { position: relative; z-index: 2; aspect-ratio: 197 / 258; overflow: hidden; }
        #tab-characters .cio-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.19, 1, .22, 1); }
        #tab-characters .cio-img-empty { display: flex; align-items: center; justify-content: center; background: #f0eef6; }
        #tab-characters .cio-img-empty p { margin: 0; color: #b9b4c8; font-size: 13px; }
        #tab-characters .cio-card:hover .cio-img img { transform: scale(1.08); }
        #tab-characters .cio-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; display: flex; }
        #tab-characters .cio-bg::before { content: ""; background-color: var(--color-main); width: 82%; height: 86%; }
        #tab-characters .cio-bg p { margin: 6px 0 0; color: var(--color-main); writing-mode: vertical-rl; flex: auto; display: flex; align-items: center; font-family: "Trebuchet MS", Arial, Raleway, sans-serif; font-size: 14px; letter-spacing: .05em; font-weight: 700; line-height: 1.2; }
        #tab-characters .cio-card dd { border-top: 1px solid var(--color-main); position: relative; z-index: 10; display: flex; flex-direction: column; justify-content: center; padding: 10px 12px 10px 14px; min-height: 62px; }
        #tab-characters .cio-card dd::before { content: ""; background-color: var(--color-main); position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
        #tab-characters .cio-name { margin: 0; font-size: 15px; font-weight: 700; color: #20283b; line-height: 1.35; }
        #tab-characters .cio-cv { margin: 3px 0 0; color: #505050; font-size: 12px; line-height: 1.4; }
        #tab-characters .cio-cv span { margin-right: 5px; font-family: Georgia, "Times New Roman", serif; font-size: 12px; letter-spacing: .05em; }
        #tab-characters .cio-nodata { display: none; padding: 60px 0; text-align: center; color: #a99cbf; font-size: 15px; }
        #tab-characters .cio-list.loading ul.cio-grid { min-height: 420px; }

        @media (min-width: 1100px) {
            #tab-characters .cio-list ul.cio-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
        }
        @media (min-width: 701px) and (max-width: 1099px) {
            #tab-characters .cio-list ul.cio-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        }
        #tab-characters .character-description {
            margin-top: 20px;
            padding-top: 18px;
            border-top: 1px solid var(--surface-line);
            color: var(--text);
            font-size: 0.94rem;
            line-height: 1.85;
        }
        #tab-characters .character-description p { margin: 0 0 0.85em; }
        #tab-characters .character-description p:last-child { margin-bottom: 0; }
        #tab-characters .c-pedigree-lens {
            margin-top: 8px; overflow: hidden; border: 0; border-radius: 16px;
            background: var(--surface-panel, #fff); box-shadow: var(--shadow-panel, 0 10px 28px rgba(24,33,64,.08));
        }
        #tab-characters .c-pedigree-lens-frame {
            display: block; width: 100%; height: clamp(460px, 62vh, 660px); border: 0; background: var(--surface-panel, #fff);
        }
        @media screen and (max-width: 700px) {
            #tab-characters .c-pedigree-lens { border-radius: 14px; }
            #tab-characters .c-pedigree-lens-frame { height: clamp(420px, 64vh, 520px); }
        }

        /* ===== CANONICAL ARCHIVE UI ===== */
        .archive-surface {
            --surface-line: #e3e5ef;
            --surface-muted: #f5f6fb;
            --surface-cobalt: #3157ed;
            --surface-orange: #ff7b16;
            max-width: 1280px;
            margin: 0 auto;
            padding-bottom: 56px;
            color: var(--text);
        }
        .archive-surface button,
        .archive-surface input,
        .archive-surface select { font-family: inherit; }



        .ui-back {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 40px;
            margin: 2px 0 20px;
            padding: 7px 16px 7px 11px;
            border: 1px solid #8aa0de;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.94);
            color: var(--navy);
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 5px 10px rgba(49, 87, 237, 0.12);
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
        }
        .ui-back svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.4; }
        .ui-back:hover { color: var(--brand-dark); border-color: var(--brand); box-shadow: 0 7px 16px rgba(255, 123, 22, 0.17); transform: translateX(-3px) scale(.97); }

        .library-heading {
            position: relative;
            display: flex;
            align-items: flex-end;
            gap: 16px;
            min-height: 78px;
            margin-bottom: 24px;
            padding: 7px 2px 15px;
            border-bottom: 3px solid #3157ed;
        }
        .library-heading::after,
        .library-heading-mark { display: none; }
        .library-heading > div { min-width: 0; }
        .library-heading h1 {
            margin: 0;
            color: var(--navy-3);
            font-size: clamp(2rem, 5vw, 3rem);
            font-weight: 900;
            line-height: 1;
            letter-spacing: 0.055em;
        }
        .library-heading > strong {
            margin-left: auto;
            padding: 0 10px 1px 20px;
            color: var(--navy);
            font-size: 1.55rem;
            font-weight: 900;
            line-height: 1;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }
        .library-heading > strong span { color: var(--text-3); font-size: 0.72em; }

        .library-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 14px;
        }
        .library-controls.compact { max-width: 720px; margin-bottom: 18px; }
        .ui-clear {
            min-height: 34px;
            padding: 5px 13px;
            border: 1px solid #b8bfd3;
            border-radius: 999px;
            background: #fff;
            color: var(--text-2);
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 3px 8px rgba(49, 87, 237, 0.08);
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, color 180ms ease;
        }
        .ui-clear:hover { color: var(--brand-dark); border-color: var(--brand); transform: scale(.95); }

        .library-filters {
            display: flex;
            align-items: flex-start;
            gap: 10px 22px;
            flex-wrap: wrap;
            margin: 0 0 24px;
            padding: 3px 0 1px;
        }
        .ui-filter-group { display: flex; align-items: center; gap: 9px; }
        .ui-filter-group > span {
            color: var(--navy);
            font-size: 0.76rem;
            font-weight: 900;
            white-space: nowrap;
        }
        .ui-filter-group > div { display: flex; gap: 4px; flex-wrap: wrap; }

        .ui-state {
            padding: 36px 20px;
            border-top: 1px solid var(--surface-line);
            color: var(--text-2);
            text-align: center;
        }
        .ui-state.compact { padding: 22px 12px; }
        .ui-state.content-state { border: 0; padding: 18px 12px; text-align: left; }
        .home-summary-error .ui-state.content-state { color: inherit; padding: 0; }
        .ui-state-error { color: #7f3020; border-color: rgba(185, 76, 0, 0.2); }
        .ui-state-error .ui-retry,
        .content-state .ui-retry {
            min-height: 40px;
            margin-inline-start: 12px;
            padding: 0 16px;
            border: 1px solid #cad4f2;
            border-radius: 999px;
            background: #fff;
            color: var(--ui-cobalt-deep);
            font: inherit;
            font-weight: 800;
            cursor: pointer;
            transition: border-color 180ms ease, color 180ms ease, transform 260ms var(--ui-ease);
        }
        .ui-state-error .ui-retry:hover,
        .content-state .ui-retry:hover { border-color: var(--ui-orange); color: var(--ui-orange-deep); transform: translateY(-1px); }

        .event-catalog,
        .song-catalog,
        .album-catalog {
            border-top: 2px solid var(--navy);
            border-bottom: 1px solid var(--surface-line);
            background: var(--card);
        }
        .event-catalog-row {
            position: relative;
            display: grid;
            width: 100%;
            align-items: center;
            gap: 16px;
            padding: 13px 14px;
            border: 0;
            border-bottom: 1px solid var(--surface-line);
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
            transition: background 180ms ease, box-shadow 180ms ease, transform 280ms cubic-bezier(.19, 1, .22, 1);
        }
        .event-catalog-row:last-child { border-bottom: 0; }
        .event-catalog-row:hover { z-index: 1; background: #f5f7ff; box-shadow: 0 8px 20px rgba(49, 87, 237, 0.11); transform: translateY(-1px); }
        .event-catalog-row > svg,
.relation-list button > svg {
            width: 21px;
            height: 21px;
            fill: none;
            stroke: var(--brand-dark);
            stroke-width: 2.2;
            transition: transform 150ms ease;
        }
        .event-catalog-row:hover > svg,
.relation-list button:hover > svg { transform: translateX(4px); }

        .event-catalog-row { grid-template-columns: 116px 92px minmax(0, 1fr) minmax(180px, auto) 24px; }
        .event-catalog-cover {
            display: block;
            width: 116px;
            aspect-ratio: 16 / 10;
            overflow: hidden;
            border-radius: 7px;
            background: var(--surface-muted);
        }
        .event-catalog-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
        .event-catalog-cover img { transition: transform 600ms cubic-bezier(.19, 1, .22, 1); }
        .event-catalog-row:hover img { transform: scale(1.06); }
        .event-catalog-row > time {
            color: var(--navy);
            font-size: 0.82rem;
            font-weight: 800;
            font-variant-numeric: tabular-nums;
        }
        .event-catalog-row > time.event-date-range {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }
        .event-catalog-row > time.event-date-range > span:nth-child(2) { text-align: center; }
        .event-catalog-main { min-width: 0; }
        .event-catalog-main b {
            display: block;
            overflow: hidden;
            color: var(--text);
            font-size: 0.98rem;
            font-weight: 850;
            line-height: 1.45;
            text-overflow: ellipsis;
        }
        .event-catalog-main > span {
            display: block;
            margin-top: 4px;
            overflow: hidden;
            color: var(--text-2);
            font-size: 0.77rem;
            line-height: 1.35;
            text-overflow: ellipsis;
        }
        .event-catalog-facts { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
        .event-catalog-facts i,
.event-catalog-facts b {
            color: var(--text-2);
            font-size: 0.75rem;
            font-style: normal;
            font-weight: 700;
            white-space: nowrap;
        }
        .event-catalog-facts i {
            padding: 4px 8px;
            border: 1px solid #aab7dc;
            border-radius: 999px;
            color: #4c5e99;
        }

        .ui-pager {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            margin-top: 18px;
            color: var(--text-2);
            font-size: 0.8rem;
            font-variant-numeric: tabular-nums;
        }
        .ui-pager > div { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
        .ui-pager button {
            min-width: 35px;
            min-height: 35px;
            padding: 5px 10px;
            border: 1px solid var(--border-strong);
            border-radius: 999px;
            background: var(--card);
            color: var(--navy);
            font-weight: 750;
            cursor: pointer;
            box-shadow: 0 3px 8px rgba(49, 87, 237, 0.08);
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, background 180ms ease;
        }
        .ui-pager button:not(:disabled):hover { border-color: var(--brand); color: var(--brand-dark); transform: scale(.94); }
        .ui-pager button.active { border-color: #3157ed; background: linear-gradient(105deg, #213aa8, #3157ed); color: #fff; }
        .ui-pager button:disabled { opacity: 0.38; cursor: default; }

        .database-directory {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }
        .database-directory button {
            position: relative;
            display: grid;
            grid-template-columns: 1fr auto;
            grid-template-rows: auto auto;
            gap: 5px 18px;
            align-items: center;
            min-height: 106px;
            padding: 19px 22px;
            overflow: hidden;
            border: 1px solid #d5d9e8;
            border-radius: 10px;
            background: var(--card);
            color: var(--text);
            text-align: left;
            cursor: pointer;
            box-shadow: 0 6px 16px rgba(49, 87, 237, 0.07);
            transition: border-color 180ms ease, transform 280ms cubic-bezier(.19, 1, .22, 1), box-shadow 180ms ease, background 180ms ease;
        }


        .database-directory button:hover { border-color: var(--brand); background: #fffaf4; transform: translateY(-3px); box-shadow: 0 10px 22px rgba(255, 123, 22, 0.14); }
        .database-directory button > span { display: none; }
        .database-directory button > b { font-size: 1.35rem; font-weight: 900; }
        .database-directory button > em { color: var(--brand-dark); font-size: 1.25rem; font-style: normal; font-weight: 900; }
        .database-directory button > i { color: var(--text-2); font-size: 0.78rem; font-style: normal; }

        .entity-detail { --entity-accent: var(--brand); }
        .song-entity-detail,
        .album-entity-detail {
            display: grid;
            grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
            align-items: start;
            gap: 20px;
        }
        .song-entity-detail > .entity-hero,
        .album-entity-detail > .entity-hero {
            display: flex;
            min-height: 0;
            flex-direction: column;
            align-items: stretch;
            gap: 24px;
            padding: 24px;
        }
        .media-content { min-width: 0; }
        .media-content > .entity-tabs { margin: 0; }
        .media-content > .entity-section { margin-top: 14px; }
        .song-entity-detail .entity-intro h1,
        .album-entity-detail .entity-intro h1 { font-size: clamp(1.55rem, 2.6vw, 2.35rem); }
        .song-entity-detail .entity-meta,
        .album-entity-detail .entity-meta { grid-template-columns: 1fr; }
        .entity-cover {
            position: relative;
            z-index: 1;
            width: min(100%, 320px);
            margin: 0 auto;
            overflow: hidden;
            border: 4px solid rgba(255, 255, 255, 0.96);
            border-radius: 9px;
            background: #eef0f7;
            box-shadow: 9px 10px 0 rgba(255, 123, 22, 0.88), 0 10px 24px rgba(22, 40, 92, 0.2);
        }
        .entity-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
        .album-cover-detail { aspect-ratio: 1; }
        .event-cover { aspect-ratio: 16 / 10; width: min(100%, 360px); }
        .event-cover img { object-position: center; }
        .portrait-cover,
        .character-cover { aspect-ratio: 3 / 4; max-width: 270px; }
        .portrait-cover img,
        .character-cover img { object-position: top center; }
        .entity-cover > span { display: grid; place-items: center; width: 100%; height: 100%; color: var(--navy); font-size: 4rem; font-weight: 900; }
        .entity-intro { position: relative; z-index: 1; min-width: 0; animation: entityReveal 480ms cubic-bezier(.22,.75,.24,1) both; }
        @keyframes entityReveal { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
        .entity-kind {
            display: inline-block;
            margin-bottom: 12px;
            padding: 5px 13px;
            border-radius: 999px;
            background: linear-gradient(100deg, #ff7b16, #ffa932);
            color: #fff;
            font-size: 0.75rem;
            font-weight: 900;
            letter-spacing: 0.05em;
        }
        .entity-intro h1 {
            margin: 0;
            color: #fff;
            font-size: clamp(1.8rem, 4.2vw, 3.35rem);
            font-weight: 900;
            line-height: 1.18;
            letter-spacing: 0.025em;
            text-wrap: balance;
        }
        .entity-reading { margin: 10px 0 0; color: rgba(255, 255, 255, 0.74); font-size: 0.9rem; font-weight: 650; letter-spacing: 0.04em; }
        .entity-summary { max-width: 680px; margin: 18px 0 0; color: rgba(255, 255, 255, 0.86); font-size: 0.9rem; line-height: 1.75; }
        .entity-meta {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0;
            margin: 22px 0 0;
        }
        .entity-meta > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); border-top: 1px solid rgba(255, 255, 255, 0.25); }
        .entity-meta dt,
        .entity-meta dd { margin: 0; padding: 10px 8px; font-size: 0.82rem; line-height: 1.45; }
        .entity-meta dt { color: rgba(255, 255, 255, 0.66); font-weight: 700; }
        .entity-meta dd { color: #fff; font-weight: 800; overflow-wrap: anywhere; }
        .entity-tabs {
            position: relative;
            display: flex;
            gap: 8px;
            margin: 0 0 18px;
            padding: 2px 1px 8px;
            overflow-x: auto;
            background: transparent;
            scrollbar-width: thin;
            border-bottom: 1px solid var(--ui-line);
        }
        .entity-tabs button {
            position: relative;
            white-space: nowrap;
            flex: 1 0 auto;
            min-height: 42px;
            padding: 9px 22px;
            border: 0;
            border-radius: 0;
            background: transparent;
            color: var(--text-2);
            font-size: 0.88rem;
            font-weight: 850;
            cursor: pointer;
            box-shadow: inset 0 -3px 0 transparent;
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
        }
        .entity-tabs button:hover { color: var(--ui-orange-deep); }
        .entity-tabs button.active { color: var(--ui-cobalt-deep); box-shadow: inset 0 -3px 0 var(--ui-orange); }

        .entity-section {
            position: relative;
            margin-top: 14px;
            padding: clamp(18px, 3vw, 30px);
            overflow-x: auto;
            border: 1px solid #8ca3df;
            border-radius: 12px;
            background: var(--card);
            box-shadow: 0 7px 18px rgba(49, 87, 237, 0.09);
        }
        .detail-meta { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--surface-line); }
        .detail-meta > div { border-top: 1px solid var(--surface-line); }
        .detail-meta > div:nth-child(-n+2) { border-top: 0; }
        .detail-meta dt { color: var(--navy); background: #f1f4fc; }
        .detail-meta dd { color: var(--text); }

        .data-table { width: 100%; min-width: 700px; border-spacing: 0; border-collapse: collapse; }
        .data-table th {
            padding: 12px 13px;
            border-bottom: 2px solid var(--navy);
            background: var(--surface-muted);
            color: var(--navy);
            font-size: 0.78rem;
            font-weight: 900;
            text-align: left;
        }
        .data-table td {
            padding: 12px 13px;
            border-bottom: 1px solid var(--surface-line);
            color: var(--text-2);
            font-size: 0.84rem;
            line-height: 1.5;
            vertical-align: middle;
        }
        .data-table tbody tr:hover td { background: #f4f7ff; }
        .text-link {
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--navy);
            font-weight: 800;
            text-align: left;
            cursor: pointer;
        }
        .text-link:hover { color: var(--brand-dark); }
        .text-link.stacked { display: flex; flex-direction: column; gap: 3px; }
        .text-link.stacked small { color: var(--text-2); font-weight: 500; }

        .setlist-frame { overflow-x: auto; }
        .setlist-frame .setlist-table { width: 100%; min-width: 760px; border-spacing: 0; border-collapse: collapse; font-size: 0.88rem; }
        .setlist-frame .setlist-table th {
            padding: 13px 12px;
            border: 0;
            border-bottom: 2px solid var(--navy);
            background: var(--surface-muted);
            color: var(--navy);
            font-size: 0.83rem;
            font-weight: 900;
            text-align: left;
        }
        .setlist-frame .setlist-table td { padding: 12px; border-bottom: 1px solid var(--surface-line); vertical-align: middle; }
        .setlist-frame .setlist-table tbody tr:nth-child(even) { background: #f4f7ff; }
        .setlist-frame .setlist-no { width: 46px; color: var(--text-3); font-variant-numeric: tabular-nums; }
        .setlist-frame .setlist-song { min-width: 260px; color: var(--text); font-weight: 850; }
        .setlist-frame .setlist-perf { min-width: 330px; }
        @media(min-width:901px) {
            .setlist-frame .setlist-table .setlist-perf { width: 65%; }
            .setlist-frame .setlist-table:has(.setlist-src) .setlist-perf { width: 52%; }
        }
        .performer-group + .performer-group { margin-top: 12px; }
        .identity-group-label { display: block; flex-basis: 100%; width: 100%; grid-column: 1 / -1; margin-bottom: 4px; color: var(--text-2); font-size: .85rem; font-weight: 700; }
        .history-list > .identity-group-label { margin: 24px 0 10px; }
        .setlist-song-link { color: var(--text); text-decoration: none; }
        .setlist-song-link:hover { color: var(--brand-dark); }
        .perf-item,
        .setlist-performer-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin: 3px 9px 3px 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--text-2);
            white-space: nowrap;
        }
        .perf-item img { width: 30px; height: 30px; border: 2px solid #c7c2ba; border-radius: 50%; object-fit: cover; object-position: top center; }
        .guest-performer { display: inline-flex; align-items: center; margin: 3px 8px 3px 0; padding: 4px 8px; border: 1px solid var(--ui-line); border-radius: 999px; color: var(--text-2); background: var(--ui-soft); font-size: .79rem; white-space: nowrap; }
        .setlist-performer-link { cursor: pointer; text-decoration: none; }
        .setlist-performer-link:hover { color: var(--brand-dark); }

        .relation-list,
        .history-list { border-top: 1px solid var(--surface-line); }
        .relation-list > button,
        .history-list > a,
        .history-years section > a {
            display: grid;
            width: 100%;
            align-items: center;
            gap: 14px;
            padding: 13px 5px;
            border: 0;
            border-bottom: 1px solid var(--surface-line);
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
        }
        .relation-list > button { grid-template-columns: minmax(0, 1fr) 24px; }
        .relation-list b { display: block; color: var(--text); font-size: 0.92rem; }
        .relation-list small { display: block; margin-top: 4px; color: var(--text-2); font-size: 0.75rem; }
        .history-list > a,
        .history-years section > a { grid-template-columns: 105px minmax(0, 1fr) auto; }
        .history-list time,
        .history-years time { color: var(--navy); font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
        .history-list span,
        .history-years button span { color: var(--text); font-weight: 750; }
        .history-list em,
        .history-years em { color: var(--text-2); font-size: 0.72rem; font-style: normal; }
        .history-years section + section { margin-top: 23px; }
        .history-years h2 { display: inline-flex; margin: 0 0 4px; padding: 5px 13px; border-radius: 999px; background: #e9eefc; color: #3151ad; font-size: 0.9rem; }

        .song-version-list { display: grid; gap: 12px; }
        .song-version-list details { border: 1px solid var(--surface-line); border-radius: 8px; background: #fff; overflow: hidden; }
        .song-version-list summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 15px 17px;
            background: var(--surface-muted);
            color: var(--navy);
            cursor: pointer;
            list-style: none;
        }
        .song-version-list summary::-webkit-details-marker { display: none; }
        .song-version-list summary b { display: block; font-size: 0.94rem; }
        .song-version-list summary small { display: block; margin-top: 3px; color: var(--text-2); font-size: 0.72rem; }
        .song-version-list summary em { font-size: 0.76rem; font-style: normal; font-weight: 800; white-space: nowrap; }
        .album-inline { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
        .album-inline img { width: 48px; height: 48px; border-radius: 5px; object-fit: cover; }
        .album-inline b,
        .album-inline small { display: block; }
        .album-inline b { color: var(--navy); font-size: 0.82rem; }
        .album-inline small { margin-top: 3px; color: var(--text-2); font-size: 0.75rem; }

        .album-track-list { border-top: 2px solid var(--navy); }
        .album-track-list > div {
            display: grid;
            grid-template-columns: 46px minmax(0, 1fr) 44px;
            align-items: center;
            gap: 10px;
            min-height: 62px;
            padding: 8px 6px;
            border-bottom: 1px solid var(--surface-line);
        }
        .album-track-list > div > span { color: var(--text-3); font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
        .album-track-main { min-width: 0; }
        .album-track-main > small { display: block; margin-top: 5px; color: var(--text-2); font-size: 0.74rem; line-height: 1.5; }
        .album-track-main .performer-chip-list { margin-top: 8px; }

        .guest-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--surface-line); }
        .guest-line b { color: var(--navy); font-size: 0.78rem; }
        .guest-line span { color: var(--text-2); font-size: 0.8rem; }
        .event-video-grid,
        .video-library,
        .setting-book-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
        .event-video { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #111; }
        .event-video iframe { width: 100%; height: 100%; border: 0; }
        .video-library a,
        .setting-book-list a {
            display: flex;
            min-width: 0;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--surface-line);
            border-radius: 8px;
            background: #fff;
            color: inherit;
            text-decoration: none;
            box-shadow: 0 5px 14px rgba(49, 87, 237, 0.07);
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, box-shadow 180ms ease;
        }
        .video-library a:hover,
        .setting-book-list a:hover { border-color: var(--brand); box-shadow: 0 9px 18px rgba(255, 123, 22, 0.14); transform: translateY(-3px); }
        .video-library img { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; }
        .video-library b,
        .setting-book-list b { padding: 12px 13px 4px; color: var(--text); font-size: 0.86rem; line-height: 1.5; }
        .video-library span,
        .setting-book-list span { margin-top: auto; padding: 5px 13px 12px; color: var(--brand-dark); font-size: 0.72rem; font-weight: 800; }
        .setting-book-list a::before { content: ''; width: 100%; aspect-ratio: 16 / 9; background: var(--thumb) center / cover no-repeat, var(--surface-muted); }
        .roommate-image { display: block; width: 100%; margin-top: 12px; border-radius: 8px; }



/* ===== FINAL SHARED INTERFACE SYSTEM ===== */
:root {
    --ui-cobalt: #3157ed;
    --ui-cobalt-deep: #213aa8;
    --ui-cobalt-soft: #edf2ff;
    --ui-navy: #151d3f;
    --ui-orange: #ff7b16;
    --ui-orange-end: #ffa932;
    --ui-orange-deep: #ff7b16;
    --ui-action-orange-hover: #cf5200;
    --ui-line: #dfe3ee;
    --ui-soft: #f5f7fc;
    --ui-ease: cubic-bezier(.19, 1, .22, 1);
}

body.subpage-bg {
    background-color: #f7f8fc;
    background-image: url('/uma_tools/img/bg_texture_white.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461');
}
.container { position: relative; max-width: 1280px; margin: 0 auto; padding: 26px 24px 38px; }

/* The same disclosure navigation is used on home and inner pages. */
.site-nav { display: flex; }
.site-nav-item { position: relative; }
.site-nav-trigger,
.site-nav-menu :is(button,a) {
    text-decoration: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.site-nav-trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    background: transparent;
    font-weight: 800;
    letter-spacing: .05em;
    transition: color 180ms ease, background 180ms ease, transform 260ms var(--ui-ease), box-shadow 260ms ease;
}
.site-nav-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    flex: none;
}
.site-nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.site-nav-chevron,
.site-nav-menu svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    transition: transform 260ms var(--ui-ease);
}
.site-nav-item.open > .site-nav-trigger > .site-nav-chevron { transform: rotate(180deg); }
.site-nav-menu {
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 360ms var(--ui-ease);
}
.site-nav-item.open > .site-nav-menu { pointer-events: auto; opacity: 1; transform: translateY(0); }
.site-nav-menu :is(button,a) {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: transparent;
    text-align: left;
}
.site-nav-menu :is(button,a)::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255,255,255,.14);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 420ms var(--ui-ease);
}
.site-nav-menu :is(button,a):hover::before { clip-path: inset(0 0 0 0); }
.site-nav-menu :is(button,a):hover svg { transform: translateX(4px); }

.site-nav-home { width: 100%; flex-direction: column; min-height: 0; overflow-y: auto; }
.site-nav-home .site-nav-trigger { min-height: 54px; justify-content: flex-start; padding: 0 25px; color: #fff; font-size: 1.04rem; }
.site-nav-home .site-nav-item { flex: 0 0 auto; border-bottom: 1px solid rgba(255,255,255,.15); }
.site-nav-home .site-nav-item.open { background: rgba(9,27,101,.18); }
.site-nav-home .site-nav-menu { position: static; }
.site-nav-home .site-nav-menu { transition: opacity 160ms ease, transform 360ms var(--ui-ease); }
.site-nav-home .site-nav-menu :is(button,a) { min-height: 43px; padding: 0 26px 0 43px; color: rgba(255,255,255,.9); }

.sub-header {
    position: sticky;
    top: 0;
    z-index: 1001;
    display: flex;
    min-height: 56px;
    color: #fff;
    align-items: stretch;
    overflow: visible;
    background: var(--ui-cobalt) url('/uma_tools/img/bg_blue.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') center / cover;
    box-shadow: 0 7px 18px rgba(27,47,125,.2);
}
.sub-brand {
    text-decoration: none;
    display: inline-flex;
    flex: 0 0 25%;
    min-width: 230px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    padding: 0 18px;
    border: 0;
    border-right: 1px solid rgba(255,255,255,.32);
    background: rgba(255,255,255,.06);
    color: #fff;
    font: inherit;
    font-size: 1.16rem;
    font-weight: 900;
    letter-spacing: .05em;
    transform: skewX(-30deg);
    cursor: pointer;
    transition: background 180ms ease;
}
.sub-brand > span { display: inline-block; transform: skewX(30deg); }
.sub-brand:hover { background: rgba(255,255,255,.15); }
.site-nav-sub { flex: 1; align-items: stretch; justify-content: flex-end; }
.site-nav-sub .site-nav-item {
    flex: 1 1 0;
    min-width: 112px;
    border-right: 1px solid rgba(255,255,255,.34);
    transform: skewX(-30deg);
    transition: transform 240ms var(--ui-ease), box-shadow 240ms ease;
}
.site-nav-sub .site-nav-trigger { min-height: 56px; padding: 0 18px; color: #fff; }
.site-nav-sub .site-nav-trigger > * { transform: skewX(30deg); }
.site-nav-sub .site-nav-item.open > .site-nav-trigger > .site-nav-chevron { transform: skewX(30deg) rotate(180deg); }
.site-nav-sub .site-nav-trigger:hover { background: rgba(255,255,255,.16); }
.site-nav-sub .site-nav-item.active {
    z-index: 2;
    background: linear-gradient(110deg,#ff7b16,#ffa932);
    transform: translateY(-7px) skewX(-30deg);
    box-shadow: 0 16px 30px rgba(20,26,65,.38);
}
.site-nav-sub .site-nav-item.active .site-nav-trigger { min-height: 63px; }
.site-nav-sub .site-nav-menu {
    position: absolute;
    top: 100%;
    right: -22px;
    left: -22px;
    z-index: 50;
    padding: 6px 0;
    background: rgba(35,62,176,.98);
    box-shadow: 0 15px 28px rgba(19,34,93,.22);
    transform: skewX(30deg) translateY(-8px);
}
.site-nav-sub .site-nav-item.open > .site-nav-menu { transform: skewX(30deg) translateY(0); }
.site-nav-sub .site-nav-menu :is(button,a) { min-height: 44px; padding: 0 18px; color: #fff; }

.route-breadcrumb {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    margin: -2px 0 18px;
    color: #536080;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.route-breadcrumb a,
.route-breadcrumb em { overflow: hidden; border: 0; background: transparent; color: inherit; font: inherit; font-style: normal; text-overflow: ellipsis; }
.route-breadcrumb a { text-decoration: none; cursor: pointer; transition: color 160ms ease; }
.route-breadcrumb a:hover { color: var(--ui-orange-deep); }
.route-breadcrumb em:last-child { color: var(--ui-navy); }
.context-back {
    position: fixed;
    bottom: 22px;
    left: 20px;
    z-index: 45;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #cdd3e4;
    border-radius: 50%;
    background: rgba(255,255,255,.93);
    color: var(--ui-navy);
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(24,38,91,.1);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform 300ms var(--ui-ease), border-color 160ms ease, color 160ms ease;
}
.context-back span { display: none; }
.context-back:hover { border-color: var(--ui-orange); color: var(--ui-orange-deep); transform: translateX(-3px); }
.context-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; }



/* One control family for every archive. */
a:is(.album-card,.music-card-main,.creator-catalog-row,.event-catalog-row,.album-inline,.relation-detail-link),
.history-list > a,.history-years section > a { color: inherit; text-decoration: none; }
.ui-search input::placeholder { color: var(--text-3); }
.ui-search input[type="search"]::-webkit-search-cancel-button,
.ui-search input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.archive-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}
.archive-toolbar.compact { max-width: 820px; margin-bottom: 18px; }
.archive-toolbar > .entity-actions { margin: 0; }
.ui-search,
.ui-select-control {
    min-height: 46px;
    border: 1px solid #cbd1e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 300ms var(--ui-ease);
}
.ui-search { position: relative; display: flex; flex: 1 1 360px; align-items: center; min-width: 190px; }
.ui-select-control { position: relative; display: flex; flex: 0 1 190px; min-width: 154px; align-items: center; }
.ui-select-control.ui-select-wide { flex-basis: 260px; }
.event-type-select { flex-basis: 260px; min-width: 220px; }
.archive-controls > .ui-select-control.event-type-select { flex: 1.3 1 260px; width: auto; min-width: 220px; }
.event-type-select .ui-select-menu { min-width: min(320px, calc(100vw - 16px)); }
.archive-controls .ui-select-control.event-type-select .ui-select-menu { width: max(100%, min(320px, calc(100vw - 16px))); }
.event-type-select .ui-select-menu button { white-space: normal; line-height: 1.35; }
@media (max-width: 700px) {
    .archive-controls.event-filter-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .archive-controls.event-filter-controls > .ui-select-control { width: auto; }
    .archive-controls > .ui-select-control.event-type-select { grid-column: 1 / -1; grid-row: 1; width: auto; min-width: 0; }
    .event-type-select .ui-select-trigger { min-height: 34px; height: auto; }
    .event-type-select .ui-select-trigger > span { white-space: normal; overflow-wrap: anywhere; }
}
.ui-search:focus-within,
.ui-select-control.open,
.ui-select-control:focus-within { border-color: var(--ui-focus); box-shadow: 0 0 0 3px var(--ui-focus-halo); }
.ui-search > svg { width: 20px; height: 20px; margin-left: 14px; fill: none; stroke: var(--ui-cobalt-deep); stroke-width: 2; flex: none; }
.ui-search input,
#tab-characters .ui-search .c-search,
#tab-db-voice .ui-search .va-search {
    width: 100%; height: 44px; margin: 0; padding: 0 42px 0 11px; border: 0; border-radius: 0;
    outline: 0; background: transparent; box-shadow: none; color: var(--text); font-size: .92rem;
}
.ui-search > button { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); font-size: 1.35rem; transform: translateY(-50%); cursor: pointer; }
.ui-select-label {
    display: flex;
    min-width: 54px;
    align-self: stretch;
    align-items: center;
    padding-left: 14px;
    color: #657091;
    font-size: .8rem;
    font-weight: 850;
    white-space: nowrap;
}
.ui-select-trigger {
    display: flex;
    min-width: 0;
    height: 44px;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px 0 8px;
    border: 0;
    background: transparent;
    color: var(--ui-navy);
    font-family: inherit;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}
.ui-select-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-select-trigger > svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--ui-cobalt-deep); stroke-width: 2.2; transition: transform 220ms var(--ui-ease); }
.ui-select-control.open .ui-select-trigger > svg { transform: rotate(180deg); }
.ui-select-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: -1px;
    left: -1px;
    z-index: 120;
    max-height: 286px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #bfc7da;
    border-radius: 8px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 16px 36px rgba(24,36,82,.18);
    backdrop-filter: blur(12px);
}
.ui-select-menu button {
    display: flex;
    width: 100%;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #38425f;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.ui-select-menu button:hover,
.ui-select-menu button.active { background: #eef2ff; color: var(--ui-cobalt-deep); }
.ui-select-menu button.selected { background: var(--ui-cobalt); color: #fff; }
.ui-select-menu button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }

.ui-filter-group button {
    min-height: 34px;
    padding: 5px 13px;
    border: 1px solid #cbd1e1;
    border-radius: 17px;
    background: #fff;
    box-shadow: none;
    font-family: inherit;
    color: var(--text-2); font-size: .8rem; font-weight: 700; cursor: pointer;
    transition: transform 280ms var(--ui-ease), background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.ui-filter-group button.active {
    border-color: var(--ui-cobalt);
    background: var(--ui-cobalt);
    color: #fff;
    box-shadow: none;
}
.ui-filter-group button:hover { border-color: var(--ui-orange); color: var(--ui-orange-deep); transform: scale(.96); }
.ui-filter-group button.active:hover { border-color: var(--ui-cobalt); color: #fff; }
/* Crisp archive rows with purposeful movement. */
.event-catalog,
.song-catalog { border-top: 3px solid var(--ui-cobalt-deep); }
.event-catalog-row:hover { background: #f7f9ff; box-shadow: none; transform: translateX(3px); }
.event-catalog-row > svg,
.relation-song-row svg { stroke: var(--ui-disclosure-accent, var(--ui-orange-deep)); }
.navigation-progress { position: fixed; z-index: 1200; inset: 0 0 auto; height: 3px; pointer-events: none; overflow: hidden; background: #3157ed18; }
.navigation-progress span { display: block; width: 38%; height: 100%; background: var(--ui-orange,#ff8718); transform: translateX(-100%); animation: route-progress 1.15s ease-in-out infinite; }
.route-placeholder { min-height: 440px; padding-top: 12px; }
.route-placeholder-toolbar { display: flex; gap: 12px; margin-bottom: 24px; }
.route-placeholder-toolbar span { height: 44px; border-radius: 8px; background: #e7e9f2; flex: 1; }
.route-placeholder-toolbar span + span { max-width: 180px; }
.route-placeholder-content { animation: reveal-route-placeholder 120ms step-end both; }
@keyframes reveal-route-placeholder { from { visibility: hidden; } to { visibility: visible; } }
.route-placeholder .route-placeholder-hero > .entity-cover { aspect-ratio: 1; background: #e7e9f2; }
.route-placeholder .route-placeholder-hero::before { opacity: .18; }
.route-placeholder-lines { display: grid; gap: 12px; }
.route-placeholder-lines > span { height: 22px; border-radius: 5px; background: #e7e9f2; }
.route-placeholder-lines > span:last-child { width: 65%; }
.route-placeholder-hero > div { flex: 1; align-self: center; min-width: 0; }
.route-placeholder-hero b { display: block; font-size: 1.4rem; margin-bottom: 20px; color: var(--text-1,#20283b); }
.route-placeholder-hero i { display: block; height: 16px; max-width: 520px; margin: 14px 0; border-radius: 4px; background: #e7e9f2; }
.route-placeholder-hero i:last-child { width: 55%; }
.route-content-enter { animation: route-content-enter 180ms ease-out; }
.news-body-skeleton { padding: 24px 0; min-height: 240px; }
.news-body-skeleton span { display: block; height: 16px; margin: 20px 0; border-radius: 4px; background: #e7e9f2; }
.news-body-skeleton span:nth-child(3n) { width: 70%; }
@keyframes route-progress { to { transform: translateX(370%); } }
@keyframes route-content-enter { from { opacity: .25; } to { opacity: 1; } }
@media(max-width:600px) { .route-placeholder-hero b { font-size: 1.1rem; } }
@media(prefers-reduced-motion:reduce) { .route-content-enter,.navigation-progress span { animation: none; } .navigation-progress span { width: 100%; transform: none; } }


.catalog-play { align-self: center; }
.news-detail-date { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.news-detail-date a { color: var(--ui-cobalt-deep); font-size: .82rem; font-weight: 800; text-decoration: none; }
.news-detail-date a:hover { text-decoration: none; }
.catalog-subline,
.secondary-line { display: block; margin-top: 4px; color: #687086; font-size: .78rem; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }

/* Detail pages share one composition; orange stays the secondary accent. */
/* Character, voice actor and event records use their own canonical two-colour identity. */
.event-entity-detail > .entity-hero,
.character-entity-detail > .entity-hero,
.voice-entity-detail > .entity-hero {
    isolation: isolate;
    grid-template-columns: 210px minmax(0,1fr);
    gap: clamp(22px,4vw,48px);
    min-height: 228px;
    padding: 26px clamp(24px,4vw,46px);
    border: 1px solid color-mix(in srgb,var(--entity-accent) 28%,#dfe3ee);
    border-radius: 7px;
    background: #fff;
    color: var(--ui-navy);
}
.event-entity-detail > .entity-hero::before,
.character-entity-detail > .entity-hero::before,
.voice-entity-detail > .entity-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    background:
        linear-gradient(154deg,var(--entity-accent) 0 29%,transparent 29.2%),
        linear-gradient(154deg,var(--entity-sub) 0 38%,transparent 38.2%);
}
.event-entity-detail > .entity-hero::after,
.character-entity-detail > .entity-hero::after,
.voice-entity-detail > .entity-hero::after {
    right: -3%;
    bottom: -30%;
    z-index: -1;
    width: 32%;
    border-width: 24px;
    border-color: color-mix(in srgb,var(--entity-accent) 9%,transparent);
}
.event-entity-detail .entity-cover,
.character-entity-detail .entity-cover,
.voice-entity-detail .entity-cover {
    width: 100%;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 7px 8px 0 var(--entity-sub),0 10px 24px rgba(22,40,92,.16);
}
.event-entity-detail .event-cover { max-width: 230px; aspect-ratio: 16/10; }
.character-entity-detail .character-cover,
.voice-entity-detail .portrait-cover { max-width: 156px; aspect-ratio: 3/4; }
.voice-entity-detail .portrait-cover { background: #fff; }
.event-entity-detail .entity-kind,
.character-entity-detail .entity-kind,
.voice-entity-detail .entity-kind { background: var(--entity-accent); color: #fff; }
.event-entity-detail .entity-intro h1,
.character-entity-detail .entity-intro h1,
.voice-entity-detail .entity-intro h1 { color: var(--ui-navy); font-size: clamp(1.55rem,3.2vw,2.55rem); }
.event-entity-detail .entity-reading,
.character-entity-detail .entity-reading,
.voice-entity-detail .entity-reading,
.event-entity-detail .entity-summary { color: #66708a; }
.event-entity-detail .entity-meta,
.character-entity-detail .entity-meta,
.voice-entity-detail .entity-meta { margin-top: 15px; }
.event-entity-detail .entity-meta > div,
.character-entity-detail .entity-meta > div,
.voice-entity-detail .entity-meta > div { border-color: #dfe3ee; }
.event-entity-detail .entity-meta dt,
.character-entity-detail .entity-meta dt,
.voice-entity-detail .entity-meta dt { color: #69738c; }
.event-entity-detail .entity-meta dd,
.character-entity-detail .entity-meta dd,
.voice-entity-detail .entity-meta dd { color: var(--ui-navy); }

/* Parent anime hero stays stable while a selected episode is shown below it. */
.anime-unit-context {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.anime-unit-context-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-muted);
}
.anime-unit-context-copy h2 { margin: 8px 0 4px; color: var(--ui-navy); font-size: 1.1rem; }
.anime-unit-context-copy .entity-reading { margin: 0 0 8px; }
.anime-unit-context-copy .entity-meta { margin-top: 10px; }
.event-hero-controls { position: absolute; z-index: 3; top: 18px; right: 24px; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; }
.event-hero-controls .event-session-select { width: max-content; min-width: min(290px, 100%); max-width: 100%; margin: 0; }
.event-session-select .ui-select-trigger { flex: auto; height: auto; min-height: 44px; padding-block: 8px; }
.event-session-select .ui-select-trigger > span { white-space: normal; word-break: keep-all; overflow-wrap: normal; text-overflow: clip; }
.event-session-menu button > span { white-space: nowrap; }
.event-session-menu button > svg { flex-shrink: 0; }
.event-entity-detail > .entity-hero:has(.event-hero-controls) .entity-kind { margin-right: 210px; }
.event-hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; margin-top: 12px; }
.event-entity-detail .event-hero-facts > dl { display: contents; }
.event-hero-facts > .activity-time-info > div:first-child { order: -1; }
.event-hero-facts > dl > div { display: flex; gap: 12px; align-items: baseline; border-top: 1px solid #dfe3ee; padding: 9px 0; }
.event-hero-facts dt, .event-hero-facts dd { padding: 0; margin: 0; }
.event-hero-facts dt { flex-shrink: 0; }
.event-hero-facts dd { min-width: 0; overflow-wrap: anywhere; }
.event-session-time { margin-top: 12px; }
.activity-time-info { margin-top: 15px; }
.activity-time-info > div { border-color: #dfe3ee; }
.activity-time-info dt { color: #69738c; }
.activity-time-info dd { color: var(--ui-navy); }
.activity-time-more { grid-column: 1 / -1; margin-top: 6px; }
.activity-time-more summary { cursor: pointer; color: var(--brand-dark); font-weight: 700; padding: 7px 8px; }
.activity-time-more > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); border-top: 1px solid #dfe3ee; }
.activity-time-more dt,
.activity-time-more dd { padding: 8px; }
.participation-recordings { margin-top: 8px; }
.participation-recordings summary { cursor: pointer; color: var(--brand-dark); font-weight: 700; }
.participation-recording-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.participation-recording-list .credit-role-tag { text-decoration: none; }
.participation-recording-list small { color: var(--text-2); }
@media (max-width: 640px) {
  .anime-unit-context { grid-template-columns: 1fr; }
  .anime-unit-context-art { max-width: 220px; }
  .event-entity-detail > .entity-hero > .event-hero-controls { position: static; grid-column: 1 / -1; grid-row: 1; }
  .event-entity-detail > .entity-hero > .entity-intro { display: contents; }
  .event-entity-detail > .entity-hero > .entity-cover { grid-row: 1 / 4; }
  .event-entity-detail > .entity-hero:has(.event-hero-controls) > .entity-cover { grid-row: 2 / 5; }
  .event-entity-detail .entity-intro > .entity-kind,
  .event-entity-detail .entity-intro > h1,
  .event-entity-detail .entity-intro > .entity-reading { grid-column: 2; margin: 0; }
  .event-entity-detail .entity-intro > .entity-kind { justify-self: start; }
  .event-entity-detail .entity-intro > .event-hero-facts { grid-column: 1 / -1; }
  .event-entity-detail > .entity-hero:has(.event-hero-controls) .entity-kind { margin-right: 0; }
  .event-hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
}
@media (max-width: 400px) { .event-hero-facts { grid-template-columns: 1fr; } }
.character-entity-detail .entity-hero .performer-chip,
.voice-entity-detail .entity-hero .performer-chip { color: var(--ui-navy); }
.character-entity-detail .entity-tabs button.active,
.voice-entity-detail .entity-tabs button.active { color: var(--entity-accent); box-shadow: inset 0 -3px 0 var(--entity-sub); }

/* The setlist performer is the canonical person-link shape. */
.performer-chip-list { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 15px; }
.performer-chip-list.compact { gap: 6px 11px; margin-top: 0; }
.performer-chip-list:not(.anime-cast-pair), .performer-grid {
    display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,10rem),1fr));
    align-items: start; justify-items: start; gap: 10px 14px;
}
.performer-grid .performer-chip-list { display: contents; }
:is(.performer-chip-list,.performer-grid) > :is(.performer-chip,.perf-item,.guest-performer) {
    min-width: 0; max-width: 100%; margin: 0; white-space: normal; overflow-wrap: anywhere;
}
.performer-grid > :is(.perf-name,b,small), .performer-note { grid-column: 1 / -1; color: var(--text-2); }
.performer-grid .perf-sep { display: none; }
@media(max-width:600px) {
    .performer-chip-list:not(.anime-cast-pair), .performer-grid {
        grid-template-columns: repeat(auto-fill,minmax(min(100%,7rem),1fr));
    }
}
.performer-chip,
.perf-item,
.setlist-performer-link {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 7px;
    margin: 2px 7px 2px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: .82rem;
    font-weight: 750;
    white-space: nowrap;
}
button.performer-chip,
.setlist-performer-link { cursor: pointer; text-decoration: none; }
.performer-chip img,
.perf-item img {
    width: 34px;
    height: 34px;
    flex: none;
    border: 2px solid var(--chip-color,#c7c2ba);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
    object-position: top center;
    transition: transform 300ms var(--ui-ease), box-shadow 160ms ease;
}
.performer-chip:hover img,
button.setlist-performer-link:hover img { transform: scale(1.1); box-shadow: 0 3px 9px rgba(20,29,63,.16); }
.performer-chip-fallback {
    display: grid;
    width: 34px;
    height: 34px;
    flex: none;
    place-items: center;
    border: 2px solid var(--chip-color,#c7c2ba);
    border-radius: 50%;
    background: #fff;
    color: var(--ui-navy);
    font-size: .72rem;
    font-weight: 900;
}
.voice-chip img { background: #fff; }
.cast-chip-list { align-items: center; row-gap: 12px; }
.cast-chip { flex: none; max-width: none; margin: 0; color: var(--text); font-size: 14px; line-height: 1.4; text-decoration: none; }
.cast-chip :is(img,.performer-chip-fallback) { width: 30px; height: 30px; }
.cast-chip > span:last-child { white-space: nowrap; }
.cast-chip.event-chip img { object-position: center; }
.setlist-voice-link { text-decoration: none; }
.setlist-voice-link:hover { color: var(--ui-cobalt-deep); }
.entity-hero .performer-chip { margin-top: 16px; color: #fff; }
.entity-hero .performer-chip-list .performer-chip { margin-top: 0; }
.album-track-main .performer-chip { font-size: .72rem; }
.album-track-main .performer-chip img { width: 29px; height: 29px; }

.relation-song-row {
    display: block;
    border-bottom: 1px solid var(--ui-line);
}
.relation-song-row b { display: block; color: var(--ui-navy); font-size: .9rem; }
.relation-song-meta { display: block; margin-top: 4px; color: #687086; font-size: .76rem; }
.relation-song-detail { padding: 4px 14px 16px 69px; animation: relationReveal 260ms var(--ui-ease) both; }
@keyframes relationReveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.relation-version { padding: 12px 0; border-top: 1px solid #e4e7f0; }
.relation-version > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.relation-version > header b { font-size: .88rem; }
.relation-version > header span { color: #687086; font-size: .76rem; }
.relation-release {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,.8fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.relation-release + .relation-release { border-top: 1px dashed #e1e4ed; }
.relation-release .album-inline { min-width: 0; }
.relation-release .album-inline img { width: 44px; height: 44px; }
.relation-release .performer-chip-list { min-width: 0; }

/* Music credits, lyrics, and creator relations share the archive's row language. */
.song-credit-list { border-top: 2px solid var(--ui-cobalt-deep); }
.song-credit-version { display: grid; grid-template-columns: minmax(150px,.34fr) minmax(0,1fr); gap: 24px; padding: 18px 4px; border-bottom: 1px solid var(--ui-line); }
.song-credit-version > header h2 { margin: 0; color: var(--ui-navy); font-size: .96rem; }
.song-credit-version > header span { display: block; margin-top: 5px; color: #59637b; font-size: .78rem; overflow-wrap: anywhere; }
.song-credit-version dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 22px; margin: 0; }
.song-credit-version dl > div { min-width: 0; }
.song-credit-version dt { margin-bottom: 5px; color: #677189; font-size: .75rem; font-weight: 850; letter-spacing: .05em; }
.song-credit-version dd { margin: 0; color: var(--ui-navy); font-size: .88rem; font-weight: 750; overflow-wrap: anywhere; }
.song-credit-version dd .text-link { color: var(--ui-cobalt-deep); font-size: inherit; font-weight: inherit; }
.song-credit-version dd small { display: block; margin-top: 3px; color: #66708a; font-size: .75rem; font-weight: 600; }

.lyrics-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--ui-cobalt-deep); }
.lyrics-sheet { max-width: 780px; margin: 0 auto; padding: 28px clamp(4px,5vw,48px) 36px; list-style: none; counter-reset: lyric-line; }
.lyrics-sheet li { position: relative; min-height: 31px; padding: 4px 12px 4px 18px; color: #343d54; font-size: .9rem; line-height: 1.65; transition: color 180ms ease,transform 220ms var(--ui-ease); }
.lyrics-sheet li::before { content: ''; position: absolute; top: 8px; bottom: 8px; left: 0; width: 3px; background: transparent; }
.lyrics-sheet li.active { color: var(--ui-cobalt-deep); font-weight: 800; transform: translateX(5px); }
.lyrics-sheet li.active::before { background: var(--ui-orange); }
.lyrics-sheet button { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lyrics-sheet.is-timed button:not(:disabled):hover { color: var(--ui-orange-deep); }
.lyrics-sheet button:disabled { cursor: text; }

.creator-catalog { border-top: 3px solid var(--ui-cobalt-deep); }
.creator-toolbar { align-items: center; }
.creator-toolbar .ui-search { flex: 1 1 360px; }
.filter-pill-group { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-pill { min-height: 38px; padding: 7px 15px; border: 1px solid #cfd5e5; border-radius: 20px; background: #fff; color: #46516a; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; transition: border-color 160ms ease,color 160ms ease,background 160ms ease; }
.filter-pill:hover { border-color: var(--ui-orange); color: var(--ui-orange-deep); }
.filter-pill.active { border-color: var(--ui-cobalt); background: var(--ui-cobalt); color: #fff; }
.creator-catalog-row { display: grid; width: 100%; grid-template-columns: 44px minmax(160px,1fr) minmax(230px,.85fr) 20px; align-items: center; gap: 18px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--ui-line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background 160ms ease; }
.identity-portrait { display: block; width: 44px; height: 44px; flex: none; }
.identity-portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }
.profile-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 36px; margin: 0; }
.profile-facts > div { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--ui-line); align-items: baseline; }
.profile-facts dt { color: var(--text-2); background: transparent; font-size: .9rem; font-weight: 500; }
.profile-facts dd { margin: 0; color: var(--ui-navy); line-height: 1.6; overflow-wrap: anywhere; }
.creator-catalog-row:hover,.creator-catalog-row:focus-visible { background: #f7f9ff; }
.creator-catalog-name { min-width: 0; }
.creator-catalog-name b { display: block; color: var(--ui-navy); font-size: .9rem; overflow-wrap: anywhere; }
.creator-catalog-name small { display: block; margin-top: 3px; color: #657087; font-size: .75rem; }
.creator-catalog-roles { min-width: 0; }
.creator-catalog-count { color: #58637b; font-size: .78rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.creator-catalog-row > svg,.creator-work-list svg,.creator-collaborator-list svg { width: 20px; height: 20px; fill: none; stroke: var(--ui-orange-deep); stroke-width: 2.2; }
.creator-cover { display: grid; place-items: center; aspect-ratio: 1; }
@media (max-width: 900px) {
    .creator-catalog-row { grid-template-columns: 44px minmax(0,1fr) 20px; gap: 12px; }
    .creator-catalog-roles { grid-column: 2; grid-row: 2; }
    .creator-catalog-row > .identity-portrait { grid-row: 1 / 3; }
    .creator-catalog-count { grid-column: 3; grid-row: 1 / 3; }
    .creator-catalog-row > svg { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 480px) {
    .creator-catalog-row { grid-template-columns: 40px minmax(0,1fr) 16px; gap: 8px 12px; padding: 12px 8px; }
    .creator-catalog-row > .identity-portrait { width: 40px; height: 40px; grid-row: 1 / 3; }
    .profile-facts { grid-template-columns: 1fr; }
    .profile-facts > div { padding: 14px 0; gap: 12px; }
    .creator-catalog-count { grid-column: 2; grid-row: 3; }
    .creator-catalog-row > svg { grid-column: 3; grid-row: 1 / 4; }
}
.pedigree-section { min-height: 520px; margin-top: 0; padding: 0; overflow: visible; }
.pedigree-section > .c-pedigree-lens { margin: 0; border-radius: 4px; box-shadow: none; }
.pedigree-empty { margin: 0; padding: 36px 20px; color: var(--text-2); text-align: center; }

.hero-video-aside {
    grid-column: 3;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 216px;
    max-width: 320px;
    padding: 14px 14px 13px;
    border: 2px solid var(--entity-accent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--entity-accent) 8%, #fff);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--entity-accent) 14%, transparent);
}
.hero-video-aside > b {
    color: color-mix(in srgb, var(--entity-accent) 72%, #1c2b4a);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.hero-video-aside .horse-link-chip {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
    text-align: left;
    margin: 0;
}
@media (max-width: 980px) {
    .hero-video-aside { grid-column: 1 / -1; max-width: none; }
}

/* ===== AUDIO PLAYER ===== */
:root {
    --audio-dock-height: 78px;
    --audio-safe-bottom: env(safe-area-inset-bottom, 0px);
    --audio-shadow: 0 -12px 34px rgba(15,20,35,.2);
}
body.audio-dock-active .site-footer { padding-bottom: calc(28px + var(--audio-dock-height) + var(--audio-safe-bottom)); }
body.audio-dock-active .home-layout { height: calc(100vh - var(--audio-dock-height) - var(--audio-safe-bottom)); min-height: 560px; }
.audio-dock {
    position: fixed;
    z-index: 1100;
    right: 0;
    bottom: 0;
    left: 0;
    min-width: 0;
    height: calc(var(--audio-dock-height) + var(--audio-safe-bottom));
    padding-bottom: var(--audio-safe-bottom);
    color: #fff;
    background: linear-gradient(102deg,var(--ui-cobalt) 0%,#2c51de 58%,var(--ui-cobalt-deep) 100%);
    box-shadow: var(--audio-shadow);
    isolation: isolate;
    animation: audioDockIn 240ms cubic-bezier(.19,1,.22,1) both;
}



        #tab-db-voice ul.va-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 12px;
            margin: 0;
            padding: 0;
            list-style: none;
        }
        #tab-db-voice ul.va-grid li { position: relative; left: auto; top: auto; width: auto; height: auto; opacity: 1; transform: none; }
        #tab-db-voice .va-card {
            display: grid;
            grid-template-columns: 68px minmax(0, 1fr);
            align-items: center;
            gap: 13px;
            min-height: 104px;
            padding: 10px 13px 10px 10px;
            overflow: hidden;
            border: 1px solid var(--surface-line);
            border-color: color-mix(in srgb, var(--color-main) 48%, var(--surface-line));
            border-radius: 9px;
            background: var(--card);
            color: inherit;
            text-decoration: none;
            box-shadow: 0 5px 15px rgba(35, 38, 51, 0.055);
            transition: transform 280ms cubic-bezier(.19, 1, .22, 1), border-color 180ms ease, box-shadow 180ms ease;
        }
        #tab-db-voice .va-card:hover { border-color: var(--color-main); box-shadow: 0 9px 19px color-mix(in srgb, var(--color-main) 18%, transparent); transform: translateY(-3px); }
        #tab-db-voice .va-card-img,
        #tab-db-voice .va-ph-fb {
            width: 68px;
            height: 88px;
            border: 0;
            border-radius: 6px;
            background: var(--surface-muted);
            object-fit: cover;
            object-position: top center;
        }
        #tab-db-voice .va-ph-fb { display: grid; place-items: center; color: var(--navy); font-size: 1.6rem; font-weight: 900; }
        #tab-db-voice .va-card-txt { min-width: 0; }
        #tab-db-voice .va-name { margin: 0; color: var(--text); font-size: 1rem; font-weight: 900; }
        #tab-db-voice .va-kana { margin: 4px 0 0; color: var(--text-3); font-size: 0.75rem; }
        #tab-db-voice .va-card-roles { margin-top: 9px; }
        #tab-db-voice .va-card-roles .performer-chip { margin: 0; font-size: 0.73rem; }
        #tab-db-voice .va-card-roles .performer-chip img,
        #tab-db-voice .va-card-roles .performer-chip-fallback { width: 28px; height: 28px; }
        #tab-db-voice .va-nodata { display: none; }

        .pedigree-section { overflow: visible; }
        .c-char-blood { min-height: 520px; }

        @media (max-width: 900px) {
            .song-entity-detail,
            .album-entity-detail { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); }
            .event-catalog-row { grid-template-columns: 100px 86px minmax(0, 1fr) 24px; }
            .event-catalog-cover { width: 100px; }
            .event-catalog-facts { grid-column: 3 / 4; justify-content: flex-start; }
            .event-catalog-row > svg { grid-column: 4; grid-row: 1 / 3; }
            .event-video-grid,
            .video-library,
            .setting-book-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        }

        @media (max-width: 700px) {
            .archive-surface { padding-bottom: 36px; }
            .library-heading { min-height: 76px; margin-bottom: 18px; padding-bottom: 14px; }
            .library-heading h1 { font-size: 2rem; }
            .library-heading > strong { font-size: 1.15rem; }
            .library-controls { flex-wrap: wrap; }
            .ui-search { flex-basis: 100%; }
            .library-filters { flex-direction: column; padding: 12px; }
            .ui-filter-group { width: 100%; align-items: flex-start; }
            .ui-filter-group > span { width: 42px; padding-top: 8px; }
            .database-directory { grid-template-columns: 1fr; }
            .song-entity-detail,
            .album-entity-detail { display: block; }
            .song-entity-detail > .entity-hero,
            .album-entity-detail > .entity-hero {
                display: grid;
                min-height: 230px;
                grid-template-columns: 118px minmax(0, 1fr);
                gap: 20px;
                padding: 20px 16px;
            }
            .media-content { margin-top: 18px; }

            .event-catalog-row {
                grid-template-columns: 92px minmax(0, 1fr) 22px;
                grid-template-rows: auto auto auto;
                gap: 5px 13px;
                padding: 12px 9px;
            }
            .event-catalog-cover { grid-row: 1 / 4; width: 92px; }
            .event-catalog-row > time { grid-column: 2; grid-row: 1; }
            .event-catalog-row > time.event-date-range { flex-direction: row; gap: 6px; }
            .event-catalog-main { grid-column: 2; grid-row: 2; }
            .event-catalog-facts { grid-column: 2; grid-row: 3; justify-content: flex-start; }
            .event-catalog-row > svg { grid-column: 3; grid-row: 1 / 4; }
            .event-catalog-facts b { display: none; }

            .entity-hero {
                grid-template-columns: 118px minmax(0, 1fr);
                gap: 20px;
                min-height: 230px;
                padding: 20px 16px;
            }
            .entity-detail .entity-cover { width: 100%; border-width: 3px; box-shadow: 7px 8px 0 color-mix(in srgb, var(--entity-accent) 70%, transparent); }
            :is(.event-entity-detail,.character-entity-detail,.voice-entity-detail,.horse-entity-detail) .entity-intro h1 { font-size: clamp(1.35rem, 6vw, 2rem); }
            .entity-kind { margin-bottom: 7px; }
            .entity-reading { margin-top: 6px; font-size: 0.78rem; letter-spacing: 0.04em; }
            .entity-summary { display: none; }
            .entity-meta { grid-template-columns: 1fr; margin-top: 13px; }
            .entity-meta > div { grid-template-columns: 68px minmax(0, 1fr); }
            .entity-meta dt,
            .entity-meta dd { padding: 7px 8px; font-size: 0.75rem; }
            .entity-detail .entity-tabs button { min-height: 44px; padding: 9px 15px; }
            .entity-section { padding: 16px 13px; }
            .detail-meta { grid-template-columns: 1fr; }
            .detail-meta > div:nth-child(2) { border-top: 1px solid var(--surface-line); }
            .history-list > a,
            .history-years section > a { grid-template-columns: 86px minmax(0, 1fr); }
            .history-list em,
            .history-years em { grid-column: 2; }
            .ui-pager { align-items: flex-start; flex-direction: column; }
            .ui-pager > div { justify-content: flex-start; }
            #tab-characters .cio-list ul.cio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
            #tab-db-voice ul.va-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
        }

        @media (max-width: 480px) {
            .library-heading > strong { display: none; }
            .entity-tabs { gap: 6px; overflow-x: hidden; }
            .entity-tabs button {
                flex: 1 1 0;
                min-width: 0;
                padding: 9px 7px;
                font-size: 0.76rem;
                white-space: nowrap;
            }
            .entity-hero { grid-template-columns: 100px minmax(0, 1fr); gap: 15px; }
            .entity-hero::before { right: -22%; width: 68%; }
            .entity-hero .performer-chip-list { margin-top: 10px; }
            .event-video-grid,
            .video-library,
            .setting-book-list { grid-template-columns: 1fr; }
            #tab-characters .cio-list ul.cio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            #tab-db-voice ul.va-grid { grid-template-columns: 1fr; }
            .album-track-list > div { grid-template-columns: 38px minmax(0, 1fr) 38px; }
        }

        @media (prefers-reduced-motion: reduce) {
            .tab-content.active,
            .entity-intro { animation: none; }
            .archive-surface *,
            .archive-surface *::before,
            .archive-surface *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
        }


.audio-dock::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: url('/uma_tools/img/bg_blue.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') center / cover;
    opacity: .13;
    pointer-events: none;
}
.audio-dock::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: clamp(220px,30vw,520px);
    width: clamp(80px,10vw,150px);
    background: linear-gradient(118deg,transparent 0 42%,rgba(255,255,255,.08) 43% 70%,transparent 71%);
    pointer-events: none;
}
.audio-dock-inner {
    width: min(1480px,100%);
    height: 100%;
    margin: 0 auto;
    padding: 10px clamp(16px,2.5vw,40px);
    display: grid;
    grid-template-columns: 52px minmax(160px,1fr) auto minmax(180px,.72fr) minmax(170px,.42fr) 46px 34px;
    align-items: center;
    gap: clamp(8px,1.35vw,18px);
}
.audio-cover {
    position: relative;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 8px;
    background: #dfe5f6;
    box-shadow: 0 5px 14px rgba(20,35,105,.22);
}
.audio-cover::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 13px;
    height: 13px;
    background: var(--ui-orange);
    clip-path: polygon(100% 0,100% 100%,0 100%);
}
.audio-cover img { width: 100%; height: 100%; object-fit: cover; }
.audio-cover img.is-missing { opacity: 0; }
.audio-playing-bars { display: inline-flex; align-items: flex-end; justify-content: center; gap: 2px; }
.audio-cover > .audio-playing-bars {
    position: absolute;
    z-index: 2;
    right: 4px;
    bottom: 4px;
    width: 19px;
    height: 16px;
    padding: 3px;
    border-radius: 4px;
    background: rgba(21,29,63,.82);
}
.audio-playing-bars i { width: 2px; height: 8px; border-radius: 2px; background: #ffa932; transform-origin: bottom; animation: audioBars 680ms ease-in-out infinite alternate; }
.audio-playing-bars i:nth-child(2) { height: 11px; animation-delay: -260ms; }
.audio-playing-bars i:nth-child(3) { height: 6px; animation-delay: -480ms; }
.audio-dock-copy { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.audio-title-link { display: block; min-width: 0; max-width: 100%; padding: 0; border: 0; color: #fff; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.audio-title-link:disabled { cursor: default; }
.audio-title-link:not(:disabled):hover .audio-title { color: #ffd09b; }
.audio-title { display: inline-block; min-width: max-content; font-size: clamp(.82rem,1vw,.94rem); font-weight: 850; white-space: nowrap; transition: color 160ms ease; }
.audio-overflow-viewport { display: block; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; }
.audio-overflow-track { width: max-content; }
.audio-overflow-viewport.is-overflowing .audio-overflow-track { animation: audioMarquee var(--marquee-duration,18s) linear infinite alternate; }
.audio-artist-viewport { color: rgba(255,255,255,.78); }
.audio-dock-vocalists { display: flex; min-width: max-content; gap: 0; color: rgba(255,255,255,.78); white-space: nowrap; }
.audio-dock-vocalists button,
.audio-dock-vocalists > span { flex: 0 0 auto; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-size: .75rem; }
.audio-dock-vocalists button { text-underline-offset: 3px; cursor: pointer; transition: color 160ms ease,transform 220ms var(--ui-ease); }
.audio-dock-vocalists > :not(:last-child)::after { content: ' / '; color: rgba(255,255,255,.38); white-space: pre; }
.audio-dock-vocalists button:hover { color: #ffd09b; text-decoration: none; transform: translateY(-1px); }
.audio-dock-artist { display: inline-block; color: rgba(255,255,255,.78); font-size: .75rem; white-space: nowrap; }
.audio-dock-controls { display: flex; align-items: center; justify-content: center; gap: 2px; }
.audio-control,
.audio-icon-btn,
.audio-queue-toggle,
.audio-dismiss,
.audio-queue-remove {
    display: inline-grid;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    place-items: center;
    cursor: pointer;
    transition: color 160ms ease,background 160ms ease,transform 260ms var(--ui-ease),box-shadow 180ms ease;
}
.audio-control { width: 40px; height: 40px; border-radius: 50%; color: rgba(255,255,255,.78); }
.audio-control:disabled { opacity: .38; pointer-events: none; }
.audio-control svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.audio-control svg.audio-solid { fill: currentColor; stroke: none; }
.audio-control-primary {
    width: 50px;
    height: 50px;
    margin-inline: 2px;
    color: #fff;
    background: var(--ui-orange);
    box-shadow: 0 7px 18px rgba(126,51,0,.28);
}
.audio-control-primary svg { width: 21px; height: 21px; fill: currentColor; stroke: none; }
.audio-control:hover,
.audio-queue-toggle:hover,
.audio-dismiss:hover { color: #fff; background: rgba(255,255,255,.13); transform: translateY(-2px); }
.audio-control-primary:hover { background: #ffa932; box-shadow: 0 10px 22px rgba(112,43,0,.34); transform: translateY(-2px) scale(1.04); }
.audio-control:active,
.audio-queue-toggle:active,
.audio-dismiss:active { transform: translateY(0) scale(.93); }
.audio-control:focus-visible,
.audio-queue-toggle:focus-visible,
.audio-dismiss:focus-visible,
.audio-dock-vocalists button:focus-visible { outline: 2px solid #ffd19a; outline-offset: 2px; }
.audio-arc-loader { display: grid; width: 24px; height: 24px; place-items: center; }
.audio-arc-loader svg { width: 23px; height: 23px; overflow: visible; fill: none; transform: rotate(-90deg); }
.audio-arc-loader circle { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.audio-arc-loader circle:first-child { stroke: rgba(255,255,255,.36); }
.audio-arc-loader circle:last-child { stroke: #fff; stroke-dasharray: 18 34; animation: audioArc 820ms linear infinite; }
.audio-dock-progress { display: grid; min-width: 0; grid-template-columns: 36px minmax(90px,1fr) 36px; align-items: center; gap: 7px; color: rgba(255,255,255,.72); font-size: .75rem; font-variant-numeric: tabular-nums; }
.audio-dock-progress > span:last-child { text-align: right; }
.audio-dock-progress input {
    width: 100%;
    height: 24px;
    margin: 0;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    touch-action: pan-y;
}
.audio-dock-progress input::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg,#ff7b16 0 var(--audio-played),#9bb0f5 var(--audio-played) var(--audio-buffered),rgba(255,255,255,.25) var(--audio-buffered));
}
.audio-dock-progress input::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg,#ff7b16 0 var(--audio-played),#9bb0f5 var(--audio-played) var(--audio-buffered),rgba(255,255,255,.25) var(--audio-buffered));
}
.audio-dock-progress input::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--ui-orange);
    box-shadow: 0 2px 7px rgba(21,29,63,.35);
    appearance: none;
    -webkit-appearance: none;
    transition: transform 160ms ease,box-shadow 160ms ease;
}
.audio-dock-progress input::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--ui-orange); box-shadow: 0 2px 7px rgba(21,29,63,.35); }
.audio-dock-progress input:hover::-webkit-slider-thumb,
.audio-dock-progress input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(245,130,32,.22); transform: scale(1.16); }
.audio-dock-progress input:focus-visible { outline: 2px solid #ffd19a; outline-offset: 1px; }
.audio-output-controls { display: flex; min-width: 0; align-items: center; gap: 8px; }
.audio-quality.ui-select-control {
    flex: 0 0 auto;
    width: max-content;
    min-width: 76px;
    min-height: 0;
    border-color: rgba(255,255,255,.5);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}
.audio-quality.ui-select-control:hover,
.audio-quality.ui-select-control.open { background: rgba(255,255,255,.18); }
.audio-quality .ui-select-trigger {
    height: 36px;
    gap: 3px;
    padding: 0 7px 0 9px;
    color: #fff;
    font-size: .76rem;
}
.audio-quality .ui-select-trigger > svg { width: 13px; height: 13px; stroke: currentColor; }
.audio-quality .ui-select-trigger > span { flex: none; }
.audio-quality .ui-select-menu { right: -1px; left: auto; width: 228px; }
.audio-quality-option {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.audio-quality-name { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.audio-quality-code,
.audio-quality-current {
    flex: none;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
}
.audio-quality-code { color: var(--ui-cobalt-deep); background: #e9efff; }
.audio-quality-current { color: #813800; background: #ffead6; }
.audio-quality .selected :is(.audio-quality-code,.audio-quality-current) { color: #fff; background: rgba(255,255,255,.22); }
.audio-volume { display: flex; flex: 1; min-width: 0; align-items: center; gap: 3px; }
.audio-volume .audio-control { flex: none; width: 34px; height: 34px; }
.audio-volume input { width: 100%; min-width: 46px; height: 24px; margin: 0; background: transparent; accent-color: var(--ui-orange); cursor: pointer; }
.audio-queue-toggle { position: relative; width: 44px; height: 44px; border-radius: 50%; color: rgba(255,255,255,.84); }
.audio-queue-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.audio-queue-toggle em {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid var(--ui-cobalt-deep);
    border-radius: 9px;
    color: var(--ui-navy);
    background: #fff;
    font-size: .7rem;
    font-style: normal;
    font-weight: 850;
    line-height: 14px;
}
.audio-queue-toggle.active { color: #fff; background: rgba(245,130,32,.28); }
.audio-dismiss { width: 32px; height: 32px; border-radius: 50%; color: rgba(255,255,255,.58); }
.audio-dismiss svg,
.audio-icon-btn svg,
.audio-queue-remove svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.audio-live-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.audio-error {
    position: absolute;
    right: clamp(14px,3vw,42px);
    bottom: calc(100% + 10px);
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 12px;
    max-width: min(420px,calc(100vw - 28px));
    padding: 8px 9px 8px 14px;
    border: 1px solid #efb5b5;
    border-radius: 10px;
    color: #842a2a;
    background: #fff7f7;
    box-shadow: 0 8px 24px rgba(69,25,25,.16);
    font-size: .73rem;
}
.audio-error span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-error button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 14px; color: #fff; background: #a93636; font: inherit; font-weight: 800; cursor: pointer; }

.audio-panel {
    position: fixed;
    z-index: 1090;
    right: max(14px,env(safe-area-inset-right));
    bottom: calc(var(--audio-dock-height) + var(--audio-safe-bottom) + 10px);
    display: grid;
    width: min(400px,calc(100vw - 28px));
    max-height: min(360px,calc(100dvh - var(--audio-dock-height) - var(--audio-safe-bottom) - 28px));
    grid-template-rows: auto minmax(0,1fr);
    overflow: hidden;
    border: 1px solid #d8def0;
    border-radius: 14px;
    color: var(--ui-navy);
    background: #fff url('/uma_tools/img/bg_texture_white.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') center / cover;
    box-shadow: 0 18px 46px rgba(18,31,79,.24);
    animation: audioPanelIn 200ms cubic-bezier(.19,1,.22,1) both;
}
.audio-panel-head {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 9px 17px;
    border-bottom: 1px solid var(--ui-line);
}
.audio-panel-head h2 { font-size: .96rem; font-weight: 900; }
.audio-panel-head h2 { margin-right: auto; }
.audio-panel-head h2 em { margin-left: 5px; color: #667397; font-size: .75rem; font-style: normal; }
.audio-preview { margin-left: .4em; color: #ffcc98; font-size: .72rem; }
.audio-panel-clear { min-height: 34px; margin-right: 4px; padding: 0 10px; border: 0; border-radius: 17px; color: #536080; background: transparent; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
.audio-panel-clear:hover { color: var(--ui-orange-deep); background: #fff0e2; }
.audio-panel-clear:disabled { opacity: .4; cursor: default; }
.audio-icon-btn { width: 34px; height: 34px; border-radius: 50%; color: #657095; }
.audio-icon-btn:hover { color: var(--ui-cobalt-deep); background: #edf1ff; transform: rotate(8deg); }
.audio-queue { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #a6b2db #eef1f8; scrollbar-width: thin; }
.audio-queue-row {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 56px;
    grid-template-columns: 34px 42px minmax(0,1fr) 34px;
    align-items: center;
    border-bottom: 1px solid #e5e8f2;
    background: rgba(255,255,255,.78);
    transition: background 150ms ease,transform 220ms var(--ui-ease);
}
.audio-queue-row:last-child { border-bottom: 0; }
.audio-queue-row:hover { background: #f3f6ff; }
.audio-queue-row.active { background: linear-gradient(90deg,#fff4e8,#fffaf5 72%); }
.audio-queue-row.dragging { z-index: 2; background: #edf2ff; box-shadow: 0 7px 20px rgba(34,61,146,.2); transform: scale(.99); }
.audio-queue-drag { display: grid; width: 34px; height: 44px; padding: 0; border: 0; color: #9099b2; background: transparent; place-items: center; cursor: grab; touch-action: none; }
.audio-queue-drag:active { cursor: grabbing; }
.audio-queue-drag svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.audio-queue-play {
    display: grid;
    min-height: 56px;
    grid-template-columns: 24px 18px;
    align-items: center;
    gap: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}
.audio-queue-play:focus-visible,.audio-queue-copy:focus-visible { outline: 2px solid var(--ui-cobalt); outline-offset: -3px; }
.audio-queue-number { color: #7a849e; font-size: .75rem; font-weight: 750; font-variant-numeric: tabular-nums; text-align: center; }
.audio-queue-row.active .audio-queue-number { color: var(--ui-orange-deep); }
.audio-queue-copy { min-width: 0; padding: 7px 8px; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.audio-queue-copy:disabled { cursor: default; }
.audio-queue-copy b,
.audio-queue-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-queue-copy b { color: var(--ui-navy); font-size: .8rem; font-weight: 850; }
.audio-queue-copy small { margin-top: 2px; color: #687188; font-size: .75rem; }
.audio-queue-play > .audio-playing-bars { width: 18px; height: 16px; }
.audio-queue-remove { width: 30px; height: 30px; border-radius: 50%; color: #9199ad; opacity: 0; }
.audio-queue-row:hover .audio-queue-remove,
.audio-queue-remove:focus-visible { opacity: 1; }
.audio-queue-remove:hover { color: #a93636; background: #fff0f0; transform: scale(1.06); }
.audio-queue-remove:focus-visible { outline: 2px solid var(--ui-cobalt); outline-offset: 1px; }

@keyframes audioDockIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes audioPanelIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes audioBars { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes audioArc { to { stroke-dashoffset: -52; } }
@keyframes audioMarquee { 0%,12% { transform: translateX(0); } 88%,100% { transform: translateX(calc(-1 * var(--overflow-distance))); } }

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #ccd2e2;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: var(--ui-cobalt-deep);
    box-shadow: 0 5px 16px rgba(20,29,63,.12);
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.audio-dock-active .context-back,
.audio-dock-active .back-to-top { bottom: calc(var(--audio-dock-height) + var(--audio-safe-bottom) + 10px); }
.back-to-top svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.back-to-top:hover { border-color: var(--ui-orange); color: var(--ui-orange-deep); }

/* Footer layout and its responsive variants share one owner. */
.home-layout + .site-footer { margin-top: 0; }
.site-footer {
    margin-top: 40px; padding: 40px 20px 28px; border-top: 1px solid rgba(255,255,255,.14);
    background: #3157ed url('/uma_tools/img/bg_blue.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') left top / 100vw auto repeat-y;
    color: rgba(255,255,255,.85);
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-main { display: grid; grid-template-columns: minmax(220px,1fr) auto minmax(270px,.8fr); gap: 54px; align-items: start; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.footer-brand-name { font-size: 1.18em; font-weight: 800; letter-spacing: .12em; line-height: 1.15; color: #fff; }
.footer-brand-sub { font-size: .75rem; font-weight: 700; letter-spacing: .18em; color: #f5f7ff; }
.footer-brand p { max-width: 320px; margin-top: 15px; color: #f5f7ff; font-size: .8rem; line-height: 1.7; }
.footer-cols { display: grid; grid-template-columns: repeat(2,150px); gap: 26px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col-title { font-size: .82em; font-weight: 700; color: rgba(255,255,255,.95); letter-spacing: .06em; margin-bottom: 4px; }
.footer-link { font-size: .86em; color: #f5f7ff; text-decoration: none; transition: color .15s; }
.footer-link:hover { color: var(--brand); }
.footer-community > span { display: block; margin-bottom: 8px; color: #f5f7ff; font-size: .76rem; font-weight: 700; }
.footer-community a {
    display: grid; grid-template-columns: minmax(0,1fr) 22px; gap: 4px 14px; padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.26); border-radius: 12px; background: rgba(255,255,255,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12); color: #fff; text-decoration: none;
    transition: background 200ms ease,border-color 200ms ease,box-shadow 200ms ease,transform 200ms ease;
}
.footer-community a:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); box-shadow: 0 12px 26px rgba(8,16,42,.28); transform: translateY(-2px); }
.footer-community b { font-size: .94rem; }
.footer-community-note { grid-column: 1; color: #f5f7ff; font-size: .78rem; line-height: 1.5; }
.footer-community svg { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 20px; fill: none; stroke: var(--ui-orange); stroke-width: 2.3; transition: transform 240ms var(--ui-ease); }
.footer-community a:hover svg { transform: translateX(5px); }
.footer-copy { margin-top: 14px; font-size: .76em; color: #f5f7ff; letter-spacing: .02em; }
@media (max-width:980px) {
    .footer-main { grid-template-columns: 1fr 1fr; gap: 34px; }
    .footer-community { grid-column: 1 / -1; }
}
@media (max-width:700px) {
    .footer-main { grid-template-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); }
    .footer-community { grid-column: auto; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width:480px) { .footer-cols { grid-template-columns: 1fr; } }



.event-video { position: relative; border: 1px solid #d8ddeb; background: #111; box-shadow: 0 6px 16px rgba(29,42,88,.1); transition: transform 280ms var(--ui-ease),box-shadow 180ms ease,border-color 180ms ease; }
.event-video:hover { border-color: var(--ui-orange); box-shadow: 0 12px 24px rgba(29,42,88,.16); transform: translateY(-3px); }
.event-video > a { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; color: #fff; text-decoration: none; }
.event-video > a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(13,20,46,.05) 30%,rgba(13,20,46,.88)); }
.event-video > a img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 520ms var(--ui-ease); }
.event-video:hover > a img { transform: scale(1.045); }
.event-video-platform,
.event-video-label,
.event-video > a svg { position: absolute; z-index: 2; }
.event-video-platform { top: 12px; left: 12px; padding: 4px 9px; border-radius: 3px; background: #fb7299; font-size: .75rem; font-weight: 900; letter-spacing: .04em; }
.event-video-external .event-video-platform { background: var(--ui-cobalt); }
.event-video-label { right: 44px; bottom: 13px; left: 13px; font-size: .86rem; font-weight: 850; line-height: 1.4; }
.event-video > a svg { right: 13px; bottom: 14px; width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.3; transition: transform 220ms var(--ui-ease); }
.event-video:hover > a svg { transform: translateX(4px); }

#tab-characters .cio-card { padding: 0 7px 7px 0; background: var(--color-sub); }
#tab-characters .cio-card dl { height: 100%; }
.fix-row > .ui-select-control { width: 100%; max-width: 360px; }
.fix-check input {
    appearance: none;
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 2px;
    border: 1px solid #aab2c8;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.fix-check input:checked { border-color: var(--ui-cobalt); background: var(--ui-cobalt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-8' fill='none' stroke='white' stroke-width='2.5'/%3E%3C/svg%3E") center/14px no-repeat; }

@media (max-width: 980px) {
    .sub-brand { flex-basis: clamp(190px,25vw,240px); padding-inline: 20px; font-size: 1rem; }
    .site-nav-sub .site-nav-item { min-width: 102px; }
    .site-nav-sub .site-nav-trigger { padding-inline: 8px; font-size: .875rem; gap: 5px; }
}

/* Keep the tablet header compact and horizontal until the mobile navigation
   takes over at the content-driven breakpoint below. */
@media (min-width: 701px) and (max-width: 768px) {
    .sub-header { flex-direction: row; flex-wrap: nowrap; }
    .sub-brand { flex: 0 0 190px; width: auto; min-width: 190px; }
    .site-nav-sub .site-nav-item { min-width: 0; }
    .site-nav-sub .site-nav-trigger { padding-inline: 8px; font-size: .82rem; }
}

@media (min-width: 701px) and (max-width: 1100px) {
    .audio-dock-inner {
        padding-inline: 16px;
        grid-template-columns: 48px minmax(102px,1fr) auto minmax(130px,.7fr) 156px 42px 30px;
        gap: 7px;
    }
    .audio-cover { width: 48px; height: 48px; }
    .audio-control { width: 38px; height: 38px; }
    .audio-control-primary { width: 48px; height: 48px; }
    .audio-dock-progress { grid-template-columns: 34px minmax(44px,1fr) 34px; gap: 5px; }
    .audio-output-controls { gap: 4px; }
    .audio-volume input { min-width: 36px; }
    .audio-queue-toggle { width: 42px; height: 42px; }
}

@media (min-width: 701px) and (max-width: 840px) {
    .audio-dock-inner {
        padding-inline: 12px;
        grid-template-columns: 48px minmax(66px,1fr) auto minmax(90px,.7fr) 156px 42px 30px;
        gap: 4px;
    }
    .audio-control { width: 32px; }
    .audio-control-primary { width: 46px; }
    .audio-dock-progress { grid-template-columns: 29px minmax(20px,1fr) 29px; }
}

@media (max-width: 700px) {
    body { background-attachment: scroll; }
    .sub-header { display: block; padding-top: env(safe-area-inset-top); }
    .sub-brand { width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid rgba(255,255,255,.25); transform: none; }
    .sub-brand > span { transform: none; }
    .site-nav-sub { display: grid; width: 100%; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: visible; }
    .site-nav-sub .site-nav-item,
    .site-nav-sub .site-nav-item.active { min-width: 0; transform: none; box-shadow: none; }
    .site-nav-sub .site-nav-trigger { min-height: 48px; gap: 3px; padding-inline: 5px; font-size: .8rem; white-space: nowrap; }
    .site-nav-sub .site-nav-item.active .site-nav-trigger { min-height: 48px; }
    .site-nav-sub .site-nav-trigger > * { transform: none; }
    .site-nav-sub .site-nav-item.open > .site-nav-trigger > .site-nav-chevron { transform: rotate(180deg); }
    .site-nav-sub .site-nav-menu { position: absolute; top: 100%; right: 10px; left: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); transform: translateY(-8px); }
    .site-nav-sub .site-nav-item { position: static; }
    .site-nav-sub .site-nav-item.open > .site-nav-menu { transform: translateY(0); }
    .site-nav-icon { width: 17px; height: 17px; }
    .container { padding: 18px max(12px,env(safe-area-inset-right)) calc(34px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
    .route-breadcrumb { margin-bottom: 12px; }
    .info-page { padding-bottom: 34px; }
    .fix-chips { display: block; }
    .fix-chips > div { display: flex; flex-wrap: wrap; overflow: visible; }
    .contact-row { grid-template-columns: 1fr; gap: 3px; }
    .contact-v a, .legal-text a { margin: 0 12px 4px 0; }
    .context-back { left: 12px; }
    .archive-toolbar { align-items: stretch; }
    .ui-search { flex-basis: 100%; }
    .ui-select-control,
    .ui-select-control.ui-select-wide { flex: 1 1 155px; min-width: 0; }

    .ui-filter-group { width: 100%; align-items: flex-start; }
    .ui-filter-group > span { width: 40px; padding-top: 8px; }
    .catalog-play { grid-column: 3; }
    .performer-chip img,
    .perf-item img { width: 31px; height: 31px; }
    .event-entity-detail > .entity-hero,
    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero { grid-template-columns: 112px minmax(0,1fr); gap: 18px; min-height: 0; padding: 20px 16px; }
    .event-entity-detail .entity-meta { grid-template-columns: 1fr; }
    .relation-song-detail { padding-left: 12px; padding-right: 6px; }
    .relation-release { grid-template-columns: minmax(0,1fr) auto; }
    .relation-release .album-inline { grid-column: 1 / -1; }
    .relation-release .performer-chip-list { grid-column: 1; }
    .relation-release > .entity-actions { grid-column: 2; grid-row: 2; align-self: start; }
    :root { --audio-dock-height: 98px; }
    body.audio-dock-active .home-layout { height: auto; min-height: calc(100vh - var(--audio-dock-height) - var(--audio-safe-bottom)); }
    .audio-dock-inner {
        position: relative;
        padding: 9px max(10px,env(safe-area-inset-right)) 5px max(10px,env(safe-area-inset-left));
        grid-template-columns: 42px minmax(0,1fr) 34px;
        grid-template-rows: 43px 40px;
        column-gap: 9px;
        row-gap: 1px;
    }
    .audio-cover { grid-column: 1; grid-row: 1; width: 42px; height: 42px; }
    .audio-cover > .audio-playing-bars { right: 2px; bottom: 2px; transform: scale(.82); transform-origin: right bottom; }
    .audio-dock-copy { grid-column: 2; grid-row: 1; padding-right: 115px; }
    .audio-title { font-size: .78rem; }
    .audio-dock-vocalists,
    .audio-dock-artist { font-size: .75rem; }
    .audio-dock-controls { grid-column: 1 / 3; grid-row: 2; gap: 3px; justify-self: center; }
    .audio-control { width: 37px; height: 37px; }
    .audio-control-primary { width: 44px; height: 44px; margin-inline: 1px; }
    .audio-dock-progress {
        position: absolute;
        top: -10px;
        right: max(8px,env(safe-area-inset-right));
        left: max(8px,env(safe-area-inset-left));
        display: grid;
        height: 20px;
        grid-template-columns: 0 minmax(0,1fr) 0;
        gap: 0;
    }
    .audio-dock-progress > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .audio-dock-progress input { height: 20px; }
    .audio-output-controls { position: absolute; top: 9px; right: calc(max(10px,env(safe-area-inset-right)) + 33px); gap: 4px; }
    .audio-quality .ui-select-trigger { height: 41px; }
    .audio-volume input { display: none; }
    .audio-volume .audio-control { width: 32px; height: 32px; }
    .audio-queue-toggle { grid-column: 3; grid-row: 2; width: 38px; height: 38px; justify-self: end; }
    .audio-queue-toggle em { top: -2px; right: -3px; min-width: 17px; height: 17px; border-color: var(--ui-cobalt-deep); line-height: 13px; }
    .audio-dismiss { grid-column: 3; grid-row: 1; justify-self: end; }
    .audio-panel {
        right: 8px;
        bottom: calc(var(--audio-dock-height) + var(--audio-safe-bottom) + 8px);
        left: 8px;
        width: auto;
        max-height: min(45dvh,360px);
        border-radius: 13px;
    }
    .audio-panel-head { min-height: 50px; padding: 8px 9px 8px 15px; }
    .audio-queue-row,
    .audio-queue-play { min-height: 54px; }
    .audio-queue-remove { opacity: 1; }
    .audio-error { right: 10px; bottom: calc(100% + 8px); max-width: calc(100vw - 20px); }
}

@media (max-width: 480px) {
    .home-nav { flex-basis: auto; width: 100%; }
    .home-brand { left: 0; width: auto; max-width: 100%; padding-inline: 12px; }
    .home-brand .hl-zh { font-size: 1.45rem; }
    .site-nav-home .site-nav-trigger { padding-inline: 18px; }
    .site-nav-home .site-nav-menu button { padding-left: 30px; }
    .route-breadcrumb { font-size: .75rem; }
    .context-back { width: 40px; height: 40px; }
    .site-nav-sub .site-nav-trigger { flex-direction: column; gap: 1px; font-size: .75rem; }
    .site-nav-sub .site-nav-chevron { display: none; }
    .event-entity-detail > .entity-hero,
    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero { grid-template-columns: 88px minmax(0,1fr); gap: 15px; padding: 16px 13px; }
    .event-entity-detail .entity-intro h1,
    .character-entity-detail .entity-intro h1,
    .voice-entity-detail .entity-intro h1 { font-size: 1.28rem; }
    .event-entity-detail .entity-meta { display: none; }
}

@media (max-height: 560px) and (max-width: 900px) {
    .audio-panel { max-height: min(50dvh,300px); }
}

@media (prefers-reduced-motion: reduce) {
    .audio-overflow-viewport.is-overflowing .audio-overflow-track {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        animation: none !important;
    }
    .site-nav-menu,
    .site-nav-menu button::before,
    .context-back,
    .event-catalog-row,
    .performer-chip img,
    .audio-dock *,
    .audio-panel,
    .audio-queue-row { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* The skewed desktop navigation intentionally paints past its own boxes. Clip
   that horizontal paint without hiding the dropdowns below the header. */
@media (min-width: 701px) {
    .sub-header { overflow-x: clip; overflow-y: visible; }
}

.news-row,
#tab-db-voice .va-grid > li {
    content-visibility: auto;
    contain-intrinsic-size: auto 92px;
}



@keyframes archiveShimmer {
    to { background-position-x: -220%; }
}
.archive-row-skeleton {
    display: grid;
    grid-template-columns: 88px minmax(120px, .45fr) minmax(180px, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 88px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--ui-line);
}
.archive-row-skeleton > span,
.archive-card-skeleton > span,
.archive-card-skeletons > span {
    border-radius: 4px;
    background: linear-gradient(100deg,#eef1f7 18%,#fff 38%,#eef1f7 58%);
    background-size: 220% 100%;
    animation: archiveShimmer 1.15s ease-in-out infinite;
}
.archive-row-skeleton > span:first-child { height: 58px; }
.archive-row-skeleton > span:nth-child(2) { height: 14px; }
.archive-row-skeleton > span:last-child { height: 34px; }
.archive-card-skeletons {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
    gap: 12px;
}
.archive-card-skeletons > span { display: block; min-height: 104px; }
.archive-card-skeleton { display: grid; gap: 12px; padding-bottom: 12px; }
.archive-card-skeleton > span:first-child { aspect-ratio: 1; }
.archive-card-skeleton > span:last-child { width: 72%; height: 18px; }

.event-video-launch {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #111;
    color: #fff;
    text-align: left;
    cursor: pointer;
}
.event-video-launch::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,rgba(13,20,46,.04) 28%,rgba(13,20,46,.88));
}
.event-video-launch > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 520ms var(--ui-ease); }
.event-video:hover .event-video-launch > img { transform: scale(1.045); }
.event-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 2px solid rgba(255,255,255,.92);
    border-radius: 50%;
    background: rgba(30,48,120,.68);
    transform: translate(-50%,-50%);
    transition: transform 260ms var(--ui-ease),background 160ms ease;
}
.event-video:hover .event-video-play { background: var(--ui-orange); transform: translate(-50%,-50%) scale(.92); }
.event-video-play svg { width: 23px; height: 23px; fill: currentColor; }

@media (max-width: 700px) {
    .news-hero-grid {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        grid-auto-columns: auto;
        justify-content: stretch;
        overflow: visible;
        padding: 2px 2px 12px;
    }
    .site-nav-trigger,
    .site-nav-menu button,
    .ui-filter-group button,
    .ui-pager button,
    .entity-action { touch-action: manipulation; }

    .ui-filter-group { display: grid; grid-template-columns: 42px minmax(0,1fr); }
    .ui-filter-group > div {
        display: flex;
        max-width: 100%;
        flex-wrap: wrap;
        gap: 7px;
        overflow: visible;
        padding: 0 2px 5px;
    }
    .ui-filter-group button { flex: 0 1 auto; min-height: 40px; border-radius: 20px; white-space: normal; }
    .album-database-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .archive-row-skeleton { grid-template-columns: 70px minmax(0,1fr); min-height: 78px; gap: 12px; padding-inline: 9px; }
    .archive-row-skeleton > span:first-child { grid-row: 1 / 3; height: 54px; }
    .archive-row-skeleton > span:last-child { height: 22px; }
    .entity-tabs { flex-wrap: wrap; overflow: visible; }
    .entity-tabs button { flex: 1 1 calc(50% - 4px); min-width: 0; white-space: nowrap; }
    .entity-section { overflow-x: visible; }
    .song-version-list .data-table,
    .song-version-list .data-table tbody,
    .song-version-list .data-table tr,
    .song-version-list .data-table td,
    .song-entity-detail .entity-section > .data-table,
    .song-entity-detail .entity-section > .data-table tbody,
    .song-entity-detail .entity-section > .data-table tr,
    .song-entity-detail .entity-section > .data-table td { display: block; min-width: 0; width: 100%; }
    .song-version-list .data-table thead,
    .song-entity-detail .entity-section > .data-table thead { display: none; }
    .song-version-list .data-table tr,
    .song-entity-detail .entity-section > .data-table tr { padding: 10px 0; border-bottom: 1px solid var(--ui-line); }
    .song-version-list .data-table td,
    .song-entity-detail .entity-section > .data-table td {
        display: grid;
        grid-template-columns: 76px minmax(0,1fr);
        gap: 10px;
        align-items: start;
        padding: 7px 2px;
        border: 0;
    }
    .song-version-list .data-table td::before,
    .song-entity-detail .entity-section > .data-table td::before {
        content: attr(data-label);
        color: #69738c;
        font-size: .74rem;
        font-weight: 800;
    }
    .song-version-list .data-table td:hover,
    .song-entity-detail .entity-section > .data-table td:hover { background: transparent; }
    .song-performance-cast {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px 10px;
    }
    .song-performance-cast .performer-chip {
        min-width: 0;
        margin: 0;
        white-space: normal;
        text-align: left;
    }
    .song-performance-cast .guest-performer { min-width: 0; margin: 0; white-space: normal; overflow-wrap: anywhere; }
    .song-performance-cast .performer-chip span {
        min-width: 0;
        overflow-wrap: anywhere;
        line-height: 1.25;
    }
    .song-credit-version { grid-template-columns: minmax(0,1fr); gap: 13px; padding-block: 15px; }
    .song-credit-version dl { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; }
    .lyrics-toolbar { align-items: stretch; flex-direction: column; }
    .lyrics-sheet { padding: 20px 0 28px; }
    .lyrics-sheet li { padding-right: 2px; font-size: .86rem; }
}

@media (max-width: 480px) {
    .archive-toolbar { gap: 8px; }
    .archive-toolbar > .ui-select-control,
    .archive-toolbar > .ui-select-control.ui-select-wide { width: 100%; flex: 1 1 100%; }
    .ui-select-menu { max-height: min(286px,52vh); }
    .event-catalog-row { grid-template-columns: 76px minmax(0,1fr) 18px; gap: 4px 10px; }
    .event-catalog-cover { width: 76px; }
    .event-catalog-main b { font-size: .88rem; }
    .event-catalog-row > time,
    .event-catalog-main > span { font-size: .75rem; }
    .catalog-play { width: 36px; height: 36px; }
    .entity-section { padding-inline: 11px; }
    .entity-tabs { justify-content: flex-start; flex-wrap: wrap; overflow: visible; }
    .entity-tabs button { flex: 1 1 calc(50% - 4px); min-width: 0; padding-inline: 8px; white-space: nowrap; }
    .anime-entity-detail .entity-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .character-entity-detail .entity-tabs,
    .voice-entity-detail .entity-tabs,
    .song-entity-detail .entity-tabs { overflow: visible; }
    .character-entity-detail .entity-tabs button,
    .voice-entity-detail .entity-tabs button,
    .song-entity-detail .entity-tabs button {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 5px;
        font-size: .72rem;
    }
    .creator-toolbar .filter-pill-group { width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
    .creator-toolbar .filter-pill { min-width: 0; padding-inline: 5px; }
    .song-credit-version dl { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 360px) {
    .song-performance-cast { grid-template-columns: minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .archive-row-skeleton > span,
    .archive-card-skeleton > span,
    .archive-card-skeletons > span { animation: none; }
}

/* ===== HORSE (PROTOTYPE REAL-HORSE) DATABASE ===== */
.horse-db-note { margin: 0 0 10px; color: #687086; font-size: .8rem; font-weight: 600; }
.horse-list { display: flex; flex-direction: column; border-top: 1px solid var(--ui-line); }
.horse-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ui-line);
    color: inherit;
    text-decoration: none;
}


.horse-row:hover { background: color-mix(in srgb,var(--ui-brown, #8c83ff) 5%, #fff); }
.horse-thumb {
    position: relative;
    display: block;
    width: 84px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 4px;
    background: #e8ebf5;
    box-shadow: 0 2px 8px rgba(22, 40, 92, .14);
}
.horse-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.horse-thumb i {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--ui-cobalt-deep);
    font-size: 1.5rem;
    font-weight: 900;
    font-style: normal;
}
.horse-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.horse-row-main b { color: var(--ui-navy); font-size: 1rem; font-weight: 900; }
.horse-row-ja { color: #687086; font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.horse-row-meta { color: #8a90a0; font-size: .74rem; font-weight: 600; overflow-wrap: anywhere; }
.horse-row-go { color: var(--ui-cobalt-deep); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.horse-row-go em { font-style: normal; }
.horse-entity-detail > .entity-hero {
    isolation: isolate;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: clamp(22px, 4vw, 48px);
    min-height: 212px;
    padding: 26px clamp(24px, 4vw, 46px);
    border: 1px solid color-mix(in srgb,var(--entity-accent) 28%, #dfe3ee);
    border-radius: 7px;
    background: #fff;
    color: var(--ui-navy);
}
.horse-entity-detail > .entity-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    background:
        linear-gradient(154deg, var(--entity-accent) 0 29%, transparent 29.2%),
        linear-gradient(154deg, var(--entity-sub) 0 38%, transparent 38.2%);
}
.horse-entity-detail > .entity-hero::after {
    content: '';
    position: absolute;
    right: -3%;
    bottom: -30%;
    z-index: -1;
    width: 32%;
    aspect-ratio: 1;
    border: 24px solid color-mix(in srgb,var(--entity-accent) 9%, transparent);
    transform: rotate(22deg);
}
.horse-entity-detail .entity-cover {
    width: 100%;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 7px 8px 0 var(--entity-sub), 0 10px 24px rgba(22, 40, 92, .16);
}
.horse-entity-detail .horse-cover { max-width: 200px; aspect-ratio: 4 / 3; background: #eef1f7; }
.horse-entity-detail .horse-cover img { object-position: center; }
.horse-entity-detail .entity-kind { background: var(--entity-accent); color: #fff; }
.horse-entity-detail .entity-intro h1 { color: var(--ui-navy); font-size: clamp(1.55rem, 3.2vw, 2.55rem); }
.horse-entity-detail .entity-reading { color: #66708a; }
.horse-entity-detail .entity-meta { margin-top: 15px; }
.horse-entity-detail .entity-meta > div { border-color: #dfe3ee; }
.horse-entity-detail .entity-meta dt { color: #69738c; }
.horse-entity-detail .entity-meta dd { color: var(--ui-navy); }
.horse-entity-detail .entity-tabs button.active { color: var(--entity-accent); box-shadow: inset 0 -3px 0 var(--entity-sub); }
.horse-badge-line { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; }
.horse-badge {
    padding: 3px 10px;
    border: 1px solid color-mix(in srgb, var(--entity-accent) 30%, #dfe3ee);
    border-radius: 999px;
    background: #f5f7fd;
    color: #46506b;
    font-size: .76rem;
    font-weight: 750;
}
.horse-badge-death { border-color: rgba(185, 76, 0, .28); background: #fdf3ec; color: #8a4a28; }
.horse-wins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.horse-win-medal {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .02em;
}
.horse-win-g1 { background: linear-gradient(105deg, #a84515, #e08a3c); color: #fff; }
.horse-win-g2 { background: linear-gradient(105deg, #23439c, #4d6fd8); color: #fff; }
.horse-win-g3 { background: linear-gradient(105deg, #2e7d46, #5aa976); color: #fff; }
.horse-paragraph { margin: 0 0 10px; color: var(--ui-navy); font-size: .92rem; line-height: 1.85; overflow-wrap: anywhere; }
.horse-table-wrap { overflow-x: auto; }
.horse-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .8rem;
}
.horse-table th,
.horse-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--ui-line);
    text-align: left;
    white-space: nowrap;
}
.horse-table thead th {
    color: #69738c;
    font-size: .76rem;
    font-weight: 800;
    background: #f1f4fc;
}
.horse-table tbody tr:hover { background: #f7f9fd; }
.horse-table tbody tr.sum td { font-weight: 850; color: var(--ui-cobalt-deep); background: #eef3ff; }
.horse-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.horse-table td.beaten { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: #687086; }
.horse-grade {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 850;
}
.horse-grade-g1 { background: linear-gradient(105deg, #a84515, #e08a3c); color: #fff; }
.horse-grade-g2 { background: linear-gradient(105deg, #23439c, #4d6fd8); color: #fff; }
.horse-grade-g3 { background: linear-gradient(105deg, #2e7d46, #5aa976); color: #fff; }
.horse-awards { display: flex; flex-wrap: wrap; gap: 8px; }
.horse-award-chip {
    padding: 5px 12px;
    border: 1px solid color-mix(in srgb, var(--entity-accent) 26%, #dfe3ee);
    border-radius: 999px;
    background: #f5f7fd;
    color: var(--ui-cobalt-deep);
    font-size: .8rem;
    font-weight: 800;
}
.horse-children,
.horse-pedigree-links { margin: 0; padding: 0; list-style: none; }
.horse-children li {
    position: relative;
    margin: 0 0 7px;
    padding-left: 16px;
    color: var(--ui-navy);
    font-size: .88rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.horse-children li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .62em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--ui-orange);
    transform: rotate(45deg);
}
.horse-pedigree-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.horse-pedigree-links a,
.horse-sources a { color: var(--ui-cobalt-deep); font-size: .84rem; font-weight: 750; text-decoration: none; }
.horse-pedigree-links a:hover,
.horse-sources a:hover { text-decoration: none; }
.horse-sources { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.horse-back {
    margin: 4px 0 16px;
    border: 0;
    background: transparent;
    color: var(--ui-cobalt-deep);
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}
.horse-back:hover { color: var(--ui-orange-deep); }
.horse-expand-btn {
    display: block;
    margin: 12px auto 0;
    padding: 8px 22px;
    border: 1.5px solid color-mix(in srgb, var(--entity-accent) 55%, #dfe3ee);
    border-radius: 999px;
    background: #fff;
    color: color-mix(in srgb, var(--entity-accent) 78%, #1c2b4a);
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.horse-expand-btn:hover {
    background: var(--entity-accent);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--entity-accent) 38%, transparent);
    transform: translateY(-1px);
}
.news-refresh-btn {
    margin-left: 10px;
    padding: 6px 18px;
    border: 1.5px solid color-mix(in srgb, var(--brand, #3157ed) 55%, #dfe3ee);
    border-radius: 999px;
    background: #fff;
    color: var(--brand, #3157ed);
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.news-refresh-btn:hover:not(:disabled) {
    background: var(--brand, #3157ed);
    color: #fff;
}
.news-refresh-btn:disabled {
    opacity: .55;
    cursor: default;
}
.horse-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    margin-left: 12px;
    padding: 7px 14px;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--entity-accent) 12%, #fff);
    color: color-mix(in srgb, var(--entity-accent) 78%, #1c2b4a);
    font-size: .82rem;
    font-weight: 750;
    letter-spacing: normal;
    text-decoration: none;
    vertical-align: middle;
    transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.horse-link-chip em { font-style: normal; }
.horse-link-chip:hover {
    background: var(--entity-accent);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--entity-accent) 38%, transparent);
    transform: translateY(-1px);
}
.hero-chip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 16px;
}
.hero-chip-row .performer-chip,
.hero-chip-row .horse-link-chip { margin: 0; }
@media (max-width: 640px) {
    .horse-entity-detail > .entity-hero { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; min-height: 0; padding: 20px 16px; }
    .horse-entity-detail .horse-cover { max-width: 120px; }
    .horse-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; padding-inline: 8px; }
    .horse-thumb { width: 64px; }
    .horse-cover > span { font-size: 2.2rem; }
}
@media (max-width: 420px) {
    .horse-row { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
    .horse-thumb { width: 56px; }
    .horse-row-go { display: none; }
    .horse-win-medal { font-size: .75rem; padding: 4px 9px; }
}

.entity-section-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) {
    .ui-filter-group.fix-chips { display: block; }
    .ui-filter-group.fix-chips > div { display: flex; max-width: none; flex-wrap: wrap; overflow: visible; }

    /* Event setlists stay in one readable vertical stream on phones and tablets. */
    .event-entity-detail .setlist-frame { overflow: visible; }
    .event-entity-detail .setlist-frame .setlist-table,
    .event-entity-detail .data-table.setlist-table,
    .event-entity-detail .setlist-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .event-entity-detail .setlist-table thead { display: none; }
    .event-entity-detail .setlist-table tbody tr {
        display: grid;
        grid-template-columns: 32px minmax(0,1fr);
        gap: 0 8px;
        padding: 9px 0 11px;
        border-bottom: 1px solid var(--ui-line);
        background: transparent;
    }
    .event-entity-detail .setlist-table tbody tr:hover { background: transparent; }
    .event-entity-detail .setlist-frame .setlist-table td,
    .event-entity-detail .data-table.setlist-table td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }
    .event-entity-detail .setlist-frame .setlist-table td.setlist-no,
    .event-entity-detail .data-table.setlist-table td.setlist-no {
        grid-column: 1;
        width: auto;
        padding-top: 12px;
        color: var(--text-3);
        text-align: right;
        font-size: .76rem;
        font-weight: 800;
    }
    .event-entity-detail .setlist-frame .setlist-table td.setlist-song,
    .event-entity-detail .data-table.setlist-table td.setlist-song {
        grid-column: 2;
        min-width: 0;
        font-size: .9rem;
        line-height: 1.45;
    }
    .event-entity-detail .setlist-song-link,
    .event-entity-detail button.setlist-song-link {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        white-space: normal;
    }
    .event-entity-detail .setlist-frame .setlist-table td.setlist-perf,
    .event-entity-detail .data-table.setlist-table td.setlist-perf,
    .event-entity-detail .setlist-frame .setlist-table td.setlist-src,
    .event-entity-detail .data-table.setlist-table td.setlist-src {
        grid-column: 1 / -1;
        margin: 3px 0 0 40px;
        padding: 0;
        border: 0;
        font-size: .8rem;
        line-height: 1.65;
    }
    .event-entity-detail .setlist-perf::before { content: '演唱'; margin-right: 9px; color: var(--text-3); font-weight: 800; }
    .event-entity-detail .setlist-src::before { content: '歌曲信息'; margin-right: 9px; color: var(--text-3); font-weight: 800; }
    .event-entity-detail .setlist-src:empty { display: none; }
    .event-entity-detail .setlist-table td.setlist-actions { grid-column: 1 / -1; width: auto; margin: 8px 0 0 40px; text-align: right; }
    .event-entity-detail .setlist-table td.setlist-actions:empty { display: none; }
    .event-entity-detail .perf-item,
    .event-entity-detail .setlist-performer-link,
    .event-entity-detail .guest-performer { max-width: 100%; white-space: normal; }
}

/* Shared music and creator surfaces. Keep page templates focused on data. */
.music-card-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 18px;
}
.music-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d6dcee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(25,40,92,.08);
    transition: border-color 180ms ease,box-shadow 220ms ease,transform 260ms var(--ui-ease);
}
.music-card::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42px;
    height: 5px;
    background: var(--ui-orange);
    pointer-events: none;
}
.music-card:hover {
    border-color: #9eb0ec;
    box-shadow: 0 13px 28px rgba(25,40,92,.15);
    transform: translateY(-4px);
}
.music-card-main {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 88px minmax(0,1fr);
    grid-template-rows: minmax(58px,auto) auto;
    gap: 8px 14px;
    padding: 14px 14px 15px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.music-card-main > img {
    grid-row: 1 / 3;
    width: 88px;
    height: 88px;
    border-radius: 5px;
    background: #eef1fb;
    object-fit: cover;
}
.music-card-copy { min-width: 0; align-self: center; }
.music-card-copy b,.music-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.music-card-copy b { color: var(--ui-navy); font-size: .92rem; font-weight: 900; line-height: 1.35; }
.music-card-copy small { margin-top: 6px; color: #667189; font-size: .78rem; line-height: 1.4; white-space: nowrap; }
.music-card-meta,.role-tag-row { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 5px 9px; }
.music-card-meta em { color: #64708b; font-size: .75rem; font-style: normal; font-weight: 750; }
.song-card .music-card-meta { padding-right: 88px; }
.song-card > .entity-actions { position: absolute; right: 10px; bottom: 10px; margin: 0; }
.relation-release > .entity-actions { flex-shrink: 0; margin: 0; justify-self: end; }
.recording-list { display: grid; }
.recording-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--ui-line); }
.recording-copy { flex: 1; min-width: 0; }
.recording-copy > a { font-size: .9rem; }
.recording-copy small { display: block; margin-top: 4px; color: var(--text-2); font-size: .78rem; line-height: 1.6; }
.recording-copy small a { color: inherit; text-decoration: none; }
.recording-copy small a:hover { color: var(--ui-cobalt); }
.recording-row .entity-actions { flex-shrink: 0; margin: 0; }
.creator-hero .creator-cover img { border-radius: 8px; object-fit: contain; }
.credit-role-tag {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 2px 9px;
    border: 1px solid #b9c7f2;
    border-radius: 999px;
    color: var(--ui-cobalt-deep);
    background: #f2f5ff;
    font-size: .75rem;
    font-style: normal;
    font-weight: 850;
    letter-spacing: 0;
}


.music-archive-hero {
    isolation: isolate;
    min-height: 218px;
    grid-template-columns: 176px minmax(0,1fr);
    gap: clamp(22px,4vw,44px);
    padding: 24px clamp(22px,4vw,42px);
    border: 1px solid #b9c8ef;
    color: var(--ui-navy);
    background: #fff;
}
.song-entity-detail,.album-entity-detail,.creator-entity-detail { display: block; }
.song-entity-detail > .music-archive-hero,
.album-entity-detail > .music-archive-hero,
.creator-entity-detail > .music-archive-hero { display: grid; flex-direction: initial; align-items: center; margin-bottom: 20px; }
.song-entity-detail > .media-content,
.album-entity-detail > .media-content,
.creator-entity-detail > .media-content { margin-top: 0; }
.music-archive-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    background:
        linear-gradient(154deg,var(--ui-cobalt-deep) 0 26%,transparent 26.2%),
        linear-gradient(154deg,var(--ui-orange) 0 35%,transparent 35.2%);
}
.music-archive-hero::after { z-index: -1; border-color: rgba(49,87,237,.08); }
.music-archive-hero .entity-intro h1 { color: var(--ui-navy); font-size: clamp(1.55rem,3.2vw,2.55rem); }
.music-archive-hero .entity-reading,
.music-archive-hero .entity-meta dt { color: #657089; }
.music-archive-hero .entity-meta dd { color: var(--ui-navy); }
.music-archive-hero .entity-kind { color: var(--ui-navy); background: var(--ui-orange); }

.ui-disclosure-list { border-top: 1px solid #aebdec; }
.ui-disclosure { border-bottom: 1px solid var(--ui-line); }
.ui-disclosure-summary {
    display: grid;
    width: 100%;
    min-height: 68px;
    grid-template-columns: minmax(0,1fr) 22px;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease,color 160ms ease;
}
.ui-disclosure-summary:hover { background: var(--ui-disclosure-hover, #f7f8fc); }
.ui-disclosure.has-leading > .ui-disclosure-summary { grid-template-columns: auto minmax(0,1fr) 22px; }
.ui-disclosure.has-meta > .ui-disclosure-summary { grid-template-columns: minmax(0,1fr) auto 22px; }
.ui-disclosure.has-leading.has-meta > .ui-disclosure-summary { grid-template-columns: auto minmax(0,1fr) auto 22px; }
.ui-disclosure.open > .ui-disclosure-summary { background: var(--ui-disclosure-open, #f2f5ff); }
.ui-disclosure-leading { display: grid; place-items: center; }
.ui-disclosure-leading img { width: 52px; height: 52px; border-radius: 5px; object-fit: cover; }
.ui-disclosure-copy { min-width: 0; }
.ui-disclosure-copy b,.ui-disclosure-copy small { display: block; }
.ui-disclosure-copy b { overflow: hidden; color: var(--ui-navy); font-size: .9rem; font-weight: 880; text-overflow: ellipsis; white-space: nowrap; }
.ui-disclosure-copy small { margin-top: 4px; color: var(--ui-disclosure-muted, #657089); font-size: .78rem; line-height: 1.45; }
.ui-disclosure-meta { color: var(--ui-disclosure-muted, #657089); font-size: .78rem; font-weight: 750; white-space: nowrap; }
.ui-disclosure-chevron { width: 20px; height: 20px; fill: none; stroke: var(--ui-disclosure-accent, var(--ui-orange-deep)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 220ms var(--ui-ease); }
.ui-disclosure.open .ui-disclosure-chevron { transform: rotate(180deg); }
.ui-disclosure-summary:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -3px; }
.ui-disclosure-detail {
    margin: 0 12px 14px;
    padding: 14px 16px;
    border: 1px solid #dce2f3;
    border-radius: 10px;
    background: #fbfcff;
    animation: disclosureReveal 220ms var(--ui-ease) both;
}
.song-credit-list { border-top: 0; }
.song-credit-version { border-bottom: 1px solid var(--ui-line); }
.song-credit-version dl { display: grid; gap: 0; margin: 0; padding: 0 8px 16px; }
.song-credit-version dl > div { display: grid; grid-template-columns: 120px minmax(0,1fr); align-items: start; gap: 14px; padding: 10px 0; border-top: 1px solid #e5e9f4; }
.song-credit-version dt,.song-credit-version dd { margin: 0; }
.song-credit-version dd { color: var(--ui-navy); font-size: .88rem; font-weight: 750; line-height: 1.8; }
.credit-separator { color: #a0a7b8; }
.lyrics-toolbar > .ui-select-control { width: min(400px,100%); flex: 0 0 auto; }

.creator-hero { min-height: 196px; grid-template-columns: 146px minmax(0,1fr); }
.creator-cover { width: 146px; aspect-ratio: 1; }
.creator-entity-detail .entity-cover.creator-cover { border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
.creator-entity-detail .entity-cover.creator-cover::before,.creator-entity-detail .entity-cover.creator-cover::after { content: none; }
.creator-intro h1 { color: var(--ui-navy); font-size: clamp(1.55rem,3.2vw,2.55rem); }
.creator-intro .entity-reading { color: #657089; }
.creator-role-tags { margin-top: 14px; }
.creator-counts { margin: 11px 0 0; color: #657089; font-size: .82rem; font-weight: 750; }
.creator-relation-list { border-top: 2px solid var(--ui-cobalt-deep); }
.creator-relation-detail { display: grid; gap: 8px; padding: 4px 12px 16px 74px; }
.creator-relation-detail > div { display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 7px 0; border-top: 1px dashed #d9deec; }
.creator-relation-detail > div > b { color: var(--ui-navy); font-size: .82rem; }
.relation-detail-link,.shared-work-link {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #cbd4ed;
    border-radius: 4px;
    color: var(--ui-cobalt-deep);
    background: #fff;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}
.relation-detail-link { justify-self: start; border-color: var(--ui-orange); color: var(--ui-orange-deep); }
.shared-work-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shared-work-link small { color: #6a748b; }

.album-track-list > div { grid-template-columns: 38px minmax(0,1fr) auto; }
.setlist-song { min-width: 0; }
.setlist-table .setlist-actions { width: 96px; text-align: right; }
.setlist-table .setlist-actions .entity-actions { margin: 0; }

@keyframes disclosureReveal { from { opacity: .35; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1120px) {
    .music-card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .music-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .music-card-main { grid-template-columns: 64px minmax(0,1fr); padding: 10px; }
    .music-card-main > img { width: 64px; height: 64px; }
    .music-card-copy b { font-size: .84rem; }
    .music-card-meta em:nth-child(n+2) { display: none; }
    .music-archive-hero,.creator-hero { min-height: 0; grid-template-columns: 112px minmax(0,1fr); gap: 18px; padding: 20px 16px; }
    .music-archive-hero .entity-cover,
    .creator-cover { width: 112px; }
    .creator-relation-detail { padding-left: 60px; }
    .song-credit-version dl > div { grid-template-columns: 92px minmax(0,1fr); }
    .entity-section-actions { justify-content: flex-end; flex-wrap: wrap; }
    .ui-disclosure-meta { display: none; }
    .ui-disclosure.has-meta > .ui-disclosure-summary { grid-template-columns: minmax(0,1fr) 22px; }
    .ui-disclosure.has-leading.has-meta > .ui-disclosure-summary { grid-template-columns: auto minmax(0,1fr) 22px; }
}
@media (max-width: 480px) {
    .music-card-grid { grid-template-columns: minmax(0,1fr); }
    .music-card-main { grid-template-columns: 76px minmax(0,1fr); }
    .music-card-main > img { width: 76px; height: 76px; }
    .music-archive-hero,.creator-hero { grid-template-columns: 86px minmax(0,1fr); gap: 14px; padding: 16px 13px; }
    .music-archive-hero .entity-cover,
    .creator-cover { width: 86px; }
    .creator-intro h1 { font-size: 1.28rem; }
    .creator-role-tags { margin-top: 9px; }
    .creator-counts { margin-top: 8px; font-size: .75rem; }
    .album-track-list > div { grid-template-columns: 26px minmax(0,1fr) auto; gap: 7px; }
    .ui-disclosure-summary { gap: 10px; padding-inline: 10px; }
    .ui-disclosure-leading img { width: 46px; height: 46px; }
    .song-credit-version dl > div { grid-template-columns: minmax(0,1fr); gap: 7px; }
    .creator-relation-detail { padding-left: 8px; }
}

/* PR10 v4: one compact entity, relation and action language. */
.entity-hero { position: relative; }
.entity-detail > .entity-hero,
.song-entity-detail > .music-archive-hero,
.album-entity-detail > .music-archive-hero,
.creator-entity-detail > .music-archive-hero,
.horse-entity-detail > .entity-hero,
.event-entity-detail > .entity-hero,
.character-entity-detail > .entity-hero,
.voice-entity-detail > .entity-hero {
    isolation: isolate;
    display: grid;
    min-height: 176px;
    grid-template-columns: 136px minmax(0,1fr);
    align-items: center;
    gap: 28px;
    margin-bottom: 18px;
    padding: 20px 28px;
    overflow: hidden;
    border: 1px solid #cbd5f4;
    border-radius: 12px;
    color: var(--ui-navy);
    background: #fff;
    box-shadow: 0 9px 24px rgba(25,40,92,.09);
}
.entity-detail > .entity-hero::before,
.music-archive-hero::before,
.horse-entity-detail > .entity-hero::before,
.event-entity-detail > .entity-hero::before,
.character-entity-detail > .entity-hero::before,
.voice-entity-detail > .entity-hero::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -2;
    display: block;
    width: 205px;
    background:
        linear-gradient(148deg,var(--hero-primary,var(--ui-cobalt)) 0 54%,transparent 54.4%),
        linear-gradient(148deg,var(--hero-secondary,var(--ui-orange)) 0 73%,transparent 73.4%);
}
.entity-detail > .entity-hero::after {
    content: '';
    position: absolute;
    right: -56px;
    bottom: -96px;
    z-index: -1;
    display: block;
    width: 230px;
    aspect-ratio: 1;
    border: 26px solid rgba(49,87,237,.06);
    transform: rotate(20deg);
}
.character-entity-detail > .entity-hero,
.voice-entity-detail > .entity-hero {
    --hero-primary: var(--entity-accent);
    --hero-secondary: var(--entity-sub);
    border-color: color-mix(in srgb,var(--entity-accent) 32%,#d9dff0);
}
.entity-detail .entity-cover,
.music-archive-hero .entity-cover,
.horse-entity-detail .entity-cover,
.event-entity-detail .entity-cover,
.character-entity-detail .entity-cover,
.voice-entity-detail .entity-cover {
    width: 132px;
    max-width: 132px;
    margin: 0;
    border: 4px solid #fff;
    border-radius: 8px;
    box-shadow: 7px 8px 0 var(--hero-secondary,var(--ui-orange)),0 9px 20px rgba(21,29,63,.16);
}
.entity-detail .event-cover,.horse-entity-detail .horse-cover { width: 150px; max-width: 150px; }
.entity-detail .entity-intro h1,
.music-archive-hero .entity-intro h1,
.creator-intro h1 {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ui-navy);
    font-size: clamp(1.45rem,3vw,2.35rem);
    line-height: 1.18;
    letter-spacing: -.02em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.entity-detail .entity-kind,
.music-archive-hero .entity-kind {
    margin-bottom: 9px;
    padding: 5px 11px;
    border-radius: 4px;
    color: #fff;
    background: linear-gradient(105deg,var(--ui-orange),var(--ui-orange-end));
    letter-spacing: 0;
}
.character-entity-detail .entity-kind,.voice-entity-detail .entity-kind { background: var(--entity-accent); }
.entity-detail .entity-reading,.music-archive-hero .entity-reading { color: #657089; }
.entity-detail .entity-meta { max-width: 700px; margin-top: 12px; }
.entity-detail .entity-meta > div { padding: 7px 0; border-color: #e1e5f0; grid-template-columns: max-content minmax(0,1fr); gap: 12px; }
.entity-detail .entity-meta { column-gap: 24px; }
.entity-detail .entity-meta dt { white-space: nowrap; padding-inline: 0; }
.entity-detail .entity-meta dd { min-width: 0; padding-inline: 0; overflow-wrap: break-word; display: flex; flex-wrap: wrap; gap: 4px 8px; }
@media (max-width: 700px) {
    .entity-detail .entity-meta > div { grid-template-columns: minmax(0,1fr); gap: 2px; }
    .entity-detail .entity-meta dt { padding-bottom: 0; }
}
.section-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-toolbar .credit-role-tag { font-size: .875rem; }
.c-detail-block:empty { display: none; border: 0; margin: 0; padding: 0; }
.character-profile:not(:has(dl,.character-description)) { display: none; }
.character-profile .c-detail-block { border: 0; }
.entity-detail .text-link { text-decoration: none; }
.entity-detail a,.archive-surface a { text-decoration: none; }
.history-list .session-tag,.history-years .session-tag { display: inline-flex; margin-left: 8px; font-style: normal; }
.history-years .history-year { display: inline-flex; margin-bottom: 12px; }
.entity-detail .entity-meta dt { color: #667089; }
.entity-detail .entity-meta dd { color: var(--ui-navy); }
.entity-hero .performer-chip { color: var(--ui-navy); }

.entity-actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-top: 14px; }
.entity-action {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #b9c7ee;
    border-radius: 50%;
    color: var(--ui-cobalt-deep);
    background: #fff;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
    box-sizing: border-box;
    transition: color 160ms ease,background 160ms ease,border-color 160ms ease;
}
.entity-actions-hero .entity-action { width: 44px; height: 44px; }
.entity-actions-labelled .entity-action-add {
    display: inline-flex;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
}
.entity-action:disabled { opacity: .55; cursor: default; }
.entity-actions-compact { margin-top: 0; }
.entity-actions-compact .entity-action { width: 36px; height: 36px; }
.entity-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.entity-action-play { border-color: transparent; color: #fff; background: linear-gradient(105deg,var(--ui-orange),var(--ui-orange-end)); }
.entity-action-play svg { fill: currentColor; stroke: none; }
.entity-action-play:hover { border-color: transparent; color: #fff; background: var(--ui-action-orange-hover); }
.entity-action-add:hover,.entity-action-added { border-color: var(--ui-cobalt); color: var(--ui-cobalt-deep); background: var(--ui-cobalt-soft); }
.entity-action:focus-visible { outline: 2px solid var(--ui-cobalt); outline-offset: 3px; }
.entity-action:active svg { transform: scale(.9); }
.entity-action svg { transition: transform 100ms ease; }
@media (pointer: coarse) {
    .entity-actions-compact .entity-action { width: 44px; height: 44px; }
    .song-card .music-card-meta { padding-right: 104px; }
}

.entity-overview {
    margin: 0 0 18px;
    padding: 20px 24px;
    border: 1px solid var(--ui-line);
    border-radius: 8px;
    background: #fff;
}
.entity-overview dl { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; }
.entity-overview dl > div { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.entity-overview dt { flex: none; color: var(--text-2); font-size: .8rem; font-weight: 700; }
.entity-overview dd { margin: 0; color: var(--ui-navy); font-size: .9rem; font-weight: 800; overflow-wrap: anywhere; }
.entity-overview p { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--ui-line); color: var(--text-2); font-size: .87rem; line-height: 1.8; overflow-wrap: anywhere; }
.entity-overview .text-link { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; color: var(--ui-cobalt-deep); font-weight: 800; white-space: nowrap; text-decoration: none; }
.entity-overview .text-link:hover { color: var(--ui-orange-deep); }
.album-release-overview { margin-bottom: 0; }

.relation-song-detail,.creator-relation-detail { margin: 0; padding: 0; }

.song-credit-list { max-width: 980px; margin-inline: auto; }
.song-credit-version .ui-disclosure-summary { grid-template-columns: minmax(0,1fr) 22px; }
.song-credit-version .ui-disclosure-detail { padding: 10px 18px; }
.credit-ledger { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; margin: 0; }
.credit-ledger > div { display: grid; grid-template-columns: 94px minmax(0,1fr); gap: 18px; padding: 13px 0; border-top: 1px solid #e1e5f1; }
.credit-ledger > div:first-child { border-top: 0; }
.credit-ledger dt { color: var(--ui-cobalt-deep); font-size: .78rem; font-weight: 900; }
.credit-ledger dd { margin: 0; color: var(--ui-navy); font-size: .9rem; font-weight: 800; line-height: 1.65; }
.credit-ledger .text-link { display: inline; width: auto; color: var(--ui-cobalt-deep); text-decoration: none; }
.credit-ledger .credit-people { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,10rem),1fr)); gap: 10px 16px; }
.credit-person { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.song-performance-table { table-layout: fixed; width: 100%; }
.song-performance-table td { vertical-align: top; overflow-wrap: anywhere; }
.song-performance-table .song-performance-cast { width: 100%; min-width: 0; grid-template-columns: repeat(auto-fill,minmax(min(100%,7.5rem),1fr)); gap: 8px 12px; }
@media(max-width:700px) { .song-performance-table colgroup { display: none; } }

.event-status-cancelled { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; background: #b42332; color: #fff; font-size: .8rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.event-hero-status { position: absolute; z-index: 2; top: 16px; right: 16px; }
.event-entity-detail:has(.event-hero-status) .entity-intro { padding-top: 24px; }
.creator-network { display: grid; gap: 16px; width: 100%; min-width: 0; align-items: start; }
.creator-network.has-selection { grid-template-columns: minmax(0,1fr) minmax(320px,400px); }
.creator-graph-viewport {
    position: relative;
    width: 100%;
    min-height: 350px;
    max-height: 560px;
    min-width: 0;
    overflow: auto;
    border: 1px solid #d7ddec;
    border-radius: 12px;
    background-color: #f7f8fb;
    background-image: linear-gradient(rgba(255,255,255,.62),rgba(255,255,255,.62)),radial-gradient(circle,#cfd5e4 1px,transparent 1px);
    background-size: auto,22px 22px;
}
.creator-graph-stage { position: relative; min-width: 100%; transition: filter 180ms ease; }
.creator-graph-edges { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.creator-graph-edges path { fill: none; stroke: #9caddd; stroke-width: 1.8; stroke-linecap: round; transition: opacity 160ms ease,stroke 160ms ease; }
.creator-graph-edges path.selected { stroke: var(--ui-orange); stroke-width: 3; }
.creator-graph-edges path.muted { opacity: .14; }
.creator-graph-node {
    position: absolute;
    z-index: 3;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 8px;
    border: 1px solid #d6d9e3;
    border-radius: 11px;
    color: var(--ui-navy);
    background: #fff;
    box-shadow: 0 4px 13px rgba(30,38,68,.08),0 1px 2px rgba(30,38,68,.05);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: opacity 160ms ease,border-color 160ms ease,box-shadow 160ms ease,transform 180ms ease;
}
.creator-graph-node:hover,.creator-graph-node:focus-visible { z-index: 5; border-color: var(--ui-cobalt); box-shadow: 0 8px 21px rgba(43,75,163,.18); transform: translateY(-2px); outline: none; }
.creator-graph-node.selected { z-index: 6; border-color: var(--ui-orange); box-shadow: 0 8px 22px rgba(218,108,8,.2); }
.creator-graph-node.muted { opacity: .3; }
.creator-graph-node.is-root { grid-template-columns: 48px minmax(0,1fr); border: 2px solid var(--ui-orange); background: linear-gradient(145deg,#fff 0%,#fff8ed 100%); box-shadow: 0 11px 28px rgba(230,117,16,.19),0 0 0 5px rgba(255,140,26,.07); cursor: default; }
.creator-graph-node .identity-portrait { width: 42px; height: 42px; }
.creator-graph-node.is-root .identity-portrait { width: 48px; height: 48px; }
.creator-graph-node > span { display: grid; min-width: 0; gap: 3px; }
.creator-graph-node b,.creator-graph-node small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-graph-node b { font-size: .82rem; }
.creator-graph-node small { color: #667089; font-size: .75rem; font-weight: 650; white-space: normal; line-height: 1.35; }
.creator-graph-node > em { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; color: #fff; background: var(--ui-cobalt); font-size: .75rem; font-style: normal; font-weight: 900; }
.creator-network-inspector {
    position: relative;
    z-index: 12;
    width: 100%;
    min-width: 0;
    max-height: 560px;
    overflow: auto;
    padding: 20px;
    border: 1px solid #d1daf2;
    border-radius: 12px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 45px rgba(25,40,92,.2);
    animation: creatorInspectorIn 220ms var(--ui-ease) both;
}
@keyframes creatorInspectorIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.creator-network-inspector > header { display: flex; align-items: center; gap: 12px; padding-right: 34px; }
.creator-network-inspector > header .identity-portrait { width: 58px; height: 58px; }
.creator-network-inspector > header span { display: grid; min-width: 0; gap: 4px; }
.creator-network-inspector > header b { color: var(--ui-navy); font-size: 1rem; }
.creator-network-inspector > header small { color: #667089; font-size: .78rem; }
.creator-inspector-close { position: absolute; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: var(--ui-cobalt-deep); background: #eef2ff; place-items: center; cursor: pointer; }
.creator-inspector-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.creator-profile-link { margin: 14px 0 2px 70px; }
.collaboration-timeline { position: relative; display: grid; gap: 0; margin: 18px 0 0; padding: 0 0 0 24px; list-style: none; }
.collaboration-timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #cbd5f0; }
.collaboration-timeline li { position: relative; min-height: 78px; padding: 0 0 16px; }
.collaboration-timeline li::before { content: ''; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border: 3px solid #fff; border-radius: 50%; background: var(--ui-orange); box-shadow: 0 0 0 2px var(--ui-orange); }
.collaboration-timeline time { display: block; color: #68728a; font-size: .74rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.collaboration-timeline a { display: flex; width: 100%; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.collaboration-timeline a:hover { background: #f4f6fc; }
.collaboration-timeline img { width: 58px; height: 58px; border-radius: 5px; object-fit: cover; }
.collaboration-timeline a > span { display: grid; min-width: 0; gap: 3px; }
.collaboration-timeline b { color: var(--ui-navy); font-size: .88rem; }
.collaboration-timeline small { overflow: hidden; color: #6a748c; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.collaboration-timeline em { display: flex; flex-wrap: wrap; gap: 5px; font-style: normal; }
.collaboration-timeline i { padding: 2px 7px; border-radius: 999px; color: var(--ui-cobalt-deep); background: #eef2ff; font-size: .75rem; font-style: normal; font-weight: 800; }

.not-found-page { max-width: 720px; margin: 12vh auto; padding: 48px 24px; text-align: center; }
.not-found-page > span { color: var(--ui-orange); font-size: 1rem; font-weight: 900; letter-spacing: .08em; }
.not-found-page h1 { margin: 10px 0; color: var(--ui-navy); font-size: clamp(1.8rem,5vw,3rem); }
.not-found-page p { color: #667089; line-height: 1.7; }
.not-found-page button { margin-top: 22px; min-height: 42px; padding: 8px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--ui-cobalt); font: inherit; font-weight: 850; cursor: pointer; }

@media (max-width: 760px) {
    .entity-detail > .entity-hero,
    .song-entity-detail > .music-archive-hero,
    .album-entity-detail > .music-archive-hero,
    .creator-entity-detail > .music-archive-hero,
    .horse-entity-detail > .entity-hero,
    .event-entity-detail > .entity-hero,
    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero {
        min-height: 0;
        grid-template-columns: 100px minmax(0,1fr);
        gap: 18px;
        padding: 18px 16px;
    }
    .entity-detail > .entity-hero::before,.music-archive-hero::before { width: 124px; }
    .entity-detail .entity-cover,.music-archive-hero .entity-cover,.horse-entity-detail .entity-cover,.event-entity-detail .entity-cover,.character-entity-detail .entity-cover,.voice-entity-detail .entity-cover { width: 96px; max-width: 96px; }
    .entity-detail .event-cover,.horse-entity-detail .horse-cover { width: 104px; max-width: 104px; }
    .entity-detail .entity-intro h1,.music-archive-hero .entity-intro h1 { font-size: clamp(1.18rem,5.5vw,1.55rem); }
    .entity-detail .entity-meta { grid-template-columns: minmax(0,1fr); }
    .entity-overview { padding: 16px; }
    .entity-overview dl { gap: 12px 24px; }
    .ui-disclosure-detail { margin-inline: 6px; padding: 12px; }
    .creator-network.has-selection { grid-template-columns: minmax(0,1fr); }
    .creator-network-inspector { max-height: none; }
}

@media (max-width: 430px) {
    .entity-detail > .entity-hero,.song-entity-detail > .music-archive-hero,.album-entity-detail > .music-archive-hero,.creator-entity-detail > .music-archive-hero,.horse-entity-detail > .entity-hero,.event-entity-detail > .entity-hero,.character-entity-detail > .entity-hero,.voice-entity-detail > .entity-hero { grid-template-columns: 88px minmax(0,1fr); gap: 14px; padding: 16px 13px; }
    .entity-detail > .entity-hero::before,.music-archive-hero::before { width: 108px; }
    .entity-detail .entity-cover,.music-archive-hero .entity-cover,.horse-entity-detail .entity-cover,.event-entity-detail .entity-cover,.character-entity-detail .entity-cover,.voice-entity-detail .entity-cover { width: 84px; max-width: 84px; }
    .entity-detail .entity-kind { margin-bottom: 7px; font-size: .75rem; }
    .entity-actions { margin-top: 10px; }
    .credit-ledger > div { grid-template-columns: 72px minmax(0,1fr); gap: 10px; }
    .creator-graph-viewport { overflow: auto; border: 0; background: transparent; }
    .creator-graph-stage { border: 1px solid #d7ddec; border-radius: 10px; background-color: #f7f8fb; background-image: linear-gradient(rgba(255,255,255,.62),rgba(255,255,255,.62)),radial-gradient(circle,#cfd5e4 1px,transparent 1px); background-size: auto,22px 22px; }
    .creator-graph-node { grid-template-columns: 42px minmax(0,1fr); }
}

/* Desktop is the primary reading surface. Keep records compact and use the full
   content width instead of centring database fragments in decorative frames. */
.song-credit-list { width: 100%; max-width: none; margin: 0; }
.song-credit-original { padding: 4px 10px; border-block: 1px solid #aebdec; }
.song-credit-variants { margin-top: 14px; }
.song-credit-version { display: block; padding: 0; }
.song-credit-version > .ui-disclosure-summary { min-height: 64px; height: auto; padding: 12px 14px; background: #f7f8fc; }
.song-credit-version.open > .ui-disclosure-summary { background: #eef2ff; }
.song-credit-version > .ui-disclosure-detail { margin: 0; padding: 6px 10px 10px; border: 0; border-radius: 0; background: transparent; }
.song-credit-version .credit-ledger { grid-template-columns: minmax(0,1fr); }
.credit-ledger > div { grid-template-columns: 82px minmax(0,1fr); gap: 18px; padding: 12px 10px; }
.credit-ledger dt { font-size: .84rem; }
.credit-ledger dd { text-align: left; }
.lyrics-sheet { width: min(100%,920px); max-width: none; margin: 0; padding: 26px 12px 34px; }
.lyrics-sheet li { text-align: left; }
.entity-detail .detail-meta { width: 100%; max-width: none; }

@media (min-width: 761px) {
    .entity-detail > .entity-hero,
    .song-entity-detail > .music-archive-hero,
    .album-entity-detail > .music-archive-hero,
    .creator-entity-detail > .music-archive-hero,
    .horse-entity-detail > .entity-hero,
    .event-entity-detail > .entity-hero,
    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero {
        min-height: 0;
        grid-template-columns: 150px minmax(0,1fr);
        gap: 28px;
        margin-bottom: 16px;
        padding: 18px 24px;
    }
    .entity-detail > .entity-hero::before,
    .music-archive-hero::before { width: 184px; }
    .entity-detail .entity-cover,
    .music-archive-hero .entity-cover,
    .horse-entity-detail .entity-cover,
    .event-entity-detail .entity-cover,
    .character-entity-detail .entity-cover,
    .voice-entity-detail .entity-cover { width: 118px; max-width: 118px; }
    .entity-detail .event-cover,.horse-entity-detail .horse-cover { width: 142px; max-width: 142px; }
    .entity-detail .entity-intro h1,
    .music-archive-hero .entity-intro h1,
    .creator-intro h1 { max-width: 30ch; font-size: clamp(1.5rem,2.25vw,2rem); line-height: 1.16; text-wrap: pretty; }
    .event-entity-detail .entity-intro h1 { max-width: 38ch; font-size: clamp(1.35rem,2vw,1.85rem); }
    .entity-detail .entity-meta { width: min(100%,760px); max-width: 760px; margin-top: 10px; }
    .album-entity-detail .entity-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .entity-detail .detail-meta { width: 100%; max-width: none; }
    .entity-detail .entity-meta > div { min-width: 0; }
    .entity-detail .entity-meta dt,.entity-detail .entity-meta dd { padding-block: 6px; }
    .entity-actions { margin-top: 11px; }
    .entity-actions-hero .entity-action { width: 40px; height: 40px; }
    .media-content > .entity-section,
    .character-entity-detail > .entity-section,
    .voice-entity-detail > .entity-section { padding: 22px 24px; }
    .voice-entity-detail .detail-meta,
    .character-entity-detail .simple-character-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .song-credit-version > .ui-disclosure-summary { min-height: 64px; }
    .song-credit-version > .ui-disclosure-detail { padding: 4px 0; }
    .lyrics-sheet { width: 100%; padding-inline: 0; }
}

#tab-db-venues .archive-toolbar { position: static; }
#tab-db-venues .archive-toolbar::before { content: none; }
#tab-db-venues .ui-pager { justify-content: flex-end; }

.venue-grid .album-name { overflow-wrap: anywhere; }
.venue-grid .album-count { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.venue-card-count { white-space: nowrap; }
.venue-grid .venue-photo-empty,
.venue-entity-detail .entity-cover > .venue-photo-empty {
    display: grid;
    place-items: center;
    color: var(--ui-navy);
    background: var(--ui-soft);
    font-size: .8rem;
    font-weight: 700;
}

.venue-entity-detail { --entity-accent: var(--ui-cobalt-deep); }
.venue-entity-detail > .venue-hero {
    --venue-cover-size: 148px;
    display: grid;
    grid-template-columns: calc(var(--venue-cover-size) + 24px) minmax(0, 1fr);
    min-height: 0;
}
.venue-hero::before { width: calc(var(--venue-cover-size) + 62px); }
.venue-entity-detail .venue-hero > .entity-cover {
    width: var(--venue-cover-size);
    max-width: 100%;
}
@media (max-width: 640px) {
    .venue-entity-detail > .venue-hero {
        --venue-cover-size: 96px;
        grid-template-columns: var(--venue-cover-size) minmax(0, 1fr);
    }
    .venue-hero::before { width: calc(var(--venue-cover-size) + 26px); }
}
@media (max-width: 360px) {
    .venue-entity-detail > .venue-hero { --venue-cover-size: 84px; }
}
.venue-entity-detail .entity-intro h1 {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
}
.venue-hero-links { color: var(--ui-navy); }
.venue-hero-links .horse-link-chip { font-family: inherit; cursor: pointer; }
.venue-hero-links .venue-link-logo { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
.venue-fact-wide { grid-column: 1 / -1; }
.venue-copy { color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.venue-copy p { margin: 12px 0 0; }
.venue-fact-line { display: block; }
.venue-information-facts:empty { display: none; }
.venue-information-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.venue-alias-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; }
.venue-alias-list li { padding-left: 12px; border-left: 2px solid var(--ui-line); overflow-wrap: anywhere; }
.venue-name-history { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--ui-line); }
.venue-name-history li { position: relative; display: grid; grid-template-columns: minmax(200px, .8fr) minmax(0, 1fr); gap: 8px 24px; padding: 0 0 20px; }
.venue-name-history li:last-child { padding-bottom: 0; }
.venue-name-history li::before { content: ''; position: absolute; left: -22px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--ui-cobalt-deep); }
.venue-name-period { font-size: .9em; font-variant-numeric: tabular-nums; }
.venue-history-name { font-weight: 600; overflow-wrap: anywhere; }
.venue-name-history li:not(:has(.venue-name-period)) { grid-template-columns: minmax(0, 1fr); }
.venue-section .history-list { margin-top: 0; }

#venue-map-panel { scroll-margin-top: 96px; }
.venue-hero-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 18px 0; }
.venue-hero-facts > div { display: flex; gap: 10px; }
.venue-introduction p { margin: 0; line-height: 1.85; }
.venue-introduction p + p { margin-top: 12px; }
.venue-introduction:has(p) { margin-bottom: 20px; }
.venue-travel-layout.has-map { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,3fr); gap: 32px; align-items: start; }
.venue-travel-copy .profile-facts { grid-template-columns: minmax(0,1fr); }
.venue-travel-copy .profile-facts > div { grid-template-columns: 4em minmax(0,1fr); }
.venue-map-caption { margin: 8px 0 0; font-size: .85rem; color: var(--text); }
@media (max-width: 800px) {
    .venue-information-facts > .venue-fact-wide:has(.venue-name-history) { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .venue-name-history li { grid-template-columns: minmax(0,1fr); gap: 4px; }
    .venue-travel-layout.has-map { grid-template-columns: minmax(0,1fr); gap: 20px; }
    .venue-hero-facts { gap: 8px 20px; }
}
.venue-map-frame {
    position: relative;
    height: clamp(260px, 30vw, 340px);
    border: 1px solid var(--ui-line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--ui-soft);
}
.venue-map-frame .venue-map-canvas { position: absolute; inset: 0; }
.venue-map-frame > .content-state { position: absolute; z-index: 1100; inset: 0; background: var(--ui-soft); }
.venue-map-frame .leaflet-control-attribution a { color: var(--ui-navy); }

.anime-catalog-grid .album-cover { aspect-ratio: 2 / 3; object-fit: contain; padding: 0; box-sizing: border-box; background: var(--ui-soft); }
.anime-catalog-grid .album-info { position: static; padding: 12px 14px 16px; background: var(--card); color: var(--ui-navy); }
.anime-catalog-grid .album-name { color: var(--ui-navy); font-size: 1rem; line-height: 1.45; }
.anime-catalog-grid .album-count { color: var(--text-2); font-size: .85rem; }
.anime-catalog-grid .album-card { align-self: stretch; display: flex; flex-direction: column; aspect-ratio: auto; }
.anime-catalog-grid .album-info { flex: 1; }
.anime-catalog-grid a, .anime-episode-list a, .archive-surface a.music-card-main { text-decoration: none; color: inherit; }
.anime-action-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.platform-mark { width: 22px; height: 22px; flex: 0 0 auto; }
.anime-cover-detail img { object-fit: contain; }
.anime-entity-detail .entity-hero { align-items: start; }
.anime-entity-detail .entity-intro { min-width: 0; }
.anime-entity-detail .anime-summary { margin: 12px 0; line-height: 1.65; white-space: pre-line; font-weight: 400; }
.anime-watch-links, .anime-episode-nav, .anime-context-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; }
.anime-watch-links a, .anime-episode-nav a, .anime-context-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; text-decoration: none; color: var(--ui-navy); }
.anime-context-links { margin: 0; }
.anime-context-links a { max-width: 100%; flex-wrap: wrap; }
.anime-version-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-top: 12px; border: 1px solid var(--ui-line); border-radius: 999px; background: var(--ui-soft); }
.anime-version-switch button { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ui-navy); font: inherit; font-weight: 700; cursor: pointer; }
.anime-version-switch .active { background: linear-gradient(110deg,var(--ui-cobalt-deep),var(--ui-cobalt)); color: white; }
.anime-version-switch button:hover { box-shadow: 0 0 0 1px var(--ui-orange) inset; }
.anime-stills { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.anime-stills button { padding: 0; border: 0; background: none; cursor: pointer; overflow: hidden; }
.anime-stills img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; transition: transform .2s; }
.anime-stills button:hover img { transform: scale(1.03); }
.anime-episode-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; margin: 12px 0; }
.anime-episode-list a { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.anime-episode-list img { width: 100px; aspect-ratio: 16/9; object-fit: contain; }
.anime-episode-list a > span { min-width: 0; flex: 1; }
.anime-episode-list b { display: block; margin-top: 6px; line-height: 1.5; }
.anime-episode-list a:hover b { color: var(--ui-cobalt); }
.anime-cast-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 20px; }
.anime-cast-list .anime-cast-pair { display: grid; grid-template-columns: minmax(max-content,140px) max-content; gap: 8px; margin: 0; align-items: center; overflow-x: auto; }
.anime-album-record { padding: 12px 0; text-decoration: none; color: inherit; }
.anime-album-record > span { display: grid; gap: 8px; }
.anime-crosslink-grid { display: grid; gap: 8px; }
.anime-crosslink-grid a { display: flex; min-width: 0; align-items: center; gap: 14px; padding: 10px 0; text-align: left; color: inherit; text-decoration: none; }
.anime-crosslink-grid a > span { min-width: 0; flex: 1; }
.anime-crosslink-grid img { width: 48px; height: 64px; object-fit: contain; }
.anime-crosslink-grid b, .anime-crosslink-grid small { display: block; }
.anime-crosslink-grid small { margin-top: 4px; color: var(--text-2); }
.anime-crosslink-grid em { flex: 0 0 20px; margin-left: auto; color: var(--ui-orange); font-style: normal; text-align: right; }
.anime-selected-release { background: var(--ui-cobalt-soft); }
.song-version-list [id^="recording-"] { scroll-margin-top: 100px; }
.anime-participation { display: grid; container-type: inline-size; }
.anime-participation-work { display: grid; grid-template-columns: 48px minmax(160px,.9fr) minmax(0,1.5fr); gap: 12px 18px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--ui-line); }
.anime-participation-work:first-child { padding-top: 0; }
.anime-participation-work:last-child { padding-bottom: 0; border-bottom: 0; }
.anime-participation-cover { grid-column: 1; grid-row: 1; display: block; }
.anime-participation-cover img { display: block; width: 48px; height: 72px; object-fit: contain; background: var(--ui-soft); }
.anime-participation-title { display: flex; gap: 8px; align-items: baseline; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.anime-participation-title b { min-width: 0; font-size: .94rem; line-height: 1.5; }
.anime-participation-title > svg { flex: none; color: var(--ui-orange); }
.anime-participation-title:hover b { color: var(--ui-cobalt); }
.anime-participation-work .credit-ledger { margin: 0; }
.anime-participation-work .credit-ledger > div { display: flex; flex-wrap: wrap; align-items: baseline; padding: 4px 0; border: 0; gap: 6px 12px; }
.anime-participation-work .credit-ledger dt { align-self: start; font-size: .875rem; line-height: 1.5; }
.anime-participation-work .credit-ledger dd { gap: 6px; }
.episode-tag { text-decoration: none; white-space: nowrap; }
.episode-tag:hover { color: var(--ui-cobalt); border-color: var(--ui-cobalt); }
.anime-participation-work .participation-scopes { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.participation-editions { grid-column: 3; grid-row: 1; display: grid; gap: 12px; min-width: 0; }
.participation-edition-group { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; }
.participation-scope { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.participation-edition { justify-self: start; color: var(--ui-cobalt-deep); font-size: .875rem; font-weight: 700; text-decoration: none; }
.participation-edition:hover { color: var(--ui-orange-deep); }
.participation-institution { color: var(--text-2); font-size: .875rem; }
.participation-edition-group:has(> .participation-edition) .credit-ledger { margin-left: 0; }
@container (max-width: 650px) {
  .anime-participation-work { grid-template-columns: 48px minmax(0,1fr); gap: 6px 14px; }
  .anime-participation-cover { grid-row: 1 / span 2; }
  .participation-editions { grid-column: 2; grid-row: 2; }
}
.anime-credit-ledger { margin-top: 12px; }
.anime-staff-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.anime-staff-disclosure .ui-disclosure-summary { grid-template-columns: minmax(0,1fr) auto 22px; min-height: 46px; background: transparent; border: 0; padding: 10px 12px; }
.anime-staff-disclosure .ui-disclosure-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.anime-staff-disclosure .ui-disclosure-copy b { white-space: normal; line-height: 1.5; font-size: .95rem; }
.anime-staff-disclosure .ui-disclosure-detail { margin: 0; padding: 2px 12px 14px; border: 0; border-radius: 0; background: transparent; }
.anime-staff-disclosure { border: 0; border-bottom: 1px solid var(--ui-line); box-shadow: none; }
.anime-staff-teams { display: grid; gap: 12px; }
.anime-staff-team { min-width: 0; padding: 4px 0; }
.anime-staff-team:not(.anime-staff-team-labelled) { display: grid; gap: 8px; }
.anime-staff-team-labelled { display: grid; grid-template-columns: minmax(120px,180px) minmax(0,1fr); align-items: start; gap: 12px; }
.anime-staff-institutions .credit-role-tag { max-width: 100%; overflow-wrap: break-word; white-space: normal; }
.anime-staff-institutions { margin: 0; }
.anime-credit-people { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,9rem),1fr)); align-items: baseline; gap: 8px 18px; }
.anime-credit-people > .anime-credit { min-width: 0; }
.anime-staff-teams .anime-credit > a,
.anime-staff-teams .anime-credit > span { font-size: .9rem; font-weight: 700; line-height: 1.6; overflow-wrap: break-word; }
.anime-staff-teams .text-link { color: var(--ui-cobalt-deep); text-decoration: none; transition: color 160ms ease; }
.anime-staff-teams .text-link:hover { color: var(--ui-orange-deep); }
.anime-staff-participation { display: grid; gap: 8px; }
.anime-staff-participation > div { display: grid; grid-template-columns: minmax(120px,180px) minmax(0,1fr); gap: 12px; align-items: start; }
.anime-staff-participation > div > div { display: flex; flex-wrap: wrap; gap: 6px; }
.entity-hero-text { grid-template-columns: 1fr; }
.entity-hero-text .entity-intro { padding-left: 24px; }
.staff-portrait { overflow: hidden; background: transparent; }
.staff-portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }
.staff-entity-detail .entity-cover { aspect-ratio: 1; }
.anime-entity-detail .entity-hero { grid-template-columns: minmax(240px,32%) minmax(0,1fr); padding: 28px; gap: 32px; }
.anime-entity-detail .entity-cover { width: 100%; max-width: none; padding: 0; border-radius: 8px; background: var(--ui-soft); box-shadow: none; }
.anime-entity-detail .entity-cover img { width: 100%; height: auto; max-height: 560px; aspect-ratio: 2 / 3; border: 0; border-radius: 4px; }
.anime-entity-detail .entity-cover.episode-artwork { align-self: start; }
.anime-entity-detail:has(.episode-artwork) .entity-hero { grid-template-columns: minmax(300px,44%) minmax(0,1fr); }
.anime-entity-detail .episode-artwork img { aspect-ratio: 16 / 9; max-height: none; }
.anime-entity-detail .entity-intro { padding: 0; }
.anime-entity-detail .entity-hero::before, .anime-entity-detail .entity-hero::after { display: none; }
.anime-entity-detail .anime-watch-links { margin-top: 20px; }
.anime-entity-detail .anime-watch-links .horse-link-chip { margin: 0; border: none; border-radius: 6px; background: var(--ui-cobalt); color: white; }
.anime-entity-detail .anime-watch-links .horse-link-chip:hover { background: var(--ui-cobalt-deep); color: white; box-shadow: none; transform: none; }
.anime-entity-detail .anime-episode-nav { padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--ui-line); }
.anime-entity-detail .anime-episode-nav .horse-link-chip { margin: 0; border: none; border-radius: 4px; background: var(--ui-soft); color: var(--ui-navy); font-size: .875rem; min-height: 40px; padding: 8px 12px; }
.anime-entity-detail .anime-episode-nav .horse-link-chip:hover { background: var(--ui-cobalt-soft); color: var(--ui-cobalt-deep); box-shadow: none; transform: none; }
.staff-role-ledger { margin: 0; }
.staff-role-ledger > div { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--ui-line); }
.staff-role-ledger dt { color: var(--ui-navy); font-size: .875rem; line-height: 1.6; font-weight: 700; }
.staff-role-ledger dt small { display: block; color: var(--text-2); font-weight: 400; }
.staff-role-ledger dd { margin: 0; min-width: 0; }
.staff-role-ledger .anime-staff-team-labelled { grid-template-columns: 140px minmax(0,1fr); }
.staff-role-ledger .anime-staff-institutions .credit-role-tag { padding: 3px 7px; border-color: var(--ui-line); border-radius: 4px; background: var(--ui-soft); color: var(--ui-navy); font-size: .875rem; font-weight: 550; font-style: normal; line-height: 1.5; }
.anime-institution-label { color: var(--text-2); font-size: .875rem; font-weight: 500; }
@media (max-width: 1000px) {
  .anime-cast-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .anime-entity-detail .entity-hero { grid-template-columns: minmax(0,1fr); gap: 20px; padding: 20px 16px; }
  .anime-entity-detail:has(.episode-artwork) .entity-hero { grid-template-columns: minmax(0,1fr); }
  .anime-entity-detail .entity-cover { width: min(100%,240px); justify-self: center; }
  .anime-entity-detail .entity-cover.episode-artwork { width: 100%; }
  .anime-entity-detail .entity-intro h1 { font-size: 1.65rem; line-height: 1.35; }
  .anime-entity-detail .entity-meta { grid-template-columns: 1fr; gap: 10px; }
  .staff-role-ledger > div, .staff-role-ledger .anime-staff-team-labelled { grid-template-columns: 1fr; gap: 8px; }
  .anime-cast-list, .anime-episode-list, .anime-crosslink-grid { grid-template-columns: 1fr; }
  .anime-staff-team-labelled, .anime-staff-participation > div { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .anime-stills { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .anime-staff-disclosure .ui-disclosure-summary { gap: 8px; padding-inline: 8px; }
  .anime-staff-disclosure .ui-disclosure-detail { padding-inline: 8px; }
  .anime-participation-work .credit-ledger { margin-top: 6px; }
  .anime-participation-work .credit-ledger > div { grid-template-columns: minmax(0,1fr); gap: 6px; }
}

/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */

.pswp {
  --pswp-bg: #000;
  --pswp-placeholder-bg: #222;


  --pswp-root-z-index: 100000;

  --pswp-preloader-color: rgba(79, 79, 79, 0.4);
  --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9);

  /* defined via js:
  --pswp-transition-duration: 333ms; */

  --pswp-icon-color: #fff;
  --pswp-icon-color-secondary: #4f4f4f;
  --pswp-icon-stroke-color: #4f4f4f;
  --pswp-icon-stroke-width: 2px;

  --pswp-error-text-color: var(--pswp-icon-color);
}


/*
	Styles for basic PhotoSwipe (pswp) functionality (sliding area, open/close transitions)
*/

.pswp {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: var(--pswp-root-z-index);
	display: none;
	touch-action: none;
	outline: 0;
	opacity: 0.003;
	contain: layout style size;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Prevents focus outline on the root element,
  (it may be focused initially) */
.pswp:focus {
  outline: 0;
}

.pswp * {
  box-sizing: border-box;
}

.pswp img {
  max-width: none;
}

.pswp--open {
	display: block;
}

.pswp,
.pswp__bg {
	transform: translateZ(0);
	will-change: opacity;
}

.pswp__bg {
  opacity: 0.005;
	background: var(--pswp-bg);
}

.pswp,
.pswp__scroll-wrap {
	overflow: hidden;
}

.pswp__scroll-wrap,
.pswp__bg,
.pswp__container,
.pswp__item,
.pswp__content,
.pswp__img,
.pswp__zoom-wrap {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.pswp__img,
.pswp__zoom-wrap {
	width: auto;
	height: auto;
}

.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img {
	cursor: -webkit-zoom-in;
	cursor: -moz-zoom-in;
	cursor: zoom-in;
}

.pswp--click-to-zoom.pswp--zoomed-in .pswp__img {
	cursor: move;
	cursor: -webkit-grab;
	cursor: -moz-grab;
	cursor: grab;
}

.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active {
  cursor: -webkit-grabbing;
  cursor: -moz-grabbing;
  cursor: grabbing;
}

/* :active to override grabbing cursor */
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,
.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,
.pswp__img {
	cursor: -webkit-zoom-out;
	cursor: -moz-zoom-out;
	cursor: zoom-out;
}


/* Prevent selection and tap highlights */
.pswp__container,
.pswp__img,
.pswp__button,
.pswp__counter {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.pswp__item {
	/* z-index for fade transition */
	z-index: 1;
	overflow: hidden;
}

.pswp__hidden {
	display: none !important;
}

/* Allow to click through pswp__content element, but not its children */
.pswp__content {
  pointer-events: none;
}
.pswp__content > * {
  pointer-events: auto;
}


/*

  PhotoSwipe UI

*/

/*
	Error message appears when image is not loaded
	(JS option errorMsg controls markup)
*/
.pswp__error-msg-container {
  display: grid;
}
.pswp__error-msg {
	margin: auto;
	font-size: 1em;
	line-height: 1;
	color: var(--pswp-error-text-color);
}

/*
class pswp__hide-on-close is applied to elements that
should hide (for example fade out) when PhotoSwipe is closed
and show (for example fade in) when PhotoSwipe is opened
 */
.pswp .pswp__hide-on-close {
	opacity: 0.005;
	will-change: opacity;
	transition: opacity var(--pswp-transition-duration) cubic-bezier(0.4, 0, 0.22, 1);
	z-index: 10; /* always overlap slide content */
	pointer-events: none; /* hidden elements should not be clickable */
}

/* class pswp--ui-visible is added when opening or closing transition starts */
.pswp--ui-visible .pswp__hide-on-close {
	opacity: 1;
	pointer-events: auto;
}

/* <button> styles, including css reset */
.pswp__button {
	position: relative;
	display: block;
	width: 50px;
	height: 60px;
	padding: 0;
	margin: 0;
	overflow: hidden;
	cursor: pointer;
	background: none;
	border: 0;
	box-shadow: none;
	opacity: 0.85;
	-webkit-appearance: none;
	-webkit-touch-callout: none;
}

.pswp__button:hover,
.pswp__button:active,
.pswp__button:focus {
  transition: none;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  opacity: 1;
}

.pswp__button:disabled {
  opacity: 0.3;
  cursor: auto;
}

.pswp__icn {
  fill: var(--pswp-icon-color);
  color: var(--pswp-icon-color-secondary);
}

.pswp__icn {
  position: absolute;
  top: 14px;
  left: 9px;
  width: 32px;
  height: 32px;
  overflow: hidden;
  pointer-events: none;
}

.pswp__icn-shadow {
  stroke: var(--pswp-icon-stroke-color);
  stroke-width: var(--pswp-icon-stroke-width);
  fill: none;
}

.pswp__icn:focus {
	outline: 0;
}

/*
	div element that matches size of large image,
	large image loads on top of it,
	used when msrc is not provided
*/
div.pswp__img--placeholder,
.pswp__img--with-bg {
	background: var(--pswp-placeholder-bg);
}

.pswp__top-bar {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 60px;
	display: flex;
  flex-direction: row;
  justify-content: flex-end;
	z-index: 10;

	/* allow events to pass through top bar itself */
	pointer-events: none !important;
}
.pswp__top-bar > * {
  pointer-events: auto;
  /* this makes transition significantly more smooth,
     even though inner elements are not animated */
  will-change: opacity;
}


/*

  Close button

*/
.pswp__button--close {
  margin-right: 6px;
}


/*

  Arrow buttons

*/
.pswp__button--arrow {
  position: absolute;
  top: 0;
  width: 75px;
  height: 100px;
  top: 50%;
  margin-top: -50px;
}

.pswp__button--arrow:disabled {
  display: none;
  cursor: default;
}

.pswp__button--arrow .pswp__icn {
  top: 50%;
  margin-top: -30px;
  width: 60px;
  height: 60px;
  background: none;
  border-radius: 0;
}

.pswp--one-slide .pswp__button--arrow {
  display: none;
}

/* hide arrows on touch screens */
.pswp--touch .pswp__button--arrow {
  visibility: hidden;
}

/* show arrows only after mouse was used */
.pswp--has_mouse .pswp__button--arrow {
  visibility: visible;
}

.pswp__button--arrow--prev {
  right: auto;
  left: 0px;
}

.pswp__button--arrow--next {
  right: 0px;
}
.pswp__button--arrow--next .pswp__icn {
  left: auto;
  right: 14px;
  /* flip horizontally */
  transform: scale(-1, 1);
}

/*

  Zoom button

*/
.pswp__button--zoom {
  display: none;
}

.pswp--zoom-allowed .pswp__button--zoom {
  display: block;
}

/* "+" => "-" */
.pswp--zoomed-in .pswp__zoom-icn-bar-v {
  display: none;
}


/*

  Loading indicator

*/
.pswp__preloader {
  position: relative;
  overflow: hidden;
  width: 50px;
  height: 60px;
  margin-right: auto;
}

.pswp__preloader .pswp__icn {
  opacity: 0;
  transition: opacity 0.2s linear;
  animation: pswp-clockwise 600ms linear infinite;
}

.pswp__preloader--active .pswp__icn {
  opacity: 0.85;
}

@keyframes pswp-clockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/*

  "1 of 10" counter

*/
.pswp__counter {
  height: 30px;
  margin-top: 15px;
  margin-inline-start: 20px;
  font-size: 14px;
  line-height: 30px;
  color: var(--pswp-icon-color);
  text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
  opacity: 0.85;
}

.pswp--one-slide .pswp__counter {
  display: none;
}

.original-image { cursor: zoom-in; }
.image-viewer-open { overflow: hidden; }
.uma-image-viewer {
  --pswp-bg: var(--ui-navy, #20283b);
  --pswp-placeholder-bg: var(--ui-navy, #20283b);
  --pswp-icon-color: var(--ui-navy, #20283b);
  --pswp-icon-color-secondary: var(--ui-navy, #20283b);
  --pswp-root-z-index: 10000;
  --pswp-icon-stroke-width: 0;
  margin: 0;
  font-family: inherit;
}
.uma-image-viewer .pswp__scroll-wrap { margin: 0; }
.uma-image-viewer .pswp__top-bar {
  height: 64px;
  box-sizing: border-box;
  padding: 10px 16px;
  gap: 8px;
  align-items: center;
  background: var(--card, #fff);
  box-shadow: 0 1px 0 var(--ui-line), 0 4px 16px #20283b18;
}
.uma-image-viewer .viewer-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--ui-navy);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.uma-image-viewer .pswp__button,
.uma-image-viewer .pswp__button:is(:hover, :focus, :active),
.uma-image-viewer .viewer-more > button {
  display: inline-flex;
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ui-navy);
  opacity: 1;
  box-shadow: none;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.uma-image-viewer .pswp__button:is(:hover, :focus-visible),
.uma-image-viewer .viewer-more > button:is(:hover, :focus-visible) {
  background: var(--ui-cobalt-soft);
  color: var(--ui-cobalt-deep);
  border-color: var(--ui-line);
}
.uma-image-viewer :is(button, a):focus-visible { outline: 2px solid var(--ui-cobalt); outline-offset: 2px; }
.uma-image-viewer .pswp__button:disabled { opacity: .4; cursor: default; background: transparent; }
.uma-image-viewer .pswp__button--fit,
.uma-image-viewer .pswp__button--fit:is(:hover, :focus, :active) { width: 88px; }
.uma-image-viewer .pswp__button--actual,
.uma-image-viewer .pswp__button--actual:is(:hover, :focus, :active) { width: 64px; }
.uma-image-viewer .pswp__button--original,
.uma-image-viewer .pswp__button--original:is(:hover, :focus, :active) { width: 116px; gap: 6px; color: var(--ui-cobalt-deep); }
.uma-image-viewer .pswp__icn,
.uma-image-viewer .viewer-menu svg {
  position: static;
  width: 22px;
  height: 22px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
  flex: 0 0 auto;
}
.uma-image-viewer .pswp__button--original .pswp__icn { width: 16px; height: 16px; }
.uma-image-viewer .pswp__button--arrow,
.uma-image-viewer .pswp__button--arrow:is(:hover, :focus, :active) {
  position: absolute;
  top: calc(50% - 24px);
  width: 48px;
  height: 48px;
  background: var(--card);
  border-color: var(--ui-line);
}
.uma-image-viewer .pswp__button--arrow--prev { left: 16px; }
.uma-image-viewer .pswp__button--arrow--next { right: 16px; }
.uma-image-viewer .pswp__button--arrow--next .pswp__icn { transform: none; }
.uma-image-viewer .viewer-more { display: none; position: relative; flex: 0 0 auto; }
.uma-image-viewer .viewer-menu {
  position: absolute;
  right: 0;
  top: 52px;
  width: 188px;
  padding: 6px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 24px #20283b26;
}
.uma-image-viewer .viewer-menu[hidden] { display: none; }
.uma-image-viewer .viewer-menu :is(button, a) {
  display: flex;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ui-navy);
  font: inherit;
  font-size: .875rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.uma-image-viewer .viewer-menu :is(button, a):hover { background: var(--ui-cobalt-soft); color: var(--ui-cobalt-deep); }
.uma-image-viewer .viewer-failure { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.uma-image-viewer .viewer-failure img { display: block; width: 100%; height: 100%; object-fit: contain; }
.uma-image-viewer .viewer-failure-message { position: absolute; bottom: 12px; padding: 16px; max-width: calc(100% - 24px); box-sizing: border-box; background: var(--card); color: var(--ui-navy); text-align: center; border-radius: 8px; }
.uma-image-viewer .viewer-failure-message p { margin: 0 0 12px; font-size: 1rem; }
.uma-image-viewer .viewer-failure-message button,
.uma-image-viewer .viewer-failure-message a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; margin: 0 4px; border: 1px solid var(--ui-line); border-radius: 6px; background: var(--ui-cobalt-soft); color: var(--ui-cobalt-deep); font: inherit; text-decoration: none; cursor: pointer; }
.uma-image-viewer .pswp__preloader { position: absolute; top: 70px; right: 18px; width: 24px; height: 24px; margin: 0; }
.uma-image-viewer .pswp__preloader .pswp__icn { width: 24px; height: 24px; stroke: none; fill: white; }
.uma-image-viewer .pswp__img { max-width: none; }
@media (max-width: 650px) {
  .uma-image-viewer .pswp__top-bar { height: 60px; padding: 8px; gap: 4px; }
  .uma-image-viewer .viewer-title { font-size: .875rem; }
  .uma-image-viewer .pswp__button--fit,
  .uma-image-viewer .pswp__button--actual,
  .uma-image-viewer .pswp__button--original { display: none; }
  .uma-image-viewer .viewer-more { display: block; }
  .uma-image-viewer .pswp__button--arrow--prev { left: 8px; }
  .uma-image-viewer .pswp__button--arrow--next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .uma-image-viewer * { transition: none; } }

.context-navigation { position: absolute; top: 100%; left: 0; right: 0; z-index: 0; display: flex; align-items: center; gap: 24px; padding: 8px max(20px,calc((100vw - 1280px)/2)); background: var(--card,#fff); border-bottom: 1px solid var(--ui-line); box-shadow: 0 4px 12px #20283b12; }
.sub-header > .site-nav, .sub-header > .sub-brand { position: relative; z-index: 1; }
.context-navigation[hidden] { display: none; }
.context-identity { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 40%; color: var(--ui-navy); background: none; border: 0; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.context-identity img { width: 32px; height: 36px; object-fit: contain; flex-shrink: 0; }
.context-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-sections { display: flex; gap: 4px; min-width: 0; margin-left: auto; overflow-x: auto; }
.context-sections button { flex-shrink: 0; min-height: 40px; padding: 8px 12px; background: none; border: 0; color: var(--text-2); font: inherit; font-size: .875rem; cursor: pointer; }
.context-sections button.active { color: var(--ui-cobalt); box-shadow: inset 0 -3px var(--ui-orange); font-weight: 700; }
body.subpage-bg { background-attachment: fixed; }
.archive-surface:not(:has(.entity-detail)) .archive-toolbar { position: sticky; top: var(--context-header-height,56px); z-index: 20; padding-block: 12px; background: transparent; box-shadow: none; }
.archive-surface:not(:has(.entity-detail)) .archive-toolbar::before { content: ''; position: absolute; inset-block: 0; left: calc(50% - var(--page-width,100vw) * .5); width: var(--page-width,100vw); z-index: -1; pointer-events: none; background: #f7f8fc url('/uma_tools/img/bg_texture_white.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461') center / cover no-repeat fixed; }
.archive-controls { display: flex; flex: 0 1 auto; gap: 8px; min-width: 0; }
.archive-controls > .ui-select-control { flex: 1 1 128px; min-width: 0; width: 140px; }
.archive-controls .ui-select-menu { min-width: 180px; }
.archive-controls > .ui-select-control:last-child .ui-select-menu { left: auto; width: max(100%,180px); }
.archive-controls .ui-select-back { color: var(--ui-cobalt-deep); border-bottom: 1px solid var(--ui-line); border-radius: 0; }
.archive-controls .ui-select-label { min-width: auto; padding-left: 10px; }
.archive-surface:not(:has(.entity-detail)) .archive-toolbar { flex-wrap: nowrap; }
.archive-surface:not(:has(.entity-detail)) .archive-toolbar > .ui-search { min-width: 160px; flex: 1 1 260px; }
.entity-hero { scroll-margin-top: calc(var(--context-header-height,56px) + 12px); }
.entity-section { scroll-margin-top: calc(var(--context-header-height,56px) + 100px); }
@media(max-width:700px) {
  .context-navigation { flex-wrap: wrap; gap: 4px; padding: 6px 12px; }
  .context-identity { max-width: 100%; width: 100%; font-size: .8rem; min-height: 26px; }
  .context-identity img { width: 20px; height: 24px; }
  .context-sections { width: 100%; margin: 0; }
  .context-sections button { min-height: 36px; padding: 6px 12px; font-size: .8rem; }
  .archive-surface:not(:has(.entity-detail)) .archive-toolbar { padding-block: 10px; flex-wrap: wrap; gap: 8px; }
  .archive-surface:not(:has(.entity-detail)) .archive-toolbar > .ui-search { flex-basis: 100%; }
  .archive-controls { width: 100%; }
  .archive-controls > .ui-select-control { flex: 1 1 0; width: 0; flex-direction: column; align-items: stretch; }
  .archive-controls .ui-select-label { padding: 4px 8px 0; min-height: 16px; font-size: .7rem; }
  .archive-controls .ui-select-trigger { height: 28px; flex: none; padding-inline: 6px; gap: 4px; }
  .archive-controls .ui-select-trigger > svg { width: 14px; height: 14px; }
  .archive-controls .ui-select-menu { top: calc(100% + 6px); }
}

/* ===== UMAMUSUME.JP SLANTED KINETIC VISUAL LANGUAGE =====
 * Removes stiff government-portal box-in-box borders & redundant horizontal lines,
 * replacing them with tonal floating panels, slanted diagonal energy,
 * unified single-color accents, and fluid spring-kinetic transitions.
 */

/* --- 0. Unified Sitewide Typography & Non-Selectable UI/Decorative Text --- */
body {
    font-family: var(--font-sans);
    font-size: var(--text-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Uniform upright typography across UI labels (no random italic/slanted clash) */
.entity-kind,
.credit-role-tag,
.horse-badge,
.event-catalog-facts i,
.route-breadcrumb em,
.history-list em,
.card-veil p,
.legal-sec-no {
    font-style: normal;
}

.entity-hero h1,
.music-archive-hero h1 {
    font-size: var(--text-h1);
    font-weight: 800;
    line-height: 1.26;
    letter-spacing: -0.01em;
}

.entity-reading,
.secondary-line {
    font-size: var(--text-sub);
    font-weight: 500;
    line-height: 1.55;
}

.legal-text,
.contact-text,
#tab-characters .character-description {
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.8;
}

.legal-sec-title,
.contact-sec-title,
.section-toolbar h2 {
    font-size: var(--text-h2);
    font-weight: 700;
    line-height: 1.4;
}

.profile-facts dt,
.detail-meta dt,
.fix-label,
.data-table th {
    font-size: var(--text-label);
    font-weight: 600;
}

.profile-facts dd,
.detail-meta dd {
    font-size: var(--text-body);
    font-weight: 600;
}

.entity-kind,
.credit-role-tag,
.horse-badge,
.event-catalog-facts i,
.legal-sec-no {
    font-size: var(--text-badge);
    font-weight: 700;
}

/* Non-selectable UI controls, buttons, badges & decorative homepage magazine text */
button,
.sub-brand,
.site-nav,
.site-nav-trigger,
.site-nav-menu,
.entity-tabs,
.entity-kind,
.credit-role-tag,
.horse-badge,
.ui-select-control,
.ui-select-menu,
.ui-pager,
.fix-submit,
.info-inline-action,
.card-veil,
.legal-sec-no,
.home-nav,
.home-stats,
.home-upcoming .hu-badge,
.dt-hero-stage,
.dt-hero-stage *,
.dt-crown-btn,
.dt-crown-bar,
.dt-vertical-stamp,
.dt-bg-word,
.dt-banner-title,
.dt-detail-hero-bg,
.dt-detail-hero-bg * {
    user-select: none;
    -webkit-user-select: none;
}

/* --- 1. Global Page Canvas & Fluid Route Choreography --- */
body.subpage-bg:not(.ui-theme-dark) {
    background-color: var(--surface-canvas);
    background-image:
        radial-gradient(ellipse 90% 42% at 88% -8%, rgba(49, 87, 237, 0.075) 0%, transparent 64%),
        radial-gradient(ellipse 65% 36% at 6% 18%, rgba(255, 123, 22, 0.055) 0%, transparent 60%),
        url('/uma_tools/img/bg_texture_white.webp?v=2a3b2b8932e6b8f24c7c0efd8e3edbc426047461');
}

.route-content-enter {
    animation: umaPageEnter 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform, opacity;
}

@keyframes umaPageEnter {
    from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.992); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Sticky top bar depth & kinetic nav polish */
body.is-scrolled .sub-header { box-shadow: 0 12px 32px rgba(18, 32, 86, 0.24); }

.site-nav-sub .site-nav-menu { border-radius: 0 0 14px 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

@media (min-width: 701px) {
    .site-nav-sub .site-nav-item.open > .site-nav-menu { animation: umaNavMenuIn 220ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}

@keyframes umaNavMenuIn {
    from { opacity: 0; transform: skewX(30deg) translateY(-8px); }
    to { opacity: 1; transform: skewX(30deg) translateY(0); }
}

/* --- 2. De-Bureaucratized Controls (Borderless Floating Pills + Proper Z-Index Layering) --- */
.archive-toolbar {
    position: relative;
    z-index: 60;
}

.ui-search,
.ui-select-control {
    position: relative;
    z-index: 1;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: var(--surface-panel);
    box-shadow: var(--shadow-control);
    transition:
        border-color var(--dur-fast) ease,
        box-shadow var(--dur-base) var(--ease-uma);
}

.ui-search:hover,
.ui-select-control:hover {
    box-shadow: 0 6px 18px rgba(22, 36, 92, 0.09);
}

.ui-select-control.open {
    position: relative;
    z-index: 300 !important;
}

.ui-search:focus-within,
.ui-select-control.open,
.ui-select-control:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-ring), 0 8px 22px rgba(49, 87, 237, 0.12);
}

.ui-select-menu {
    z-index: 400 !important;
    pointer-events: auto;
    border: 0;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-float);
    transform-origin: top center;
    animation: umaDropdownIn 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes umaDropdownIn {
    from {
        opacity: 0;
        transform: translate3d(0, -8px, 0) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.ui-select-menu button {
    border-radius: 8px;
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-uma);
}

.ui-select-menu button:hover {
    transform: translateX(4px);
}

.ui-pager button {
    border: 0;
    background: var(--surface-panel);
    box-shadow: var(--shadow-control);
    transition: transform 240ms cubic-bezier(0.22, 1.15, 0.36, 1), box-shadow var(--dur-base) var(--ease-uma), background var(--dur-fast) ease;
}

.ui-pager button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.ui-pager button:not(:disabled):active {
    transform: translateY(0) scale(0.93);
}

/* --- 3. Borderless Floating Archive Lists & Slanted Kinetic Row Highlight --- */
.event-catalog,
.song-catalog,
.album-catalog,
.creator-catalog,
.horse-list {
    border: 0;
    border-radius: 18px;
    background: var(--surface-panel);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    padding: 6px;
}

.event-catalog-row,
.creator-catalog-row,
.news-row,
.horse-row,
.relation-song-row {
    position: relative;
    border-bottom: 0;
    border-radius: 12px;
    transition:
        background 200ms ease,
        transform 280ms cubic-bezier(0.22, 1.12, 0.36, 1),
        box-shadow 220ms ease;
}

.event-catalog-row::before,
.creator-catalog-row::before,
.news-row::before,
.horse-row::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 12px;
    bottom: 12px;
    width: 3.5px;
    border-radius: 3px;
    background: var(--accent-primary);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 280ms cubic-bezier(0.22, 1.18, 0.36, 1);
    pointer-events: none;
}

.event-catalog-row:hover::before,
.creator-catalog-row:hover::before,
.news-row:hover::before,
.horse-row:hover::before {
    transform: scaleY(1);
}

.event-catalog-row:hover,
.creator-catalog-row:hover,
.news-row:hover,
.horse-row:hover {
    background: var(--surface-hover);
    box-shadow: none;
    transform: translateX(5px);
}

/* --- 4. Borderless Tonal Tags & Badges (Zero Clunky Pill Borders) --- */
.credit-role-tag,
.event-catalog-facts i,
.guest-performer,
.horse-badge {
    border: 0;
    border-radius: 999px;
    background: var(--surface-raised);
    color: var(--accent-primary-deep);
    padding: 4px 12px;
}

.horse-badge-death {
    background: var(--accent-secondary-soft);
    color: #9e4810;
}

/* --- 5. Gallery Cards & Staggered Cascade Choreography --- */
.music-card,
.album-card,
.news-hero-card,
.database-directory button,
.video-library a,
.setting-book-list a,
.link-card {
    border: 0;
    border-radius: 16px;
    background: var(--surface-panel);
    box-shadow: var(--shadow-panel);
    transition:
        transform 340ms cubic-bezier(0.22, 1.15, 0.36, 1),
        box-shadow 300ms var(--ease-uma);
}

.music-card::after {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    transform: none;
    right: 14px;
    bottom: 0;
    transition: width 320ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.music-card:hover::after {
    width: 78px;
}

.music-card:hover,
.album-card:hover,
.news-hero-card:hover,
.database-directory button:hover,
.video-library a:hover,
.setting-book-list a:hover,
.link-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.music-card:active,
.album-card:active,
.news-hero-card:active,
.database-directory button:active,
.link-card:active {
    transform: translateY(-1px) scale(0.98);
}

.album-cover,
.news-hero-cover,
.music-card-main > img {
    transition: transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

.album-card:hover .album-cover,
.news-hero-card:hover .news-hero-cover,
.music-card:hover .music-card-main > img {
    transform: scale(1.055);
}

/* Crisp staggered entrance for catalog cards & rows */
@keyframes umaStaggerIn {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :is(.album-card, .music-card, .event-catalog-row, .creator-catalog-row, .news-row, .horse-row, .relation-song-row) {
    animation: umaStaggerIn 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :nth-child(2) { animation-delay: 24ms; }
:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :nth-child(3) { animation-delay: 48ms; }
:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :nth-child(4) { animation-delay: 72ms; }
:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :nth-child(5) { animation-delay: 96ms; }
:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :nth-child(6) { animation-delay: 120ms; }
:is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > :nth-child(n+7) { animation-delay: 144ms; }

/* Modern gallery cards: artwork on top, always-visible crisp title caption below (zero overlap!) */
.album-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    overflow: hidden;
}

.album-card::before {
    content: none;
}

.album-card > .album-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
}

.album-card > .album-info {
    position: relative;
    inset: auto;
    z-index: 2;
    flex: 1 1 auto;
    padding: 12px 14px 14px;
    background: var(--surface-panel);
    color: var(--ink-1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}

.album-card .album-name {
    color: var(--ink-1);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.38;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-card .album-count {
    color: var(--ink-3);
    font-size: 0.78rem;
    font-weight: 500;
}

/* Card hover veil sits strictly over the artwork area (never overlaps caption or CV!) */
.card-veil {
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--card-accent, var(--color-main, #3157ed)) 16%, transparent) 0%,
        color-mix(in srgb, var(--card-accent, var(--color-main, #3157ed)) 78%, transparent) 66%,
        color-mix(in srgb, var(--card-accent, var(--color-main, #3157ed)) 94%, #0f1838) 100%
    );
    z-index: 5;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 14px 16px;
    transition: opacity 260ms var(--ease-uma);
}

.album-card > .card-veil {
    inset: 0 0 auto 0;
    aspect-ratio: 1 / 1;
}

.cio-card > .card-veil {
    inset: 0 0 64px 0;
    z-index: 6;
}

:is(.album-card, .cio-card):is(:hover, :focus-visible) > .card-veil {
    opacity: 1;
}

.card-veil p {
    transform: translateY(8px);
    transition: transform 320ms cubic-bezier(0.22, 1.15, 0.36, 1);
    font-style: normal;
    font-weight: 700;
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: #fff;
}

:is(.album-card, .cio-card):is(:hover, :focus-visible) > .card-veil p {
    transform: translateY(0);
}

/* Performer chips micro-spring (zero borders!) */
.performer-chip {
    transition: transform 260ms cubic-bezier(0.22, 1.15, 0.36, 1), color 180ms ease;
}

.performer-chip:hover {
    transform: translateX(2px);
}

.performer-chip:hover img {
    transform: scale(1.12);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--chip-color, #3157ed) 32%, transparent);
}

/* --- 6. Editorial Entity Detail Mastheads & Zero-Hairline Profile Sections --- */
.event-entity-detail > .entity-hero,
.character-entity-detail > .entity-hero,
.voice-entity-detail > .entity-hero,
.horse-entity-detail > .entity-hero,
.music-archive-hero {
    border: 0;
    border-radius: 20px;
    background: var(--surface-panel);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
}

.entity-cover {
    border: 3px solid rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(22, 36, 92, 0.16);
    transition: transform 420ms cubic-bezier(0.22, 1.15, 0.36, 1), box-shadow 360ms var(--ease-uma);
}

.entity-hero:hover .entity-cover {
    transform: translateY(-3px) scale(1.02);
}

.entity-kind {
    border-radius: 6px;
    transform: none;
    padding: 4px 12px;
}

/* Borderless floating content sections with silky kinetic entrance */
.entity-section {
    border: 0;
    border-radius: 18px;
    background: var(--surface-panel);
    box-shadow: var(--shadow-panel);
    animation: umaTabPanelIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes umaTabPanelIn {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* ZERO horizontal lines in profile facts & detail metadata — tonal soft tiles instead */
.profile-facts,
.detail-meta {
    border: 0;
    gap: 12px;
}

.profile-facts > div,
.detail-meta > div {
    border: 0;
    border-radius: 12px;
    background: var(--surface-subtle);
    padding: 14px 18px;
    transition: background 200ms ease, transform 240ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.profile-facts > div:hover,
.detail-meta > div:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.profile-facts dt,
.detail-meta dt {
    background: transparent;
    color: var(--ink-3);
    font-weight: 700;
    font-size: 0.84rem;
}

.profile-facts dd,
.detail-meta dd {
    color: var(--ink-1);
    font-weight: 750;
}

/* Character editorial bio/quote — ZERO top horizontal line, clean left accent bar */
#tab-characters .character-description {
    margin-top: 18px;
    padding: 16px 20px;
    border: 0;
    border-left: 3px solid var(--entity-accent, var(--accent-primary));
    border-radius: 0 14px 14px 0;
    background: var(--surface-subtle);
    color: var(--ink-1);
}

/* --- 7. Unified Single-Color Sliding Tab Bar (ZERO Bottom Hairline & ZERO Box Border) --- */
.entity-tabs {
    border-bottom: 0;
    padding: 4px 2px 10px;
    gap: 6px;
}

.entity-tabs button {
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    transition:
        color 200ms ease,
        background 200ms ease,
        transform 220ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.entity-tabs button:hover {
    background: color-mix(in srgb, var(--entity-accent, var(--accent-primary)) 6%, transparent);
    color: var(--entity-accent, var(--accent-primary-deep));
}

.entity-tabs button:active {
    transform: scale(0.96);
}

.entity-tabs button.active {
    background: transparent;
    color: var(--entity-accent, var(--accent-primary-deep));
    box-shadow: none;
}

.entity-tabs.has-ink-bar::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    height: 3px;
    width: var(--tab-w, 0px);
    transform: translateX(var(--tab-x, 0px));
    border-radius: 999px;
    background: var(--entity-accent, var(--accent-primary));
    transition:
        transform 380ms cubic-bezier(0.22, 1.18, 0.36, 1),
        width 340ms cubic-bezier(0.22, 1.12, 0.36, 1),
        background-color 220ms ease;
    pointer-events: none;
}

body.ui-theme-dark .entity-tabs.has-ink-bar::after {
    background: var(--accent-primary);
}

.entity-tabs.has-ink-bar button.active {
    box-shadow: none;
}

/* --- 8. Lightened Data Tables & Smooth Disclosures --- */
.data-table th,
.setlist-frame .setlist-table th,
.horse-table thead th {
    border-bottom: 0;
    background: var(--surface-subtle);
    color: var(--ink-2);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.data-table th:first-child,
.setlist-frame .setlist-table th:first-child {
    border-radius: 10px 0 0 10px;
}

.data-table th:last-child,
.setlist-frame .setlist-table th:last-child {
    border-radius: 0 10px 10px 0;
}

.data-table td,
.setlist-frame .setlist-table td {
    border-bottom: 1px solid color-mix(in srgb, var(--hairline) 65%, transparent);
}

.data-table tbody tr:last-child td,
.setlist-frame .setlist-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover td,
.setlist-frame .setlist-table tbody tr:hover td {
    background: var(--surface-hover);
}

.ui-disclosure-list {
    border-top: 0;
}

.ui-disclosure {
    border-bottom: 0;
    margin-bottom: 4px;
}

.ui-disclosure-detail {
    border: 0;
    border-radius: 14px;
    background: var(--surface-subtle);
    animation: umaDisclosureIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.relation-version {
    border-top: 0;
    padding: 12px 0;
}

@keyframes umaDisclosureIn {
    from {
        opacity: 0;
        transform: translate3d(0, -8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* --- 9. Info / Legal / Fix Form Pages (Unified Editorial Masthead + Slanted Orange CTA) --- */
.info-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-hero {
    position: relative;
    padding: 28px 32px;
    background:
        linear-gradient(122deg, rgba(49, 87, 237, 0.06) 0%, rgba(255, 123, 22, 0.04) 100%),
        var(--surface-panel);
}

.info-hero::after {
    content: none;
}

.info-hero .entity-kind {
    display: inline-block;
    margin-bottom: 10px;
    border-radius: 6px;
    transform: none;
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
    font-size: var(--text-badge);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.info-hero .entity-reading {
    margin: 8px 0 0;
    color: var(--ink-2);
    font-size: 0.9rem;
    line-height: 1.6;
}

.information-document {
    padding: 28px 34px;
}

.legal-section {
    border: 0;
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: var(--surface-subtle);
    transition: background 200ms ease, transform 240ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.legal-section:hover {
    background: var(--surface-hover);
    transform: translateX(3px);
}

.legal-sec-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
    transform: none;
}

.legal-text a {
    display: inline;
    margin: 0;
    color: var(--accent-primary-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-section {
    padding: 24px 28px;
}

.contact-sec-head {
    border-bottom: 0;
    margin-bottom: 14px;
    padding-bottom: 0;
}

.contact-sec-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--ink-1);
}

.contact-sec-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    border-radius: 999px;
    background: var(--accent-primary);
    transform: none;
}

.info-inline-action {
    border: 0;
    border-radius: 8px;
    padding: 6px 12px;
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
    font-weight: 700;
    transition: background 180ms ease, transform 220ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.info-inline-action:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-1px);
}

.fix-card {
    padding: 28px 32px;
}

.fix-chips button {
    border: 0;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--ink-2);
    font-weight: 600;
    transition: background 180ms ease, color 180ms ease, transform 220ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.fix-chips button:hover {
    background: var(--surface-hover);
    color: var(--accent-primary-deep);
    transform: translateY(-1px);
}

.fix-chips button.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(49, 87, 237, 0.24);
}

.fix-input,
.fix-textarea {
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--surface-subtle);
    box-shadow: inset 0 1px 2px rgba(22, 36, 92, 0.05);
    transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--ease-uma);
}

.fix-input:focus,
.fix-textarea:focus {
    background: var(--surface-panel);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.fix-submit {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    padding: 13px 34px;
    background: linear-gradient(108deg, var(--accent-secondary), var(--accent-secondary-end));
    color: #fff;
    font-size: var(--text-body);
    font-weight: 700;
    letter-spacing: 0.04em;
    transform: none;
    box-shadow: 0 10px 24px rgba(255, 123, 22, 0.26);
    transition: transform 280ms cubic-bezier(0.22, 1.15, 0.36, 1), box-shadow 260ms var(--ease-uma), filter var(--dur-fast) ease, opacity 200ms ease;
}

.fix-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.3) 50%, transparent 72%);
    transform: translateX(-120%);
    transition: transform 540ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.fix-submit:not(:disabled):hover::before {
    transform: translateX(120%);
}

.fix-submit:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(255, 123, 22, 0.34);
    filter: brightness(1.04);
}

.fix-submit:not(:disabled):active {
    transform: translateY(0) scale(0.97);
}

.fix-submit:disabled {
    opacity: 0.5;
    box-shadow: none;
    cursor: not-allowed;
}

/* Catalog Polish: No mid-word badge wrap on songs, uncrowded album toolbar, crisp cover scrim */
.music-card .credit-role-tag,
.music-card-meta span {
    white-space: nowrap;
    flex-shrink: 0;
}

.archive-toolbar {
    flex-wrap: wrap;
    row-gap: 10px;
}

.archive-toolbar > .ui-search {
    flex: 1 1 280px;
}

.archive-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
}

.archive-toolbar > .ui-select-control,
.archive-controls > .ui-select-control {
    flex: 0 1 auto;
    min-width: 152px;
}

/* --- 10. Normal Homepage Subtle Kinetic Polish --- */
.home-upcoming {
    gap: 7px;
}

.home-upcoming .hu-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.home-upcoming .hu-venue {
    opacity: 0.92;
}

@media (prefers-reduced-motion: reduce) {
    .route-content-enter, .entity-section, .ui-select-menu, .ui-disclosure-detail, .site-nav-sub .site-nav-menu,
    :is(.album-database-grid, .song-catalog, .event-catalog, .creator-catalog, .news-list, .horse-list, .relation-song-list) > * {
        animation: none;
    }
    .entity-tabs.has-ink-bar::after { transition: none; }
}

/* ===== MEDIA OVERLAYS, DETAILS DISCLOSURES & EDITORIAL TABLES =====
 * Dedicated module (<300 lines) for:
 * 1. Modernized native <details> disclosures (replaces clunky ▼ + hairline borders)
 * 2. Uniform borderless horse/entity metadata grids (zero zebra striping)
 * 3. Spaced email chips
 * 4. Kinetic Audio Dock & Queue Drawer polish
 * 5. Frosted Glass PhotoSwipe Image Lightbox Viewer
 */

/* --- 0. Seamless Focus Handling (zero jarring rectangular browser focus boxes) --- */
:focus,
:focus-visible,
button:focus-visible,
a:focus-visible,
.audio-control:focus-visible,
.audio-queue-toggle:focus-visible,
.audio-dismiss:focus-visible,
.audio-dock-vocalists button:focus-visible,
.audio-dock-progress input:focus-visible,
.audio-queue-play:focus-visible,
.audio-queue-copy:focus-visible,
.audio-queue-remove:focus-visible,
.ui-disclosure-summary:focus-visible,
.entity-action:focus-visible,
.entity-tabs button:focus-visible,
.news-language:focus-visible,
.uma-image-viewer :is(button, a):focus-visible {
    outline: none !important;
}

/* --- 1. Modernized Native <details> Disclosures (replaces ▼ + rigid hairlines) --- */
.activity-time-more,
.participation-recordings,
details.ui-native-details {
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-subtle);
    padding: 6px 12px;
    transition: background 200ms ease;
}

.activity-time-more summary,
.participation-recordings summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    color: var(--accent-primary-deep);
    font-size: var(--text-sub);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: color 180ms ease;
}

.activity-time-more summary::-webkit-details-marker,
.participation-recordings summary::-webkit-details-marker {
    display: none;
}

.activity-time-more summary::before,
.participation-recordings summary::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 240ms cubic-bezier(0.22, 1.15, 0.36, 1);
    flex: none;
}

.activity-time-more[open] > summary::before,
.participation-recordings[open] > summary::before {
    transform: rotate(45deg) translateY(-1px);
}

.activity-time-more > div {
    border-top: 0;
    padding: 6px 8px;
    margin-top: 4px;
    border-radius: 8px;
    background: var(--surface-panel);
    animation: umaDisclosureIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.activity-time-more dt,
.activity-time-more dd {
    padding: 4px 6px;
}

/* --- 2. Uniform Non-Zebra Metadata Grids & Spacious Data Tables --- */
.entity-detail .entity-meta,
.horse-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    border: 0;
}

.entity-detail .entity-meta > div,
.horse-meta > div {
    border: 0;
    border-radius: 12px;
    background: var(--surface-subtle) !important;
    padding: 13px 18px !important;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    gap: 14px;
    transition: background 180ms ease, transform 220ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.entity-detail .entity-meta > div:hover,
.horse-meta > div:hover {
    background: var(--surface-hover) !important;
    transform: translateY(-1px);
}

.horse-table th,
.horse-table td {
    padding: 11px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--hairline) 65%, transparent);
}

.horse-table tbody tr:last-child td {
    border-bottom: 0;
}

/* --- 3. Spaced Email Pills (never concatenated) --- */
.email-chip-list,
.email-inline-list {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.email-chip {
    display: inline-flex !important;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep) !important;
    font-size: var(--text-sub);
    font-weight: 600;
    text-decoration: none !important;
    transition: background 180ms ease, color 180ms ease, transform 220ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.email-chip:hover {
    background: var(--accent-primary);
    color: #fff !important;
    transform: translateY(-1px);
}

/* --- 4. Kinetic Frosted Audio Player Dock & Queue Drawer --- */
.audio-dock {
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 -10px 36px rgba(16, 26, 72, 0.22);
    animation: audioDockEnter 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes audioDockEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 22px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.audio-cover {
    border: 0;
    border-radius: 10px;
    transition: transform 300ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.audio-cover:hover {
    transform: scale(1.06);
}

.audio-control-primary {
    background: linear-gradient(125deg, var(--accent-secondary), var(--accent-secondary-end));
    box-shadow: 0 8px 22px rgba(255, 123, 22, 0.36);
    transition: transform 260ms cubic-bezier(0.22, 1.18, 0.36, 1), box-shadow 240ms ease, filter 180ms ease;
}

.audio-control-primary:hover {
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 12px 28px rgba(255, 123, 22, 0.46);
}

.audio-dock-progress input::-webkit-slider-thumb {
    transition: transform 180ms cubic-bezier(0.22, 1.18, 0.36, 1), box-shadow 180ms ease;
}

.audio-dock-progress input:hover::-webkit-slider-thumb {
    transform: scale(1.28);
    box-shadow: 0 0 0 4px rgba(255, 123, 22, 0.28);
}

.audio-queue-panel {
    border: 0;
    border-radius: 18px 18px 0 0;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 -14px 44px rgba(15, 24, 62, 0.24);
    animation: audioQueueIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes audioQueueIn {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.audio-queue-row {
    border-radius: 10px;
    transition: background 180ms ease, transform 220ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.audio-queue-row:hover {
    transform: translateX(4px);
}

/* --- 5. Frosted Glass Image Lightbox Viewer (PhotoSwipe) --- */
.uma-image-viewer {
    --pswp-bg: rgba(10, 16, 34, 0.92);
    --pswp-placeholder-bg: rgba(10, 16, 34, 0.92);
}

.uma-image-viewer .pswp__bg {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.uma-image-viewer .pswp__top-bar {
    height: 62px;
    padding: 10px 18px;
    background: rgba(14, 22, 46, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(4, 8, 22, 0.36);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    animation: viewerBarIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes viewerBarIn {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.uma-image-viewer .viewer-title {
    color: #f4f7ff;
    font-size: 0.94rem;
    font-weight: 700;
}

.uma-image-viewer .pswp__button,
.uma-image-viewer .pswp__button:is(:hover, :focus, :active),
.uma-image-viewer .viewer-more > button {
    border: 0;
    border-radius: 10px;
    color: rgba(240, 246, 255, 0.88);
    transition: background 180ms ease, color 180ms ease, transform 240ms cubic-bezier(0.22, 1.15, 0.36, 1);
}

.uma-image-viewer .pswp__button:is(:hover, :focus-visible),
.uma-image-viewer .viewer-more > button:is(:hover, :focus-visible) {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-1px);
}

.uma-image-viewer .pswp__button:active {
    transform: scale(0.94);
}

.uma-image-viewer .pswp__button--original,
.uma-image-viewer .pswp__button--original:is(:hover, :focus, :active) {
    width: auto;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(49, 87, 237, 0.86);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
}

.uma-image-viewer .pswp__button--original:hover {
    background: var(--accent-secondary);
    color: #ffffff;
}

.uma-image-viewer .pswp__button--arrow,
.uma-image-viewer .pswp__button--arrow:is(:hover, :focus, :active) {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: rgba(16, 24, 52, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(4, 8, 22, 0.36);
}

.uma-image-viewer .pswp__button--arrow:hover {
    background: var(--accent-primary);
    transform: scale(1.08);
}

.uma-image-viewer .viewer-menu {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(14, 22, 46, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(4, 8, 22, 0.5);
    animation: umaDropdownIn 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.uma-image-viewer .viewer-menu :is(button, a) {
    color: #eef4ff;
    border-radius: 8px;
}

.uma-image-viewer .viewer-menu :is(button, a):hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* --- 6. Smooth Sticky Context Navigation Bar, Fluid Queue Drag & Unified Controls --- */
.context-navigation {
    background: var(--surface-glass);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 8px 24px rgba(18, 32, 86, 0.08);
    animation: umaContextBarIn 220ms var(--spring-drag) both;
}

@keyframes umaContextBarIn {
    from {
        opacity: 0;
        transform: translate3d(0, -8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.context-sections {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.context-sections::-webkit-scrollbar {
    display: none;
}

.context-sections button {
    border-radius: var(--radius-badge);
    transition: color 180ms ease, background 180ms ease;
}

.context-sections button:hover {
    background: var(--surface-hover);
    color: var(--accent-primary-deep);
}

.context-sections button.active {
    color: var(--accent-primary-deep);
    box-shadow: inset 0 -2.5px 0 var(--accent-primary);
}

/* Audio Queue Fluid Drag-Snap (1200/80 critically damped spring, zero bounce) */
.audio-panel {
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    animation: audioQueueIn 260ms var(--spring-drag) both;
}

.audio-queue-row {
    position: relative;
    border-radius: var(--radius-control);
    transition: background 160ms ease, transform var(--dur-drag) var(--spring-drag), box-shadow 200ms ease;
    will-change: transform;
}

.audio-queue-row.dragging {
    transition: box-shadow 180ms ease, background 160ms ease;
    background: var(--surface-panel);
    box-shadow: 0 12px 28px rgba(18, 30, 74, 0.22);
    cursor: grabbing;
}

.audio-queue-drag {
    touch-action: none;
    cursor: grab;
}

.audio-queue-row.dragging .audio-queue-drag {
    cursor: grabbing;
}

/* Unified Secondary Action Button System (replaces stiff rectangular 1px orange/grey boxes) */
.relation-detail-link,
.state-retry,
.ui-retry,
.horse-expand-btn,
.news-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0 !important;
    border-radius: var(--radius-pill) !important;
    padding: 8px 18px !important;
    background: var(--accent-primary-soft) !important;
    color: var(--accent-primary-deep) !important;
    font-size: var(--text-meta);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 180ms ease, color 180ms ease, transform var(--dur-pop) var(--spring-pop);
}

.relation-detail-link:hover,
.state-retry:hover,
.ui-retry:hover,
.horse-expand-btn:hover,
.news-refresh-btn:hover:not(:disabled) {
    background: var(--accent-primary) !important;
    color: var(--ink-inverse) !important;
    transform: translateY(-1px);
}

.relation-detail-link:active,
.state-retry:active,
.ui-retry:active,
.horse-expand-btn:active,
.news-refresh-btn:active {
    transform: scale(0.96);
}

body.ui-theme-dark .relation-detail-link:hover,
body.ui-theme-dark .state-retry:hover,
body.ui-theme-dark .ui-retry:hover {
    color: #060b18 !important;
}

.creator-relation-detail,
.creator-relation-detail > div {
    border-top: 0 !important;
    border-bottom: 0 !important;
}

.recording-row {
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: var(--radius-control);
    padding: 10px 12px;
    transition: background 180ms ease;
}

.recording-row:hover {
    background: var(--surface-hover);
}

/* Unified Checkbox Control (380/18 pop micro-rebound) */
.fix-check input {
    border-radius: var(--radius-badge);
    border: 1.5px solid var(--hairline-strong);
    background: var(--surface-subtle);
    transition: background 180ms ease, border-color 180ms ease, transform var(--dur-pop) var(--spring-pop), box-shadow 180ms ease;
}

.fix-check input:checked {
    border-color: var(--accent-primary);
    transform: scale(1.06);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.fix-feedback,
.back-to-top {
    animation: umaContextBarIn 240ms var(--ease-uma) both;
}

/* Global Tabular Numerals for jitter-free counters, dates & timestamps */
.home-stat,
.home-stat b,
.audio-dock-progress,
.audio-queue-number,
.audio-panel-head em,
.ui-pager,
.event-catalog-row > time,
.album-count,
.data-table td,
.horse-table td,
.fix-hint,
.legal-updated,
.contact-updated,
.news-row time,
.news-detail-date {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
    .entity-detail .entity-meta,
    .horse-meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .audio-dock,
    .audio-panel,
    .audio-queue-panel,
    .context-navigation,
    .uma-image-viewer .pswp__top-bar,
    .activity-time-more > div {
        animation: none;
    }
    .audio-queue-row,
    .fix-check input {
        transition: none;
    }
}

/* ===== MULTI-SIZE MOBILE RESPONSIVE SYSTEM =====
 * Dedicated phone adaptation across compact (<=375px), standard (376-430px),
 * and large mobile (431-767px) screens for every standalone page type.
 */

/* --- Tier 1: All Mobile Phones (<= 767px) --- */
@media (max-width: 767px) {
    html,
    body {
        overflow-x: clip;
    }

    /* Safe bottom clearance when audio dock is present */
    body:has(.audio-dock) .site-footer,
    body:has(.audio-dock) .main-wrap {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    /* Hide native scrollbars on ALL horizontal scroll rails (prevents white Android scrollbar tracks) */
    .context-sections,
    .ui-filter-group > div {
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .context-sections::-webkit-scrollbar,
    .ui-filter-group > div::-webkit-scrollbar {
        display: none;
    }

    /* Main container breathing room */
    .main-wrap,
    .archive-surface,
    .entity-detail {
        padding-inline: 12px;
    }

    /* Unified horizontal-scroll kinetic tabs (keeps sliding ink-bar silky on mobile!) */
    .entity-tabs,
    .character-entity-detail .entity-tabs,
    .voice-entity-detail .entity-tabs,
    .song-entity-detail .entity-tabs,
    .anime-entity-detail .entity-tabs,
    .horse-entity-detail .entity-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding: 4px 4px 12px;
        margin-inline: -4px;
        scroll-snap-type: x proximity;
    }

    .entity-tabs::-webkit-scrollbar {
        display: none;
    }

    .entity-tabs button,
    .character-entity-detail .entity-tabs button,
    .voice-entity-detail .entity-tabs button,
    .song-entity-detail .entity-tabs button,
    .anime-entity-detail .entity-tabs button,
    .horse-entity-detail .entity-tabs button {
        flex: 0 0 auto !important;
        min-height: 40px;
        padding: 8px 14px !important;
        font-size: 0.84rem !important;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    /* Entity Detail Mastheads (Character / Voice / Song / Album / Event / Horse / Venue / Anime) */
    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero,
    .horse-entity-detail > .entity-hero,
    .music-archive-hero,
    .event-entity-detail > .entity-hero {
        border-radius: 16px;
        padding: 16px;
        gap: 14px;
    }

    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero,
    .horse-entity-detail > .entity-hero {
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: start;
    }

    .character-entity-detail > .entity-hero > .hero-video-aside,
    .horse-entity-detail > .entity-hero > .hero-video-aside {
        grid-column: 1 / -1;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .entity-hero h1,
    .music-archive-hero h1 {
        font-size: clamp(1.24rem, 5.4vw, 1.65rem);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .entity-reading {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    /* Profile facts & detail metadata: clean borderless tonal cards */
    .profile-facts,
    .detail-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .profile-facts > div,
    .detail-meta > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 12px 14px;
    }

    #tab-characters .character-description {
        padding: 14px 16px;
        font-size: 0.9rem;
        line-height: 1.75;
    }

    /* Entity Sections & Tables */
    .entity-section {
        border-radius: 16px;
        padding: 14px;
    }

    .data-table,
    .setlist-frame .setlist-table,
    .horse-table {
        font-size: 0.84rem;
    }

    .setlist-frame,
    .horse-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-inline: -4px;
        padding-inline: 4px;
    }

    /* Relation song disclosure detail: remove desktop 69px left indent on mobile */
    .relation-song-detail {
        padding: 8px 10px 14px;
    }

    .relation-release {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    /* Archive toolbars & filters */
    .archive-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .archive-toolbar > .ui-search,
    .archive-toolbar > .filter-pill-group,
    .archive-toolbar > .archive-controls {
        grid-column: 1 / -1;
        width: 100%;
    }

    .archive-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .archive-toolbar > .ui-select-control,
    .archive-controls > .ui-select-control {
        width: 100%;
        min-width: 0;
        position: relative;
        z-index: 1;
    }

    .archive-toolbar > .ui-select-control.open,
    .archive-controls > .ui-select-control.open {
        z-index: 300 !important;
    }

    .archive-controls > .ui-select-control:nth-child(even) .ui-select-menu {
        left: auto;
        right: 0;
    }

    .ui-select-menu {
        max-height: min(300px, 50vh);
        min-width: max(100%, 172px);
        max-width: calc(100vw - 24px);
        z-index: 400 !important;
    }

    /* Catalog grids */
    .album-database-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #tab-characters .cio-list ul.cio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .anime-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .horse-row {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 12px 10px;
    }

    .horse-row-badges {
        grid-column: 2;
        justify-content: flex-start;
    }

    /* Legal, Contact, Fix Form & Links pages */
    .legal-page,
    .contribute-page,
    .links-page {
        padding: 18px 14px;
        border-radius: 16px;
    }

    .fix-input,
    .fix-textarea,
    .ui-search input {
        font-size: 16px; /* Prevents iOS Safari auto-zoom on focus */
    }

    .fix-submit {
        width: 100%;
        min-height: 46px;
        justify-content: center;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Footer clean mobile stack */
    .footer-inner {
        padding: 28px 16px 22px;
        gap: 20px;
    }

    .footer-copy {
        font-size: 0.76rem;
        line-height: 1.6;
        gap: 8px 14px !important;
    }
}

/* --- Mobile Nav Drawer (<= 700px — matches shell-responsive.css 5-column mobile bar) --- */
@media (max-width: 700px) {
    .sub-header {
        padding-inline: 0;
    }

    .sub-brand,
    .sub-brand > span,
    .site-nav-sub .site-nav-item,
    .site-nav-sub .site-nav-item.active,
    body.ui-theme-dark .site-nav-sub .site-nav-item.active,
    .site-nav-sub .site-nav-trigger > * {
        transform: none !important;
    }

    .site-nav-sub .site-nav-item {
        position: static !important;
    }

    .site-nav-sub .site-nav-menu {
        position: absolute;
        top: 100%;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 6px;
        padding: 8px;
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        transform: translateY(-6px);
        transition: opacity 180ms ease, transform 220ms var(--spring-drag);
    }

    .site-nav-sub .site-nav-item.open > .site-nav-menu {
        transform: translateY(0);
    }

    .site-nav-sub .site-nav-menu :is(button, a) {
        min-height: 44px;
        padding: 0 14px;
        border-radius: var(--radius-control);
        white-space: nowrap;
    }
}

/* --- Tier 2: Standard Phones (<= 430px — iPhone 14/15/16 Pro / Pro Max) --- */
@media (max-width: 430px) {
    .main-wrap,
    .archive-surface,
    .entity-detail {
        padding-inline: 10px;
    }

    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero,
    .horse-entity-detail > .entity-hero {
        grid-template-columns: 82px minmax(0, 1fr);
        padding: 14px;
        gap: 12px;
    }

    .profile-facts,
    .detail-meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .event-catalog-row {
        grid-template-columns: 72px minmax(0, 1fr) 16px;
        gap: 6px 10px;
        padding: 12px 8px;
    }

    .event-catalog-cover {
        width: 72px;
    }

    .music-card {
        border-radius: 14px;
    }
}

/* --- Tier 3: Compact Phones (<= 375px — iPhone SE / Mini / 360px Android) --- */
@media (max-width: 375px) {
    .archive-toolbar,
    .archive-controls {
        grid-template-columns: 1fr;
    }

    #tab-characters .cio-list ul.cio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .anime-catalog-grid {
        grid-template-columns: 1fr;
    }

    .character-entity-detail > .entity-hero,
    .voice-entity-detail > .entity-hero,
    .horse-entity-detail > .entity-hero {
        grid-template-columns: 72px minmax(0, 1fr);
        padding: 12px;
        gap: 10px;
    }

    .entity-tabs button,
    .character-entity-detail .entity-tabs button,
    .voice-entity-detail .entity-tabs button,
    .song-entity-detail .entity-tabs button {
        padding: 8px 11px !important;
        font-size: 0.8rem !important;
    }
}

/* ===== SHARED NIGHT CAMPAIGN BASE + VARIANT SYSTEM =====
 * Used exclusively by temporary special campaigns (e.g. Daring Tact 7-day celebration).
 * Future dark campaigns only need a ~6-line [data-variant="..."] accent block.
 */

body.ui-theme-dark,
body[data-theme="night"] {
    color-scheme: dark;

    --surface-canvas: #060b18;
    --surface-panel: rgba(13, 21, 44, 0.72);
    --surface-raised: #152544;
    --surface-subtle: rgba(9, 16, 36, 0.76);
    --surface-hover: rgba(121, 198, 219, 0.11);
    --surface-glass: rgba(8, 14, 32, 0.86);

    --ink-1: #f0f6ff;
    --ink-2: #b4c8df;
    --ink-3: #839ab8;

    --accent-primary: #79c6db;
    --accent-primary-deep: #9ae0f4;
    --accent-primary-soft: rgba(121, 198, 219, 0.16);
    --accent-secondary: #f5c556;
    --accent-secondary-end: #ffe49c;
    --accent-secondary-soft: rgba(245, 197, 86, 0.18);
    --accent-ring: rgba(121, 198, 219, 0.24);

    --hairline: rgba(154, 214, 240, 0.14);
    --hairline-strong: rgba(154, 214, 240, 0.26);

    --shadow-panel: 0 12px 34px rgba(2, 6, 18, 0.45);
    --shadow-hover: 0 16px 40px rgba(2, 6, 18, 0.58);
    --shadow-control: 0 4px 14px rgba(2, 6, 18, 0.36);
    --shadow-float: 0 18px 44px rgba(2, 5, 16, 0.65);

    /* Legacy compatibility bridge — re-declared on body so CSS custom property inheritance resolves to dark values */
    --bg: var(--surface-canvas);
    --bg-2: var(--surface-raised);
    --card: #0d1630;
    --text: var(--ink-1);
    --text-1: var(--ink-1);
    --text-2: var(--ink-2);
    --text-3: var(--ink-3);
    --border: var(--hairline);
    --border-strong: var(--hairline-strong);
    --surface-line: var(--hairline);
    --surface-muted: var(--surface-subtle);
    --ui-line: var(--hairline);
    --ui-soft: var(--surface-raised);
    --ui-navy: var(--ink-1);
    --ui-cobalt: var(--accent-primary);
    --ui-cobalt-deep: var(--accent-primary-deep);
    --ui-cobalt-soft: var(--accent-primary-soft);
    --ui-orange: var(--accent-primary);
    --ui-orange-end: var(--accent-primary-deep);
    --ui-orange-deep: var(--accent-primary-deep);
    --ui-focus: var(--accent-primary);
    --ui-focus-halo: var(--accent-ring);
    --theme-surface: #0c142a;
    --theme-raised: var(--surface-raised);
    --theme-accent: var(--accent-primary-deep);
    --theme-line: rgba(154, 214, 240, 0.22);
    --ui-disclosure-open: var(--surface-raised);
    --ui-disclosure-hover: rgba(121, 198, 219, 0.12);
    --ui-disclosure-muted: var(--ink-2);
    --ui-disclosure-accent: var(--accent-primary-deep);
}

/* Variant: Daring Tact Crowned (无败牝马三冠达成鎏金态) */
body.ui-theme-dark.dt-crowned-theme,
body[data-theme="night"][data-variant="daring-tact-crowned"] {
    --surface-canvas: #081026;
    --surface-panel: rgba(16, 28, 60, 0.72);
    --surface-raised: #242b48;
    --surface-hover: rgba(248, 212, 120, 0.13);
    --card: #101c3c;
    --accent-primary: #f5c556;
    --accent-primary-deep: #ffe49c;
    --accent-primary-soft: rgba(248, 212, 120, 0.18);
    --accent-ring: rgba(255, 228, 156, 0.24);
    --hairline: rgba(248, 212, 120, 0.18);
    --hairline-strong: rgba(248, 212, 120, 0.34);
    --ui-cobalt: var(--accent-primary);
    --ui-cobalt-deep: var(--accent-primary-deep);
    --ui-cobalt-soft: var(--accent-primary-soft);
    --ui-orange: var(--accent-primary);
    --ui-orange-end: var(--accent-primary-deep);
    --ui-orange-deep: var(--accent-primary-deep);
    --theme-accent: #ffe49c;
    --theme-raised: #29273a;
    --theme-line: rgba(248, 212, 120, 0.32);
    --ui-disclosure-hover: rgba(248, 212, 120, 0.14);
}

/* Base page canvas & chrome under night theme */
body.ui-theme-dark,
body.ui-theme-dark #app {
    background-color: var(--surface-canvas);
    background-image: none;
    color: var(--ink-1);
}

body.ui-theme-dark .sub-header {
    background-image: none;
    background: var(--surface-glass);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 10px 30px rgba(2, 6, 18, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.ui-theme-dark .site-nav-sub .site-nav-item.active {
    border-right-color: var(--hairline);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--accent-primary-soft) 100%);
    box-shadow: inset 0 -3px 0 var(--accent-primary);
}

@media (min-width: 701px) {
    body.ui-theme-dark .site-nav-sub .site-nav-item.active {
        transform: skewX(-30deg);
    }
    body.ui-theme-dark .site-nav-sub .site-nav-item.active .site-nav-trigger {
        min-height: 56px;
    }
}

body.ui-theme-dark .site-nav-sub .site-nav-item.active > .site-nav-trigger {
    background: transparent;
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .site-nav-sub .site-nav-menu {
    background: rgba(10, 18, 40, 0.96);
    border: 1px solid var(--hairline);
}

body.ui-theme-dark .route-breadcrumb {
    color: var(--ink-3);
}

body.ui-theme-dark .route-breadcrumb a {
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .route-breadcrumb a:hover {
    color: #ffffff;
}

body.ui-theme-dark .route-breadcrumb em:last-child {
    color: var(--ink-1);
}

body.ui-theme-dark .context-back {
    background: var(--surface-glass);
    border-color: var(--hairline);
    color: var(--ink-1);
}

body.ui-theme-dark .context-back:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-deep);
}

/* Unified Night Footer */
body.ui-theme-dark .site-footer {
    background-image: none;
    background: linear-gradient(180deg, #070d1e 0%, #050914 100%);
    border-top: 1px solid var(--hairline);
    color: var(--ink-2);
}

body.ui-theme-dark.dt-crowned-theme .site-footer {
    background: linear-gradient(180deg, #0b1636 0%, #070e24 100%);
}

/* Unified Night Audio Dock & Queue Panel */
body.ui-theme-dark .audio-dock {
    background: linear-gradient(90deg, #060b18 0%, #0b1530 52%, #070d1e 100%);
    border-top: 1px solid var(--hairline-strong);
    box-shadow: 0 -10px 30px rgba(2, 6, 16, 0.55);
}

body.ui-theme-dark.dt-crowned-theme .audio-dock {
    background: linear-gradient(90deg, #09132e 0%, #12224f 52%, #0a1432 100%);
}

body.ui-theme-dark .audio-dock::before {
    opacity: 0;
}

body.ui-theme-dark .audio-dock .audio-control-primary {
    background: var(--accent-primary);
    color: #060b18;
    box-shadow: 0 6px 20px var(--accent-ring);
}

body.ui-theme-dark .audio-dock .audio-control-primary:hover {
    background: var(--accent-primary-deep);
}

body.ui-theme-dark .audio-dock input[type="range"] {
    accent-color: var(--accent-primary);
}

body.ui-theme-dark .audio-panel {
    background: #0b142c;
    border-color: var(--hairline-strong);
    color: var(--ink-1);
}

body.ui-theme-dark .audio-queue-row {
    background: transparent;
    border-color: var(--hairline);
}

body.ui-theme-dark .audio-queue-row:is(:hover, .active, .dragging) {
    background: var(--surface-raised);
}

body.ui-theme-dark :is(.audio-queue-copy small, .audio-queue-number, .audio-panel-head h2 em,
    .audio-panel-clear, .audio-icon-btn, .audio-queue-drag, .audio-queue-remove) {
    color: var(--ink-2);
}

body.ui-theme-dark .audio-queue-row.active .audio-queue-number {
    color: var(--accent-primary-deep);
}

body.ui-theme-dark :is(.audio-panel-clear, .audio-icon-btn, .audio-queue-remove):hover {
    color: var(--accent-primary-deep);
    background: var(--surface-raised);
}

/* Shared Dark Controls, Tabs, Disclosures, History & News */
body.ui-theme-dark .ui-search,
body.ui-theme-dark .ui-select-control {
    background: var(--surface-subtle);
    border-color: var(--hairline-strong);
    color: var(--ink-1);
    box-shadow: var(--shadow-control);
}

body.ui-theme-dark .ui-search input,
body.ui-theme-dark .ui-select-trigger,
body.ui-theme-dark .ui-select-value {
    color: var(--ink-1);
}

body.ui-theme-dark .ui-search input::placeholder,
body.ui-theme-dark .ui-select-label {
    color: var(--ink-3);
}

body.ui-theme-dark .ui-search > svg,
body.ui-theme-dark .ui-select-trigger > svg {
    stroke: var(--accent-primary-deep);
}

body.ui-theme-dark .ui-select-menu {
    background: #0b1530;
    border-color: var(--hairline-strong);
    box-shadow: var(--shadow-float);
}

body.ui-theme-dark .ui-select-menu button {
    color: var(--ink-1);
}

body.ui-theme-dark .ui-select-menu button:is(:hover, .active, .selected) {
    background: var(--surface-raised);
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .ui-state { color: var(--ink-2); }
body.ui-theme-dark .ui-state-error { color: #ffb6aa; }
body.ui-theme-dark .ui-retry {
    background: var(--surface-raised);
    border-color: var(--hairline-strong);
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .entity-tabs {
    border-bottom: 0;
}

body.ui-theme-dark .entity-tabs button {
    color: var(--ink-2);
    background: transparent;
}

body.ui-theme-dark .entity-tabs button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

body.ui-theme-dark .entity-tabs button.active {
    color: var(--accent-primary-deep);
    background: transparent;
    box-shadow: none;
}

body.ui-theme-dark .entity-section,
body.ui-theme-dark .pedigree-section {
    background: var(--surface-panel);
    border: 0;
    color: var(--ink-1);
    box-shadow: var(--shadow-panel);
}

body.ui-theme-dark .ui-disclosure-detail {
    background: var(--surface-subtle);
    border-color: var(--hairline);
}

body.ui-theme-dark .relation-song-row b,
body.ui-theme-dark .ui-disclosure-copy b,
body.ui-theme-dark .relation-version header,
body.ui-theme-dark .relation-release b,
body.ui-theme-dark .album-inline b,
body.ui-theme-dark .history-list strong,
body.ui-theme-dark .history-list > a > span:first-of-type {
    color: var(--ink-1);
}

body.ui-theme-dark .relation-song-meta,
body.ui-theme-dark .secondary-line,
body.ui-theme-dark .history-list time,
body.ui-theme-dark .history-list em {
    color: var(--ink-2);
}

body.ui-theme-dark .history-list > a:hover {
    background: var(--surface-hover);
}

body.ui-theme-dark .credit-role-tag,
body.ui-theme-dark .history-list em.credit-role-tag,
body.ui-theme-dark .related-news .section-toolbar h2 {
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
    border: 0;
}

body.ui-theme-dark .text-link,
body.ui-theme-dark .album-inline {
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .route-placeholder :is(.entity-hero, .entity-section, .entity-cover) {
    background: var(--surface-panel);
    border-color: var(--hairline);
    box-shadow: none;
}

body.ui-theme-dark .route-placeholder :is(i, .route-placeholder-lines > span) {
    background: var(--surface-raised);
}

/* High-contrast borderless tonal profile facts & editorial bio under night theme */
body.ui-theme-dark .profile-facts > div,
body.ui-theme-dark .detail-meta > div {
    background: var(--surface-subtle);
    border: 0;
}

body.ui-theme-dark .profile-facts > div:hover,
body.ui-theme-dark .detail-meta > div:hover {
    background: var(--surface-hover);
}

body.ui-theme-dark .profile-facts dt,
body.ui-theme-dark .detail-meta dt {
    color: var(--ink-3);
}

body.ui-theme-dark .profile-facts dd,
body.ui-theme-dark .detail-meta dd {
    color: var(--ink-1);
}

body.ui-theme-dark #tab-characters .character-description {
    background: var(--surface-subtle);
    border-left-color: var(--accent-primary);
    color: var(--ink-1);
}

/* Sticky Entity Context Navigation Bar (100% dark glass, zero white bar leak) */
body.ui-theme-dark .context-navigation {
    background: var(--surface-glass);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 12px 32px rgba(2, 6, 18, 0.5);
}

body.ui-theme-dark .context-identity {
    color: var(--ink-1);
}

body.ui-theme-dark .context-sections button {
    color: var(--ink-2);
}

body.ui-theme-dark .context-sections button:hover {
    color: #ffffff;
}

body.ui-theme-dark .context-sections button.active {
    color: var(--accent-primary-deep);
    box-shadow: inset 0 -2.5px 0 var(--accent-primary);
}

/* Sticky Archive Toolbar Backdrop */
body.ui-theme-dark .archive-surface:not(:has(.entity-detail)) .archive-toolbar::before {
    background: var(--surface-canvas);
    background-image: none;
}

/* Audio Queue Drawer & Controls under Dark Theme */
body.ui-theme-dark .audio-panel {
    background: rgba(10, 17, 36, 0.94);
    background-image: none;
    border-top: 1px solid var(--hairline);
    color: var(--ink-1);
}

body.ui-theme-dark .audio-panel-head {
    border-bottom-color: var(--hairline);
    color: var(--ink-1);
}

body.ui-theme-dark .audio-panel-head h2,
body.ui-theme-dark .audio-queue-copy b {
    color: var(--ink-1);
}

body.ui-theme-dark .audio-panel-head em,
body.ui-theme-dark .audio-queue-copy small,
body.ui-theme-dark .audio-queue-number {
    color: var(--ink-2);
}

body.ui-theme-dark .audio-queue-row:hover {
    background: var(--surface-hover);
}

body.ui-theme-dark .audio-queue-row.active {
    background: var(--accent-primary-soft);
}

body.ui-theme-dark .audio-queue-row.dragging {
    background: var(--surface-raised);
    box-shadow: 0 14px 34px rgba(2, 6, 18, 0.65);
}

body.ui-theme-dark .audio-panel-clear:hover {
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .audio-queue-remove:hover {
    background: rgba(255, 110, 110, 0.16);
    color: #ff9c9c;
}

body.ui-theme-dark .audio-quality.ui-select-control {
    background: var(--surface-raised);
    border-color: var(--hairline-strong);
    color: var(--ink-1);
}

body.ui-theme-dark .audio-quality .audio-quality-code {
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
}

body.ui-theme-dark .audio-quality .audio-quality-current {
    background: var(--accent-secondary-soft);
    color: var(--accent-secondary-end);
}

body.ui-theme-dark .audio-quality .selected :is(.audio-quality-code, .audio-quality-current) {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.ui-theme-dark .audio-queue-toggle em {
    background: var(--accent-primary);
    color: #060b18;
    border-color: #070d1e;
    font-weight: 800;
}

body.ui-theme-dark .audio-preview {
    background: var(--accent-primary-soft);
    color: var(--accent-primary-deep);
}

/* Back-to-top, Pedigree Container, Filter Pills & Misc Overlays */
body.ui-theme-dark .back-to-top {
    background: var(--surface-glass);
    border-color: var(--hairline-strong);
    color: var(--ink-1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.ui-theme-dark .back-to-top:hover {
    background: var(--accent-primary-soft);
    border-color: var(--accent-primary);
    color: var(--accent-primary-deep);
}

body.ui-theme-dark #tab-characters .c-pedigree-lens {
    background: var(--surface-panel);
    box-shadow: var(--shadow-panel);
}

body.ui-theme-dark .filter-pill,
body.ui-theme-dark .horse-expand-btn,
body.ui-theme-dark .news-refresh-btn {
    background: var(--surface-subtle);
    border-color: var(--hairline-strong);
    color: var(--ink-2);
}

body.ui-theme-dark .filter-pill.active,
body.ui-theme-dark .horse-expand-btn:hover,
body.ui-theme-dark .news-refresh-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #060b18;
}

body.ui-theme-dark .not-found-page {
    color: var(--ink-1);
}

body.ui-theme-dark .not-found-page p {
    color: var(--ink-2);
}
