:root {
  color-scheme: dark;
  --bg: #070604;
  --surface: #11100d;
  --surface-2: #1b120d;
  --line: rgba(255,152,67,.18);
  --text: #fff7ed;
  --muted: #b9a99a;
  --accent: #ff7a1a;
  --accent-2: #9a3412;
  --accent-soft: rgba(255,122,26,.15);
  --glow: rgba(255,122,26,.28);
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,122,26,.15), transparent 28vw),
    radial-gradient(circle at 86% 18%, rgba(154,52,18,.18), transparent 30vw),
    radial-gradient(circle at 50% 100%, rgba(255,122,26,.08), transparent 34vw),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 32%, rgba(255,122,26,.09), transparent 26vw),
    radial-gradient(circle at 24% 72%, rgba(154,52,18,.1), transparent 30vw);
}
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: rgba(11,13,16,.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}
.brand-word {
  display: inline-block;
  color: #ff9a3d;
  font-family: "Arial Rounded MT Bold", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .04em;
  background: linear-gradient(180deg, #ffe2b8 0%, #ff9a3d 42%, #e85d04 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 2px rgba(255,238,214,.95),
    0 0 8px rgba(255,125,35,.72),
    0 0 18px rgba(255,117,24,.62),
    0 0 32px rgba(255,117,24,.32);
  filter: drop-shadow(0 0 7px rgba(255,124,30,.42));
}
.brand-mark {
  position: relative;
  width: 38px;
  height: 32px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
}
.brand-mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 50%;
  width: 72px;
  height: 58px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,156,64,.46) 0%, rgba(255,117,24,.24) 38%, rgba(255,117,24,.09) 62%, transparent 76%);
  filter: blur(10px);
  pointer-events: none;
}
.brand-symbol {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  filter:
    drop-shadow(0 0 3px rgba(255,197,135,.72))
    drop-shadow(0 0 8px rgba(255,117,24,.28));
}
nav { display: flex; align-items: center; gap: 18px; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
nav a:hover { color: var(--text); }
.top-search {
  width: min(320px, 30vw);
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.top-search input {
  min-height: 36px;
  background: rgba(255,255,255,.045);
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
main { min-height: 100vh; padding-top: 72px; }

.admin-site {
  background: #0e1116;
}

.admin-site main {
  padding-top: 0;
}

.admin-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #0b0d10;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 440px) minmax(280px, 420px);
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 88px);
  padding: 32px;
}

.admin-login h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
}

.admin-login p {
  color: var(--muted);
  line-height: 1.75;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 16px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled {
  cursor: wait;
  opacity: .62;
  transform: none;
}
.primary {
  background: linear-gradient(180deg, rgba(255,122,26,.92), rgba(194,65,12,.92));
  border-color: rgba(255,204,128,.18);
  color: #1a0b02;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(255,122,26,.14);
}
.secondary { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--text); }
.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.danger {
  background: rgba(154,52,18,.18);
  border-color: rgba(255,122,26,.42);
  color: #ffd2a1;
}
.small { min-height: 36px; padding: 0 13px; font-size: 14px; }

.mobile-bottom-nav {
  display: none;
}

.flash {
  position: fixed;
  z-index: 40;
  right: 24px;
  top: 88px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border: 1px solid rgba(255,122,26,.32);
  border-radius: var(--radius);
  color: var(--text);
  background: #1b0e07;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,255,255,.04);
  line-height: 1.6;
}

.notice a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.upload-progress {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,122,26,.22);
  border-radius: var(--radius);
  background: rgba(255,122,26,.055);
}
.upload-progress[hidden] { display: none; }
.upload-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  font-size: 13px;
}
.upload-progress-head strong { color: var(--accent); }
.upload-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.upload-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c2410c, var(--accent));
  transition: width .18s ease;
}
.upload-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.group-bulk-upload {
  margin: 0 0 18px;
}

.hero {
  min-height: calc(100svh - 72px);
  position: relative;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,5,7,.96), rgba(5,5,7,.72), rgba(5,5,7,.92)),
    radial-gradient(circle at 62% 42%, rgba(255,122,26,.16), transparent 34%),
    radial-gradient(circle at 74% 16%, rgba(154,52,18,.16), transparent 28%),
    linear-gradient(135deg, #070604, #1a0d05 48%, #090705);
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
}
.film-strip {
  position: absolute;
  right: 8vw;
  top: 12vh;
  width: min(42vw, 520px);
  height: 68vh;
  border: 1px solid rgba(255,122,26,.18);
  transform: rotate(3deg);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 9px, transparent 9px 34px), linear-gradient(160deg, rgba(255,122,26,.12), rgba(154,52,18,.14));
  opacity: .55;
}
.hero-showcase {
  position: absolute;
  z-index: 1;
  right: clamp(28px, 7vw, 120px);
  top: 13vh;
  width: min(44vw, 720px);
  height: 68vh;
  pointer-events: none;
}
.hero-showcase-film {
  position: absolute;
  inset: 2vh 0 0;
  border: 1px solid rgba(255,122,26,.14);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.065) 0 12px, transparent 12px 42px),
    linear-gradient(160deg, rgba(255,122,26,.1), rgba(154,52,18,.12));
  opacity: .52;
  transform: rotate(3deg);
}
.hero-scroll-frame {
  position: absolute;
  left: 8%;
  right: 4%;
  height: 25%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(12,10,14,.72);
  box-shadow: 0 0 38px rgba(255,122,26,.08);
}
.hero-scroll-top { top: 12%; }
.hero-scroll-bottom { top: 52%; left: 0; right: 14%; }
.hero-scroll-frame.empty {
  display: grid;
  place-items: center;
  color: rgba(255,243,251,.36);
  font-size: 13px;
}
.hero-scroll-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5,5,7,.72), transparent 16%, transparent 84%, rgba(5,5,7,.72));
}
.hero-scroll-track {
  height: 100%;
  display: flex;
  width: max-content;
  animation: hero-scroll 28s linear infinite;
}
.hero-scroll-bottom .hero-scroll-track {
  animation-direction: reverse;
  animation-duration: 34s;
}
.hero-scroll-track img {
  width: 260px;
  height: 100%;
  object-fit: cover;
  flex: 0 0 auto;
  filter: saturate(.92) contrast(1.02);
}
@keyframes hero-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.scene-frame {
  position: absolute;
  right: 11vw;
  width: min(34vw, 430px);
  height: 19vh;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(90deg, rgba(0,0,0,.5), transparent), repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 1px, transparent 1px 10px), linear-gradient(135deg, rgba(255,122,26,.16), rgba(30,17,9,.72));
}
.frame-a { top: 18vh; }
.frame-b { top: 45vh; right: 15vw; background-color: #151820; }
.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 40px));
  padding: max(14vh, 92px) 0 0 clamp(24px, 8vw, 110px);
}
.hero-logo-mark {
  position: relative;
  width: min(180px, 42vw);
  aspect-ratio: 600 / 488;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
  margin-bottom: 20px;
}
.hero-logo-mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 50%;
  width: 145%;
  height: 132%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,156,64,.52) 0%, rgba(255,117,24,.28) 36%, rgba(255,117,24,.12) 58%, transparent 76%);
  filter: blur(24px);
  pointer-events: none;
}
.hero-logo {
  width: min(180px, 42vw);
  aspect-ratio: 600 / 488;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  filter:
    drop-shadow(0 0 5px rgba(255,197,135,.74))
    drop-shadow(0 0 12px rgba(255,117,24,.3));
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(56px, 10vw, 132px);
  line-height: .9;
  text-shadow: 0 0 28px rgba(255,122,26,.18);
}
.hero p {
  width: min(520px, 100%);
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.weekly-update-pill {
  width: fit-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255,122,26,.26);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.055);
  box-shadow: 0 0 22px rgba(255,122,26,.08);
  font-size: 13px;
  font-weight: 800;
}
.weekly-update-pill strong {
  color: var(--text);
  font-size: 16px;
}
.status-row { display: flex; flex-wrap: wrap; gap: 10px; }
.status-row {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 8vw, 110px);
  bottom: 28px;
}
.status-row span {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.22);
  font-size: 13px;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(rgba(11,13,16,.86), rgba(11,13,16,.92)), repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 13px);
}
.age-gate.hidden { display: none; }
.age-panel, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.age-panel {
  width: min(520px, 100%);
  padding: 30px;
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
}
.age-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  font-weight: 900;
}
.age-panel p { color: var(--muted); line-height: 1.75; }

.split, .library, .group-layout, .watch-layout, .account-layout {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: 56px clamp(20px, 5vw, 72px);
}
.split aside h1, .filters h1, .group-summary h1, .watch-info h1, .account-nav h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
}
.split aside p, .narrow p, .group-summary p, .watch-info p, .plain-section p {
  color: var(--muted);
  line-height: 1.75;
}
.narrow {
  width: min(640px, calc(100vw - 40px));
  margin: 56px auto;
  padding: 28px;
}
.form { display: grid; gap: 16px; padding: 24px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  min-height: 45px;
  padding: 0 13px;
  color: var(--text);
  background: #0e1116;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}
textarea { min-height: 120px; padding-top: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(255,122,26,.62); }
.check-row { grid-template-columns: 18px 1fr; align-items: start; }
.check-row input { min-height: 18px; }

.cover-cropper {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.cover-cropper[hidden] { display: none; }
.cover-crop-stage {
  overflow: hidden;
  border: 1px solid rgba(255,122,26,.18);
  border-radius: var(--radius);
  background: #0e1116;
}
.cover-crop-stage canvas {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  cursor: grab;
  touch-action: none;
}
.hero-cropper .cover-crop-stage canvas {
  aspect-ratio: 16 / 5;
}
.recommendation-cropper .cover-crop-stage canvas {
  aspect-ratio: 7 / 3;
}
.cover-crop-stage canvas:active { cursor: grabbing; }
.cover-cropper input[type="range"] {
  min-height: 28px;
  padding: 0;
}

.recovery-display {
  padding: 24px;
  display: grid;
  gap: 16px;
  align-items: start;
  justify-items: start;
}
.recovery-display img {
  width: min(340px, 100%);
  border-radius: var(--radius);
  background: #090705;
}
code {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--accent);
  background: #0e1116;
}
.tiny-code {
  display: inline-block;
  max-width: 150px;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.3;
}
.compact-id {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  white-space: nowrap;
  vertical-align: middle;
}

.plans, .group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 18px;
}
.plan, .group-card, .filters, .group-summary, .asset-panel, .account-nav, .account-main, .admin-sidebar, .admin-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.membership-page {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 44px) 64px;
}
.membership-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  padding: 34px 0;
}
.hero-copy {
  display: grid;
  gap: 18px;
}
.membership-hero h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .96;
}
.membership-hero p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.member-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255,122,26,.24);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: 0 24px 74px rgba(0,0,0,.28);
}
.member-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent, rgba(255,255,255,.08), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 18px);
  opacity: .48;
}
.member-panel > * { position: relative; }
.member-panel span { color: var(--muted); }
.member-panel strong {
  font-size: clamp(34px, 5vw, 58px);
  line-height: .95;
}
.unlock-context {
  margin: 18px 0 6px;
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(255,122,26,.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 20%, rgba(255,122,26,.16), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}
.unlock-context span,
.unlock-context small {
  color: var(--muted);
}
.unlock-context p {
  max-width: 720px;
  margin: 2px 0 0;
  color: #f4dbc3;
  line-height: 1.7;
}
.unlock-context strong {
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.05;
}
.meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.meter i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f59e0b);
}
.tiers {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}
.tier {
  position: relative;
  min-height: 182px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 36%);
  gap: clamp(18px, 3vw, 36px);
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(255,122,26,.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.026)),
    rgba(18,13,9,.76);
  box-shadow: 0 18px 58px rgba(0,0,0,.24);
}
.tier::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 28%, rgba(255,122,26,.22), transparent 26%),
    linear-gradient(110deg, rgba(255,255,255,.08), transparent 26%);
  opacity: .72;
}
.tier.featured {
  border-color: rgba(255,163,74,.7);
  background:
    radial-gradient(circle at 16% 12%, rgba(255,142,45,.2), transparent 28%),
    radial-gradient(circle at 82% 28%, rgba(245,158,11,.16), transparent 30%),
    linear-gradient(180deg, rgba(255,122,26,.16), rgba(255,255,255,.04)),
    rgba(27,14,7,.86);
  box-shadow: 0 26px 92px rgba(0,0,0,.38), 0 0 52px rgba(255,122,26,.2);
}
.tier.recommended-plan::after {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 4px;
  z-index: 1;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #ff8a2a, #f59e0b);
  box-shadow: 0 0 26px rgba(255,132,35,.42);
}
.tier > * { position: relative; }
.tier-main {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-width: 0;
}
.tier-title {
  display: grid;
  gap: 8px;
}
.tier-title small,
.group-meta span {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255,122,26,.26);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255,122,26,.09);
  font-size: 12px;
  font-weight: 900;
}
.tier.recommended-plan .tier-title small {
  color: #1f0f03;
  border-color: rgba(255,204,128,.78);
  background: linear-gradient(135deg, #ff8a2a, #f59e0b);
  box-shadow: 0 0 22px rgba(255,122,26,.24);
}
.tier.recommended-plan .tier-title small::before {
  content: "★ ";
}
.tier-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: .95;
}
.tier-title p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.65;
}
.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.perks span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  color: #eadbe5;
  background: rgba(255,255,255,.055);
  font-size: 12px;
  font-weight: 800;
}
.tier-buy {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  justify-items: end;
  gap: 12px;
  text-align: right;
  min-width: 0;
}
.mock-pay-form {
  width: min(240px, 100%);
  display: grid;
  gap: 8px;
}
.mock-pay-form .open {
  width: 100%;
}
.recommended-plan .pay-alipay,
.recommended-plan .open:not(.secondary) {
  background: linear-gradient(180deg, #ffb15f, #c2410c);
  border-color: rgba(255,217,154,.48);
  box-shadow: 0 16px 42px rgba(255,122,26,.32), inset 0 1px 0 rgba(255,255,255,.2);
}
.mock-pay-form .pay-wxpay {
  color: #fff2df;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,122,26,.18));
  border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.mock-pay-form .pay-wxpay:disabled {
  color: rgba(255,242,223,.52);
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.1);
  box-shadow: none;
}
.price {
  display: grid;
  gap: 4px;
  min-width: 0;
  justify-items: end;
  width: 100%;
}
.price del {
  color: rgba(255,235,204,.42);
  font-size: 14px;
}
.price strong {
  color: var(--text);
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(42px, 4.2vw, 66px);
  line-height: .92;
  text-shadow: 0 0 26px rgba(255,122,26,.22);
}
.price span {
  color: var(--muted);
  font-size: 12px;
}
.open {
  min-height: 46px;
  min-width: 148px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255,203,132,.22);
  border-radius: 999px;
  color: #1a0b02;
  background: linear-gradient(180deg, rgba(255,143,48,.95), rgba(194,65,12,.95));
  box-shadow: 0 12px 32px rgba(255,122,26,.18);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.open.secondary {
  color: var(--text);
  background: rgba(255,255,255,.06);
  border-color: var(--line);
}
.open:disabled {
  cursor: default;
  opacity: .68;
}
.mini-dl {
  width: 100%;
  display: grid;
  gap: 1px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.mini-dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.035);
}
.featured,
.recommended-plan {
  border-color: rgba(255,122,26,.42);
  box-shadow: 0 24px 70px rgba(0,0,0,.34), 0 0 42px rgba(255,122,26,.14);
}
.current-plan .tier-title small {
  color: #1a0b02;
  background: linear-gradient(180deg, rgba(255,122,26,.9), rgba(214,84,14,.9));
}

.filters, .account-nav {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 96px;
}
.filter {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 8px 0;
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 7px;
}
.filter.active, .filter:hover {
  color: var(--text);
  background: rgba(255,255,255,.06);
  border-color: var(--line);
}
.side-search {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.result-count {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
}
.pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.pagination a,
.pagination span:not(.button) {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,255,255,.035);
  text-decoration: none;
  font-size: 14px;
}
.pagination .active {
  color: #1a0b02;
  border-color: rgba(255,204,128,.18);
  background: linear-gradient(180deg, rgba(255,122,26,.9), rgba(194,65,12,.9));
  font-weight: 900;
}
.pagination .disabled {
  pointer-events: none;
  opacity: .48;
}
.search-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.search-block h3 { margin: 0; }
.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.compact-grid .group-card { min-height: 280px; }
.compact-grid .group-cover { height: 170px; }
.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.empty-state p {
  color: var(--muted);
  line-height: 1.7;
}
.library { grid-template-columns: 260px minmax(0, 1fr); }
.library-full { grid-template-columns: 1fr; }
.recommend-carousel {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
  box-shadow: 0 0 34px rgba(255,122,26,.08);
}
.recommend-track {
  display: flex;
  gap: 12px;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.recommend-slide {
  position: relative;
  flex: 0 0 min(520px, 78vw);
  aspect-ratio: 7 / 3;
  overflow: hidden;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
  background: #09080b;
  scroll-snap-align: start;
}
.recommend-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.recommend-slide span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffe6c7;
  background: rgba(5,5,7,.72);
  border: 1px solid rgba(255,122,26,.24);
  font-size: 12px;
  font-weight: 800;
}
.announcement-bar {
  grid-column: 1 / -1;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,122,26,.26);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,122,26,.18), transparent 36%),
    linear-gradient(135deg, rgba(26,14,6,.86), rgba(8,8,10,.78));
  box-shadow: 0 0 34px rgba(255,122,26,.09), inset 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.library .announcement-bar {
  width: 100%;
  margin: 0;
}
.announcement-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #ffd2a1;
  background: rgba(255,122,26,.16);
  border: 1px solid rgba(255,122,26,.28);
  font-size: 13px;
  font-weight: 900;
}
.announcement-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.announcement-item {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.announcement-item summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}
.announcement-item summary::-webkit-details-marker {
  display: none;
}
.announcement-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff7ed;
}
.announcement-item summary span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.announcement-item p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  line-height: 1.7;
}
.library-head, .asset-head, .admin-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
}
.library-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.category-filter {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -4px 0 4px;
}
.category-chip,
.category-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255,122,26,.26);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255,122,26,.09);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}
.category-chip:hover,
.category-chip.active,
a.category-badge:hover {
  color: #1a0b02;
  border-color: rgba(255,204,128,.72);
  background: linear-gradient(135deg, #ff8a2a, #f59e0b);
  box-shadow: 0 0 18px rgba(255,122,26,.18);
}
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.ok-status {
  color: #d9ffe9;
  background: rgba(72,180,116,.14);
  border: 1px solid rgba(72,180,116,.28);
}
.danger-status {
  color: #ffd2a1;
  background: rgba(154,52,18,.2);
  border: 1px solid rgba(255,122,26,.38);
}
.status-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  white-space: nowrap;
}
.inline-delete {
  display: inline-flex;
  margin: 0;
}
.inline-action {
  display: inline-flex;
  margin: 0;
}
.mock-pay-form.inline-action {
  width: min(240px, 100%);
  display: grid;
  gap: 8px;
}
.mock-pay-form.inline-action .open {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}
.library-head h2, .asset-head h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); }
.group-card {
  min-height: 360px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
.group-card:hover { transform: translateY(-2px); border-color: rgba(255,122,26,.34); }
.group-cover, .group-hero, .asset-thumb, .image-thumb {
  background-size: cover;
  background-position: center;
}
.group-cover {
  height: 230px;
  background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.58)), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, #2b2118, #15171d);
}
.poster-1 { background-color: #261c14; }
.poster-2 { background-color: #27160d; }
.poster-3 { background-color: #1b2423; }
.poster-4 { background-color: #2b1f09; }
.locked .asset-thumb { filter: saturate(.4) blur(1px); }
.group-meta { display: grid; gap: 7px; padding: 14px; }
.group-meta small { color: var(--muted); }

.group-layout { grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); }
.group-summary { align-self: start; overflow: hidden; position: sticky; top: 96px; }
.group-hero {
  height: 240px;
  background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.62)), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, #2b2118, #15171d);
}
.group-summary .eyebrow, .group-summary h1, .group-summary p, .group-summary dl {
  margin-left: 22px;
  margin-right: 22px;
}
.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 22px 4px;
}
.group-summary dl, .watch-info dl { display: grid; gap: 1px; padding-bottom: 22px; }
.group-summary dl div, .watch-info dl div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
dt { color: var(--muted); }
dd { margin: 0; }
.asset-panel { position: relative; padding: 24px; }
.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.segmented button {
  min-height: 34px;
  border: 0;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
}
.segmented .active {
  color: #1a0b02;
  background: linear-gradient(180deg, rgba(255,122,26,.88), rgba(194,65,12,.88));
  font-weight: 800;
}
.asset-section { padding-top: 22px; border-top: 1px solid var(--line); }
.asset-section + .asset-section { margin-top: 28px; }
.asset-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.asset-section-head h3 {
  margin: 0;
}
.asset-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.asset-list { display: grid; gap: 12px; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.media-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease;
}
.media-card:hover { transform: translateY(-2px); border-color: rgba(255,122,26,.34); }
.media-card:disabled {
  cursor: default;
  transform: none;
  opacity: .9;
}
.media-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  background: #0e1116;
}
.media-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background-color: #15171d;
  background-size: cover;
  background-position: center;
}
.video-card .media-cover {
  pointer-events: none;
}
.play-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #ffe6c7;
  background: rgba(26,10,4,.72);
  border-color: rgba(255,122,26,.48);
  box-shadow: 0 0 18px rgba(255,122,26,.16);
  font-size: 12px;
  font-weight: 800;
}
.asset-panel-locked {
  min-height: 520px;
  overflow: hidden;
}
.asset-panel-locked .media-grid {
  pointer-events: none;
}
.locked-content-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: start center;
  padding: 28px 24px;
  pointer-events: auto;
  background:
    linear-gradient(180deg, rgba(18,8,14,.56) 0%, rgba(18,8,14,.34) 36%, rgba(18,8,14,.18) 100%);
  backdrop-filter: blur(4px) saturate(1.08);
  -webkit-backdrop-filter: blur(4px) saturate(1.08);
}
.locked-content-overlay div {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255,122,26,.28);
  border-radius: var(--radius);
  background: rgba(12,7,11,.62);
  box-shadow: 0 18px 46px rgba(0,0,0,.26), 0 0 28px rgba(255,122,26,.12);
}
.locked-content-overlay small {
  padding: 6px 10px;
  border: 1px solid rgba(255,122,26,.26);
  border-radius: 999px;
  color: #ffd6eb;
  background: rgba(255,122,26,.12);
  font-weight: 800;
}
.locked-content-overlay strong {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
}
.locked-content-overlay span {
  color: var(--muted);
  line-height: 1.7;
}
.media-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
}
.media-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-meta span {
  color: var(--muted);
  font-size: 13px;
}
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(0,0,0,.86);
}
.media-modal[hidden] { display: none; }
.media-modal-body {
  width: min(1120px, 100%);
  max-height: 88vh;
  display: grid;
  place-items: center;
}
.media-modal-body video,
.media-modal-body img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #050607;
}
.media-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(18,21,26,.88);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.daily-free-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 48px);
  background:
    radial-gradient(circle at 50% 38%, rgba(255,122,26,.22), transparent 32%),
    rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.daily-free-modal[hidden] {
  display: none;
}
.daily-free-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100svh - 36px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255,163,74,.42);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(255,142,45,.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035)),
    rgba(13,8,13,.94);
  box-shadow: 0 28px 90px rgba(0,0,0,.48), 0 0 52px rgba(255,122,26,.2);
}
.daily-free-panel .media-modal-close {
  position: absolute;
}
.daily-free-poster {
  width: 100%;
  max-height: min(310px, 38svh);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255,163,74,.26);
  border-radius: calc(var(--radius) - 4px);
  background-color: #09070a;
  box-shadow: 0 18px 48px rgba(0,0,0,.34), 0 0 34px rgba(255,122,26,.13);
}
.daily-free-panel h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
}
.daily-free-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.daily-free-panel .modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.daily-free-panel .modal-actions .button {
  width: 100%;
}
.watch-cta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.watch-cta .button {
  justify-content: center;
}
.asset-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.asset-thumb {
  width: 92px;
  height: 62px;
  border-radius: 6px;
  background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.58)), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, #2b2118, #15171d);
}
.asset-row span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.image-grid { display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); gap: 10px; }
.image-asset {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}
.image-asset strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.image-thumb {
  aspect-ratio: 4 / 5;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.45)), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 12px), linear-gradient(135deg, #2b2118, #15171d);
}

.watch-layout { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 390px); }
.player {
  min-height: min(68vh, 640px);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.65)), repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 42px), linear-gradient(135deg, #16191f, #291817 54%, #111418);
}
.player video { width: 100%; height: 100%; min-height: min(68vh, 640px); object-fit: contain; background: #050607; }
.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
}
.play-button::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 22px;
  border-left: 20px solid var(--text);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
.watermark { position: absolute; right: 18px; top: 18px; color: rgba(255,255,255,.58); font-size: 12px; }
.timeline { position: absolute; left: 20px; right: 20px; bottom: 20px; height: 4px; background: rgba(255,255,255,.18); border-radius: 999px; }
.timeline span {
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, #8f315d, var(--accent));
  border-radius: inherit;
}

.account-layout, .admin-view { grid-template-columns: 260px minmax(0, 1fr); }
.account-main, .admin-main { padding: 24px; }
.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.profile-title {
  min-width: 0;
  flex: 1;
}
.profile-edit-button {
  margin-left: auto;
  white-space: nowrap;
}
.profile-avatar {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255,122,26,.32);
  background: #070604;
  box-shadow: 0 0 28px rgba(255,122,26,.16);
}
.profile-hero h2 {
  margin: 0 0 6px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
}
.profile-hero span { color: var(--muted); }
.profile-form {
  margin-top: 12px;
}
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
}
.profile-modal[hidden] { display: none; }
.profile-modal-panel {
  width: min(560px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.profile-group-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.035);
}
.profile-group-cover {
  height: 120px;
  display: block;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.58)), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, #2b2118, #15171d);
}
.profile-group-card strong,
.profile-group-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 12px;
}
.profile-group-card strong { margin-top: 12px; }
.profile-group-card small {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
.metric-line, .ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.asset-pagination {
  margin-top: 16px;
}
.metric-line { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
.account-metrics { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
.metric-line div, .ops-grid div { display: grid; gap: 10px; padding: 18px; background: var(--surface-2); }
.metric-line span, .ops-grid span { color: var(--muted); font-size: 13px; }
.metric-line strong, .ops-grid strong { font-size: 24px; }
.admin-dashboard-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.admin-head.compact {
  margin-bottom: 14px;
}
.admin-head.compact h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}
.finance-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.finance-grid strong {
  font-size: clamp(20px, 2.4vw, 30px);
}
.admin-growth-table th,
.admin-growth-table td {
  white-space: nowrap;
}
.admin-growth-table td:last-child {
  color: var(--accent-soft);
  font-weight: 700;
}
.plain-section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.account-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.account-action-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(255,122,26,.26);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)),
    rgba(18,13,9,.78);
  cursor: pointer;
}
.account-action-card span,
.account-action-card small {
  color: var(--muted);
}
.account-action-card strong {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}
.daily-free-entry {
  border-color: rgba(255,163,74,.58);
  background:
    radial-gradient(circle at 82% 24%, rgba(255,142,45,.22), transparent 30%),
    linear-gradient(180deg, rgba(255,122,26,.16), rgba(255,255,255,.035)),
    rgba(27,14,7,.9);
  box-shadow: 0 18px 58px rgba(0,0,0,.32), 0 0 34px rgba(255,122,26,.18);
}
.daily-free-entry strong {
  color: #fff7ed;
}
.muted-action {
  opacity: .82;
}
.feedback-form {
  margin-top: 12px;
}
.feedback-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.feedback-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.feedback-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.feedback-item strong {
  color: #ffd2a1;
}
.feedback-item p {
  margin: 10px 0 0;
}
.feedback-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-view { display: grid; padding: 24px; gap: 18px; }
.admin-sidebar {
  max-height: calc(100vh - 120px);
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 96px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255,122,26,.42) rgba(255,255,255,.04);
  scrollbar-width: thin;
}
.admin-sidebar::-webkit-scrollbar {
  width: 8px;
}
.admin-sidebar::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
  border-radius: 999px;
}
.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,122,26,.42);
  border-radius: 999px;
}
.admin-main { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 18px; }
th, td { padding: 15px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; font-weight: 600; }
td a { color: var(--accent); text-decoration: none; }
.admin-user-table th:nth-child(10),
.admin-user-table td:nth-child(10) {
  width: 142px;
  max-width: 142px;
  white-space: nowrap;
}
.admin-thumb {
  width: 120px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #09080b;
}
.inline-membership-form {
  min-width: 420px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.inline-membership-form select,
.inline-membership-form input {
  min-height: 36px;
  padding: 0 10px;
}
.inline-feedback-form {
  min-width: 430px;
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: start;
}
.inline-feedback-form textarea {
  min-height: 72px;
}
.feedback-body {
  min-width: 220px;
  max-width: 520px;
  line-height: 1.7;
  color: var(--text);
}

@media (max-width: 980px) {
  nav { display: none; }
  .top-search { width: min(360px, 42vw); }
  .split, .library, .group-layout, .watch-layout, .account-layout, .admin-view, .membership-hero { grid-template-columns: 1fr; }
  .admin-login { grid-template-columns: 1fr; }
  .plans, .group-grid, .metric-line, .account-metrics, .ops-grid { grid-template-columns: 1fr; }
  .filters, .group-summary, .account-nav, .admin-sidebar { position: static; }
  .admin-sidebar {
    max-height: none;
    overflow: visible;
  }
  .tier {
    grid-template-columns: 1fr;
  }
  .tier-buy {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    align-items: end;
    justify-items: stretch;
  }
  .hero-content { padding: 110px 22px 0; }
  .status-row { left: 22px; }
  .film-strip, .scene-frame { right: -18vw; width: 70vw; }
  .hero-showcase { opacity: .34; right: -16vw; width: 78vw; }
}

@media (max-width: 620px) {
  .daily-free-modal {
    padding: 12px;
  }
  .daily-free-panel .modal-actions {
    grid-template-columns: 1fr;
  }
  .topbar {
    height: 64px;
    padding: 0 10px;
    gap: 8px;
  }
  .brand { gap: 8px; flex: 0 0 auto; }
  .brand-word {
    font-size: 20px;
    letter-spacing: .02em;
  }
  .brand-mark { width: 34px; height: 30px; flex-basis: 34px; }
  .top-search { display: none; }
  .top-actions {
    min-width: 0;
    margin-left: auto;
    gap: 6px;
  }
  .top-actions .button {
    min-height: 34px;
    max-width: 88px;
    padding: 0 10px;
    font-size: 13px;
  }
  .user-chip {
    max-width: 72px;
    font-size: 12px;
  }
  main {
    padding-top: 64px;
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 70;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255,122,26,.24);
    border-radius: 14px;
    background: rgba(11,13,16,.9);
    box-shadow: 0 16px 44px rgba(0,0,0,.42), 0 0 24px rgba(255,122,26,.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .mobile-bottom-nav a {
    min-width: 0;
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
  }
  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a:focus-visible {
    color: var(--text);
    border-color: rgba(255,122,26,.28);
    background: rgba(255,122,26,.12);
  }
  .split, .library, .group-layout, .watch-layout, .account-layout { padding: 28px 14px; }
  .membership-page {
    padding: 28px 14px;
  }
  .membership-hero {
    gap: 22px;
    padding: 28px 0 20px;
  }
  .membership-hero h1 {
    font-size: 42px;
    line-height: 1.04;
  }
  .member-panel {
    padding: 18px;
  }
  .tier {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .tier-buy {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: left;
  }
  .price strong {
    font-size: 54px;
  }
  .open {
    width: 100%;
  }
  .hero-actions, .library-head, .asset-head, .admin-head { flex-direction: column; align-items: stretch; }
  .library-head-actions {
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
  }
  .weekly-update-pill {
    width: 100%;
    justify-content: center;
  }
  .announcement-bar {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    margin-top: 12px;
    gap: 8px;
    padding: 8px;
  }
  .announcement-label {
    min-height: 32px;
    padding: 0 10px;
    width: fit-content;
  }
  .announcement-item summary {
    min-height: 32px;
    align-items: center;
    flex-direction: row;
    padding: 0 10px;
  }
  .announcement-item strong {
    width: 100%;
    white-space: nowrap;
  }
  .pagination {
    justify-content: stretch;
  }
  .pagination .button {
    flex: 1 1 120px;
  }
  .hero-actions .button,
  .library-head .button,
  .asset-head .button,
  .mock-pay-form,
  .mock-pay-form .open {
    width: 100%;
  }
  .button {
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }
  .hero {
    min-height: auto;
    padding-bottom: 28px;
  }
  .hero-content {
    width: auto;
    padding: 72px 18px 0;
  }
  .hero h1 { font-size: 54px; }
  .hero-logo-mark,
  .hero-logo { width: 150px; }
  .hero-showcase {
    position: relative;
    inset: auto;
    width: auto;
    height: 260px;
    margin: 28px 18px 0;
    opacity: 1;
  }
  .hero-showcase-film {
    inset: 0;
    transform: none;
  }
  .hero-scroll-frame {
    left: 10px;
    right: 10px;
    height: 38%;
  }
  .hero-scroll-top { top: 20px; }
  .hero-scroll-bottom { top: 140px; left: 10px; right: 10px; }
  .hero-scroll-track img { width: 210px; }
  .group-card { min-height: 280px; }
  .group-cover { height: 190px; }
  .asset-row { grid-template-columns: 1fr; align-items: stretch; }
  .asset-thumb { width: 100%; height: 150px; }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .asset-panel {
    padding: 16px;
  }
  .asset-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .asset-panel-locked {
    min-height: 460px;
  }
  .locked-content-overlay {
    padding: 16px;
  }
  .profile-hero {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .profile-edit-button {
    width: 100%;
    margin-left: 0;
  }
  .profile-modal {
    align-items: stretch;
    place-items: stretch;
    padding: 10px;
  }
  .profile-modal-panel {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 8px;
  }
  .profile-modal-panel .admin-head {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 14px;
  }
  .profile-modal-panel .admin-head h2 {
    min-width: 0;
    flex: 1;
    margin: 0;
    font-size: 26px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .profile-modal-panel .admin-head .button {
    flex: 0 0 auto;
  }
  .profile-form {
    margin-top: 0;
  }
  .profile-form label,
  .profile-form input {
    min-width: 0;
  }
  .profile-form input {
    width: 100%;
  }
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions .button {
    width: 100%;
  }
  .account-action-grid {
    grid-template-columns: 1fr;
  }
  .inline-membership-form {
    min-width: 280px;
    grid-template-columns: 1fr;
  }
  .inline-feedback-form {
    min-width: 280px;
    grid-template-columns: 1fr;
  }
  .inline-membership-form .button,
  .inline-feedback-form .button,
  .inline-action .button,
  .inline-delete .button {
    width: 100%;
  }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
