/* ==========================================================================
   绿泡泡剧场 · H5 Design System
   ========================================================================== */
:root {
    --bg: #08080d;
    --bg-soft: #0e0e16;
    --panel: #15151f;
    --panel-2: #1d1d2a;
    --panel-3: #26263a;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);
    --txt: #f7f5f2;
    --sub: #a3a1b4;
    --muted: #6e6c80;
    --brand: #ff4063;
    --brand-2: #ff7c4d;
    --brand-soft: rgba(255, 64, 99, .14);
    --gold: #ffd27a;
    --jade: #3fd6c0;
    --blue: #64a8ff;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 20px 50px rgba(0, 0, 0, .45);
    --tabbar-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #050508;
    color: var(--txt);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(1000px 700px at 78% -10%, rgba(255, 64, 99, .18), transparent 60%),
        radial-gradient(800px 600px at 12% 110%, rgba(63, 214, 192, .12), transparent 60%),
        #050508;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0;
}

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

img {
    display: block;
    max-width: 100%;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, p {
    margin: 0;
}

svg {
    display: block;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* ------------------------------ App frame ------------------------------ */
#app {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    background: var(--bg);
    overflow: hidden;
    isolation: isolate;
}

@media (min-width: 521px) {
    #app {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 120px rgba(0, 0, 0, .7);
    }
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background:
            radial-gradient(600px 400px at 20% 10%, rgba(255, 64, 99, .10), transparent 70%),
            radial-gradient(500px 500px at 85% 90%, rgba(63, 214, 192, .08), transparent 70%);
        pointer-events: none;
    }
}

.page {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px);
    scrollbar-width: none;
    overscroll-behavior-y: contain;
}

.page.no-tabbar {
    padding-bottom: 24px;
}

.page.feed-page {
    padding-bottom: 0;
    overflow: hidden;
    background: #000;
}

.page-enter {
    animation: pageIn .26s ease both;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ------------------------------ Tabbar ------------------------------ */
.tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    display: flex;
    align-items: stretch;
    background: rgba(12, 12, 19, .86);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform .25s ease, opacity .25s ease;
}

.tabbar.is-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    transition: color .2s ease;
    position: relative;
}

.tab-item .tab-icon {
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-item .tab-icon svg {
    width: 100%;
    height: 100%;
}

.tab-item .tab-label {
    font-size: 10.5px;
    letter-spacing: .02em;
}

.tab-item.active {
    color: var(--txt);
}

.tab-item.active .tab-icon {
    color: var(--brand);
    filter: drop-shadow(0 0 10px rgba(255, 64, 99, .45));
}

.tab-item-feed .tab-icon {
    width: 38px;
    height: 26px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 64, 99, .35);
}

.tab-item-feed .tab-icon svg {
    width: 20px;
    height: 20px;
}

.tab-item-feed.active .tab-icon {
    color: #fff;
}

/* ------------------------------ Typography / utils ------------------------------ */
.h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 15px; font-weight: 700; }
.sub { color: var(--sub); }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.gold { color: var(--gold); }
.brand { color: var(--brand); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.gap4 { gap: 4px; }
.gap6 { gap: 6px; }
.gap8 { gap: 8px; }
.gap10 { gap: 10px; }
.gap12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; }
.mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.px16 { padding-left: 16px; padding-right: 16px; }

.icon {
    width: 22px;
    height: 22px;
    flex: none;
}

.icon-sm {
    width: 16px;
    height: 16px;
    flex: none;
}

.icon-lg {
    width: 27px;
    height: 27px;
    flex: none;
}

/* ------------------------------ Buttons ------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    background: var(--panel-2);
    color: var(--txt);
    border: 1px solid var(--line);
    transition: transform .12s ease, opacity .2s ease, background .2s ease;
    white-space: nowrap;
}

.btn:active { transform: scale(.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 64, 99, .26);
}

.btn-gold {
    background: linear-gradient(135deg, #ffd57d, #ff9e3d);
    border-color: transparent;
    color: #3a2300;
    box-shadow: 0 8px 22px rgba(255, 180, 70, .2);
}

.btn-ghost {
    background: rgba(255, 255, 255, .05);
    border-color: var(--line);
    color: var(--txt);
}

.btn-sm {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 999px;
}

.btn-xs {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

.btn:disabled,
.btn.disabled {
    opacity: .45;
    pointer-events: none;
}

.btn-soft-brand {
    background: var(--brand-soft);
    border-color: rgba(255, 64, 99, .25);
    color: #ff8aa0;
}

/* ------------------------------ Chips / badges ------------------------------ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid transparent;
    color: var(--sub);
    font-size: 12px;
    white-space: nowrap;
    transition: all .18s ease;
}

.chip.active {
    background: var(--brand-soft);
    border-color: rgba(255, 64, 99, .35);
    color: #ff8499;
    font-weight: 600;
}

.chip.special {
    background: linear-gradient(135deg, rgba(255, 210, 122, .16), rgba(255, 64, 99, .10));
    border-color: rgba(255, 210, 122, .25);
    color: var(--gold);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .07);
    color: var(--sub);
    font-size: 10px;
    line-height: 1.5;
    white-space: nowrap;
}

.tag.hot {
    background: rgba(255, 64, 99, .16);
    color: #ff8ba0;
}

.tag.gold {
    background: rgba(255, 210, 122, .14);
    color: var(--gold);
}

.badge-corner {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    z-index: 2;
}

.badge-corner.dark {
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
}

.dot-red {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 64, 99, .18);
}

/* ------------------------------ Surfaces ------------------------------ */
.glass {
    background: rgba(21, 21, 31, .72);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.card {
    background: linear-gradient(180deg, rgba(30, 30, 44, .92), rgba(18, 18, 27, .92));
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.section {
    padding: 18px 16px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.section-head .title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.section-head .title::before {
    content: "";
    width: 3px;
    height: 15px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.section-head .more {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--muted);
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 14px 0;
}

/* ------------------------------ Top bar ------------------------------ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(8, 8, 13, .96) 30%, rgba(8, 8, 13, .6) 75%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.topbar .brand-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.bubble-logo {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 15px;
    box-shadow: 0 6px 16px rgba(255, 64, 99, .32);
    position: relative;
    overflow: hidden;
}

.bubble-logo::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .26);
    top: 4px;
    left: 5px;
}

.brand-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.search-trigger {
    flex: 1;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}

.search-trigger .hot-word {
    color: #cf9a8b;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt);
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--line);
    position: relative;
    flex: none;
}

.icon-btn .badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    border: 1.5px solid var(--bg);
}

/* ------------------------------ Forms ------------------------------ */
.field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.field input,
.field textarea {
    width: 100%;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--txt);
    font-size: 14px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted);
}

.field.textarea {
    height: auto;
    padding: 12px 14px;
    align-items: flex-start;
}

.field textarea {
    resize: none;
    min-height: 76px;
    line-height: 1.6;
}

.switch {
    position: relative;
    width: 46px;
    height: 27px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid var(--line);
    flex: none;
    transition: background .2s ease;
}

.switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.switch.on {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
}

.switch.on::after {
    transform: translateX(19px);
    background: #fff;
}

.checkbox {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: all .18s ease;
}

.checkbox.on {
    background: var(--brand);
    border-color: var(--brand);
}

.checkbox svg {
    width: 11px;
    height: 11px;
    opacity: 0;
}

.checkbox.on svg { opacity: 1; }

/* ------------------------------ Skeletons ------------------------------ */
.sk {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .055);
    border-radius: 8px;
}

.sk::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

.sk-card {
    border-radius: 14px;
    overflow: hidden;
}

.sk-cover {
    aspect-ratio: 3 / 4;
    width: 100%;
    border-radius: 14px;
}

.sk-line {
    height: 11px;
    border-radius: 5px;
    margin-top: 8px;
}

.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }
.sk-line.w40 { width: 40%; }

/* ------------------------------ Empty / error ------------------------------ */
.state-box {
    padding: 52px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.state-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    color: var(--muted);
    margin-bottom: 4px;
}

.state-icon svg { width: 30px; height: 30px; }

.state-title { font-size: 15px; font-weight: 700; }
.state-desc { font-size: 12px; color: var(--muted); max-width: 260px; line-height: 1.7; }

/* ------------------------------ Toast / net ------------------------------ */
.toasts {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 18px);
    left: 0;
    right: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    padding: 0 30px;
}

.toast {
    max-width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(28, 28, 42, .94);
    border: 1px solid var(--line-strong);
    color: var(--txt);
    font-size: 12.5px;
    line-height: 1.55;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
    animation: toastIn .22s ease both;
    text-align: center;
    backdrop-filter: blur(14px);
}

.toast.out { animation: toastOut .2s ease both; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-6px) scale(.98); }
}

.net-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 280;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
    background: #7f2b3a;
    color: #ffdde4;
    font-size: 12px;
    text-align: center;
    transform: translateY(-110%);
    transition: transform .25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.net-banner.show { transform: none; }

.net-banner span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff8fa4;
    box-shadow: 0 0 0 3px rgba(255, 143, 164, .2);
}

/* ------------------------------ Overlay / sheet / modal ------------------------------ */
#layers {
    position: absolute;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

.overlay {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn .2s ease both;
    z-index: 1;
}

.overlay.center {
    align-items: center;
    padding: 24px;
}

.overlay.full {
    background: var(--bg);
    align-items: stretch;
}

.overlay.closing {
    animation: fadeOut .18s ease both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.sheet {
    width: 100%;
    max-height: 88%;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, #1b1b28, #111119);
    border-top: 1px solid var(--line-strong);
    padding: 8px 16px calc(18px + var(--safe-b));
    animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1) both;
    position: relative;
    scrollbar-width: none;
}

@keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: none; }
}

.sheet.closing { animation: sheetDown .2s ease both; }

@keyframes sheetDown {
    to { transform: translateY(100%); }
}

.sheet-grip {
    width: 38px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .18);
    margin: 4px auto 14px;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.sheet-title {
    font-size: 16px;
    font-weight: 800;
}

.sheet-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    flex: none;
}

.modal {
    width: 100%;
    max-width: 360px;
    border-radius: 22px;
    background: linear-gradient(180deg, #1d1d2b, #13131d);
    border: 1px solid var(--line-strong);
    padding: 22px 18px 18px;
    box-shadow: var(--shadow);
    animation: modalIn .24s cubic-bezier(.2, .8, .2, 1) both;
    max-height: 86%;
    overflow-y: auto;
}

.modal.closing { animation: modalOut .18s ease both; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(.96); }
    to { opacity: 1; transform: none; }
}

@keyframes modalOut {
    to { opacity: 0; transform: translateY(8px) scale(.97); }
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -.01em;
}

.modal-desc {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--sub);
    line-height: 1.75;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn { flex: 1; }

.overlay.full .full-page {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: var(--bg);
    animation: fadeIn .2s ease both;
}

/* ------------------------------ Lists / cells ------------------------------ */
.cell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--txt);
}

.cell:last-child { border-bottom: 0; }

.cell-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
    color: var(--sub);
    flex: none;
}

.cell-icon.brand { background: var(--brand-soft); color: #ff7d93; }
.cell-icon.gold { background: rgba(255, 210, 122, .12); color: var(--gold); }
.cell-icon.jade { background: rgba(63, 214, 192, .12); color: var(--jade); }
.cell-icon.blue { background: rgba(100, 168, 255, .12); color: var(--blue); }

.cell-title { font-size: 13.5px; font-weight: 600; }
.cell-desc { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.cell-arrow { color: var(--muted); flex: none; }
.cell-arrow svg { width: 16px; height: 16px; }

.list-group {
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
}

/* ------------------------------ Loading spinner ------------------------------ */
.spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .16);
    border-top-color: var(--brand);
    animation: spin .8s linear infinite;
    flex: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    color: var(--muted);
    font-size: 12px;
}

/* ------------------------------ Avatar ------------------------------ */
.avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #5b5b7a, #35354d);
    flex: none;
    overflow: hidden;
}

.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.md { width: 44px; height: 44px; font-size: 16px; }
.avatar.lg { width: 62px; height: 62px; font-size: 22px; }

/* ------------------------------ Poster / QR ------------------------------ */
.poster-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.poster-canvas {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #191925;
    box-shadow: var(--shadow);
}

.poster-canvas img {
    width: 100%;
    display: block;
}

.poster-tip {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

/* ==========================================================================
   Home · 免费剧场
   ========================================================================== */
.home-refresh {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 5;
    pointer-events: none;
}

.home-refresh.show { opacity: 1; transform: none; }

.home-refresh .spinner { width: 15px; height: 15px; }

/* Banner */
.hero {
    padding: 8px 0 0;
}

.hero-track-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 0 14px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .4);
}

.hero-track {
    display: flex;
    transition: transform .45s cubic-bezier(.22, .8, .24, 1);
    will-change: transform;
}

.hero-slide {
    flex: 0 0 100%;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1b1b28;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .32) 55%, rgba(0, 0, 0, .05) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .82), transparent 58%);
}

.hero-content {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 64, 99, .9);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 7px;
    backdrop-filter: blur(6px);
}

.hero-slide[data-theme="jade"] .hero-badge { background: rgba(36, 170, 154, .9); }
.hero-slide[data-theme="gold"] .hero-badge { background: rgba(209, 154, 48, .92); }
.hero-slide[data-theme="amber"] .hero-badge { background: rgba(184, 122, 68, .92); }

.hero-title {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
    line-height: 1.25;
}

.hero-sub {
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, .72);
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.hero-play {
    position: absolute;
    right: 16px;
    bottom: 18px;
    z-index: 2;
    height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #14141c;
    font-size: 11.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    margin-top: 9px;
    height: 6px;
}

.hero-dots i {
    width: 5px;
    height: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .22);
    transition: all .25s ease;
}

.hero-dots i.on {
    width: 16px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

/* Category */
.category-panel {
    position: sticky;
    top: 0;
    z-index: 25;
    margin-top: 12px;
    padding: 8px 0 8px;
    background: linear-gradient(180deg, rgba(8, 8, 13, .98) 74%, rgba(8, 8, 13, .9));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.form-tabs {
    display: flex;
    gap: 6px;
    padding: 0 14px;
    overflow-x: auto;
}

.form-tab {
    position: relative;
    padding: 6px 12px 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sub);
    white-space: nowrap;
    transition: color .2s ease;
}

.form-tab.active {
    color: var(--txt);
    font-weight: 800;
}

.form-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 3px;
    border-radius: 3px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    box-shadow: 0 2px 8px rgba(255, 64, 99, .4);
}

.genre-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 8px 14px 4px;
    scrollbar-width: none;
}

.genre-row .chip {
    height: 27px;
    font-size: 11.5px;
}

.special-row {
    display: flex;
    gap: 8px;
    padding: 6px 14px 0;
}

.special-pill {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    background: linear-gradient(135deg, rgba(255, 64, 99, .12), rgba(255, 124, 77, .06));
    border: 1px solid rgba(255, 64, 99, .18);
    position: relative;
    overflow: hidden;
}

.special-pill::after {
    content: "";
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    right: -16px;
    top: -18px;
    background: rgba(255, 255, 255, .05);
}

.special-pill .sp-icon {
    width: 27px;
    height: 27px;
    border-radius: 9px;
    background: rgba(255, 64, 99, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff8598;
    flex: none;
}

.special-pill .sp-icon svg { width: 15px; height: 15px; }

.special-pill .sp-title {
    font-size: 12px;
    font-weight: 700;
}

.special-pill .sp-sub {
    font-size: 9.5px;
    color: var(--muted);
    margin-top: 1px;
}

.special-pill:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 210, 122, .12), rgba(255, 160, 70, .04));
    border-color: rgba(255, 210, 122, .18);
}

.special-pill:nth-child(2) .sp-icon {
    background: rgba(255, 210, 122, .13);
    color: var(--gold);
}

/* Drama grid */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 11px;
    padding: 2px 14px 0;
}

.drama-card {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.drama-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #1b1b28;
    border: 1px solid rgba(255, 255, 255, .06);
}

.drama-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.drama-card:active .drama-cover img { transform: scale(1.035); }

.drama-cover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(0, 0, 0, .86), transparent);
}

.cover-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.cover-badges .tag {
    background: rgba(0, 0, 0, .52);
    color: #fff;
    backdrop-filter: blur(6px);
    font-size: 9.5px;
    padding: 3px 7px;
    border-radius: 6px;
}

.cover-badges .tag.free {
    background: rgba(255, 64, 99, .88);
}

.cover-meta {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9.5px;
    color: rgba(255, 255, 255, .78);
}

.cover-meta .heat {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--gold);
    font-weight: 600;
}

.cover-meta .heat svg { width: 10px; height: 10px; }

.drama-title {
    margin-top: 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.drama-sub {
    margin-top: 3px;
    font-size: 10.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drama-tags {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    overflow: hidden;
}

.drama-tags .tag {
    background: rgba(255, 255, 255, .05);
    font-size: 9.5px;
    padding: 2px 6px;
    color: #9b99ac;
}

.drama-tags .tag:first-child {
    color: #d6a87d;
    background: rgba(255, 210, 122, .08);
}

.drama-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 9.5px;
    color: var(--muted);
}

.drama-stats .sep {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--muted);
}

.feed-ad-card {
    grid-column: 1 / -1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(120deg, #24203a, #151521 60%);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feed-ad-card::before {
    content: "广告";
    position: absolute;
    top: 7px;
    right: 8px;
    font-size: 8.5px;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .35);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 4px;
    padding: 1px 4px;
}

.feed-ad-card .ad-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(100, 168, 255, .3), rgba(63, 214, 192, .16));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bcdcff;
    flex: none;
}

.feed-ad-card .ad-title {
    font-size: 13px;
    font-weight: 700;
}

.feed-ad-card .ad-desc {
    font-size: 10.5px;
    color: var(--muted);
    margin-top: 3px;
}

.feed-ad-card .ad-go {
    flex: none;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid var(--line);
    font-size: 11px;
    color: var(--txt);
}

/* Ranking */
.rank-tabs {
    display: flex;
    gap: 6px;
    padding: 0 16px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.rank-tab {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: var(--sub);
    font-size: 11.5px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.rank-tab.active {
    background: rgba(255, 210, 122, .12);
    color: var(--gold);
    border-color: rgba(255, 210, 122, .2);
    font-weight: 600;
}

.city-select {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--sub);
}

.rank-list {
    margin: 0 16px;
    padding: 4px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .032);
    border: 1px solid var(--line);
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    cursor: pointer;
}

.rank-row:last-child { border-bottom: 0; }

.rank-no {
    width: 20px;
    font-size: 14px;
    font-weight: 900;
    font-style: italic;
    color: var(--muted);
    text-align: center;
    flex: none;
}

.rank-row:nth-child(1) .rank-no { color: #ff5a70; }
.rank-row:nth-child(2) .rank-no { color: #ffac5a; }
.rank-row:nth-child(3) .rank-no { color: #ffd27a; }

.rank-cover {
    width: 40px;
    height: 53px;
    border-radius: 7px;
    overflow: hidden;
    flex: none;
    background: #22222f;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info { min-width: 0; flex: 1; }
.rank-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-tags { display: flex; gap: 4px; margin-top: 4px; }
.rank-tags .tag { font-size: 9px; padding: 1px 5px; }
.rank-num { text-align: right; flex: none; }
.rank-heat { font-size: 10px; color: var(--gold); font-weight: 600; }
.rank-rise { font-size: 9px; color: #ff7b8e; margin-top: 2px; }
.rank-rise.down { color: var(--muted); }

/* Friends */
.friend-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 16px 2px;
}

.friend-card {
    flex: 0 0 108px;
    border-radius: 13px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
    cursor: pointer;
}

.friend-cover {
    height: 76px;
    position: relative;
    overflow: hidden;
}

.friend-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.9);
}

.friend-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .66), transparent 70%);
}

.friend-who {
    position: absolute;
    left: 7px;
    bottom: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.friend-who .avatar {
    width: 18px;
    height: 18px;
    font-size: 8px;
    border: 1px solid rgba(255, 255, 255, .25);
}

.friend-who span {
    font-size: 9px;
    color: rgba(255, 255, 255, .86);
}

.friend-body {
    padding: 7px 8px 8px;
}

.friend-drama {
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-action {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
    font-size: 9px;
    color: var(--muted);
}

.friend-action svg { width: 9px; height: 9px; color: var(--brand); }

/* Home footer */
.home-footer {
    padding: 24px 16px 12px;
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, .22);
    line-height: 1.9;
}

.home-footer .brand-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 3px;
}

.home-footer svg { width: 11px; height: 11px; }

/* ==========================================================================
   Search overlay
   ========================================================================== */
.search-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}

.search-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    flex: none;
}

.search-input-wrap {
    flex: 1;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    min-width: 0;
}

.search-input-wrap svg { color: var(--muted); }

.search-input-wrap input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--txt);
    font-size: 13.5px;
}

.search-input-wrap input::placeholder { color: var(--muted); }

.search-cancel {
    font-size: 13px;
    color: var(--sub);
    flex: none;
    padding: 6px 2px;
}

.search-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 16px calc(20px + var(--safe-b));
    scrollbar-width: none;
}

.search-block { margin-top: 18px; }

.search-block-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 11px;
}

.search-block-title .clear-mini {
    font-size: 10px;
    color: var(--muted);
}

.hot-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 2px;
    cursor: pointer;
    border-radius: 8px;
}

.hot-item:active { background: rgba(255, 255, 255, .04); }

.hot-rank {
    width: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    font-style: italic;
    color: var(--muted);
    flex: none;
}

.hot-item:nth-child(1) .hot-rank { color: #ff4f66; }
.hot-item:nth-child(2) .hot-rank { color: #ff9a52; }
.hot-item:nth-child(3) .hot-rank { color: #ffd27a; }

.hot-keyword {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-heat { font-size: 10px; color: var(--muted); flex: none; }

.suggest-box {
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    overflow: hidden;
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    font-size: 13px;
    cursor: pointer;
}

.suggest-item:last-child { border-bottom: 0; }
.suggest-item svg { color: var(--muted); flex: none; }
.suggest-item .match { color: var(--brand); }

.search-result-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.search-result {
    display: flex;
    gap: 11px;
    padding: 9px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    cursor: pointer;
}

.search-result-cover {
    width: 66px;
    height: 88px;
    border-radius: 9px;
    overflow: hidden;
    flex: none;
    background: #22222f;
}

.search-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info { flex: 1; min-width: 0; padding: 2px 0; }
.search-result-title { font-size: 13.5px; font-weight: 700; }
.search-result-sub { font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.search-result-meta { display: flex; gap: 5px; margin-top: 6px; }
.search-result-match { margin-top: 6px; font-size: 10px; color: #c69274; }

.search-empty {
    padding: 40px 10px 20px;
    text-align: center;
}

.search-empty .em-title { font-size: 14px; font-weight: 700; }
.search-empty .em-desc { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.search-fallback-title {
    margin: 20px 0 11px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
}

/* ==========================================================================
   Feed · 刷一刷沉浸播放
   ========================================================================== */
.feed-shell {
    position: absolute;
    inset: 0;
    background: #000;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.feed-stage {
    position: absolute;
    inset: 0;
    transition: transform .22s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
    background: #000;
}

.feed-stage.dragging { transition: none; }

.feed-poster,
.feed-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.feed-poster {
    filter: brightness(.82) saturate(1.02);
    transition: opacity .4s ease;
}

.feed-video {
    opacity: 0;
    transition: opacity .3s ease;
}

.feed-video.ready { opacity: 1; }

.feed-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .62) 0%, transparent 22%, transparent 58%, rgba(0, 0, 0, .82) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 22%, transparent 78%, rgba(0, 0, 0, .22));
}

.feed-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feed-back,
.feed-top-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    color: #fff;
    flex: none;
}

.feed-top-title {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}

.feed-top-title small {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: rgba(255, 255, 255, .55);
    margin-top: 1px;
    letter-spacing: .2em;
}

.feed-lock-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 13;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .75);
    backdrop-filter: blur(8px);
}

.feed-lock-btn.active {
    color: var(--gold);
    border-color: rgba(255, 210, 122, .4);
    background: rgba(49, 36, 12, .55);
}

/* Center play state */
.feed-center {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.feed-big-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .38);
    border: 1px solid rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(.85);
    transition: all .2s ease;
    pointer-events: auto;
}

.feed-big-play.show {
    opacity: 1;
    transform: none;
}

.feed-big-play svg { width: 26px; height: 26px; margin-left: 3px; }

.feed-big-play.paused svg { margin-left: 0; }

/* Interaction rail */
.feed-rail {
    position: absolute;
    right: 9px;
    bottom: calc(152px + var(--safe-b));
    z-index: 14;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 56px;
}

.rail-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #fff;
    width: 100%;
}

.rail-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .26);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
    transition: transform .15s ease, color .2s ease;
    color: #fff;
}

.rail-btn:active .rail-icon { transform: scale(.9); }

.rail-btn.on .rail-icon {
    color: var(--brand);
    border-color: rgba(255, 64, 99, .32);
    background: rgba(52, 12, 23, .5);
}

.rail-btn.on .rail-icon svg { fill: currentColor; }

.rail-count {
    font-size: 9.5px;
    color: rgba(255, 255, 255, .82);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    line-height: 1.2;
}

.rail-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 2px;
}

.rail-avatar .avatar {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255, 255, 255, .8);
    font-size: 16px;
    background: linear-gradient(135deg, #ff6a7e, #7a5cff);
}

.rail-follow {
    position: absolute;
    left: 50%;
    bottom: -7px;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand);
    border: 1.5px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.rail-follow svg { width: 10px; height: 10px; }
.rail-follow.following { background: var(--panel-3); color: var(--sub); }

/* Bottom info */
.feed-bottom {
    position: absolute;
    left: 0;
    right: 64px;
    bottom: calc(56px + var(--safe-b));
    z-index: 12;
    padding: 0 14px;
}

.feed-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.feed-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

.feed-ep-chip {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 9.5px;
    color: rgba(255, 255, 255, .9);
    backdrop-filter: blur(6px);
}

.feed-form-chip {
    padding: 2px 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 64, 99, .85), rgba(255, 124, 77, .8));
    font-size: 9px;
    font-weight: 600;
    color: #fff;
}

.feed-tags {
    display: flex;
    gap: 5px;
    margin-top: 7px;
    flex-wrap: wrap;
}

.feed-tag {
    font-size: 9.5px;
    color: rgba(255, 255, 255, .72);
}

.feed-tag::before { content: "#"; opacity: .5; }

.feed-synopsis {
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.62;
    color: rgba(255, 255, 255, .7);
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
    max-width: 94%;
}

.feed-synopsis.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed-synopsis-toggle {
    margin-top: 4px;
    font-size: 9.5px;
    color: rgba(255, 255, 255, .48);
}

.feed-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
    flex-wrap: wrap;
}

.feed-pill {
    height: 31px;
    padding: 0 11px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .13);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
}

.feed-pill.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(255, 64, 99, .3);
}

.feed-pill.gold {
    background: linear-gradient(135deg, #ffd57d, #ffa53d);
    border-color: transparent;
    color: #3b2400;
}

.feed-pill svg { width: 13px; height: 13px; }

.feed-pill .unlock-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
}

/* Progress */
.feed-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    padding: 0 12px calc(8px + var(--safe-b));
    transition: opacity .22s ease, transform .22s ease;
}

.feed-progress-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feed-time {
    font-size: 9px;
    color: rgba(255, 255, 255, .55);
    font-variant-numeric: tabular-nums;
    flex: none;
    min-width: 26px;
    text-align: center;
}

.progress-track {
    flex: 1;
    height: 24px;
    display: flex;
    align-items: center;
    position: relative;
    touch-action: none;
    cursor: pointer;
}

.progress-rail {
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .2);
    overflow: visible;
    position: relative;
}

.progress-buffer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, .28);
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.progress-thumb {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    left: 0;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .2s ease;
}

.feed-progress.show-controls .progress-thumb { opacity: 1; }

.progress-track.dragging .progress-thumb { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }

.feed-bottom-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    padding-left: 34px;
}

.feed-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, .58);
    font-size: 9.5px;
}

.feed-mini svg { width: 12px; height: 12px; }

.feed-ad-mini {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: rgba(255, 255, 255, .38);
}

.feed-ad-mini b {
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 3px;
    padding: 0 3px;
    font-size: 8px;
}

/* Controls overlay */
.feed-controls {
    position: absolute;
    inset: 0;
    z-index: 11;
    pointer-events: none;
    opacity: 0;
    transition: opacity .22s ease;
}

.feed-controls.show {
    opacity: 1;
}

.feed-controls .ctl {
    pointer-events: auto;
}

.ctl-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ctl-center svg { width: 24px; height: 24px; }
.ctl-center.play svg { margin-left: 3px; }

.ctl-right-top {
    position: absolute;
    right: 12px;
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ctl-mini-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .85);
}

.ctl-speed {
    position: absolute;
    left: 12px;
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .32);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
    font-size: 10.5px;
    color: rgba(255, 255, 255, .86);
    display: flex;
    align-items: center;
    gap: 3px;
    pointer-events: auto;
}

.speed-menu {
    position: absolute;
    left: 12px;
    top: calc(env(safe-area-inset-top, 0px) + 90px);
    z-index: 20;
    background: rgba(20, 20, 30, .95);
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

.speed-menu.show { display: flex; }

.speed-menu button {
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 11px;
    color: var(--sub);
    text-align: left;
    white-space: nowrap;
}

.speed-menu button.on {
    background: var(--brand-soft);
    color: #ff8ba0;
    font-weight: 700;
}

.vol-pop {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 30, .9);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 8px 6px;
    display: none;
    align-items: center;
    backdrop-filter: blur(14px);
}

.vol-pop.show { display: flex; }

.vol-pop input[type="range"] {
    -webkit-appearance: none;
    width: 86px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand) 70%, rgba(255, 255, 255, .18) 70%);
    outline: none;
}

.vol-pop input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.feed-locked {
    position: absolute;
    inset: 0;
    z-index: 16;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(12px);
}

.feed-locked .lock-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-bottom: 14px;
}

.feed-locked .lock-icon svg { width: 25px; height: 25px; }
.feed-locked .lk-title { font-size: 17px; font-weight: 800; }
.feed-locked .lk-desc { margin-top: 7px; font-size: 11.5px; color: rgba(255, 255, 255, .56); line-height: 1.7; max-width: 250px; }
.feed-locked .lk-actions { display: flex; gap: 9px; margin-top: 18px; }

.feed-teen-block {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px;
}

.feed-teen-block .teen-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: rgba(63, 214, 192, .1);
    border: 1px solid rgba(63, 214, 192, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jade);
    margin-bottom: 16px;
}

.feed-teen-block h3 { font-size: 17px; font-weight: 800; }
.feed-teen-block p { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 8px; max-width: 270px; }

.feed-swipe-hint {
    position: absolute;
    right: 13px;
    bottom: calc(124px + var(--safe-b));
    z-index: 9;
    writing-mode: vertical-rl;
    font-size: 8.5px;
    letter-spacing: .16em;
    color: rgba(255, 255, 255, .28);
    text-orientation: mixed;
    pointer-events: none;
    transition: opacity .4s ease;
}

/* Episode drawer */
.ep-drawer-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ep-drawer-cover {
    width: 58px;
    height: 78px;
    border-radius: 9px;
    overflow: hidden;
    flex: none;
    background: #25253a;
}

.ep-drawer-cover img { width: 100%; height: 100%; object-fit: cover; }
.ep-drawer-title { font-size: 14px; font-weight: 800; line-height: 1.4; }
.ep-drawer-desc { margin-top: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.6; }

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

.ep-cell {
    height: 40px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 12px;
    color: var(--sub);
    position: relative;
    transition: all .15s ease;
}

.ep-cell small {
    font-size: 7px;
    color: var(--muted);
    line-height: 1;
}

.ep-cell.free,
.ep-cell.unlocked {
    background: rgba(255, 255, 255, .08);
    color: var(--txt);
}

.ep-cell.current {
    border-color: var(--brand);
    background: rgba(255, 64, 99, .14);
    color: #ff8ba0;
    font-weight: 800;
}

.ep-cell.watched {
    color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .035);
}

.ep-cell.watched small { color: rgba(63, 214, 192, .7); }

.ep-cell.locked {
    color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .025);
    border-color: rgba(255, 255, 255, .05);
}

.ep-cell.locked small { color: rgba(255, 210, 122, .55); }

.ep-cell .new-flag {
    position: absolute;
    top: -5px;
    right: -4px;
    padding: 0 3px;
    height: 12px;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
    font-size: 7px;
    line-height: 12px;
    font-weight: 600;
}

.ep-legend {
    display: flex;
    gap: 14px;
    margin: 13px 0 2px;
    font-size: 9.5px;
    color: var(--muted);
}

.ep-legend i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    margin-right: 4px;
    background: rgba(255, 255, 255, .1);
}

.ep-legend i.free { background: rgba(255, 255, 255, .3); }
.ep-legend i.watched { background: rgba(63, 214, 192, .5); }
.ep-legend i.locked { background: rgba(255, 210, 122, .3); }

/* Unlock sheet */
.unlock-hero {
    text-align: center;
    padding: 4px 10px 16px;
}

.unlock-hero .u-ico {
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(255, 210, 122, .22), rgba(255, 124, 77, .1));
    border: 1px solid rgba(255, 210, 122, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.unlock-hero h3 { font-size: 17px; font-weight: 800; }
.unlock-hero p { margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

.unlock-methods {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.unlock-method {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--line);
    text-align: left;
    width: 100%;
}

.unlock-method.primary {
    background: linear-gradient(135deg, rgba(255, 64, 99, .16), rgba(255, 124, 77, .06));
    border-color: rgba(255, 64, 99, .3);
}

.unlock-method .um-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex: none;
}

.unlock-method.primary .um-icon {
    background: var(--brand-soft);
    color: #ff8ba0;
}

.unlock-method .um-title { font-size: 13px; font-weight: 700; }
.unlock-method .um-desc { margin-top: 3px; font-size: 10px; color: var(--muted); }
.unlock-method .um-go {
    margin-left: auto;
    flex: none;
    font-size: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: var(--sub);
}

.unlock-footnote {
    margin-top: 12px;
    text-align: center;
    font-size: 9.5px;
    color: rgba(255, 255, 255, .3);
    line-height: 1.7;
}

/* Reward ad */
.ad-layer {
    position: absolute;
    inset: 0;
    z-index: 400;
    background: #0c0c14;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn .18s ease both;
}

.ad-visual {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px 500px at 70% 20%, rgba(255, 64, 99, .34), transparent 62%),
        radial-gradient(600px 500px at 20% 80%, rgba(63, 214, 192, .18), transparent 65%),
        linear-gradient(160deg, #251426, #0a0a12 55%, #101024);
}

.ad-visual::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .045), transparent 30%);
    animation: adSweep 8s linear infinite;
}

@keyframes adSweep {
    to { transform: rotate(360deg); }
}

.ad-topbar {
    position: relative;
    z-index: 2;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ad-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: rgba(255, 255, 255, .5);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 5px;
    padding: 3px 7px;
    letter-spacing: .06em;
}

.ad-countdown {
    width: 42px;
    height: 42px;
    position: relative;
}

.ad-countdown svg {
    width: 42px;
    height: 42px;
    transform: rotate(-90deg);
}

.ad-countdown .ring-bg { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 3; }
.ad-countdown .ring-fg {
    fill: none;
    stroke: var(--gold);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset .9s linear;
}

.ad-countdown span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.ad-body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px 90px;
    text-align: center;
}

.ad-brand-badge {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    box-shadow: 0 16px 40px rgba(255, 64, 99, .3);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.ad-brand-badge::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    top: 8px;
    left: 10px;
}

.ad-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.ad-sub {
    margin-top: 8px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.7;
    max-width: 260px;
}

.ad-progress-note {
    margin-top: 22px;
    font-size: 10px;
    color: rgba(255, 255, 255, .4);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    padding: 5px 12px;
}

.ad-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 16px 18px calc(18px + var(--safe-b));
    background: linear-gradient(0deg, rgba(0, 0, 0, .72), transparent);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ad-skip {
    margin-left: auto;
    height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    font-weight: 600;
    min-width: 108px;
}

.ad-skip.ready {
    background: rgba(255, 255, 255, .94);
    color: #12121a;
}

.ad-fail {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.ad-fail .fail-ico {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 16px;
}

.ad-fail h3 { font-size: 16px; font-weight: 800; }
.ad-fail p { margin-top: 7px; font-size: 11.5px; color: rgba(255, 255, 255, .45); line-height: 1.8; max-width: 250px; }
.ad-fail .fail-actions { display: flex; gap: 9px; margin-top: 20px; }

/* Mini player */
.mini-player {
    position: absolute;
    right: 12px;
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
    z-index: 90;
    width: 168px;
    height: 96px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    animation: miniIn .25s cubic-bezier(.2, .8, .2, 1) both;
    cursor: pointer;
}

@keyframes miniIn {
    from { opacity: 0; transform: translateY(14px) scale(.9); }
    to { opacity: 1; transform: none; }
}

.mini-player video,
.mini-player img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-player .mini-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .72), transparent 60%);
}

.mini-player .mini-title {
    position: absolute;
    left: 8px;
    right: 26px;
    bottom: 6px;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, .9);
}

.mini-player .mini-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .48);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
}

.mini-player .mini-close svg { width: 11px; height: 11px; }

.mini-player .mini-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background: var(--brand);
    z-index: 2;
}

.mini-player .mini-pause {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .8);
}

.mini-player .mini-pause svg { width: 24px; height: 24px; }

/* ==========================================================================
   Detail · 剧集详情
   ========================================================================== */
.detail-page {
    background: var(--bg);
    min-height: 100%;
}

.detail-hero {
    position: relative;
    height: 360px;
    overflow: hidden;
    background: #14141e;
}

.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    transform: scale(1.04);
    filter: brightness(.86);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 8, 13, .32) 0%, transparent 35%, rgba(8, 8, 13, .72) 72%, var(--bg) 100%),
        linear-gradient(90deg, rgba(8, 8, 13, .4), transparent 55%);
}

.detail-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 6px;
}

.detail-nav .round-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .36);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.detail-hero-content {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 5;
}

.detail-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.24;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

.detail-subtitle {
    margin-top: 5px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .6);
}

.detail-hero-tags {
    display: flex;
    gap: 5px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.detail-hero-tags .tag {
    background: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .88);
    backdrop-filter: blur(6px);
    font-size: 9.5px;
}

.detail-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 11px;
    font-size: 10px;
    color: rgba(255, 255, 255, .62);
}

.detail-stats b {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-right: 2px;
}

.detail-body {
    padding: 4px 16px 0;
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-top: -4px;
    position: relative;
    z-index: 6;
}

.detail-action {
    flex: 1;
    height: 46px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 9.5px;
    color: var(--sub);
    transition: all .2s ease;
}

.detail-action svg { width: 17px; height: 17px; }
.detail-action.on { color: var(--brand); border-color: rgba(255, 64, 99, .3); background: var(--brand-soft); }
.detail-action.on svg { fill: currentColor; }
.detail-action.play {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(255, 64, 99, .24);
}

.detail-action.play svg { width: 18px; height: 18px; fill: currentColor; }

.detail-block {
    margin-top: 20px;
}

.detail-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.detail-block-head h3 {
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-block-head h3::before {
    content: "";
    width: 3px;
    height: 13px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.detail-block-head .more {
    font-size: 10px;
    color: var(--muted);
}

.synopsis-box {
    font-size: 12px;
    line-height: 1.8;
    color: var(--sub);
    background: rgba(255, 255, 255, .032);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 12px 13px;
    transition: max-height .25s ease;
}

.synopsis-box.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.synopsis-more {
    margin-top: 7px;
    font-size: 10.5px;
    color: #ff8ba0;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.detail-meta-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 10px;
    color: var(--muted);
}

.detail-meta-line .copyright {
    color: rgba(255, 210, 122, .66);
}

/* Unlock */
.unlock-panel {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.unlock-option {
    flex: 1;
    border-radius: 13px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
    padding: 12px 9px;
    min-width: 0;
    transition: all .2s ease;
}

.unlock-option:active { transform: scale(.97); }

.unlock-option.hot {
    background: linear-gradient(160deg, rgba(255, 64, 99, .14), rgba(255, 124, 77, .04));
    border-color: rgba(255, 64, 99, .26);
}

.unlock-option .uo-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-bottom: 8px;
}

.unlock-option.hot .uo-icon { background: var(--brand-soft); color: #ff8ba0; }
.unlock-option .uo-icon svg { width: 14px; height: 14px; }
.unlock-option .uo-title { font-size: 11px; font-weight: 700; line-height: 1.3; }
.unlock-option .uo-desc { font-size: 8.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; min-height: 24px; }
.unlock-option .uo-price { font-size: 11px; color: var(--gold); font-weight: 800; margin-top: 5px; }

.unlock-hint {
    margin-top: 10px;
    font-size: 9.5px;
    color: var(--muted);
    line-height: 1.7;
    text-align: center;
}

/* Episodes */
.ep-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ep-summary {
    font-size: 10px;
    color: var(--muted);
}

.ep-sort-btns {
    display: flex;
    gap: 6px;
}

.ep-sort-btns button {
    font-size: 10px;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .04);
}

.ep-sort-btns button.on {
    color: var(--gold);
    background: rgba(255, 210, 122, .1);
}

.detail-ep-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

/* Related */
.related-row {
    margin-top: 14px;
}

.related-row .related-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--sub);
    margin-bottom: 8px;
}

.related-row .related-head::before {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--brand);
}

.related-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.related-item {
    flex: 0 0 88px;
    cursor: pointer;
}

.related-cover {
    width: 88px;
    height: 117px;
    border-radius: 9px;
    overflow: hidden;
    background: #20202e;
    position: relative;
}

.related-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-cover .tag { position: absolute; left: 5px; bottom: 5px; font-size: 8px; background: rgba(0, 0, 0, .55); color: #fff; }
.related-name { margin-top: 5px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Comments */
.comment-head-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.comment-head-tabs button {
    font-size: 11px;
    color: var(--muted);
    padding: 3px 0;
    position: relative;
}

.comment-head-tabs button.on {
    color: var(--txt);
    font-weight: 700;
}

.comment-head-tabs button.on::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.comment-item {
    display: flex;
    gap: 9px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5a5a78, #34344a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex: none;
    overflow: hidden;
}

.comment-main { flex: 1; min-width: 0; }
.comment-userline { display: flex; align-items: center; gap: 5px; }
.comment-user { font-size: 11px; color: #b9b7c8; font-weight: 600; }
.comment-mine { font-size: 8px; color: var(--brand); border: 1px solid rgba(255, 64, 99, .3); border-radius: 3px; padding: 0 3px; }
.comment-time { font-size: 8.5px; color: rgba(255, 255, 255, .26); margin-left: auto; flex: none; }
.comment-text { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .8); line-height: 1.65; word-break: break-word; }
.comment-ops { display: flex; align-items: center; gap: 14px; margin-top: 5px; }
.comment-op { display: flex; align-items: center; gap: 3px; font-size: 9px; color: var(--muted); }
.comment-op svg { width: 12px; height: 12px; }
.comment-op.on { color: var(--brand); }
.comment-op.on svg { fill: currentColor; }
.comment-replies {
    margin-top: 8px;
    background: rgba(255, 255, 255, .035);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.comment-reply { font-size: 10.5px; line-height: 1.6; color: var(--sub); }
.comment-reply b { color: #b9b7c8; font-weight: 600; }
.comment-more-replies { font-size: 9.5px; color: #c99a7d; }
.comment-empty { padding: 30px 10px; text-align: center; font-size: 11px; color: var(--muted); }

.comment-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
}

.comment-input-bar input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--txt);
    font-size: 12px;
    padding: 0 4px;
}

.comment-input-bar input::placeholder { color: var(--muted); }

.comment-send {
    flex: none;
    height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.detail-promo {
    margin-top: 20px;
    border-radius: 15px;
    padding: 14px;
    background: linear-gradient(120deg, rgba(255, 210, 122, .12), rgba(255, 64, 99, .06));
    border: 1px solid rgba(255, 210, 122, .16);
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-promo .promo-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 210, 122, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex: none;
}

.detail-promo .promo-title { font-size: 12px; font-weight: 700; }
.detail-promo .promo-desc { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.detail-promo .btn { margin-left: auto; flex: none; }

/* Detail sticky bottom */
.detail-bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 22px;
    padding: 10px 16px calc(12px + var(--safe-b));
    display: flex;
    gap: 9px;
    align-items: center;
    background: linear-gradient(0deg, var(--bg) 60%, rgba(8, 8, 13, .88) 85%, transparent);
    backdrop-filter: blur(10px);
}

.detail-bottom-bar .btn { height: 44px; }

/* ==========================================================================
   Share sheet / poster / report
   ========================================================================== */
.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 6px 0 14px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    font-size: 10px;
    color: var(--sub);
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform .15s ease;
}

.share-item:active .share-icon { transform: scale(.92); }
.share-icon.wechat { background: linear-gradient(135deg, #42d06e, #25a94d); }
.share-icon.group { background: linear-gradient(135deg, #ffb648, #f08222); }
.share-icon.moments { background: linear-gradient(135deg, #5da8ff, #3478e0); }
.share-icon.poster { background: linear-gradient(135deg, #ff6b85, #ff8d53); }
.share-icon.copy { background: linear-gradient(135deg, #4d4d68, #313146); }
.share-icon.report { background: linear-gradient(135deg, #8a6d6d, #5b4646); }

.share-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--line);
    font-size: 10px;
    color: var(--muted);
}

.share-link-box .link-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--sub);
}

.share-params {
    margin-top: 10px;
    font-size: 9px;
    color: rgba(255, 255, 255, .3);
    line-height: 1.7;
    text-align: center;
}

.poster-preview {
    border-radius: 18px;
    overflow: hidden;
    background: #191925;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

.poster-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

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

.poster-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 12, 20, .96), rgba(15, 12, 20, .3) 55%, transparent);
}

.poster-brand {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}

.poster-brand i {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 12px;
}

.poster-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 2;
}

.poster-slogan {
    font-size: 11px;
    color: var(--gold);
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.poster-title {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.poster-desc {
    margin-top: 7px;
    font-size: 10.5px;
    color: rgba(255, 255, 255, .62);
    line-height: 1.6;
}

.poster-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.poster-qr {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    flex: none;
}

.poster-qr img { width: 100%; height: 100%; }

.poster-foot-info { font-size: 9px; color: rgba(255, 255, 255, .5); line-height: 1.7; }
.poster-foot-info b { display: block; font-size: 11px; color: #fff; margin-bottom: 2px; }

.poster-download {
    margin-left: auto;
    flex: none;
    height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.report-reason {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--line);
    font-size: 12px;
    color: var(--sub);
    text-align: left;
}

.report-reason.on {
    border-color: rgba(255, 64, 99, .4);
    background: var(--brand-soft);
    color: #ff8ba0;
}

.report-reason .radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    flex: none;
}

.report-reason.on .radio {
    border-color: var(--brand);
    background: radial-gradient(circle, var(--brand) 40%, transparent 46%);
}

/* ==========================================================================
   Agreement / auth
   ========================================================================== */
.agree-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(255, 64, 99, .28);
    position: relative;
    overflow: hidden;
}

.agree-logo::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    top: 7px;
    left: 9px;
}

.agree-checks {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 18px;
}

.agree-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.6;
    text-align: left;
}

.agree-check a {
    color: #d6a87d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.doc-sheet {
    font-size: 12px;
    line-height: 1.85;
    color: var(--sub);
}

.doc-sheet h4 {
    margin: 16px 0 5px;
    font-size: 12.5px;
    color: var(--txt);
    font-weight: 700;
}

.doc-sheet .doc-meta {
    font-size: 9.5px;
    color: var(--muted);
    margin-bottom: 8px;
}

.auth-modal .auth-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(63, 214, 192, .12);
    border: 1px solid rgba(63, 214, 192, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jade);
    margin: 0 auto 12px;
}

.auth-modal .field { margin-top: 14px; }

/* ==========================================================================
   Profile · 个人中心
   ========================================================================== */
.profile-page {
    background:
        radial-gradient(700px 380px at 85% -8%, rgba(255, 64, 99, .18), transparent 65%),
        radial-gradient(600px 400px at 5% 12%, rgba(120, 90, 255, .1), transparent 60%),
        var(--bg);
    min-height: 100%;
}

.profile-head {
    padding: calc(env(safe-area-inset-top, 0px) + 22px) 18px 10px;
}

.profile-id-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.profile-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    flex: none;
}

.profile-avatar .avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
    background: linear-gradient(135deg, #ff7b8c, #7a5cff);
    border: 2px solid rgba(255, 255, 255, .18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.profile-avatar .v-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.profile-avatar .v-badge svg { width: 10px; height: 10px; }

.profile-name {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-wxid {
    margin-top: 4px;
    font-size: 10px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-wxid .silent-tag {
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(63, 214, 192, .25);
    color: rgba(63, 214, 192, .8);
    font-size: 8.5px;
}

.profile-stats {
    display: flex;
    align-items: center;
    margin-top: 18px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.profile-stat {
    flex: 1;
    text-align: center;
    position: relative;
}

.profile-stat + .profile-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: var(--line);
}

.profile-stat b {
    display: block;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.profile-stat span {
    font-size: 9.5px;
    color: var(--muted);
    margin-top: 1px;
    display: block;
}

.profile-wallet {
    margin-top: 16px;
    border-radius: 16px;
    padding: 15px;
    background:
        radial-gradient(300px 120px at 90% -10%, rgba(255, 255, 255, .2), transparent 70%),
        linear-gradient(120deg, #4a2d22, #2c2024 55%, #232035);
    border: 1px solid rgba(255, 210, 122, .16);
    position: relative;
    overflow: hidden;
}

.profile-wallet::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 18px solid rgba(255, 210, 122, .05);
}

.profile-wallet .pw-label {
    font-size: 10px;
    color: rgba(255, 210, 122, .68);
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-wallet .pw-value {
    margin-top: 5px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.03em;
    color: var(--gold);
    line-height: 1.1;
}

.profile-wallet .pw-value small {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 210, 122, .6);
    margin-left: 3px;
}

.profile-wallet .pw-desc {
    margin-top: 5px;
    font-size: 9.5px;
    color: rgba(255, 255, 255, .4);
}

.profile-wallet .pw-btn {
    position: absolute;
    right: 14px;
    bottom: 15px;
    z-index: 2;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 210, 122, .14);
    border: 1px solid rgba(255, 210, 122, .24);
    color: var(--gold);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 16px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 11px 4px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    font-size: 9.5px;
    color: var(--sub);
    position: relative;
}

.quick-item .q-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
    color: var(--sub);
}

.quick-item:nth-child(1) .q-icon { color: #ff8ba0; background: var(--brand-soft); }
.quick-item:nth-child(2) .q-icon { color: var(--gold); background: rgba(255, 210, 122, .1); }
.quick-item:nth-child(3) .q-icon { color: var(--jade); background: rgba(63, 214, 192, .1); }
.quick-item:nth-child(4) .q-icon { color: var(--blue); background: rgba(100, 168, 255, .1); }
.quick-item .q-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    font-size: 8px;
    line-height: 14px;
    text-align: center;
}

.profile-menu {
    margin-top: 16px;
}

.profile-menu .list-group { background: rgba(255, 255, 255, .028); }

.profile-talent-banner {
    margin-top: 16px;
    border-radius: 15px;
    padding: 14px;
    background: linear-gradient(120deg, rgba(255, 64, 99, .16), rgba(255, 124, 77, .05));
    border: 1px solid rgba(255, 64, 99, .2);
    display: flex;
    align-items: center;
    gap: 11px;
}

.profile-talent-banner .pt-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 64, 99, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff8ba0;
    flex: none;
}

.profile-talent-banner .pt-title { font-size: 12.5px; font-weight: 700; }
.profile-talent-banner .pt-desc { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.profile-talent-banner .btn { margin-left: auto; flex: none; }

.profile-footer {
    padding: 24px 0 10px;
    text-align: center;
    font-size: 9px;
    color: rgba(255, 255, 255, .2);
    line-height: 1.8;
}

/* ==========================================================================
   Sub pages · 通用
   ========================================================================== */
.subnav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    background: rgba(8, 8, 13, .9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.subnav-back {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt);
    flex: none;
}

.subnav-title {
    flex: 1;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    margin-right: 34px;
}

.subpage { min-height: 100%; }
.subpage-body { padding: 14px 16px 30px; }

.simple-tabs {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 55px);
    z-index: 20;
    background: rgba(8, 8, 13, .94);
    backdrop-filter: blur(12px);
}

.simple-tab {
    padding: 11px 12px;
    font-size: 12px;
    color: var(--muted);
    position: relative;
    white-space: nowrap;
}

.simple-tab.on {
    color: var(--txt);
    font-weight: 700;
}

.simple-tab.on::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

.simple-tab .cnt {
    font-size: 8.5px;
    color: var(--muted);
    margin-left: 2px;
}

/* History / follows */
.media-row {
    display: flex;
    gap: 11px;
    padding: 11px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    margin-bottom: 10px;
    cursor: pointer;
}

.media-cover {
    width: 72px;
    height: 96px;
    border-radius: 9px;
    overflow: hidden;
    flex: none;
    position: relative;
    background: #22222f;
}

.media-cover img { width: 100%; height: 100%; object-fit: cover; }
.media-cover .ep-badge {
    position: absolute;
    left: 5px;
    bottom: 5px;
    font-size: 8px;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border-radius: 4px;
    padding: 1px 4px;
    backdrop-filter: blur(4px);
}

.media-info { flex: 1; min-width: 0; padding: 2px 0; }
.media-title { font-size: 13px; font-weight: 700; line-height: 1.35; }
.media-sub { font-size: 9.5px; color: var(--muted); margin-top: 4px; }
.media-tags { display: flex; gap: 4px; margin-top: 6px; }
.media-progress {
    margin-top: 9px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}
.media-progress i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.media-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 8.5px;
    color: var(--muted);
    margin-top: 4px;
}
.media-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}
.media-new {
    font-size: 8px;
    color: #fff;
    background: var(--brand);
    border-radius: 4px;
    padding: 1px 5px;
}
.media-continue {
    height: 27px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 64, 99, .14);
    border: 1px solid rgba(255, 64, 99, .28);
    color: #ff8ba0;
    font-size: 9.5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.batch-bar {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 55px);
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    background: rgba(8, 8, 13, .94);
    border-bottom: 1px solid var(--line);
}

.batch-bar .sel-all {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--sub);
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 11px;
    padding: 14px 16px 30px;
}

.fav-item {
    position: relative;
}

.fav-item .drama-cover { aspect-ratio: 3 / 4; }

.fav-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .7);
    background: rgba(0, 0, 0, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(4px);
}

.fav-check.on {
    background: var(--brand);
    border-color: var(--brand);
}

.fav-check svg { width: 12px; height: 12px; opacity: 0; }
.fav-check.on svg { opacity: 1; }

/* Wallet */
.wallet-hero {
    margin: 14px 16px 0;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(360px 160px at 88% -10%, rgba(255, 255, 255, .18), transparent 70%),
        linear-gradient(130deg, #53331f, #2f2229 58%, #252036);
    border: 1px solid rgba(255, 210, 122, .18);
    position: relative;
    overflow: hidden;
}

.wallet-hero .wh-label { font-size: 10px; color: rgba(255, 210, 122, .72); }
.wallet-hero .wh-value { margin-top: 4px; font-size: 36px; font-weight: 900; color: var(--gold); letter-spacing: -.03em; line-height: 1.1; }
.wallet-hero .wh-value small { font-size: 12px; font-weight: 500; margin-left: 3px; color: rgba(255, 210, 122, .6); }
.wallet-hero .wh-desc { margin-top: 6px; font-size: 9.5px; color: rgba(255, 255, 255, .38); }

.record-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.record-row:last-child { border-bottom: 0; }
.record-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex: none;
}
.record-icon.in { background: rgba(63, 214, 192, .1); color: var(--jade); }
.record-icon.out { background: rgba(255, 64, 99, .1); color: #ff8ba0; }
.record-title { font-size: 12px; font-weight: 600; }
.record-time { font-size: 9px; color: var(--muted); margin-top: 3px; }
.record-amount { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--jade); flex: none; }
.record-amount.out { color: #ff8ba0; }

/* ==========================================================================
   Tasks · 任务与裂变
   ========================================================================== */
.tasks-page {
    background:
        radial-gradient(600px 360px at 90% -6%, rgba(255, 180, 70, .14), transparent 60%),
        var(--bg);
}

.tasks-hero {
    margin: 14px 16px 0;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(130deg, rgba(255, 210, 122, .15), rgba(255, 64, 99, .07) 55%, rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 210, 122, .18);
    position: relative;
    overflow: hidden;
}

.tasks-hero::after {
    content: "";
    position: absolute;
    right: -28px;
    top: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 210, 122, .16), transparent 65%);
}

.tasks-hero .th-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tasks-hero .th-title { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.tasks-hero .th-title svg { color: var(--gold); }
.tasks-hero .th-sub { margin-top: 5px; font-size: 10px; color: rgba(255, 255, 255, .48); }
.tasks-hero .th-right { text-align: right; flex: none; }
.tasks-hero .th-cards { font-size: 22px; font-weight: 900; color: var(--gold); line-height: 1.1; }
.tasks-hero .th-cards-label { font-size: 8.5px; color: rgba(255, 210, 122, .6); }

.checkin-days {
    display: flex;
    gap: 5px;
    margin-top: 16px;
    position: relative;
    z-index: 2;
}

.checkin-day {
    flex: 1;
    border-radius: 9px;
    padding: 7px 2px 6px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
    text-align: center;
}

.checkin-day .cd-day { font-size: 8px; color: var(--muted); }
.checkin-day .cd-reward {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 800;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.checkin-day .cd-reward svg { width: 9px; height: 9px; }
.checkin-day.done { background: rgba(63, 214, 192, .08); border-color: rgba(63, 214, 192, .18); }
.checkin-day.done .cd-reward { color: var(--jade); }
.checkin-day.today { border-color: rgba(255, 210, 122, .36); background: rgba(255, 210, 122, .1); }

.checkin-btn {
    margin-top: 12px;
    width: 100%;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ffd57d, #ffa53d);
    color: #3b2400;
    font-size: 13px;
    font-weight: 800;
    position: relative;
    z-index: 2;
}

.checkin-btn.done {
    background: rgba(255, 255, 255, .07);
    color: var(--muted);
    font-weight: 600;
}

.task-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.task-row:last-child { border-bottom: 0; }
.task-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    flex: none;
}
.task-row:nth-child(1) .task-icon { color: #ff8ba0; background: var(--brand-soft); }
.task-row:nth-child(2) .task-icon { color: var(--gold); background: rgba(255, 210, 122, .1); }
.task-row:nth-child(3) .task-icon { color: var(--jade); background: rgba(63, 214, 192, .1); }
.task-info { flex: 1; min-width: 0; }
.task-title { font-size: 12.5px; font-weight: 600; }
.task-desc { margin-top: 3px; font-size: 9px; color: var(--muted); }
.task-reward {
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    color: var(--gold);
    background: rgba(255, 210, 122, .08);
    border-radius: 4px;
    padding: 1px 5px;
}
.task-reward svg { width: 9px; height: 9px; }
.task-btn {
    flex: none;
    height: 29px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--line);
    color: var(--sub);
}
.task-btn.ready {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #fff;
}
.task-btn.done { color: var(--muted); background: transparent; border-color: transparent; }
.task-btn.demo { margin-top: 4px; height: 20px; padding: 0 7px; font-size: 8px; color: #8f8ca3; border-style: dashed; }

.invite-card {
    border-radius: 16px;
    padding: 15px;
    background: linear-gradient(130deg, rgba(63, 214, 192, .1), rgba(100, 168, 255, .05));
    border: 1px solid rgba(63, 214, 192, .16);
}

.invite-card .ic-title { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.invite-card .ic-title svg { color: var(--jade); }
.invite-card .ic-desc { margin-top: 5px; font-size: 10px; color: var(--muted); line-height: 1.7; }
.invite-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .2);
    border: 1px dashed rgba(63, 214, 192, .25);
}
.invite-code-row .code { flex: 1; font-size: 15px; font-weight: 900; letter-spacing: .14em; color: var(--jade); }
.invite-code-row .btn { flex: none; }
.invite-stats { display: flex; gap: 8px; margin-top: 10px; }
.invite-stat {
    flex: 1;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    padding: 8px;
    text-align: center;
}
.invite-stat b { display: block; font-size: 15px; color: var(--txt); }
.invite-stat span { font-size: 8.5px; color: var(--muted); }

.share-unlock-card {
    border-radius: 16px;
    padding: 15px;
    background: linear-gradient(130deg, rgba(255, 64, 99, .1), rgba(255, 124, 77, .04));
    border: 1px solid rgba(255, 64, 99, .16);
}

.share-unlock-card .su-title { font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.share-unlock-card .su-desc { margin-top: 5px; font-size: 10px; color: var(--muted); line-height: 1.65; }
.su-bar { margin-top: 10px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.su-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ==========================================================================
   Talent · 达人推广中心
   ========================================================================== */
.talent-page {
    background:
        radial-gradient(700px 400px at 80% -8%, rgba(255, 64, 99, .16), transparent 62%),
        var(--bg);
}

.talent-hero {
    margin: 14px 16px 0;
    border-radius: 18px;
    padding: 16px;
    background:
        radial-gradient(260px 140px at 92% 0%, rgba(255, 255, 255, .16), transparent 70%),
        linear-gradient(130deg, #4a2a24, #2c2130 55%, #1e1d2c);
    border: 1px solid rgba(255, 210, 122, .18);
}

.talent-hero .tl-label { font-size: 10px; color: rgba(255, 210, 122, .66); display: flex; align-items: center; gap: 5px; }
.talent-hero .tl-balance { margin-top: 5px; font-size: 34px; font-weight: 900; letter-spacing: -.03em; color: var(--gold); line-height: 1.1; }
.talent-hero .tl-balance small { font-size: 12px; font-weight: 500; margin-left: 3px; }
.talent-hero .tl-row { display: flex; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.talent-hero .tl-cell { flex: 1; }
.talent-hero .tl-cell b { display: block; font-size: 14px; font-weight: 800; }
.talent-hero .tl-cell span { font-size: 8.5px; color: rgba(255, 255, 255, .4); }
.talent-hero .btn { margin-top: 13px; width: 100%; height: 38px; }

.talent-pending {
    margin: 14px 16px 0;
    padding: 20px 16px;
    border-radius: 16px;
    background: rgba(255, 210, 122, .06);
    border: 1px solid rgba(255, 210, 122, .16);
    text-align: center;
}

.talent-pending .tp-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 210, 122, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin: 0 auto 12px;
}

.talent-pending h3 { font-size: 15px; font-weight: 800; }
.talent-pending p { margin-top: 6px; font-size: 10.5px; color: var(--muted); line-height: 1.7; }

.talent-apply-card {
    margin: 14px 16px 0;
    padding: 18px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
}

.talent-apply-card h3 { font-size: 15px; font-weight: 800; }
.talent-apply-card .tac-desc { margin-top: 5px; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.talent-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.talent-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.talent-link-item {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    cursor: pointer;
}

.talent-link-cover {
    height: 94px;
    overflow: hidden;
    position: relative;
}

.talent-link-cover img { width: 100%; height: 100%; object-fit: cover; }
.talent-link-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent 60%);
}
.talent-link-cover .tl-cover-title {
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 6px;
    z-index: 2;
    font-size: 9.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.talent-link-ops { display: flex; gap: 5px; padding: 7px; }
.talent-link-ops button {
    flex: 1;
    height: 25px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--line);
    font-size: 8.5px;
    color: var(--sub);
}

.earn-orders { display: flex; flex-direction: column; }
.earn-order {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
}
.earn-order:last-child { border-bottom: 0; }
.earn-order-cover { width: 42px; height: 56px; border-radius: 7px; overflow: hidden; flex: none; background: #22222f; }
.earn-order-cover img { width: 100%; height: 100%; object-fit: cover; }
.earn-order-info { flex: 1; min-width: 0; }
.earn-order-title { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earn-order-user { font-size: 9px; color: var(--muted); margin-top: 3px; }
.earn-order-time { font-size: 8px; color: rgba(255, 255, 255, .25); margin-top: 3px; }
.earn-order-amount { text-align: right; flex: none; }
.earn-order-amount b { display: block; font-size: 13px; color: var(--gold); font-weight: 800; }
.earn-order-amount span { font-size: 8px; color: var(--muted); }
.earn-order-amount span.frozen { color: #ff9a52; }

.stats-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 108px;
    padding: 8px 4px 0;
    border-bottom: 1px solid var(--line);
}

.stats-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    height: 100%;
}

.stats-bar {
    width: 100%;
    max-width: 22px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, rgba(255, 210, 122, .8), rgba(255, 100, 80, .28));
    min-height: 3px;
    transition: height .4s ease;
}

.stats-date { font-size: 7.5px; color: var(--muted); margin-top: 5px; }

.stats-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 9.5px; }
.stats-table th { color: var(--muted); font-weight: 500; text-align: right; padding: 5px 2px; border-bottom: 1px solid var(--line); }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table td { text-align: right; padding: 7px 2px; color: var(--sub); border-bottom: 1px solid rgba(255, 255, 255, .035); }
.stats-table td.cvr { color: var(--gold); font-weight: 600; }

.material-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.material-card {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    cursor: pointer;
}

.material-cover { height: 108px; overflow: hidden; }
.material-cover img { width: 100%; height: 100%; object-fit: cover; }
.material-body { padding: 8px; }
.material-title { font-size: 10px; font-weight: 600; line-height: 1.4; height: 28px; overflow: hidden; }
.material-type { margin-top: 5px; font-size: 8px; color: var(--gold); }

/* ==========================================================================
   Messages / settings
   ========================================================================== */
.msg-list { padding: 12px 16px 30px; display: flex; flex-direction: column; gap: 9px; }
.msg-card {
    border-radius: 13px;
    padding: 13px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
    position: relative;
}
.msg-card.unread { border-color: rgba(255, 64, 99, .18); background: rgba(255, 64, 99, .035); }
.msg-card .msg-top { display: flex; align-items: flex-start; gap: 9px; }
.msg-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: rgba(255, 255, 255, .05);
    color: var(--sub);
}
.msg-icon.update { color: #ff8ba0; background: var(--brand-soft); }
.msg-icon.commission { color: var(--gold); background: rgba(255, 210, 122, .1); }
.msg-icon.system { color: var(--blue); background: rgba(100, 168, 255, .1); }
.msg-title { font-size: 12px; font-weight: 700; line-height: 1.45; }
.msg-time { font-size: 8px; color: rgba(255, 255, 255, .25); margin-top: 3px; }
.msg-body { margin-top: 7px; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.msg-ticket {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(255, 210, 122, .08);
    border: 1px solid rgba(255, 210, 122, .16);
    font-size: 8.5px;
    color: var(--gold);
}

.settings-group { margin-top: 14px; }
.settings-group-title { font-size: 10px; color: var(--muted); padding: 0 4px 7px; letter-spacing: .06em; }
.settings-note {
    padding: 12px 14px;
    font-size: 9.5px;
    color: rgba(255, 255, 255, .28);
    line-height: 1.8;
    text-align: center;
}

.teen-panel {
    margin: 14px 16px 0;
    border-radius: 16px;
    padding: 15px;
    background: linear-gradient(130deg, rgba(63, 214, 192, .09), rgba(100, 168, 255, .04));
    border: 1px solid rgba(63, 214, 192, .16);
}

.teen-panel .teen-head { display: flex; align-items: center; gap: 10px; }
.teen-panel .teen-ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(63, 214, 192, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jade);
    flex: none;
}
.teen-panel .teen-title { font-size: 13px; font-weight: 700; }
.teen-panel .teen-desc { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.teen-panel .teen-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 10px; color: var(--sub); line-height: 1.8; }

/* ==========================================================================
   Responsive / motion
   ========================================================================== */
@media (max-width: 360px) {
    .drama-grid { gap: 14px 9px; }
    .feed-title { font-size: 16px; }
    .feed-rail { right: 5px; }
    .ep-grid { grid-template-columns: repeat(4, 1fr); }
    .detail-ep-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ==========================================================================
   Interaction & page-specific refinements
   ========================================================================== */
.category-panel {
    top: calc(env(safe-area-inset-top, 0px) + 52px);
}

.special-pill.active {
    border-color: rgba(255, 64, 99, .45);
    box-shadow: inset 0 0 0 1px rgba(255, 64, 99, .18);
    background: linear-gradient(135deg, rgba(255, 64, 99, .2), rgba(255, 124, 77, .1));
}

.special-pill.active .sp-title {
    color: #ff9cae;
}

.feed-top {
    z-index: 18;
}

.feed-progress {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
}

.feed-progress.show-controls {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.feed-progress.show-controls .feed-thumb {
    opacity: 1;
}

.feed-controls.show {
    opacity: 1;
}

.feed-controls .ctl-right-top {
    z-index: 2;
}

.feed-big-play svg {
    pointer-events: none;
}

.feed-shell.is-locked .feed-top,
.feed-shell.is-locked .feed-controls,
.feed-shell.is-locked .feed-rail,
.feed-shell.is-locked .feed-bottom,
.feed-shell.is-locked .feed-progress,
.feed-shell.is-locked .feed-center,
.feed-shell.is-locked .feed-swipe-hint,
.feed-shell.is-locked .pause-ad {
    opacity: 0 !important;
    pointer-events: none !important;
}

.feed-shell.is-locked .feed-lock-btn {
    background: rgba(49, 36, 12, .6);
    border-color: rgba(255, 210, 122, .42);
    color: var(--gold);
    z-index: 20;
}

.feed-lock-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100px + var(--safe-b));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .72);
    font-size: 9.5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.feed-shell.is-locked .feed-lock-tip {
    opacity: 1;
    z-index: 21;
}

.feed-mini {
    background: none;
    border: 0;
    padding: 0;
}

/* Pause overlay ad */
.pause-ad {
    position: absolute;
    right: 12px;
    bottom: calc(200px + var(--safe-b));
    width: 232px;
    z-index: 19;
    border-radius: 15px;
    background: linear-gradient(150deg, rgba(41, 33, 57, .96), rgba(18, 18, 28, .97));
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
    padding: 10px;
    animation: pauseAdIn .24s cubic-bezier(.2, .8, .2, 1) both;
    backdrop-filter: blur(16px);
}

@keyframes pauseAdIn {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: none; }
}

.pause-ad-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pause-ad-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .72);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pause-ad-body {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pause-ad-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f7dff, #7b4dff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 17px;
    flex: none;
}

.pause-ad-title {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pause-ad-desc {
    margin-top: 3px;
    font-size: 8.5px;
    color: var(--muted);
}

.pause-ad-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.pause-ad-report {
    font-size: 8.5px;
    color: rgba(255, 255, 255, .32);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pause-ad-go {
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .14);
    font-size: 9px;
    color: #fff;
}

/* Comment sheet */
.comment-sheet-body {
    max-height: 46vh;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: none;
}

.comment-sheet .comment-list {
    gap: 13px;
}

/* Favorite remove */
.fav-cancel {
    display: inline-block;
    margin-top: 5px;
    font-size: 9px;
    color: rgba(255, 255, 255, .34);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Teen switch direct row */
#teenSwitch {
    cursor: pointer;
}

/* Select on dark */
.field select option {
    background: #1b1b28;
    color: var(--txt);
}

/* Profile interaction */
.profile-stat,
.profile-wallet,
.profile-talent-banner,
.profile-quick .quick-item,
.rank-row,
.friend-card,
.media-row,
.drama-card,
.related-item,
.talent-link-item,
.material-card {
    cursor: pointer;
}

.profile-stat:active,
.profile-wallet:active,
.profile-talent-banner:active,
.quick-item:active,
.drama-card:active,
.media-row:active {
    opacity: .88;
}

/* Feed page loading */
.feed-page .feed-shell .loading-row {
    height: 100%;
    color: rgba(255, 255, 255, .5);
}

/* Ad layer inside full page */
.full-page .ad-layer {
    position: absolute;
}

/* Better bottom padding on detail */
.detail-page {
    padding-bottom: 8px;
}

/* Mini player above tabbar on profile pages */
#miniRoot {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 90;
}

#miniRoot .mini-player {
    pointer-events: auto;
}

/* Hide tabbar spacing when page has its own bottom bar */
.page.no-tabbar.detail-page-wrap {
    padding-bottom: 0;
}

/* Safe auto-hide for feed bottom info under controls */
.feed-controls .ctl-center {
    display: none;
}

/* Slight visual polish for agreement checkbox buttons */
.agree-check .checkbox {
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.agree-check .checkbox svg {
    width: 12px;
    height: 12px;
}

/* Tooltip when no episodes */
.ep-grid:empty::after {
    content: "暂无剧集";
    display: block;
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    padding: 16px;
}
