:root {
    color-scheme: dark;
    --bg: #0e0e10;
    --bar: #1a1a1e;
    --elevated: #2a2a2e;
    --line: #34343a;
    --text: #fff;
    --muted: #a1a1aa;
    --dim: #7c7c85;
    --red: #ff2d2d;
    --blue: #3ea6ff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: #070708;
    color: var(--text);
    font-family: Manrope, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

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

button { cursor: pointer; }

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

.shell {
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    width: min(460px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top {
    position: relative;
    flex: none;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(14, 14, 16, 0.94);
    backdrop-filter: blur(10px);
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-copy {
    display: grid;
    line-height: 1.05;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: -0.04em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--red);
    display: block;
    object-fit: cover;
    color: #fff;
    flex: 0 0 auto;
}

.mark i.fa-play, .plus i.fa-plus, .play i.fa-play { margin-left: 2px; }

.search {
    flex: 1;
    min-width: 0;
    max-width: 560px;
    height: 42px;
    border-radius: 21px;
    background: var(--bar);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: var(--dim);
}

.search:focus-within {
    box-shadow: 0 0 0 1px rgba(255, 45, 45, 0.55);
}

.search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    min-width: 0;
}

.top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--text);
    display: grid;
    place-items: center;
    padding: 4px;
}

.dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.me, .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--elevated);
}

.me-btn,
.coin-pill {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
}

.pack-pill, .cash-pill, .coin-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.pack-pill { background: #3a3a42; color: #fff; }

.cash-pill { background: #123024; color: #b6f3c4; }

.coin-pill {
    background: #2a2112;
    color: #ffd56a;
}

.top-menu-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #2a2a2e;
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0;
}

.account-drawer {
    position: absolute;
    inset: 0;
    z-index: 50;
}

.account-drawer[hidden] { display: none; }

.account-drawer-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
}

.account-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 86%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 12px;
    background: #141418;
    border-left: 1px solid #34343a;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.4);
}

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

.account-drawer-head strong {
    font-size: 18px;
}

.account-drawer-head button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #2a2a2e;
    color: #fff;
    display: grid;
    place-items: center;
    padding: 0;
}

.account-drawer-panel form { margin: 0; }

.account-drawer-logout { margin-top: auto; }

.account-drawer-panel form button,
.account-drawer-panel > button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #fff;
    text-align: left;
    padding: 12px;
    font-weight: 700;
}

.account-drawer-panel form button:hover,
.account-drawer-panel > button:hover { background: #2a2a2e; }

.account-face {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    background: #1a1a1e;
}

main {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0;
}

.panel { display: none; }
.panel.is-on { display: block; }

.panel[data-panel="explore"].is-on,
.panel[data-panel="channels"].is-on,
.panel[data-panel="library"].is-on,
.panel[data-panel="account"].is-on {
    padding: 8px 16px 20px;
}

.shorts, .chips, .topics {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.shorts::-webkit-scrollbar, .chips::-webkit-scrollbar, .topics::-webkit-scrollbar { display: none; }

.short {
    width: 76px;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    display: grid;
    justify-items: center;
    gap: 6px;
}

.short-face { position: relative; }

.short img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1a1a1e;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.short-plus {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: grid;
    place-items: center;
    border: 2px solid var(--bg);
}

.chips { gap: 8px; margin: 14px 0 18px; }

.chip {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--elevated);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.chip.is-on { background: var(--red); color: #fff; }

.chip input { display: none; }
.chip:has(input:checked) { background: var(--red); color: #fff; }

.feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px 18px;
}

.video { min-width: 0; }

.thumb, .row-thumb {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--elevated);
    aspect-ratio: 16 / 9;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.thumb img, .row-thumb img, .stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--red);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.live i { font-size: 7px; }

.length {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.78);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
}

.verified {
    color: var(--blue);
    font-size: 11px;
    margin-left: 4px;
}

.heart {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: grid;
    place-items: center;
}

.heart.is-on {
    color: var(--red);
    background: rgba(255, 45, 45, 0.18);
}

.meta, .row, .channel, .note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.meta { padding-top: 10px; }

.copy { flex: 1; min-width: 0; }

h1, h2, p { margin: 0; }

.video h2, .row h2, .channel h2 {
    font-size: 14.5px;
    line-height: 1.3;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.copy p, .sub, .description, .note p, time {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.more {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 2px;
}

.panel-head {
    height: 52px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
}

.panel-head h1 { text-align: center; font-size: 18px; }

.topics { gap: 18px; margin-bottom: 8px; }

.topic {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 650;
    padding: 6px 0;
}

.topic.is-on { color: var(--red); border-bottom-color: var(--red); }

.filters {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin: 8px 0 16px;
}

.filters select {
    border: 0;
    background: transparent;
    font-weight: 750;
    color: var(--text);
}

.rows { display: grid; gap: 16px; }

.row-thumb { width: 168px; flex: 0 0 168px; aspect-ratio: auto; height: 96px; border-radius: 12px; }

.row .heart { width: 24px; height: 24px; right: 6px; bottom: 6px; }

.channel-list { display: grid; gap: 16px; }

.channel img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.subscribe, .publish {
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    padding: 8px 16px;
    box-shadow: 0 8px 18px rgba(255, 45, 45, 0.28);
    text-decoration: none;
    text-align: center;
}

.subscribe.is-on { background: var(--elevated); box-shadow: none; }

.subscribe.wide, .publish {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 24px;
}

.switch { display: flex; gap: 8px; margin-bottom: 16px; }

.empty { color: var(--muted); padding: 12px 0; }

.tabbar {
    position: relative;
    z-index: 6;
    flex: none;
    width: 100%;
    margin: 0;
    min-height: 74px;
    height: auto;
    border-radius: 0;
    background: #101013;
    border: 0;
    border-top: 1px solid #2a2a2e;
    box-shadow: none;
    display: flex;
    align-items: stretch;
    padding: 0 4px env(safe-area-inset-bottom);
}

.tab i, .icon-btn i, .topic i, .more i, .short-plus i, .plus i, .play i {
    line-height: 1;
}

.tab,
.plus {
    position: relative;
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #8b8b94;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    padding: 12px 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.tab.is-on {
    color: #fff;
}

.tab.is-on i { color: var(--red); }

.tab.is-on::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    transform: translateX(-50%);
    background: var(--red);
}

.plus { color: #fff; }

.plus-mark {
    width: 44px;
    height: 26px;
    display: grid;
    place-items: center;
    background: var(--red);
    color: #fff;
    border-radius: 0;
}

.sheet {
    width: min(640px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0 0 18px;
    border: 0;
    border-radius: 18px;
    background: var(--bg);
    color: var(--text);
    overflow: auto;
}

.sheet::backdrop { background: rgba(0, 0, 0, 0.62); }

.player-bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px 0;
}

.player-bar button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.stage {
    position: relative;
    margin: 12px;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #000;
}

.stage img { position: absolute; inset: 0; }

.stage-top {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
}

.stage-top button {
    border: 0;
    background: transparent;
    color: #fff;
}

.play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    display: grid;
    place-items: center;
}

.times {
    position: absolute;
    z-index: 2;
    left: 12px;
    right: 12px;
    bottom: 14px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 650;
}

.track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.25); }
.track span { display: block; height: 100%; width: 0; background: var(--red); }

.sheet-body, #create-form, .notes { padding: 4px 16px 0; }

#create-form { padding: 12px 22px 8px; }

#create .panel-head {
    grid-template-columns: 1fr auto;
    height: 48px;
    margin-bottom: 8px;
}

#create .panel-head h1 {
    text-align: left;
    margin: 0;
}

#create .panel-head button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #2a2a2e;
    color: #fff;
    display: grid;
    place-items: center;
}

#create .cost-note,
#create .link-field,
#create .chip-label { padding-inline: 2px; }

.sheet-body h2 { font-size: 18px; line-height: 1.3; }

.description { font-size: 13px; line-height: 1.45; }

.actions { display: flex; gap: 18px; margin-top: 14px; }

.actions button {
    border: 0;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

#create.sheet {
    width: min(420px, calc(100% - 24px));
}

#create-form .link-field {
    display: block;
    margin: 4px 0 12px;
}

#create-form .link-field span,
.chip-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

#create-form input {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--bar);
    padding: 14px;
    outline: 0;
    font-size: 14px;
}

.chip-label { margin-top: 4px; text-align: center; }

#create-form .create-chips {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    row-gap: 8px;
    margin-top: 0;
}

#create-form .create-chips .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.yt-preview[hidden] { display: none; }

.yt-preview {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 16px;
    background: var(--bar);
}

.yt-preview img {
    width: 120px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #000;
}

.yt-preview strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.yt-preview span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.yt-preview.is-loading {
    display: block;
    padding: 14px;
    text-align: center;
}

.yt-preview.is-loading img { display: none; }

.error { color: var(--red); }

.note img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.note time { white-space: nowrap; }

.video[hidden], .row[hidden] { display: none; }

@media (max-width: 720px), (max-height: 760px) {
    .top-bar { gap: 10px; padding-inline: 14px; }
    .brand-copy small { display: none; }
    .brand-copy strong { font-size: 18px; }
    .short { width: 64px; }
    .short img { width: 52px; height: 52px; }
    .chips { margin: 8px 0 12px; }
    .feed { grid-template-columns: 1fr; }
    .thumb { aspect-ratio: auto; height: min(30vh, 220px); }
    .row { align-items: center; }
    .row-thumb { width: 120px; flex-basis: 120px; height: 72px; }
    .channel { align-items: center; }
    .subscribe { flex: none; }
}

.reel.is-on {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.reel-chips {
    position: relative;
    top: auto;
    flex: none;
    width: 100%;
    min-width: 0;
    z-index: 4;
    margin: 0;
    padding: 2px 20px 10px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    background: #000;
    scrollbar-width: none;
}

.reel-chips::-webkit-scrollbar { display: none; }

.reel-chips .chip {
    flex: 0 0 auto;
    height: auto;
    padding: 6px 12px;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    white-space: nowrap;
}

.reel-chips .chip.is-on {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 -2px 0 #fff;
}

#home-feed {
    flex: 1;
    min-height: 0;
    height: auto;
    display: block;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    background: #000;
    scrollbar-width: none;
}

#home-feed::-webkit-scrollbar { display: none; }

#home-feed .video {
    position: relative;
    height: 100%;
    min-height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    overflow: hidden;
    background: #000;
}

#home-feed .thumb {
    position: absolute;
    inset: 0;
    height: auto;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
}

#home-feed .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

#home-feed .live { top: 12px; }

.reel-play {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    backdrop-filter: blur(4px);
}

.reel-play i { margin-left: 3px; }

.reel-frame,
.stage-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 2;
    background: #000;
    pointer-events: auto;
}

.reel-embed-hit,
.stage-hit {
    display: none;
}

.reel-cue,
.stage-cue {
    display: none;
}

.video.is-cued .reel-cue {
    display: block;
    margin: 8px 14px 0;
    color: #ffd56a;
    font-size: 12px;
    font-weight: 800;
}

.sheet.is-cued .stage-cue {
    display: block;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 4;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    pointer-events: none;
}

#home-feed .video.is-playing {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#home-feed .video.is-playing .thumb {
    position: relative;
    inset: auto;
    flex: none;
    width: 100%;
    height: auto;
    max-height: 180px;
    aspect-ratio: 16 / 9;
    margin-top: 0;
    z-index: 1;
}

.reel:has(.video.is-playing) .source-switch,
.reel:has(.video.is-playing) .reel-chips {
    background: #000;
}

.reel:has(.video.is-playing) .reel-chips {
    padding-bottom: 10px;
}

.reel-transport {
    display: none;
}

.video.is-playing .reel-transport {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 3;
    padding: 12px 14px 0;
}

.reel-toggle {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: grid;
    place-items: center;
    flex: none;
    font-size: 13px;
}

.reel-time {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex: none;
}

.reel-count {
    flex: none;
    padding: 4px 8px;
    border-radius: 999px;
    background: #2a2112;
    color: #ffd56a;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.reel-scrub.is-locked {
    cursor: not-allowed;
    opacity: 0.45;
}

.reel-scrub {
    position: relative;
    flex: 1;
    height: 18px;
    cursor: pointer;
}

.reel-scrub::before,
.reel-scrub span {
    position: absolute;
    left: 0;
    top: 7px;
    height: 4px;
    border-radius: 999px;
}

.reel-scrub::before {
    content: "";
    right: 0;
    background: rgba(255, 255, 255, 0.22);
}

.reel-scrub span {
    width: 0;
    background: var(--red);
}

.video.is-playing .reel-copy {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex: none;
    padding: 8px 14px 0;
}

.video.is-playing .reel-copy p { margin-top: 2px; }

.video.is-playing .reel-rail {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex: none;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 0;
    padding: 10px 10px 2px;
}

.video.is-playing .reel-avatar {
    width: 40px;
    height: 40px;
}

.video.is-playing .reel-play,
.video.is-playing .live,
.video.is-playing .coin-hint,
.video.is-playing .reel-progress {
    opacity: 0;
    visibility: hidden;
}

.video.is-playing .reel-copy,
.video.is-playing .reel-rail {
    z-index: 3;
}

#home-feed .video.is-playing[data-source="ai"] {
    display: block;
}

#home-feed .video.is-playing[data-source="ai"] .thumb {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
}

#home-feed .video.is-playing[data-source="ai"] .reel-file {
    object-fit: contain;
}

#home-feed .video.is-playing[data-source="ai"] .reel-transport {
    display: none;
}

#home-feed .video[data-source="ai"] .reel-copy,
#home-feed .video.is-playing[data-source="ai"] .reel-copy {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 28px;
    padding: 0;
}

#home-feed .video.is-playing[data-source="ai"] .reel-rail {
    position: absolute;
    right: 10px;
    bottom: 36px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    gap: 16px;
    margin: 0;
    padding: 0;
}

#home-feed .video.is-playing[data-source="ai"] .reel-avatar {
    width: 46px;
    height: 46px;
}

#home-feed .video.is-playing[data-source="ai"] .reel-progress {
    opacity: 1;
    visibility: visible;
}

#home-feed .video.is-embed .reel-play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#home-feed .video[data-source="ai"] .reel-play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#home-feed .video.is-paused[data-source="ai"] .reel-play {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 4;
}

.coin-hint {
    position: absolute;
    left: 50%;
    top: calc(46% + 48px);
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffd56a;
    font-size: 12px;
    font-weight: 800;
}

.toast {
    position: absolute;
    left: 50%;
    bottom: 108px;
    transform: translateX(-50%);
    z-index: 8;
    max-width: calc(100% - 48px);
    margin: 0;
    padding: 10px 14px;
    border-radius: 999px;
    background: #1c140c;
    color: #ffd56a;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.account-id {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 16px;
}

.account-id img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px rgba(255, 45, 45, 0.75);
}

.account-id h2 { margin: 0; font-size: 22px; }
.account-id p { margin: 4px 0 0; color: var(--muted); }

.wallet {
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(255, 45, 45, 0.38), transparent 46%),
        linear-gradient(165deg, #322616, #141416 62%);
    border: 1px solid rgba(255, 213, 106, 0.28);
}

.wallet-kicker {
    margin: 0;
    color: #ffd56a;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12px;
}

.wallet strong {
    display: block;
    margin-top: 6px;
    font-size: 48px;
    letter-spacing: -0.05em;
    line-height: 1;
}

.wallet .usd {
    margin: 8px 0 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.wallet .rate { margin: 6px 0 0; color: var(--muted); }

.account-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.account-stats article {
    padding: 12px;
    border-radius: 16px;
    background: var(--bar);
}

.account-stats span,
.account-stats small { display: block; color: var(--muted); font-size: 11px; }
.account-stats strong { display: block; margin: 4px 0; font-size: 18px; }

.account-note,
.cost-note { color: var(--muted); line-height: 1.45; }

.account-note { margin: 10px 14px; }

.shell { position: relative; }

.sheet.is-embed .play,
.sheet.is-embed .times,
.sheet.is-embed .track {
    display: none;
}

.reel-copy {
    position: absolute;
    left: 14px;
    right: 86px;
    bottom: 28px;
    z-index: 2;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.reel-copy h2 { font-size: 16px; }

.reel-copy p {
    margin-top: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
}

.reel-meta {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 12px !important;
}

.reel-rail {
    position: absolute;
    right: 10px;
    bottom: 36px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.reel-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.reel-btn {
    border: 0;
    background: transparent;
    color: #fff;
    display: grid;
    justify-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.reel-btn i { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)); }

.reel-btn.is-on { color: var(--red); }

.reel-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: 3px;
    background: rgba(255, 255, 255, 0.28);
}

.reel-progress span {
    display: block;
    height: 100%;
    background: #fff;
}

#home-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
}

#home-empty[hidden] { display: none; }

.page-ad {
    position: relative;
    flex: none;
    background: #000;
    border-top: 1px solid #2a2a2e;
    z-index: 5;
}

.page-ad[hidden],
.page-ad-side { display: none; }

.page-ad-hide {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border: 0;
    border-radius: 0;
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

.reel-ads-viewport {
    position: relative;
    flex: none;
    height: auto;
    overflow: hidden;
    border-radius: 0;
    border: 1px solid #2a2a2e;
    background: #111114;
}

.reel-ads-track {
    display: flex;
    align-items: flex-start;
    height: auto;
    transition: transform 0.4s ease;
}

.reel-ad {
    position: relative;
    flex: 0 0 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.reel-ad-art {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

.reel-ads-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 0;
}

.reel-ads-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #3a3a40;
}

.reel-ads-dots button.is-on { background: var(--red); }

.desk-nav,
.desk-side { display: none; }

.desk-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: 100%;
    position: relative;
}

.desk-admin-link {
    display: inline-flex;
    margin-top: 16px;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

@media (min-width: 1100px) {
    body {
        background:
            radial-gradient(820px 480px at 50% 0%, rgba(255, 45, 45, 0.2), transparent 62%),
            #070708;
    }

    .shell {
        width: 100%;
        max-width: none;
        flex-direction: row;
        align-items: stretch;
        background: #070708;
    }

    .desk-nav,
    .desk-side {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: auto;
        background: transparent;
    }

    .desk-nav {
        width: 248px;
        flex: none;
        gap: 22px;
        padding: 22px 16px;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
    }

    .desk-nav nav { display: grid; gap: 4px; }

    .desk-admin { margin-top: auto; text-decoration: none; }

    .desk-link {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--muted);
        padding: 12px 14px;
        font-weight: 700;
        text-align: left;
        text-decoration: none;
    }

    .desk-link.is-on,
    .desk-link:hover { background: #1a1a1e; color: #fff; }

    .desk-link.is-on {
        color: #fff;
        background: rgba(255, 45, 45, 0.14);
        box-shadow: inset 3px 0 0 var(--red);
    }

    .desk-link[data-open="create"] {
        margin-top: 10px;
        justify-content: center;
        background: var(--red);
        color: #fff;
        box-shadow: 0 12px 28px rgba(255, 45, 45, 0.32);
    }

    .desk-link[data-open="create"]:hover { background: #ff4545; color: #fff; }

    .desk-body {
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        background: radial-gradient(460px 320px at 50% 12%, rgba(255, 45, 45, 0.14), transparent 70%);
    }

    .desk-body .top {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 40;
        width: 288px;
        background: transparent;
    }

    .desk-body .top-bar {
        justify-content: flex-end;
        padding: 0;
    }

    .desk-body .top .brand { display: none; }

    .desk-body main {
        display: flex;
        flex: 1;
        flex-direction: column;
        min-height: 0;
        padding: 0;
    }

    .tabbar { display: none; }

    .panel.reel.is-on {
        width: 100%;
        max-width: none;
        height: 100%;
        flex: 1;
        min-height: 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #home-feed .video,
    #home-feed .thumb,
    #home-feed .reel-file {
        border-radius: 0;
    }

    .desk-body .panel-head {
        grid-template-columns: 1fr;
        margin: 8px 0 14px;
    }

    .desk-body .panel-head .icon-btn { display: none; }

    .desk-body .panel-head h1 {
        text-align: left;
        font-size: 28px;
        letter-spacing: -0.04em;
    }

    .desk-body .panel.is-on:not(.reel) {
        max-width: 920px;
        width: 100%;
        margin-inline: auto;
        padding: 0 28px 18px;
    }

    .desk-body .rows { grid-template-columns: 1fr 1fr; gap: 12px; }

    .desk-body .row {
        align-items: center;
        padding: 10px;
        border: 1px solid #2a2a2e;
        border-radius: 16px;
        background: #141418;
    }

    .desk-body .row:hover { border-color: rgba(255, 45, 45, 0.5); background: #1a1a1e; }

    .desk-body > .page-ad { display: none; }

    .desk-side {
        width: 320px;
        flex: none;
        gap: 14px;
        padding: 62px 16px 22px;
    }

    .page-ad-side {
        display: block;
        margin-top: auto;
        border-top: 0;
        background: transparent;
    }

    .desk-card {
        margin: 0;
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        background: rgba(17, 17, 20, 0.9);
        color: #fff;
        text-align: left;
    }

    .desk-side .desk-card:first-child {
        background: linear-gradient(165deg, #4a1520 0%, #16161a 58%);
        border-color: rgba(255, 45, 45, 0.35);
    }

    .desk-card p, .desk-card span, .desk-card small { color: var(--muted); }

    .desk-card strong {
        display: block;
        margin-top: 6px;
        font-size: 36px;
        letter-spacing: -0.04em;
    }

    .desk-card h2 { margin: 0 0 10px; font-size: 16px; }

    .desk-card button {
        display: block;
        width: 100%;
        margin-top: 8px;
        border: 0;
        border-radius: 12px;
        background: #1a1a1e;
        color: #fff;
        padding: 12px 14px;
        font-weight: 700;
        text-align: left;
    }

    .desk-card button:hover { background: #24242a; }

    .desk-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .desk-stats strong { font-size: 24px; }

    .desk-you {
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
    }

    .desk-you img { width: 44px; height: 44px; border-radius: 50%; }

    .desk-you strong { margin: 0; font-size: 16px; color: #fff; }

    .desk-you small { color: var(--muted); }
}

.source-switch {
    position: relative;
    flex: none;
    z-index: 5;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    padding: 10px 12px 6px;
    background: #000;
    overflow-x: auto;
    scrollbar-width: none;
}

.source-switch::-webkit-scrollbar { display: none; }

.source-switch button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #1a1a1e;
    color: #a1a1aa;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.source-switch button.is-on { background: #ff2d2d; color: #fff; }

#refresh-app {
    margin-left: auto;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
}

.reel-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #000;
    pointer-events: none;
}

@media (max-width: 1099px) {
    .shell {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    #home-feed .video .reel-file,
    #home-feed .video.is-playing[data-source="ai"] .reel-file,
    #home-feed .thumb img {
        position: absolute;
        inset: auto 0 auto 0;
        top: 50%;
        left: 0;
        width: 100%;
        height: auto;
        max-height: none;
        transform: translateY(-50%);
        object-fit: contain;
        object-position: center;
    }
}

.reel-file[hidden],
.reel-chips[hidden],
#home-feed[hidden],
#request-board[hidden],
#library-history[hidden] { display: none !important; }

#request-board {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 14px 18px;
    background: #000;
}

.request-form {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.request-form span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.request-form input {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--bar);
    padding: 14px;
    outline: 0;
    font-size: 14px;
}

.request-form p,
.request-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.request-form button,
.request-list button {
    border: 0;
    border-radius: 12px;
    background: #ff2d2d;
    color: #fff;
    padding: 12px 14px;
    font: inherit;
    font-weight: 800;
}

.request-status { color: #b6f3c4 !important; }

.request-list { display: grid; gap: 10px; }

.request-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #2a2a2e;
    background: #141418;
}

.request-list a { color: #fff; font-weight: 800; text-decoration: none; }

.request-actions { display: grid; gap: 6px; flex: none; }

.request-list a.request-go {
    display: block;
    background: #ff2d2d;
    color: #fff;
    padding: 10px 12px;
    text-align: center;
}

.request-list .request-actions button {
    background: transparent;
    color: #fff;
    border: 1px solid #3a3a40;
    padding: 8px 12px;
}

.request-list span { color: var(--muted); font-size: 12px; font-weight: 800; }

.channel-add {
    display: grid;
    gap: 8px;
    margin: 4px 0 18px;
}

.channel-add p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.channel-add label { display: grid; gap: 6px; }

.channel-add span { color: var(--muted); font-size: 12px; font-weight: 800; }

.channel-add input {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--bar);
    padding: 14px;
    outline: 0;
    font-size: 14px;
    color: #fff;
}

.channel-add > button,
.channel-add form > button {
    border: 0;
    border-radius: 12px;
    background: #ff2d2d;
    color: #fff;
    padding: 12px 14px;
    font: inherit;
    font-weight: 800;
}

.channel-add .pack-row { margin: 0; }

.pack-row button.is-off,
.pack-row button:disabled {
    background: #2a2a2e !important;
    color: #6b6b73 !important;
    border-color: #2a2a2e !important;
    box-shadow: none;
    cursor: default;
}

.account-history { margin: 8px 14px 0; }

.account-history h2 { margin: 18px 0 0; font-size: 15px; }

.account-history article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2e;
}

.account-history p { margin: 0; grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

.account-history .state { font-size: 12px; font-weight: 800; color: #b6f3c4; }

.account-history .state.is-pending { color: #ffd56a; }

.channel-add .error { color: #ff8d8d; }

.account-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: #ff2d2d;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    flex: none;
}

.account-id .text-btn {
    width: auto;
    margin-left: auto;
    padding: 8px 0;
    background: transparent;
    border: 0;
    color: #a1a1aa;
    font-weight: 800;
}

.account-tabs {
    display: flex;
    gap: 0;
    margin: 4px 0 14px;
    border-bottom: 1px solid #2a2a2e;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.account-tabs button {
    flex: 1;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #8b8b94;
    padding: 12px 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.account-tabs button.is-on {
    color: #fff;
    border-bottom-color: #ff2d2d;
}

[data-account-pane][hidden] { display: none !important; }

.balance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.balance-grid .wallet { border-radius: 0; padding: 16px; }

.balance-grid .wallet strong { font-size: 32px; }

.wallet-cash {
    background: linear-gradient(165deg, #1a2420, #141416 70%) !important;
    border-color: #2a3a32 !important;
}

.account-form, .pack-row {
    display: grid;
    gap: 8px;
    margin: 14px;
}

.account-form h2 { margin: 8px 0 0; font-size: 18px; }

.account-form p { margin: 0; color: var(--muted); }

.account-form input, .account-form select, .account-form button, .pack-row button, .text-btn {
    width: 100%;
    border: 1px solid #2a2a2e;
    border-radius: 12px;
    background: #141418;
    color: #fff;
    padding: 12px;
    font: inherit;
}

.account-form button, .pack-row button { background: #ff2d2d; border-color: #ff2d2d; font-weight: 800; }

.text-btn { background: transparent; color: #a1a1aa; }
