:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #171a1f;
  --panel2: #20242b;
  --line: #33383f;
  --text: #f5f1e8;
  --muted: #a3a6ad;
  --soft: #d7d3ca;
  --accent: #ffb65f;
  --accent2: #ffd18d;
  --good: #8fd0a7;
  --bad: #e56f6a;
  --shadow: 0 24px 72px #0008;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 55% -12%, #282219 0, transparent 42%), var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button { color: inherit; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection { color: #20170e; background: var(--accent); }

.ui-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon--small { width: 19px; height: 19px; }
.ui-icon--play { fill: currentColor; stroke: none; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  grid-template-columns: 248px minmax(0, 1fr);
  background: transparent;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  gap: 30px;
  padding: 26px 16px 20px;
  background: #101317;
  border-right: 1px solid var(--line);
}
.brand { min-height: 46px; gap: 12px; padding: 0 7px; }
.brandmark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffd08c, #e69b48);
  box-shadow: 0 6px 24px #ffb65f2c;
  color: #25190d;
  font-size: 20px;
}
.brandname { font-size: 15px; letter-spacing: -.35px; }
.brandtag { color: #a3a6ad; font-size: 9px; letter-spacing: 1.35px; }
.nav { gap: 5px; }
.navbtn {
  min-height: 48px;
  gap: 13px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #aeb0b5;
  font-size: 14px;
  font-weight: 550;
}
.navbtn:hover { background: #ffffff08; color: var(--text); }
.navbtn.active {
  border-color: #ffffff0d;
  background: linear-gradient(100deg, #ffb65f1c, #ffffff08 78%);
  color: var(--text);
}
.navbtn.active .navicon { color: var(--accent); }
.navicon { width: 23px; height: 23px; display: grid; place-items: center; font-size: 0; }
.navicon .ui-icon { width: 21px; height: 21px; }
.side-bottom { gap: 12px; }
.mini-card {
  padding: 16px;
  border: 1px solid #6b5136;
  border-radius: 16px;
  background: linear-gradient(145deg, #282117, #18191c 78%);
}
.mini-card strong { margin-bottom: 7px; font-size: 14px; }
.mini-card p { margin-bottom: 14px; font-size: 12px; line-height: 1.55; }
.side-bottom .tiny { font-size: 11px; }

.main { min-width: 0; padding: 0 34px 48px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 72px;
  margin: 0 -34px;
  padding: 0 34px;
  border-bottom: 1px solid #ffffff10;
  background: #0b0d10eF;
  backdrop-filter: blur(18px);
}
.page-title { display: none; }
.web-search {
  width: min(420px, 42vw);
  height: 42px;
  gap: 10px;
  padding: 0 14px;
  border-color: var(--line);
  background: #15181d;
  color: #aeb0b5;
}
.web-search input { min-width: 0; font-size: 13px; }
.web-search input::placeholder { color: #858990; }
main:has(#page-discover.active) .web-search { display: none; }
.top-actions { gap: 10px; }
.download-app-trigger { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 42px; padding: 0 12px; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.download-app-mobile-label { display: none; }
.api-status { color: #c3c4c7; font-size: 11px; }
.icon-button, .pill-button, .locale-select {
  min-height: 42px;
  border-color: var(--line);
  border-radius: 12px;
  background: #171a1f;
  color: var(--soft);
}
.icon-button { width: 42px; height: 42px; }
.locale-select { padding: 9px 12px; font-size: 12px; }
.avatar {
  width: 40px;
  height: 40px;
  border: 1px solid #ffffff20;
  background: linear-gradient(145deg, #ffd08c, #d88761);
  color: #291c13;
}

.web-experience { max-width: 1440px; margin: 0 auto; padding: 32px 0 64px; }
.web-feed-heading { margin: 4px 0 26px; }
.web-feed-heading h1 { margin-top: 8px; font-size: clamp(30px, 3vw, 40px); letter-spacing: -1.25px; }
.web-feed-heading p { font-size: 13px; }
.download-app-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 0; border-radius: 12px; background: linear-gradient(105deg, var(--accent), #ffc779); color: #2d1a0c; font-size: 12px; font-weight: 800; white-space: nowrap; }
.download-app-cta:hover { filter: brightness(1.06); }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: 1.55px; }
.web-feed-tabs { gap: 27px; margin-bottom: 19px; border-color: var(--line); }
.web-feed-tab { min-height: 44px; padding: 11px 1px; color: #a3a6ad; font-size: 13px; }
.web-feed-tab.active::after { height: 3px; background: var(--accent); }
.web-genre-chips { gap: 9px; padding-bottom: 22px; }
.web-chip, .chip {
  min-height: 40px;
  padding: 9px 15px;
  border-color: var(--line);
  background: #171a1f;
  color: #c4c5c8;
  font-size: 12px;
}
.web-chip.active, .chip.selected { border-color: var(--accent); background: var(--accent); color: #24180d; }
.web-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
  gap: 17px;
  max-width: none;
  margin: 0;
  columns: initial;
}
.web-feed-card {
  display: block;
  width: auto;
  min-width: 0;
  margin: 0;
  border-color: #ffffff14;
  border-radius: 15px;
  background: #15181d;
  cursor: pointer;
}
.web-feed-card:hover { border-color: #6b583f; box-shadow: 0 18px 34px #0006; }
.web-feed-art { aspect-ratio: .76; background: #20242b; }
.web-feed-card:nth-child(4n+2) .web-feed-art { aspect-ratio: .83; }
.web-feed-card:nth-child(4n+3) .web-feed-art { aspect-ratio: .72; }
.web-feed-card:nth-child(4n) .web-feed-art { aspect-ratio: .8; }
.web-feed-art img { object-position: center 32%; }
.web-feed-badge { padding: 7px 9px; font-size: 9px; }
.web-feed-play { width: 38px; height: 38px; border-color: #ffffff85; }
.web-feed-art-title { left: 15px; right: 14px; bottom: 15px; }
.web-feed-art-title small { font-size: 9px; }
.web-feed-art-title strong { font-size: clamp(21px, 1.7vw, 26px); }
.web-feed-card-copy { padding: 13px 14px 15px; }
.web-feed-card-open {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
  color: inherit;
  text-align: left;
}
.web-feed-card-open:focus-visible,
.collection-card-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.web-feed-meta strong { font-size: 12px; }
.web-feed-meta span, .web-feed-sub { font-size: 11px; }
.web-feed-sub { line-height: 1.5; }
.web-feed-grid > .api-state {
  grid-column: 1 / -1;
  min-height: 170px;
  display: grid;
  align-content: center;
  padding: 28px 30px;
  border: 1px solid #ffffff15;
  border-radius: 16px;
  background: linear-gradient(135deg, #171a1f, #121519);
  color: #c1c2c5;
  font-size: 14px;
}

.section-view { max-width: 1080px; padding-top: 33px; }
.section-view h1 { margin: 7px 0 8px; font-size: clamp(28px, 3vw, 36px); letter-spacing: -1px; }
.section-intro { max-width: 720px; margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.searchbox {
  min-height: 52px;
  margin-bottom: 20px;
  border-color: var(--line);
  border-radius: 14px;
  background: #15181d;
  color: var(--muted);
}
.searchbox input { font-size: 14px; }
.chip-row { gap: 9px; margin-bottom: 22px; }
.collection-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); gap: 16px; }
.collection-card { border-color: #ffffff14; border-radius: 15px; background: #15181d; cursor: default; }
.collection-card-open {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.poster { height: auto; aspect-ratio: .78; }
.card-body { padding: 14px; }
.card-title { font-size: 14px; }
.card-meta, .card-foot { font-size: 11px; }
.collection-card:hover { border-color: #6b583f; }
.collection-card .card-foot { margin: 0; padding: 0 14px 14px; }
.api-state {
  border-color: #ffffff15;
  border-radius: 14px;
  background: #15181d;
  color: #b6b8be;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.55;
}
#page-collections > .section-view > #libraryState {
  min-height: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aeb0b5;
  font-size: 12px;
}
.library-progress-panel, .panel {
  border-color: #ffffff15;
  border-radius: 16px;
  background: #15181d;
}
.library-progress-panel { margin-bottom: 24px; padding: 18px; }
.library-progress-panel > h2 { font-size: 16px !important; }
.library-progress-panel #watchProgressCard.api-state {
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}
.library-progress-panel #watchProgressCard > .api-state { min-height: 0; padding: 0; border: 0; background: transparent; }
.library-section-title { margin: 0 0 14px; font-size: 18px; }
#savedCollectionGrid > .api-state { grid-column: 1 / -1; }
.profile-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 18px; }
.profile-grid > .panel { min-width: 0; padding: 20px; }
.profile-head { gap: 14px; }
.profile-avatar { width: 58px; height: 58px; }
.setting-row { min-height: 60px; gap: 14px; font-size: 13px; }
.setting-row small { color: #a3a6ad; font-size: 12px; line-height: 1.4; }
.secondary-btn, .primary-btn { min-height: 42px; padding: 10px 14px; border-radius: 11px; font-size: 12px; }
.primary-btn { background: linear-gradient(110deg, #ffb65f, #ffd08c); color: #24180d; }
.status { font-size: 10px; }
.table { font-size: 12px; }
.table th { font-size: 10px; }
.demo-banner { border-color: #6a5539; border-radius: 12px; background: #272219; color: #e8d9bd; font-size: 12px; line-height: 1.55; }
.invite-code { gap: 10px; border-color: #8a693f; border-radius: 13px; background: #ffb65f0d; }
.invite-code #referralShareUrl { overflow-wrap: anywhere; }

.player { border: 1px solid #ffffff24; border-radius: 22px; background-color: #141519; }
.player-video { object-fit: cover; }
.player-copy { max-width: 380px; }
.series-title { font-size: 21px; letter-spacing: -.35px; }
.series-sub { font-size: 13px; line-height: 1.5; }
.player-cta { min-height: 44px; border-radius: 10px; font-size: 12px; }
.side-actions { gap: 14px; }
.action { min-width: 48px; min-height: 54px; gap: 5px; font-size: 11px; }
.action .bubble { width: 46px; height: 46px; font-size: 0; }
.action .bubble .ui-icon { width: 22px; height: 22px; }
.round-action, .play-core { width: 44px; height: 44px; font-size: 0; }
.play-core { width: 64px; height: 64px; }
.play-core .ui-icon { width: 25px; height: 25px; }
.round-action .ui-icon { width: 20px; height: 20px; }
.player-top { gap: 9px; }
.player-controls { font-size: 12px; }
.progress-wrap { height: 4px; }
.web-viewer { background: #080a0d; }
.web-viewer:fullscreen .immersive-controls { display: flex; }
.web-viewer-layout { max-width: 1520px; grid-template-columns: minmax(210px, 270px) minmax(340px, 470px) minmax(230px, 300px); gap: 28px; padding: 10px 28px 28px; }
.web-viewer-stage .player { height: min(84dvh, 860px); border-radius: 18px; }
.web-viewer-story h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.04; }
.web-viewer-story p { font-size: 14px; }
.web-viewer-details { border-color: #ffffff20; background: #14171bd9; }
.viewer-episode-list { max-height: min(56dvh, 560px); overflow: auto; padding-right: 3px; }
.viewer-episode { min-height: 58px; padding: 9px; border-color: #ffffff12; }
.viewer-episode strong { font-size: 12px; }
.viewer-episode small { font-size: 10px; }
.viewer-top-button { min-height: 44px; border-radius: 11px; }
.viewer-round { width: 44px; }
.fullscreen-toggle { min-width: 44px; justify-content: center; padding: 0 12px; }
.viewer-top-right { gap: 8px; }
.immersive-controls { min-height: 60px; padding: 10px 24px max(10px, env(safe-area-inset-bottom)); }
.watch-control { min-height: 40px; height: 40px; padding: 0 13px; border-radius: 9px; font-size: 12px; }
.watch-clock { font-size: 11px; }
.watch-progress { height: 4px; }

.modal-backdrop { padding: 24px; }
.modal, .modal.wide { border-color: #3c4149; border-radius: 20px; background: #171a1f; }
.modal { width: min(520px, 100%); padding: 25px; }
.modal.wide { width: min(760px, 100%); }
.modal h2 { font-size: 26px; line-height: 1.1; }
.modal p { font-size: 14px; line-height: 1.6; }
.close-btn { width: 42px; height: 42px; }
.plan-option { min-height: 76px; border-color: #ffffff18; border-radius: 13px; }
.plan-option.selected { border-color: var(--accent); background: #ffb65f12; }
.plan-option strong, .price-demo { font-size: 14px; }
.plan-option small, .fineprint { font-size: 12px !important; line-height: 1.55; }
.episode-list { gap: 9px; }
.episode { min-height: 68px; border-radius: 12px; }
.ep-thumb { width: 72px; height: 50px; }
.ep-text strong { font-size: 13px; }
.ep-text small { font-size: 11px; }
.comment-box input { min-height: 46px; font-size: 14px; }
.comment-item { padding: 15px 0; }
.comment-text { font-size: 13px; line-height: 1.5; }
.comment-actions { gap: 18px; }
.text-action { min-height: 36px; padding: 5px 2px; font-size: 11px; }
.toast { max-width: min(92vw, 540px); white-space: normal; text-align: center; font-size: 13px; }

.light {
  color-scheme: light;
  --bg: #f3f1ed;
  --panel: #fff;
  --panel2: #f3f0ec;
  --line: #ddd8d1;
  --text: #25211f;
  --muted: #6f6d6a;
  --soft: #4c4641;
  --accent: #b76a20;
  --accent2: #e39b4d;
  --good: #287247;
  --bad: #b9423b;
  --shadow: 0 24px 72px #40332820;
  background: #f3f1ed;
}
.app.light { color: var(--text); background: var(--bg); }
.light .sidebar { background: #eeece7; border-right-color: #d8d2ca; }
.light .brandtag, .light .navbtn { color: #625d57; }
.light .navbtn.active { border-color: #e3d8ca; background: linear-gradient(100deg, #efe3d3, #ffffffaa 78%); color: #25211f; }
.light .mini-card { border-color: #d8c8b4; background: linear-gradient(145deg, #fffaf3, #fff 78%); color: #302820; }
.light .mini-card p { color: #6d655b; }
.light .topbar { border-bottom-color: #ddd8d1; background: #f3f1edeb; }
.light .web-search, .light .searchbox, .light .locale-select, .light .icon-button { border-color: #d8d2ca; background: #fff; color: #514b45; }
.light .web-search input, .light .searchbox input { color: var(--text); }
.light .web-search input::placeholder { color: #6d6760; }
.light .api-status { color: #625d57; }
.light .web-feed-tab { color: #625d57; }
.light .web-feed-tab.active { color: var(--text); }
.light .web-chip, .light .chip { border-color: #d8d2ca; background: #fff; color: #514b45; }
.light .web-chip.active, .light .chip.selected { border-color: #965016; background: #965016; color: #fff; }
.light .web-feed-card, .light .collection-card, .light .panel, .light .api-state { border-color: #ded8cf; background: #fff; }
.light .web-feed-card, .light .collection-card { border-color: #ded8cf; }
.light .web-feed-meta span { color: #835016; }
.light .api-state { color: #514b45; }
.light .web-feed-grid > .api-state { border-color: #ded8cf; background: linear-gradient(135deg, #fff, #f4f1ec); color: #514b45; }
.light #page-collections > .section-view > #libraryState { background: transparent; color: #625d57; }
.light .library-progress-panel #watchProgressCard.api-state { background: transparent; }
.light .setting-row small { color: #625d57; }
.light #mobileCatalogState:not([hidden]) { color: #514b45; }

.top-settings { display: contents; }
.top-settings > summary { display: none; }
.top-settings-panel, .top-setting-item { display: contents; }

@media (max-width: 380px) {
  .top-settings { position: relative; display: block; flex: none; }
  .top-settings > summary {
    display: grid;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    place-items: center;
    list-style: none;
    font-size: 23px;
    line-height: 1;
  }
  .top-settings > summary::-webkit-details-marker { display: none; }
  .top-settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: none;
    width: min(240px, calc(100vw - 20px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }
  .top-settings[open] .top-settings-panel { display: grid; gap: 12px; }
  .top-setting-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--soft); font-size: 12px; }
  .top-actions .top-settings-panel .icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; }
  .top-actions .top-settings-panel .locale-select { width: auto; min-width: 0; max-width: none; min-height: 44px; flex: 1 1 auto; padding: 8px; font-size: 12px; }
  .collection-card-open { min-height: 44px; }
}

@media (min-width: 701px) and (max-width: 999px) {
  .app { grid-template-columns: 196px minmax(0, 1fr); }
  .sidebar { padding: 22px 12px; }
  .main { padding: 0 22px 40px; }
  .topbar { margin: 0 -22px; padding: 0 22px; }
  .web-search { width: min(250px, 30vw); }
  .web-experience { padding-top: 26px; }
  .web-feed-heading > p { display: none; }
  .web-feed-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 175px), 1fr)); gap: 13px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
  .web-viewer-layout { grid-template-columns: minmax(0, 1fr); padding: 0 16px 20px; }
  .web-viewer-story, .web-viewer-details { display: none; }
  .web-viewer-stage .player { height: min(82dvh, 820px); }
}

@media (min-width: 701px) and (max-width: 840px) {
  .app { grid-template-columns: 174px minmax(0, 1fr); }
  .brandtag { display: none; }
  .web-search { width: min(205px, 27vw); }
  .top-actions { gap: 6px; }
  .top-actions .locale-select { max-width: 92px; }
}

@media (max-width: 700px) {
  body { min-width: 320px; }
  .app { display: block; min-height: 100dvh; padding: 0; }
  .sidebar { display: none; }
  .main { padding: 0 0 calc(70px + env(safe-area-inset-bottom)); }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    height: 56px;
    margin: 0;
    padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
    border-bottom-color: #ffffff12;
    background: #0b0d10f2;
  }
  .topbar:before { left: max(14px, env(safe-area-inset-left)); font-size: 15px; }
  .top-actions { gap: 7px; }
  .top-actions .api-status { max-width: 66px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
  .top-actions .icon-button { width: 38px; height: 38px; min-height: 38px; }
  .top-actions .download-app-trigger { padding: 0; gap: 4px; }
  .download-app-label { display: none; }
  .download-app-mobile-label { display: inline; font-size: 10px; font-weight: 800; letter-spacing: .2px; }
  .top-actions .locale-select { width: 106px; max-width: 106px; min-height: 38px; padding: 7px 8px; font-size: 11px; }
  .top-actions .avatar { width: 36px; height: 36px; }
  .web-search { display: none !important; }
  .content { display: block; padding: 0; }
  .web-experience { display: none !important; }
  .legacy-feed { display: block; }
  .feed-column { min-width: 0; }
  .feed-heading, .demo-controls, .right-column { display: none; }
  .player {
    width: min(100%, 560px);
    height: calc(100dvh - 56px - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 320px;
    max-height: none;
    aspect-ratio: auto;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
  }
  .player-copy { left: 16px; right: 66px; bottom: 24px; max-width: 340px; }
  .series-title { font-size: 19px; }
  .series-sub { font-size: 12px; }
  .player-cta { min-height: 42px; margin-top: 10px; padding: 9px 11px; }
  .side-actions { right: 9px; bottom: 112px; gap: 8px; }
  .action { min-width: 48px; min-height: 50px; gap: 3px; font-size: 10px; }
  .action .bubble { width: 42px; height: 42px; }
  .action .bubble .ui-icon { width: 20px; height: 20px; }
  .player-top { top: 12px; right: 10px; }
  .player-top .round-action { width: 40px; height: 40px; }
  .scene-label { left: 12px; top: 14px; }
  .dialogue { top: 44%; left: 12px; right: 64px; font-size: clamp(18px, 5vw, 24px); }
  #mobileCatalogState:not([hidden]) {
    min-height: calc(100dvh - 56px - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: grid;
    align-content: center;
    padding: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #c5c6c8;
    text-align: center;
    font-size: 14px;
  }
  .section-view { padding: 22px 16px 28px; }
  .section-view h1 { font-size: 28px; }
  .section-intro { margin-bottom: 21px; font-size: 13px; }
  .searchbox { min-height: 48px; padding: 10px 13px; }
  .chip-row { gap: 7px; overflow-x: auto; flex-wrap: nowrap; padding: 0 0 6px; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar, .web-genre-chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 38px; padding: 8px 13px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .poster { aspect-ratio: .72; }
  .card-body { padding: 11px; }
  .card-title { font-size: 12px; }
  .card-meta, .card-foot { font-size: 10px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .profile-grid > .panel { padding: 16px; }
  .setting-row { min-height: 58px; gap: 9px; font-size: 12px; }
  .setting-row .secondary-btn, .setting-row .primary-btn { flex: none; min-height: 42px; padding: 9px 11px; font-size: 11px; }
  .setting-row select { max-width: 134px; }
  .library-progress-panel { padding: 14px; }
  .library-progress-panel #watchProgressCard.api-state { min-height: 0; }
  .library-progress { grid-template-columns: 68px minmax(0, 1fr); gap: 11px; }
  .library-progress .primary-btn { grid-column: 2; justify-self: start; }
  .library-progress-cover { width: 68px; height: 90px; }
  .stat-grid { gap: 7px; }
  .stat { min-width: 0; padding: 10px 8px; }
  .stat strong { font-size: 16px; }
  .stat span { font-size: 10px; line-height: 1.3; }
  .invite-code { align-items: flex-start; }
  .invite-code #referralShareUrl { max-width: 55vw; font-size: 10px; }
  .setting-row input, .setting-row select { min-width: 0; max-width: 100%; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal, .modal.wide {
    width: 100%;
    max-height: min(90dvh, 760px);
    padding: 22px 18px max(24px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }
  .modal h2 { font-size: 24px; }
  .modal p { font-size: 13px; }
  .modal-footer { flex-wrap: wrap; }
  .bottom-nav {
    display: grid !important;
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding: 5px 5px max(7px, env(safe-area-inset-bottom));
    border-top-color: #ffffff18;
    background: #101317f2;
  }
  .bottom-nav .navbtn {
    min-width: 48px;
    min-height: 52px;
    gap: 2px;
    padding: 4px 2px;
    font-size: 10px;
  }
  .bottom-nav .navicon, .bottom-nav .navicon .ui-icon { width: 23px; height: 23px; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .web-viewer { overflow: hidden; }
  .web-viewer-top { height: 56px; padding: 0 10px; }
  .web-viewer-layout { display: flex; height: calc(100dvh - 56px); min-height: 0; padding: 0; align-items: stretch; }
  .web-viewer-stage { width: 100%; height: 100%; align-items: flex-start; }
  .web-viewer-stage .player {
    width: min(100%, 560px);
    height: 100%;
    min-height: 0;
    max-width: 560px;
    border-radius: 0;
  }
  .web-viewer-story, .web-viewer-details { display: none; }
  .viewer-top-label { display: none; }
  .viewer-top-button { min-height: 40px; height: 40px; padding: 0 11px; }
  .viewer-round { width: 40px; padding: 0; }
  .fullscreen-toggle { width: 40px; min-width: 40px; padding: 0; }
  .fullscreen-toggle span { display: none; }
  body.watch-mode .web-viewer-top { height: 56px; padding: 0 10px; }
  body.watch-mode #viewerStage .scene-label { left: 13px; top: 68px; }
  body.watch-mode #viewerStage .player-top { right: 10px; top: 66px; }
  body.watch-mode #viewerStage .dialogue { left: 10%; right: 18%; top: 38%; font-size: clamp(20px, 6vw, 29px); }
  body.watch-mode #viewerStage .side-actions { right: 8px; bottom: 126px; gap: 6px; }
  body.watch-mode #viewerStage .action .bubble { width: 40px; height: 40px; }
  body.watch-mode #viewerStage .player-copy { left: 14px; right: 58px; bottom: 67px; }
  body.watch-mode #viewerStage .series-title { font-size: 19px; }
  body.watch-mode #viewerStage .series-sub { font-size: 11px; }
  .immersive-controls { min-height: calc(54px + env(safe-area-inset-bottom)); padding: 7px 10px max(7px, env(safe-area-inset-bottom)); gap: 7px; }
  .watch-control { min-height: 36px; height: 36px; padding: 0 9px; font-size: 10px; }
  .watch-clock { font-size: 9px; }
  .watch-progress { min-width: 24px; }
}

@media (max-width: 380px) {
  .top-actions .api-status { display: none; }
  .top-actions .locale-select { width: 94px; max-width: 94px; }
  .section-view { padding-right: 13px; padding-left: 13px; }
  .collection-grid { gap: 9px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bottom-nav .navbtn { font-size: 9px; }
}

@media (max-width: 700px) and (orientation: landscape) {
  .main { padding-bottom: 0; }
  .topbar { height: 48px; }
  .topbar:before { font-size: 14px; }
  .player {
    width: 100%;
    height: calc(100dvh - 48px);
    min-height: 260px;
  }
  .bottom-nav { display: none !important; }
  #mobileCatalogState:not([hidden]) { min-height: calc(100dvh - 48px); }
  body.watch-mode #viewerStage .player-video,
  #webViewer:fullscreen #viewerStage .player-video {
    left: 50%;
    width: auto;
    height: 100%;
    max-width: 100vw;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    transform: translateX(-50%);
  }
  body.watch-mode #viewerStage .player:after,
  #webViewer:fullscreen #viewerStage .player:after {
    background: linear-gradient(180deg, #07080c90, transparent 25%, transparent 62%, #07080ced 100%);
  }
  body.watch-mode #viewerStage .dialogue,
  #webViewer:fullscreen #viewerStage .dialogue { top: 34%; left: 15%; right: 24%; font-size: clamp(18px, 3vw, 28px); }
  body.watch-mode #viewerStage .side-actions,
  #webViewer:fullscreen #viewerStage .side-actions { right: 14px; bottom: 78px; gap: 4px; }
  body.watch-mode #viewerStage .player-copy,
  #webViewer:fullscreen #viewerStage .player-copy { left: 18px; right: 74px; bottom: 48px; max-width: min(52vw, 480px); }
  body.watch-mode #viewerStage .series-title,
  #webViewer:fullscreen #viewerStage .series-title { font-size: 17px; }
  body.watch-mode #viewerStage .series-sub,
  #webViewer:fullscreen #viewerStage .series-sub { font-size: 10px; }
  body.watch-mode .web-viewer-top { height: 48px; padding: 0 12px; }
  body.watch-mode #viewerStage .scene-label { top: 56px; left: 18px; }
  body.watch-mode #viewerStage .player-top { top: 54px; right: 14px; }
  body.watch-mode .immersive-controls { min-height: 46px; padding: 5px 14px; }
  body.watch-mode .watch-control { min-height: 32px; height: 32px; }
  .web-viewer-layout { height: calc(100dvh - 48px); }
  .web-viewer-stage .player { height: 100%; }
}

@media (min-width: 701px) and (max-height: 520px) and (orientation: landscape) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main { padding-bottom: 18px; }
  .topbar { height: 52px; }
  .web-experience { padding-top: 20px; }
  .bottom-nav { display: none !important; }
  .web-viewer-layout { grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - 52px); padding: 0 12px 10px; }
  .web-viewer-story, .web-viewer-details { display: none; }
  .web-viewer-stage .player { height: calc(100dvh - 64px); max-height: none; }
  body.watch-mode .web-viewer-top { height: 46px; padding: 0 12px; }
  body.watch-mode .web-viewer-layout { height: calc(100dvh - 46px); }
  body.watch-mode .web-viewer-stage .player { height: 100%; }
  body.watch-mode #viewerStage .player-video,
  #webViewer:fullscreen #viewerStage .player-video {
    left: 50%; width: auto; height: 100%; max-width: 100vw; aspect-ratio: 9 / 16;
    object-fit: contain; transform: translateX(-50%);
  }
  body.watch-mode #viewerStage .player:after,
  #webViewer:fullscreen #viewerStage .player:after {
    background: linear-gradient(180deg, #07080c90, transparent 25%, transparent 62%, #07080ced 100%);
  }
  body.watch-mode #viewerStage .dialogue,
  #webViewer:fullscreen #viewerStage .dialogue { top: 34%; left: 15%; right: 24%; font-size: clamp(18px, 3vw, 28px); }
  body.watch-mode #viewerStage .side-actions,
  #webViewer:fullscreen #viewerStage .side-actions { right: 14px; bottom: 76px; gap: 4px; }
  body.watch-mode #viewerStage .player-copy,
  #webViewer:fullscreen #viewerStage .player-copy { left: 18px; right: 74px; bottom: 46px; max-width: min(52vw, 480px); }
  body.watch-mode .immersive-controls { min-height: 44px; padding: 4px 14px; }
  body.watch-mode .watch-control { min-height: 32px; height: 32px; }
}

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

/* Comment appeal UI */
.appeal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.appeal-toolbar .api-state { flex: 1; min-width: 0; }
.appeal-toolbar .secondary-btn { flex: none; min-height: 40px; }
.appeal-list { display: grid; gap: 13px; }
.appeal-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel2); }
.appeal-card-heading, .appeal-current-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.appeal-card-heading h3 { margin: 0; font-size: 14px; }
.appeal-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.appeal-status--restriction { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 42%, transparent); }
.appeal-status--pending { color: #dca04e; border-color: #dca04e66; background: #dca04e12; }
.appeal-status--accepted { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); background: color-mix(in srgb, var(--good) 8%, transparent); }
.appeal-status--rejected { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.appeal-status--superseded, .appeal-status--unknown { color: var(--muted); }
.appeal-comment-body { margin: 12px 0; padding: 12px; border-left: 2px solid var(--accent); border-radius: 0 9px 9px 0; background: var(--panel); color: var(--soft); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.appeal-detail { margin-top: 9px; }
.appeal-detail strong { display: block; color: var(--muted); font-size: 10px; font-weight: 600; }
.appeal-detail p { margin: 3px 0 0; color: var(--text); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.appeal-current { margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.appeal-current-heading { align-items: center; }
.appeal-current-heading > strong { font-size: 11px; }
.appeal-no-history, .appeal-unavailable { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.appeal-open-button { min-height: 40px; margin-top: 12px; }
.appeal-form { display: grid; gap: 9px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.appeal-form-label { display: grid; gap: 7px; color: var(--soft); font-size: 11px; font-weight: 700; }
.appeal-reason-input { width: 100%; min-height: 112px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--text); font: inherit; font-size: 12px; line-height: 1.5; }
.appeal-reason-input::placeholder { color: var(--muted); }
.appeal-form-helper, .appeal-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.appeal-form-helper { color: var(--muted); font-size: 10px; }
.appeal-reason-count { color: var(--soft); font-variant-numeric: tabular-nums; }
.appeal-form-status { min-height: 18px; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.appeal-form-actions { justify-content: flex-start; }
.appeal-form-actions .primary-btn, .appeal-form-actions .quiet-btn { min-height: 40px; padding: 9px 13px; border-radius: 10px; font-size: 11px; }
.appeal-form-actions button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 520px) {
  .appeal-toolbar { align-items: stretch; }
  .appeal-toolbar .secondary-btn { padding: 8px 10px; }
  .appeal-card { padding: 13px; }
  .appeal-card-heading, .appeal-current-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .appeal-form-helper { align-items: flex-start; flex-direction: column; gap: 3px; }
}
/* Image-led feature panels for the Invite and Profile destinations. */
.feature-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 244px;
  margin: 0 0 20px;
  padding: 27px 30px;
  overflow: hidden;
  border: 1px solid #ffffff1c;
  border-radius: 22px;
  background: linear-gradient(112deg, #211a15 0%, #2c241d 53%, #15191e 100%);
}
.feature-banner::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #171513 0%, #1c1915e8 48%, #1b1b1b08 100%);
  pointer-events: none;
}
.feature-banner-copy { position: relative; z-index: 2; width: min(65%, 610px); }
.feature-kicker { color: #ffc078; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.feature-banner-copy h2 { max-width: 520px; margin: 9px 0 8px; color: #fff7eb; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.08; letter-spacing: -.7px; }
.feature-banner-copy p { max-width: 500px; margin: 0; color: #d0c8bf; font-size: 13px; line-height: 1.55; }
.feature-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.feature-steps span { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 10px; border: 1px solid #ffffff21; border-radius: 999px; background: #ffffff0c; color: #f0e7dc; font-size: 10px; font-weight: 650; white-space: nowrap; }
.feature-steps b { color: #ffc078; font-size: 9px; letter-spacing: .05em; }
.feature-art { position: absolute; z-index: 0; top: 0; right: 4px; width: 330px; height: 100%; }
.feature-art::before { position: absolute; top: 12%; right: 15%; width: 210px; height: 210px; border-radius: 50%; background: #ffb65f35; content: ""; filter: blur(38px); }
.feature-poster { position: absolute; display: block; width: 112px; height: 168px; border: 1px solid #ffffff70; border-radius: 13px; object-fit: cover; box-shadow: 0 18px 38px #0009; }
.feature-poster-back { top: 33px; right: 151px; transform: rotate(-10deg); opacity: .78; }
.feature-poster-front { top: 39px; right: 49px; width: 126px; height: 186px; transform: rotate(8deg); }
.profile-feature-banner { background: linear-gradient(112deg, #18212b 0%, #222a35 52%, #35291f 100%); }
.profile-feature-banner::after { background: linear-gradient(90deg, #161c24 0%, #1a2028e8 48%, #1b1b1b08 100%); }
.light .feature-banner { border-color: #dfc5a5; background: linear-gradient(112deg, #fff5e8 0%, #f0dfca 54%, #ead3b6 100%); }
.light .feature-banner::after { background: linear-gradient(90deg, #fff5e8 0%, #fff1dfe8 48%, #fff1df08 100%); }
.light .feature-banner-copy h2 { color: #2f241a; }
.light .feature-banner-copy p { color: #66584a; }
.light .feature-steps span { border-color: #8d69433a; background: #ffffff80; color: #493a2d; }
.light .profile-feature-banner { background: linear-gradient(112deg, #eff3f7 0%, #e5e9ee 52%, #ead7c1 100%); }
.light .profile-feature-banner::after { background: linear-gradient(90deg, #eff3f7 0%, #edf0f4e8 48%, #edf0f408 100%); }
@media (max-width: 700px) {
  .feature-banner { min-height: 224px; margin-bottom: 15px; padding: 21px 18px; border-radius: 18px; }
  .feature-banner-copy { width: 100%; padding-right: 55px; }
  .feature-banner-copy h2 { max-width: 310px; font-size: 25px; }
  .feature-banner-copy p { max-width: 300px; font-size: 12px; }
  .feature-steps { gap: 6px; margin-top: 15px; }
  .feature-steps span { min-height: 27px; padding: 4px 8px; font-size: 9px; }
  .feature-art { right: -69px; width: 250px; opacity: .45; }
  .feature-poster { width: 84px; height: 126px; border-radius: 10px; }
  .feature-poster-back { top: 40px; right: 121px; }
  .feature-poster-front { top: 48px; right: 48px; width: 91px; height: 136px; }
  .feature-banner::after { background: linear-gradient(90deg, #171513 0%, #1c1915ef 57%, #1b1b1b35 100%); }
  .profile-feature-banner::after { background: linear-gradient(90deg, #161c24 0%, #1a2028ef 57%, #1b1b1b35 100%); }
  .light .feature-banner::after { background: linear-gradient(90deg, #fff5e8 0%, #fff1dfef 57%, #fff1df35 100%); }
  .light .profile-feature-banner::after { background: linear-gradient(90deg, #eff3f7 0%, #edf0f4ef 57%, #edf0f435 100%); }
}
/* Personal invitation link */
.referral-link-card { align-items: stretch; flex-direction: column; gap: 12px; }
.referral-link-content { display: grid; min-width: 0; gap: 7px; }
.referral-link-content > label { color: var(--muted); }
.referral-share-url { display: block; max-width: 100%; color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; text-decoration-color: #ffb65f88; text-underline-offset: 3px; }
.referral-share-url[aria-disabled="true"] { color: var(--muted); cursor: default; text-decoration: none; }
.referral-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.referral-link-actions button { min-height: 42px; padding: 10px 15px; border-radius: 10px; font-size: 11px; }
.referral-link-actions button:disabled { cursor: not-allowed; opacity: .55; }
.referral-distribution-status { margin-top: 10px; font-size: 11px; line-height: 1.55; }
#withdrawalRuleVersionRow[hidden], #ruleVersionBalanceInfo[hidden], #loadMoreWithdrawalsButton[hidden] { display: none !important; }
#withdrawalRuleVersion { min-width: 0; max-width: 100%; }
#withdrawalHistoryStatus { margin-top: 8px; font-size: 11px; line-height: 1.5; }
#withdrawalRows td { vertical-align: top; }
#withdrawalRows [data-cancel-withdrawal] { min-height: 34px; padding: 7px 10px; white-space: nowrap; }
@media (max-width: 700px) {
  .referral-link-card { align-items: stretch; }
  .referral-share-url { font-size: 12px; }
  .referral-link-actions button { flex: 1; }
}

/* API-backed empty states for Discover and Library. */
.discover-empty-state {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 22px;
  min-height: 258px;
  padding: 22px 28px;
  overflow: hidden;
  border: 1px solid #ffffff18;
  border-radius: 18px;
  background: radial-gradient(ellipse at 78% 50%, #a5673a30, transparent 44%), linear-gradient(115deg, #181a20, #171719 75%);
}
.discover-empty-copy { min-width: 0; }
.discover-empty-kicker, .library-empty-kicker {
  color: #ffc078;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.discover-empty-copy h2 { max-width: 390px; margin: 9px 0 8px; font-size: clamp(21px, 2vw, 28px); line-height: 1.12; letter-spacing: -.45px; }
.discover-empty-copy > .api-state { margin: 0; padding: 0; border: 0; background: transparent; font-size: 12px; }
.library-empty-state { display: grid; grid-template-columns: 1fr; align-items: center; gap: 15px; min-height: 112px; }
.library-progress-cover-empty { background: linear-gradient(145deg, #29272d, #18171b); }
.library-empty-copy { min-width: 0; }
.library-empty-copy p { margin: 6px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.library-empty-copy .secondary-btn { min-height: 38px; padding: 8px 11px; font-size: 11px; }
#savedCollectionGrid > .library-empty-state { grid-column: 1 / -1; padding: 13px 16px; border: 1px solid #ffffff14; border-radius: 14px; background: linear-gradient(105deg, #171a1f, #171719); }
.light .discover-empty-state { border-color: #e5d9cb; background: radial-gradient(ellipse at 78% 50%, #edb57b55, transparent 44%), linear-gradient(115deg, #fff9f1, #f3eee7 75%); }
.light .discover-empty-copy h2 { color: #2f241a; }
.light #savedCollectionGrid > .library-empty-state { border-color: #e8e0d7; background: linear-gradient(105deg, #fff, #f7f3ee); }
@media (max-width: 700px) {
  .discover-empty-state { grid-template-columns: 1fr; gap: 10px; min-height: 0; padding: 17px; }
  .discover-empty-copy { grid-row: 1; }
  .discover-empty-copy h2 { margin-top: 7px; font-size: 22px; }
  .library-empty-state { grid-template-columns: 1fr; gap: 11px; }
  #savedCollectionGrid > .library-empty-state { padding: 11px; }
}

/* Distinct poster-led moods for every non-home destination. */
.discover-feature-banner { background: linear-gradient(112deg, #261b22 0%, #33212a 54%, #1a1b22 100%); }
.discover-feature-banner::after { background: linear-gradient(90deg, #20171d 0%, #251c22e8 48%, #1b1b1b08 100%); }
.library-feature-banner { background: linear-gradient(112deg, #18252a 0%, #202d32 52%, #30271f 100%); }
.library-feature-banner::after { background: linear-gradient(90deg, #172126 0%, #1a2429e8 48%, #1b1b1b08 100%); }
.light .discover-feature-banner { background: linear-gradient(112deg, #fff1e7 0%, #f2e4e6 54%, #eadce0 100%); }
.light .discover-feature-banner::after { background: linear-gradient(90deg, #fff4eb 0%, #fff1e9e8 48%, #fff1e908 100%); }
.light .library-feature-banner { background: linear-gradient(112deg, #eef5f5 0%, #e4eceb 52%, #eee2d4 100%); }
.light .library-feature-banner::after { background: linear-gradient(90deg, #eef5f5 0%, #edf3f2e8 48%, #edf3f208 100%); }
@media (max-width: 700px) {
  .discover-feature-banner::after { background: linear-gradient(90deg, #20171d 0%, #251c22ef 57%, #1b1b1b35 100%); }
  .library-feature-banner::after { background: linear-gradient(90deg, #172126 0%, #1a2429ef 57%, #1b1b1b35 100%); }
  .light .discover-feature-banner::after { background: linear-gradient(90deg, #fff4eb 0%, #fff1e9ef 57%, #fff1e935 100%); }
  .light .library-feature-banner::after { background: linear-gradient(90deg, #eef5f5 0%, #edf3f2ef 57%, #edf3f235 100%); }
}

/* Public invitation landing status and install handoff. */
.invite-landing-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 23px 0 12px; }
.invite-landing-status > div { min-width: 0; padding: 14px 15px; border: 1px solid #ffffff20; border-radius: 13px; background: #ffffff08; }
.invite-landing-status span { display: block; margin-bottom: 6px; color: #9da5b2; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.invite-landing-status strong { display: block; color: #f4f1eb; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.invite-landing-note { color: #bec3cc; font-size: 13px; line-height: 1.65; }
@media (max-width: 480px) {
  .invite-landing-status { grid-template-columns: 1fr; }
}

/* Story-first membership paywall with server-backed options and account state. */
#modal:has(.membership-paywall) {
  width: min(880px, 100%);
  max-height: min(90dvh, 900px);
  overflow: auto;
  padding: 20px;
  scrollbar-gutter: stable;
}
.membership-paywall {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(255px, .85fr);
  grid-template-areas:
    "hero hero"
    "value value"
    "options status"
    "options checkout"
    "footer footer"
    "fineprint fineprint";
  align-items: start;
  gap: 14px 18px;
  min-width: 0;
}
.membership-hero {
  position: relative;
  grid-area: hero;
  min-height: 220px;
  overflow: hidden;
  padding: 23px 26px;
  border: 1px solid #ffc07845;
  border-radius: 19px;
  background:
    radial-gradient(ellipse at 78% 10%, #ffbc7740, transparent 24%),
    radial-gradient(ellipse at 96% 95%, #a33d4b68, transparent 36%),
    linear-gradient(124deg, #292126 0%, #1c1a20 57%, #15171d 100%);
  box-shadow: inset 0 1px #ffffff08, 0 14px 36px #00000024;
}
.membership-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, #fff3 30.2%, transparent 30.8%, transparent 61%, #ffffff09 61.2%, transparent 61.8%);
  content: "";
  opacity: .42;
  pointer-events: none;
}
.membership-hero-copy { position: relative; z-index: 1; max-width: min(62%, 500px); }
.membership-eyebrow { margin-bottom: 10px; color: #ffc078; font-size: 10px; font-weight: 800; letter-spacing: 1.65px; }
.membership-story-context { display: grid; gap: 4px; max-width: min(100%, 500px); margin: 0 0 14px; }
.membership-story-context strong { color: #fff3e3; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.membership-story-context span { color: #c7b9b4; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.membership-hero h2 { max-width: 430px; margin: 0 0 8px; color: #fff9f2; font-size: clamp(27px, 4vw, 36px); letter-spacing: -1px; line-height: 1.04; }
.membership-hero p { max-width: 440px; margin: 0; color: #d0c7c5; font-size: 12px; line-height: 1.55; }
.membership-access-notice { margin-top: 10px !important; color: #f1d2ae !important; font-size: 11px !important; line-height: 1.55; }
.membership-close { position: absolute; z-index: 3; top: 13px; right: 13px; border-color: #ffffff30; background: #10111688; backdrop-filter: blur(8px); }
.membership-hero-art { position: absolute; z-index: 0; top: 19px; right: 42px; width: 190px; height: 220px; opacity: .9; transform: rotate(5deg); }
.membership-hero-art::before { position: absolute; inset: 0 13px 12px 30px; border: 1px solid #ffd29b42; border-radius: 46% 46% 18px 18px; background: radial-gradient(ellipse at 50% 28%, #ffd7a42b, transparent 44%), linear-gradient(150deg, #ffc67c18, #aa505522 52%, transparent 70%); content: ""; }
.membership-hero-art span { position: absolute; display: block; width: 92px; height: 148px; overflow: hidden; border: 1px solid #ffd29b64; border-radius: 13px; background: radial-gradient(ellipse at 57% 26%, #ffe0b4 0 8%, transparent 9%), linear-gradient(165deg, #efac70 0%, #9d5861 48%, #251f2b 100%); box-shadow: 0 15px 30px #0008; }
.membership-hero-art span::before { position: absolute; inset: 46% -12% -20%; border-radius: 50% 50% 0 0; background: linear-gradient(145deg, #34252d, #10131b); content: ""; }
.membership-hero-art span::after { position: absolute; inset: 8px 8px auto; height: 2px; background: #fff9e993; box-shadow: 0 5px 0 #fff6e52a, 0 10px 0 #fff6e51a; content: ""; }
.membership-hero-art span:nth-child(1) { top: 34px; right: 87px; transform: rotate(-15deg) scale(.87); opacity: .58; filter: saturate(.75); }
.membership-hero-art span:nth-child(2) { top: 12px; right: 8px; transform: rotate(13deg) scale(.88); opacity: .78; filter: hue-rotate(-20deg); }
.membership-hero-art span:nth-child(3) { top: 54px; right: 42px; transform: rotate(1deg); background: radial-gradient(ellipse at 45% 25%, #ffd8a7 0 8%, transparent 9%), linear-gradient(165deg, #ffca82 0%, #bd675a 48%, #30202b 100%); }
.membership-value { display: grid; grid-area: value; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 12px; margin: 0; padding: 13px 15px; border: 1px solid #ffc07834; border-radius: 13px; background: linear-gradient(105deg, #ffb65f12, #ffffff04); }
.membership-value-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #ffb65f1c; color: var(--accent); font-size: 17px; font-weight: 850; }
.membership-value h3 { margin: 1px 0 5px; font-size: 13px; line-height: 1.35; }
.membership-value p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.membership-options { grid-area: options; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, var(--panel2), color-mix(in srgb, var(--panel2) 74%, transparent)); }
.membership-options-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.membership-options-heading .eyebrow { letter-spacing: 1.2px; }
.membership-options-heading h3 { margin: 3px 0 0; font-size: 16px; letter-spacing: -.2px; }
.membership-options-heading .tiny { padding-bottom: 2px; text-align: right; }
.membership-catalog-state { min-height: 0; margin: 0 0 8px; padding: 8px 10px; border-radius: 9px; font-size: 10px; line-height: 1.45; }
.membership-plan-list { display: grid; gap: 8px; }
#membershipPlanList > .api-state, .membership-selection-state:empty { display: none; }
button.plan-option.membership-plan { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 72px; margin: 0; padding: 12px 13px; border-color: var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease; }
button.plan-option.membership-plan:hover { border-color: #ffb65f99; transform: translateY(-1px); }
button.plan-option.membership-plan:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.plan-option.membership-plan.selected { border-color: var(--accent); background: #ffb65f12; box-shadow: inset 3px 0 0 var(--accent), 0 6px 18px #ffb65f0c; }
.membership-plan-copy { display: block; min-width: 0; overflow-wrap: anywhere; }
.membership-plan-copy strong { display: block; font-size: 12px; line-height: 1.35; }
.membership-plan-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px !important; line-height: 1.4 !important; }
.membership-plan-copy small:last-child { width: fit-content; margin-top: 6px; padding: 3px 7px; border: 1px solid #ffc0782b; border-radius: 999px; background: #ffb65f0c; color: var(--soft); font-size: 9px !important; line-height: 1.25 !important; }
.membership-plan-price { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; max-width: 132px; color: var(--soft); text-align: right; white-space: normal; }
.membership-plan-price small { color: var(--muted); font-size: 9px !important; font-weight: 550; line-height: 1.25 !important; }
.membership-plan-price strong { color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.membership-selection-state { min-height: 0; margin: 9px 0 0; font-size: 10px; line-height: 1.45; }
.membership-benefits { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin: 10px 0 0; }
.membership-benefit { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.membership-benefit-mark { display: grid; flex: none; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: #ffb65f1c; color: var(--accent); font-size: 12px; font-weight: 900; }
.membership-benefit strong, .membership-benefit small { display: block; }
.membership-benefit strong { font-size: 11px; line-height: 1.35; }
.membership-benefit small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.membership-plan-terms { margin: 10px 0 0; padding: 11px 12px; border-left: 2px solid #ffc07888; border-radius: 0 9px 9px 0; background: #ffffff06; color: var(--muted); font-size: 10px; line-height: 1.6; }
.membership-plan-terms[hidden] { display: none; }
.membership-account-status { display: grid; grid-area: status; gap: 7px; align-self: stretch; min-width: 0; margin: 0; padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); }
.membership-account-status > div { min-width: 0; }
.membership-account-status .eyebrow { display: block; margin-bottom: 9px; color: var(--muted); font-size: 9px; line-height: 1.45; letter-spacing: 1px; }
.membership-account-copy { display: grid; gap: 6px; margin: 0; }
.membership-account-copy strong { color: var(--soft); font-size: 10px; letter-spacing: .07em; }
.membership-account-copy span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.membership-checkout-section { grid-area: checkout; align-self: start; min-width: 0; margin: 0; }
.membership-checkout-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px; border: 1px solid #82663b66; border-radius: 12px; background: #342a1d77; }
.membership-checkout-icon { display: grid; flex: none; width: 20px; height: 20px; place-items: center; border: 1px solid #ffc07899; border-radius: 50%; color: #ffc078; font-size: 11px; font-weight: 800; }
.membership-checkout-note strong, .membership-checkout-note span { display: block; }
.membership-checkout-note strong { color: #f3d7b1; font-size: 11px; line-height: 1.4; }
.membership-checkout-note span { margin-top: 4px; color: #c8bba8; font-size: 11px; line-height: 1.5; }
.membership-checkout { min-height: 46px; margin-top: 10px; font-size: 12px; }
.membership-checkout:disabled { cursor: not-allowed; border: 1px solid #ffffff16; background: #38383b; color: #aaa7a2; opacity: 1; filter: none; box-shadow: none; }
.membership-footer { grid-area: footer; display: flex; justify-content: space-between; gap: 12px; margin-top: 0; padding-top: 3px; }
.membership-footer .quiet-btn { min-height: 38px; padding: 6px 2px; color: var(--soft); font-size: 11px; text-align: left; }
.membership-footer .quiet-btn:hover { color: var(--accent); }
.membership-fineprint { grid-area: fineprint; margin: -8px 0 0; font-size: 10px !important; line-height: 1.5; }
@media (max-width: 700px) {
  #modal:has(.membership-paywall) { width: 100%; max-height: min(92dvh, 900px); padding: 16px 15px max(20px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .membership-paywall { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "value" "options" "status" "checkout" "footer" "fineprint"; gap: 12px; }
  .membership-hero { min-height: 198px; padding: 19px 18px; }
  .membership-hero-copy { max-width: min(67%, 440px); }
  .membership-hero h2 { font-size: clamp(25px, 6vw, 31px); }
  .membership-story-context { max-width: 100%; margin-bottom: 11px; }
  .membership-story-context strong { font-size: 13px; }
  .membership-hero-art { top: 32px; right: 10px; transform: scale(.77) rotate(5deg); transform-origin: top right; }
  .membership-value { grid-template-columns: 30px minmax(0, 1fr); gap: 9px; padding: 11px 12px; }
  .membership-value-mark { width: 28px; height: 28px; }
  .membership-options { padding: 13px; }
  .membership-options-heading { align-items: start; flex-direction: row; }
  .membership-options-heading .tiny { max-width: 42%; }
  .membership-account-status { padding: 12px 13px; }
  .membership-checkout-note { gap: 9px; padding: 11px; }
  .membership-footer { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 390px) {
  #modal:has(.membership-paywall) { padding: 13px 12px max(18px, env(safe-area-inset-bottom)); }
  .membership-hero { min-height: 190px; padding: 17px 15px; }
  .membership-hero-copy { max-width: 72%; }
  .membership-eyebrow { font-size: 9px; }
  .membership-hero h2 { font-size: 24px; }
  .membership-hero p { font-size: 11px; }
  .membership-hero-art { right: 0; transform: scale(.62) rotate(5deg); opacity: .78; }
  .membership-options { padding: 11px; }
  button.plan-option.membership-plan { gap: 9px; min-height: 68px; padding: 10px; }
  .membership-plan-copy strong { font-size: 11px; }
  .membership-plan-copy small { font-size: 10px !important; }
  .membership-plan-price { max-width: 104px; }
  .membership-plan-price strong { font-size: 12px; }
  .membership-checkout-note span { font-size: 10px; }
}

/* Compact, market-specific membership sheet. */
#modal:has(.membership-paywall) {
  width: min(740px, 100%);
  max-height: min(90dvh, 860px);
  padding: 18px;
  overscroll-behavior: contain;
}
.membership-paywall {
  grid-template-columns: minmax(0, 1.22fr) minmax(238px, .78fr);
  grid-template-areas:
    "hero hero"
    "options status"
    "options checkout"
    "footer footer"
    "fineprint fineprint";
  gap: 12px 14px;
}
.membership-hero {
  min-height: 172px;
  padding: 21px 23px;
  background:
    radial-gradient(ellipse at 90% 0%, #ffbc7733, transparent 31%),
    linear-gradient(125deg, #262126 0%, #1a191f 62%, #15171d 100%);
}
.membership-hero-copy { max-width: min(78%, 560px); }
.membership-hero-art { display: none; }
.membership-story-context { margin-bottom: 10px; }
.membership-hero h2 { font-size: clamp(26px, 3.6vw, 32px); }
.membership-hero p { font-size: 13px; }
.membership-options { padding: 14px; }
.membership-options-heading { align-items: center; margin-bottom: 10px; }
.membership-options-heading h3 { font-size: 18px; }
.membership-options-heading .tiny { max-width: 46%; }
.membership-catalog-state { margin: 0 0 8px; padding: 9px 11px; font-size: 12px; }
.membership-catalog-state[data-state="empty"],
.membership-catalog-state[data-state="market-unavailable"],
.membership-catalog-state[data-state="error"] { border-color: #725b423d; }
.membership-catalog-state[data-state="ready"] { border-color: #7eb69a4d; color: #b4d9c2; }
.membership-catalog-retry { min-height: 36px; margin: 0 0 9px; padding: 7px 10px; color: #ffd39a; font-size: 12px; }
.membership-catalog-retry[hidden] { display: none; }
button.plan-option.membership-plan { min-height: 74px; padding: 12px 13px; }
.membership-plan-copy strong { font-size: 14px; }
.membership-plan-copy small { font-size: 11px !important; }
.membership-plan-copy small:last-child { font-size: 10px !important; }
.membership-plan-price { max-width: 150px; }
.membership-plan-price strong { font-size: 16px; }
.membership-benefit { padding: 10px 12px; }
.membership-benefit strong { font-size: 12px; }
.membership-benefit small { font-size: 11px; }
.membership-plan-terms { font-size: 11px; }
.membership-account-status { padding: 13px 14px; }
.membership-account-status .eyebrow { font-size: 10px; }
.membership-account-copy strong { font-size: 11px; }
.membership-checkout-note { padding: 12px; }
.membership-checkout-note strong { font-size: 12px; }
.membership-checkout-note span { font-size: 12px; }
.membership-checkout { min-height: 44px; font-size: 13px; }
.membership-fineprint { margin-top: -4px; }
@media (max-width: 700px) {
  #modal:has(.membership-paywall) {
    width: 100%;
    max-height: min(94dvh, 920px);
    padding: max(15px, env(safe-area-inset-top)) 15px max(20px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }
  .membership-paywall {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "options" "status" "checkout" "footer" "fineprint";
    gap: 11px;
  }
  .membership-hero { min-height: 158px; padding: 18px; }
  .membership-hero-copy { max-width: calc(100% - 28px); }
  .membership-hero h2 { font-size: clamp(25px, 7vw, 31px); }
  .membership-options { padding: 13px; }
  .membership-options-heading .tiny { max-width: 44%; }
  button.plan-option.membership-plan { min-height: 72px; }
  .membership-footer { align-items: center; flex-wrap: nowrap; }
  .membership-footer .quiet-btn { min-height: 40px; font-size: 12px; }
}
@media (max-width: 390px) {
  #modal:has(.membership-paywall) { padding-right: 12px; padding-left: 12px; }
  .membership-hero { min-height: 150px; padding: 16px; }
  .membership-hero-copy { max-width: calc(100% - 20px); }
  .membership-hero p { font-size: 12px; }
  .membership-options { padding: 11px; }
  button.plan-option.membership-plan { gap: 8px; padding: 10px; }
  .membership-plan-price { max-width: 112px; }
  .membership-plan-price strong { font-size: 14px; }
  .membership-footer { gap: 8px; }
  .membership-footer .quiet-btn { font-size: 11px; }
}

/* Consumer header: contain labels and reserve space before shrinking search. */
.main > .topbar {
  gap: 24px;
  min-height: 72px;
  height: auto;
}
.main > .topbar .web-search {
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 420px;
  height: 44px;
  margin: 0;
}
.main > .topbar .web-search input { min-width: 0; }
.main > .topbar .top-actions {
  flex: 0 0 auto;
  min-width: 0;
  gap: 10px;
}
.main > .topbar .top-actions .api-status {
  flex: 0 0 112px;
  width: 112px;
  max-width: 112px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main > .topbar .top-actions .icon-button,
.main > .topbar .top-actions > .avatar {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
}
.main > .topbar .top-actions > .download-app-trigger {
  flex: 0 0 auto;
  width: auto;
  min-width: 44px;
  padding: 0 12px;
  gap: 7px;
}
.main > .topbar .download-app-trigger > span:first-child { font-size: 18px; }
.main > .topbar .download-app-trigger .download-app-label { display: inline; }
.main > .topbar .download-app-trigger .download-app-mobile-label { display: none; }
.main > .topbar .top-actions .locale-select {
  flex: 0 0 240px;
  width: 240px;
  min-width: 0;
  max-width: 240px;
  height: 44px;
  min-height: 44px;
  font-size: 12px;
}
@media (min-width: 381px) {
  .main > .topbar .top-settings { display: block; flex: 0 0 auto; }
  .main > .topbar .top-settings-panel { display: flex; align-items: center; gap: 10px; }
  .main > .topbar .top-setting-item { display: flex; align-items: center; }
  .main > .topbar .top-setting-item > span { display: none; }
}
@media (min-width: 701px) and (max-width: 1199px) {
  .main > .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .main > .topbar .web-search { width: 100%; min-width: 0; max-width: none; }
  .main > .topbar .top-actions { width: 100%; justify-content: flex-end; gap: 8px; }
  .main > .topbar .top-actions .api-status { margin-right: auto; }
  .main > .topbar .download-app-trigger .download-app-label { display: none; }
  .main > .topbar .download-app-trigger .download-app-mobile-label { display: inline; }
}
@media (min-width: 701px) and (max-width: 840px) {
  .main > .topbar .top-actions .api-status { display: none; }
}
@media (max-width: 700px) {
  .main > .topbar { min-height: 60px; gap: 0; }
  .main > .topbar .top-actions { gap: 7px; }
  .main > .topbar .top-actions .api-status { display: none; }
  .main > .topbar .top-actions > .download-app-trigger { flex: 0 0 44px; width: 44px; padding: 0; }
  .main > .topbar .download-app-trigger .download-app-label,
  .main > .topbar .download-app-trigger .download-app-mobile-label { display: none; }
  .main > .topbar .top-actions .locale-select { flex-basis: 106px; width: 106px; max-width: 106px; }
  .main > .topbar .top-settings-panel { gap: 7px; }
}
@media (min-width: 381px) and (max-width: 700px) {
  .main > .topbar { min-height: 112px; padding-top: 8px; padding-bottom: 8px; }
  .main > .topbar::before { top: 20px; }
  .main > .topbar .top-actions { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; width: 100%; gap: 8px; }
  .main > .topbar .top-actions > .download-app-trigger { grid-column: 2; grid-row: 1; }
  .main > .topbar .top-actions > .avatar { grid-column: 3; grid-row: 1; }
  .main > .topbar .top-settings { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .main > .topbar .top-settings-panel { width: 100%; gap: 8px; }
  .main > .topbar .top-setting-item:last-child { flex: 1 1 auto; min-width: 0; }
  .main > .topbar .top-actions .locale-select { flex: 1 1 auto; width: 100%; max-width: none; }
  .main .legacy-feed .player { height: calc(100dvh - 112px - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  #mobileCatalogState:not([hidden]) { min-height: calc(100dvh - 112px - 70px); }
}
@media (max-width: 380px) {
  .main > .topbar .top-actions { gap: 4px; }
  .main > .topbar .top-settings-panel {
    position: fixed;
    top: 68px;
    right: max(14px, env(safe-area-inset-right));
    width: min(280px, calc(100vw - 28px));
  }
  .main > .topbar .top-setting-item:last-child { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .main > .topbar .top-actions .top-settings-panel .locale-select {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }
}
