:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-soft: #f0f0ed;
  --ink: #1d1d20;
  --muted: #77777c;
  --line: rgba(25, 25, 28, 0.08);
  --accent: #17171a;
  --warm: #ff7043;
  --lime: #a9de5a;
  --gold: #e6b957;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow: 0 14px 40px rgba(22, 22, 25, 0.08);
  font-family: Inter, ui-rounded, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #ecece8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #ecece8;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
.drama-card:focus-visible {
  outline: 3px solid rgba(255, 112, 67, 0.4);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 18px calc(96px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 92% -2%, rgba(185, 226, 116, 0.24), transparent 28%),
    radial-gradient(circle at 3% 5%, rgba(255, 192, 154, 0.24), transparent 25%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 2px 15px;
}

body.profile-page-active .topbar {
  display: none;
}

.topbar h1,
.page-intro h2,
.profile-header h2 {
  margin: 2px 0 0;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.icon-button svg,
.search-field svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.page[hidden] {
  display: none;
}

.page.is-active {
  animation: page-in 240ms ease-out both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-row {
  min-height: 0;
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #fff0e9;
  color: #7b412f;
  font-size: 12px;
}

.offline-banner button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: white;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 11px;
  margin: 5px 0 28px;
}

.feature-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(35, 35, 38, 0.045);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.feature-card:active {
  transform: scale(0.98);
}

.feature-ranking {
  min-height: 184px;
  padding: 17px;
  background: linear-gradient(145deg, #fff9ee, #fff);
}

.feature-copy,
.feature-small > span:first-child {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.feature-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.feature-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.trophy-art {
  position: absolute;
  top: 15px;
  right: 12px;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  transform: rotate(7deg);
}

.trophy-cup {
  display: grid;
  width: 45px;
  height: 39px;
  place-items: center;
  border-radius: 10px 10px 16px 16px;
  background: linear-gradient(135deg, #ff8757, #ef3f35);
  box-shadow: inset 0 -7px 0 rgba(136, 34, 25, 0.12), 0 8px 12px rgba(239, 63, 53, 0.18);
  color: #ffe57c;
  font-size: 20px;
}

.trophy-cup::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 30px;
  height: 8px;
  border-radius: 5px;
  background: #f9b347;
}

.confetti {
  position: absolute;
  width: 7px;
  height: 15px;
  border-radius: 6px;
}

.confetti-a { top: 0; right: 4px; background: var(--lime); transform: rotate(30deg); }
.confetti-b { left: 2px; bottom: 6px; background: #7869ef; transform: rotate(-25deg); }

.mini-posters {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  align-items: end;
  gap: 6px;
  height: 78px;
}

.mini-poster {
  height: 65px;
  border: 2px solid white;
  border-radius: 10px;
  background: var(--poster-bg, linear-gradient(145deg, #4d768d, #e6b4a0));
  box-shadow: 0 5px 12px rgba(24, 24, 27, 0.14);
}

.mini-poster:first-child { height: 78px; }

.feature-stack {
  display: grid;
  gap: 11px;
}

.feature-small {
  min-height: 86px;
  padding: 17px 62px 15px 16px;
}

.feature-recommend {
  background: linear-gradient(135deg, #fff, #eefbe3);
}

.feature-following {
  background: linear-gradient(135deg, #fff, #fff4e9);
}

.feature-icon {
  position: absolute;
  top: 18px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50% 50% 48% 52%;
  font-size: 15px;
  transform: rotate(-8deg);
}

.play-bubble { background: var(--lime); color: #23451d; box-shadow: 4px 4px 0 #5ca553; }
.star-bubble { background: #ffd964; color: #6f4a00; box-shadow: 4px 4px 0 #f08a55; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 14px;
}

.section-heading h2,
.section-heading h3 {
  margin: 3px 0 0;
  font-size: 23px;
  line-height: 1.2;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 12px;
}

.section-heading.compact h3 {
  font-size: 17px;
}

.text-button {
  padding: 5px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 10px;
}

.drama-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.poster,
.detail-poster {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 0.72;
  border-radius: 15px;
  background: var(--poster-bg, linear-gradient(145deg, #4d768d, #e6b4a0));
  box-shadow: 0 9px 22px rgba(30, 30, 34, 0.1);
  isolation: isolate;
}

.poster.has-cover,
.detail-poster.has-cover {
  background: var(--poster-bg);
}

.poster-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster::before,
.detail-poster::before,
.mini-poster::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17%;
  left: 50%;
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 235, 213, 0.78);
  box-shadow: 0 42px 0 22px rgba(32, 41, 52, 0.42);
  transform: translateX(-50%);
}

.poster.has-cover::before,
.detail-poster.has-cover::before,
.mini-poster.has-cover::before {
  display: none;
}

.poster::after,
.detail-poster::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(14, 14, 18, 0.78));
}

.poster-title {
  position: absolute;
  z-index: 2;
  right: 7px;
  bottom: 9px;
  left: 7px;
  color: white;
  font-size: clamp(11px, 3.3vw, 15px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

.poster.has-cover .poster-title {
  display: none;
}

.drama-card > strong {
  display: block;
  overflow: hidden;
  margin: 8px 1px 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-card > small {
  display: block;
  margin: 3px 1px 0;
  color: var(--muted);
  font-size: 10px;
}

.skeleton-card {
  min-width: 0;
}

.skeleton-poster,
.skeleton-line {
  overflow: hidden;
  border-radius: 14px;
  background: #e9e9e5;
}

.skeleton-poster {
  aspect-ratio: 0.72;
}

.skeleton-line {
  width: 80%;
  height: 12px;
  margin-top: 9px;
  border-radius: 6px;
}

.skeleton-poster::after,
.skeleton-line::after {
  content: "";
  display: block;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(240%); }
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 28px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(251, 251, 248, 0.91);
  box-shadow: 0 -12px 32px rgba(20, 20, 22, 0.06);
  backdrop-filter: blur(20px);
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #9a9a9d;
  font-size: 10px;
  cursor: pointer;
  flex-direction: column;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 1px;
  width: 34px;
  height: 29px;
  border-radius: 50%;
  background: transparent;
  transform: scale(0.6);
  transition: 180ms ease;
}

.nav-item svg {
  position: relative;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.nav-item.is-active {
  color: var(--ink);
  font-weight: 750;
}

.nav-item.is-active::before {
  background: #e8e8e4;
  transform: scale(1);
}

.nav-item.is-active svg {
  fill: var(--ink);
  color: var(--ink);
  stroke: var(--ink);
}

.page-intro {
  padding: 12px 2px 22px;
}

.page-intro p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 58px 20px;
  border: 1px dashed rgba(20,20,24,.14);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.55);
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.empty-state p {
  margin: 6px 0 0;
  font-size: 12px;
}

.history-list {
  display: grid;
  gap: 11px;
}

.history-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 17px;
  background: white;
  box-shadow: 0 7px 24px rgba(30,30,34,.045);
  text-align: left;
  cursor: pointer;
}

.history-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: .8;
  border-radius: 11px;
  background: var(--poster-bg);
  isolation: isolate;
}

.history-copy {
  min-width: 0;
}

.history-copy strong,
.history-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy strong { font-size: 14px; }
.history-copy small { margin-top: 6px; color: var(--muted); font-size: 11px; }

.progress-track {
  overflow: hidden;
  height: 3px;
  margin-top: 9px;
  border-radius: 9px;
  background: #ecece8;
}

.progress-track span {
  display: block;
  width: var(--progress, 18%);
  height: 100%;
  border-radius: inherit;
  background: var(--warm);
}

.continue-pill {
  padding: 7px 9px;
  border-radius: 99px;
  background: #f2f2ef;
  font-size: 10px;
  font-weight: 700;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 4px 20px;
}

.profile-header h2 {
  font-size: 22px;
}

.profile-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

#user-id {
  overflow-wrap: anywhere;
}

.profile-header .eyebrow {
  margin-top: 0;
  font-size: 11px;
}

.avatar {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #efefeb, #d5d5d1);
}

.avatar svg {
  width: 52px;
  fill: rgba(255,255,255,.9);
  stroke: rgba(80,80,85,.16);
}

.member-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 1px minmax(60px, .9fr) auto;
  align-items: center;
  column-gap: 12px;
  min-height: 100px;
  overflow: hidden;
  margin-bottom: 13px;
  padding: 18px 16px;
  border-radius: 19px;
  background:
    radial-gradient(circle at 80% 130%, rgba(238,190,90,.32), transparent 36%),
    linear-gradient(135deg, #151518, #262427);
  box-shadow: 0 12px 30px rgba(23,23,26,.18);
  color: #f4d88f;
}

.member-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 160px;
  height: 90px;
  border: 1px solid rgba(241, 200, 104, .35);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.member-metric {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-metric span:last-child {
  display: flex;
  flex-direction: column;
}

.member-metric small { color: #d0b878; font-size: 10px; }
.member-metric strong { margin-top: 6px; color: white; font-size: 13px; }
.member-metric em {
  max-width: 124px;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255, 240, 202, .72);
  font-size: 8px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-mark { color: #f5c955; font-size: 28px; font-style: italic; font-weight: 900; }
.member-divider { width: 1px; height: 35px; background: rgba(241,216,151,.22); }

.recharge-button {
  position: relative;
  z-index: 3;
  min-width: 66px;
  padding: 10px 16px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff3c7, #eec56d);
  color: #655023;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.settings-card,
.watched-card {
  overflow: hidden;
  margin-bottom: 13px;
  padding: 5px 15px;
  border-radius: 19px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 28px rgba(30,30,34,.045);
}

.settings-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 14px;
  width: 100%;
  min-height: 55px;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.settings-row:last-child { border-bottom: 0; }
.settings-row small {
  grid-column: 3;
  overflow: hidden;
  color: #aaa9ad;
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-row > span:last-child {
  grid-column: 4;
  justify-self: end;
  color: #aaa9ad;
  font-size: 18px;
}
.settings-icon { color: #5f5f64; font-size: 16px; }

.watched-card {
  padding: 15px;
}

.profile-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-history .drama-card:nth-child(n + 4) { display: none; }

@media (max-width: 365px) {
  .member-card {
    grid-template-columns: minmax(58px, 1fr) 1px minmax(52px, .8fr) auto;
    column-gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .member-metric { gap: 5px; }
  .coin-mark { font-size: 24px; }
  .recharge-button { min-width: 60px; padding-right: 13px; padding-left: 13px; }
}

dialog {
  width: min(calc(100% - 24px), 496px);
  max-height: min(86vh, 760px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(16,16,18,.25);
}

dialog::backdrop {
  background: rgba(15,15,18,.45);
  backdrop-filter: blur(6px);
}

.dialog-shell {
  padding: 22px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 3px 0 0;
  font-size: 24px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 19px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f5f5f2;
}

.search-field svg { width: 19px; color: var(--muted); }
.search-field input { width: 100%; height: 48px; border: 0; outline: 0; background: transparent; }

.search-results {
  display: grid;
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  margin-top: 13px;
}

.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 13px;
  background: #f7f7f4;
  text-align: left;
  cursor: pointer;
}

.search-result strong,
.search-result small { display: block; }
.search-result small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.search-result span:last-child { color: var(--muted); }

.detail-dialog {
  align-self: end;
  width: min(100%, 520px);
  max-height: 90vh;
  margin: auto auto 0;
  border-radius: 28px 28px 0 0;
}

.detail-sheet {
  --detail-column-gap: 18px;
  --detail-poster-width: 120px;
  --detail-row-gap: 14px;
  position: relative;
  display: grid;
  grid-template-columns: var(--detail-poster-width) minmax(0, 1fr);
  grid-template-areas:
    "poster copy"
    "actions actions";
  align-items: start;
  column-gap: var(--detail-column-gap);
  row-gap: var(--detail-row-gap);
  padding: 24px 21px calc(24px + env(safe-area-inset-bottom));
}

.detail-close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
}

.detail-poster {
  grid-area: poster;
  margin-top: 7px;
}

.detail-copy {
  grid-area: copy;
  min-width: 0;
  padding: 8px 0;
}

.detail-copy h2 {
  margin: 5px 42px 0 0;
  font-size: 21px;
  line-height: 1.25;
}

.detail-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.tag-list span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f0f0ed;
  color: #646469;
  font-size: 9px;
}

.detail-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 13px 0 0;
  color: #5f5f64;
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.detail-actions {
  display: grid;
  grid-area: actions;
  grid-template-columns: var(--detail-poster-width) minmax(0, 1fr);
  gap: var(--detail-column-gap);
  margin-top: 0;
}

.primary-button,
.secondary-button {
  min-height: 43px;
  padding: 8px;
  border: 0;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.primary-button { background: var(--ink); color: white; }
.secondary-button { background: #efefec; color: var(--ink); }

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.catalog-more {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 28px 0 4px;
}

.catalog-more[hidden] {
  display: none;
}

.load-more-button {
  min-width: 150px;
  min-height: 44px;
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  box-shadow: 0 7px 22px rgba(30,30,34,.06);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.mini-poster,
.history-thumb {
  isolation: isolate;
}

.mini-poster {
  position: relative;
  overflow: hidden;
}

.search-loading {
  padding: 28px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.detail-sheet[aria-busy="true"] .detail-copy {
  opacity: .72;
}

.player-dialog {
  --player-accent: var(--warm);
  inset: 0;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 4%, rgba(255,112,67,.13), transparent 34%),
    linear-gradient(180deg, #141419 0%, #0c0c10 100%);
  color: white;
}

.player-sheet {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.player-heading {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(14,14,18,.78);
  backdrop-filter: blur(18px);
}

.player-heading-copy {
  min-width: 0;
}

.player-heading h2 {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-heading p:last-child {
  display: inline-flex;
  margin: 6px 0 0;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 99px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.68);
  font-size: 11px;
}

.player-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  letter-spacing: .08em;
}

.player-heading .eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--player-accent);
  box-shadow: 0 0 12px rgba(255,112,67,.7);
  content: "";
}

.player-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: white;
  font-size: 22px;
}

.player-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px calc(28px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.player-body::-webkit-scrollbar {
  display: none;
}

.player-stage {
  position: relative;
  display: grid;
  min-height: calc(min(58vh, 560px) + 16px);
  min-height: calc(min(58dvh, 560px) + 16px);
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,112,67,.11), transparent 54%),
    #08080b;
}

.video-frame {
  position: relative;
  display: grid;
  width: min(100%, 32.625vh, 315px);
  width: min(100%, 32.625dvh, 315px);
  height: min(58vh, 560px);
  height: min(58dvh, 560px);
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: #050506;
  box-shadow: 0 22px 55px rgba(0,0,0,.48);
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #050506;
  object-fit: contain;
}

.player-message {
  position: absolute;
  right: 12px;
  bottom: 48px;
  left: 12px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  text-align: center;
  pointer-events: none;
}

.player-controls {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 10px;
  max-width: 420px;
  margin: 14px auto 0;
}

.player-controls button {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.07);
  color: white;
  font-size: 13px;
}

.player-controls #next-episode:not(:disabled) {
  border-color: transparent;
  background: linear-gradient(135deg, #ff936f, var(--player-accent));
  box-shadow: 0 10px 24px rgba(255,112,67,.2);
}

.episode-heading {
  position: sticky;
  z-index: 4;
  top: -14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px -2px 9px;
  padding: 13px 4px 10px;
  background: linear-gradient(180deg, rgba(12,12,16,.98) 70%, rgba(12,12,16,0));
}

.episode-heading h3 {
  margin: 0;
  font-size: 16px;
}

.episode-heading span {
  color: rgba(255,255,255,.48);
  font-size: 11px;
}

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

.episode-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
  font-size: 13px;
  cursor: pointer;
}

.episode-button.is-active {
  border-color: var(--player-accent);
  background: var(--player-accent);
  box-shadow: 0 8px 18px rgba(255,112,67,.2);
  color: white;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-radius: 99px;
  background: rgba(25,25,28,.92);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 521px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100vh - 36px); border-radius: 32px; box-shadow: var(--shadow); }
  .bottom-nav { bottom: 18px; border-radius: 0 0 32px 32px; }
  .detail-dialog { margin-bottom: 18px; border-radius: 28px; }
  .player-dialog {
    width: min(calc(100% - 36px), 520px);
    height: min(92vh, 840px);
    height: min(92dvh, 840px);
    max-height: min(92vh, 840px);
    max-height: min(92dvh, 840px);
    margin: auto;
    border-radius: 28px;
  }
}

@media (max-width: 365px) {
  .app-shell { padding-right: 13px; padding-left: 13px; }
  .feature-grid { gap: 8px; }
  .feature-card strong { font-size: 15px; }
  .feature-small { padding-left: 12px; }
  .poster-grid { column-gap: 7px; }
  .detail-sheet {
    --detail-column-gap: 13px;
    --detail-poster-width: 100px;
    --detail-row-gap: 13px;
  }
  .player-body { padding-right: 11px; padding-left: 11px; }
  .episode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Night Theater visual system — 2026-10-17 */
:root {
  --bg: #090508;
  --surface: #160d12;
  --surface-soft: #201218;
  --ink: #f7eadc;
  --muted: #ae959d;
  --line: rgba(239, 204, 165, 0.14);
  --accent: #efc99d;
  --warm: #c84c70;
  --lime: #7e2942;
  --gold: #efc99d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  background: #050305;
}

html {
  background: #050305;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(116, 26, 50, 0.18), transparent 36%),
    #050305;
}

button:focus-visible,
input:focus-visible,
.drama-card:focus-visible {
  outline-color: rgba(239, 201, 157, 0.74);
}

.skip-link {
  background: var(--accent);
  color: #211015;
}

.app-shell {
  overflow-x: hidden;
  padding: 0 18px calc(96px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 92% 2%, rgba(105, 25, 47, 0.2), transparent 30%),
    radial-gradient(circle at 5% 42%, rgba(103, 42, 49, 0.12), transparent 28%),
    var(--bg);
}

.night-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 782 / 559;
  min-height: calc(230px + env(safe-area-inset-top));
  margin: 0 -18px 20px;
  border-radius: 0 0 28px 28px;
  background: #180b10;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.4);
}

.night-hero::before,
.night-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.night-hero::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 3, 6, 0.74) 0%, rgba(7, 3, 6, 0.4) 27%, rgba(7, 3, 6, 0.06) 55%, transparent 74%),
    linear-gradient(0deg, rgba(7, 3, 6, 0.62) 0%, transparent 42%);
}

.night-hero::after {
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 201, 157, 0.38), transparent);
}

.night-hero-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

.night-hero .topbar {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  padding: calc(15px + env(safe-area-inset-top)) 18px 10px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-heart {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  transform: rotate(-4deg);
}

.brand-heart::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(255, 72, 139, 0.68);
  filter: blur(9px);
  opacity: 0.78;
}

.brand-heart svg {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  overflow: visible;
  filter:
    drop-shadow(0 0 6px rgba(255, 112, 169, 0.78))
    drop-shadow(0 5px 10px rgba(75, 4, 32, 0.42));
}

.brand-heart-main {
  fill: url(#brand-heart-pink);
}

.brand-heart-glint {
  fill: none;
  stroke: rgba(255, 245, 249, 0.76);
  stroke-linecap: round;
  stroke-width: 1.15;
}

.brand-kicker {
  margin: 0 0 2px;
  color: rgba(247, 234, 220, 0.58);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.night-hero .topbar h1 {
  margin: 0;
  color: #f8e3ca;
  font-family: "Songti SC", STSong, Georgia, serif;
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.52);
}

.night-hero .icon-button {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 239, 220, 0.26);
  background: rgba(18, 8, 13, 0.5);
  color: #fff4e8;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.night-hero-copy {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 20px;
  width: min(50%, 235px);
  color: #fff4e8;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 213, 190, 0.2);
  border-radius: 99px;
  background: rgba(126, 25, 53, 0.72);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
  color: #f9ddcf;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.night-hero-copy h2 {
  margin: 8px 0 11px;
  font-family: "Songti SC", STSong, Georgia, serif;
  font-size: clamp(31px, 9vw, 48px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0.03em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-watch-button {
  min-width: 128px;
  min-height: 39px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 235, 211, 0.34);
  border-radius: 99px;
  background: linear-gradient(135deg, #f2d0ab, #d79a7e);
  box-shadow: 0 9px 24px rgba(42, 8, 18, 0.32);
  color: #2a1218;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.hero-watch-button span {
  margin-left: 7px;
  font-size: 18px;
  line-height: 0;
  vertical-align: -1px;
}

.status-row:not(:empty) {
  margin-top: 2px;
}

.offline-banner {
  border: 1px solid rgba(239, 201, 157, 0.14);
  background: #241219;
  color: #d6b8b2;
}

.offline-banner button {
  background: #34202a;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 28px;
}

.feature-card,
.feature-ranking,
.feature-small,
.feature-recommend,
.feature-following {
  min-height: 78px;
  padding: 12px 10px;
  border: 1px solid rgba(239, 201, 157, 0.13);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(50, 25, 34, 0.92), rgba(24, 13, 18, 0.94));
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.2);
  color: var(--ink);
}

.feature-card::after {
  content: "›";
  position: absolute;
  top: 10px;
  right: 10px;
  color: rgba(239, 201, 157, 0.42);
  font-size: 16px;
}

.feature-card:hover {
  border-color: rgba(239, 201, 157, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.feature-number {
  display: block;
  margin-bottom: 7px;
  color: #bb7180;
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: italic;
  letter-spacing: 0.14em;
}

.feature-copy,
.feature-small > .feature-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.feature-card strong {
  overflow: hidden;
  color: #f7eadc;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-card small {
  overflow: hidden;
  margin-top: 4px;
  color: #987d85;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-posters,
.trophy-art,
.feature-icon,
.feature-stack {
  display: none;
}

.section-heading {
  align-items: center;
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading h3 {
  color: #f5e8dc;
}

.section-heading h2 {
  font-family: "Songti SC", STSong, Georgia, serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.eyebrow {
  color: #a87b85;
  font-size: 9px;
  letter-spacing: 0.2em;
}

.text-button {
  color: #cfac9e;
}

.poster,
.detail-poster {
  border: 1px solid rgba(239, 201, 157, 0.11);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.poster::after,
.detail-poster::after {
  background: linear-gradient(transparent, rgba(8, 3, 6, 0.88));
}

.drama-card > strong {
  color: #f1e5db;
  font-weight: 600;
}

.drama-card > small {
  color: #8f7a81;
}

.skeleton-poster,
.skeleton-line {
  background: #21141a;
}

.skeleton-poster::after,
.skeleton-line::after {
  background: linear-gradient(90deg, transparent, rgba(255, 225, 210, 0.07), transparent);
}

.bottom-nav {
  border-color: rgba(239, 201, 157, 0.1);
  background: rgba(12, 7, 10, 0.9);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.34);
}

.nav-item {
  color: #9a8088;
}

.nav-item.is-active {
  color: #efc99d;
}

.nav-item.is-active::before {
  background: rgba(126, 41, 66, 0.34);
}

.nav-item.is-active svg {
  fill: rgba(200, 76, 112, 0.34);
  color: #efc99d;
  stroke: #efc99d;
}

.page-intro {
  padding-top: calc(24px + env(safe-area-inset-top));
}

.page-intro h2,
.profile-header h2 {
  color: #f7eadc;
}

.empty-state,
.history-item,
.settings-card,
.watched-card {
  border-color: rgba(239, 201, 157, 0.12);
  background: rgba(25, 14, 19, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.history-item {
  color: var(--ink);
}

.progress-track {
  background: #2c1a21;
}

.continue-pill {
  background: rgba(126, 41, 66, 0.28);
  color: #e9c0b7;
}

.profile-header {
  padding-top: calc(26px + env(safe-area-inset-top));
}

.avatar {
  border: 1px solid rgba(239, 201, 157, 0.14);
  background: linear-gradient(145deg, #2f1d25, #170d12);
}

.avatar svg {
  fill: rgba(239, 214, 202, 0.78);
  stroke: rgba(239, 201, 157, 0.18);
}

.settings-icon,
.settings-row > span:last-child {
  color: #a98b90;
}

dialog {
  border: 1px solid rgba(239, 201, 157, 0.13);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.64);
}

dialog::backdrop {
  background: rgba(4, 2, 4, 0.72);
}

.dialog-heading .icon-button,
.detail-close {
  border-color: rgba(239, 201, 157, 0.15);
  background: #27161d;
  color: #eed8cb;
}

.search-field,
.search-result {
  border-color: rgba(239, 201, 157, 0.12);
  background: #21131a;
  color: var(--ink);
}

.search-result:hover {
  background: #2a1821;
}

.tag-list span {
  background: rgba(126, 41, 66, 0.25);
  color: #d9b8b2;
}

.detail-summary {
  color: #b49da3;
}

.primary-button {
  background: linear-gradient(135deg, #e7bd93, #c97f78);
  color: #261117;
}

.secondary-button {
  background: #2a1a20;
  color: #eadbd1;
}

.load-more-button {
  border-color: rgba(239, 201, 157, 0.17);
  background: #1b1015;
  color: #e9d6ca;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
}

@media (min-width: 521px) {
  .app-shell {
    border: 1px solid rgba(239, 201, 157, 0.08);
    box-shadow: var(--shadow);
  }

  .night-hero {
    border-radius: 32px 32px 28px 28px;
  }
}

@media (max-width: 365px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .night-hero {
    margin-right: -13px;
    margin-left: -13px;
  }

  .night-hero .topbar {
    padding-right: 13px;
    padding-left: 13px;
  }

  .night-hero-copy {
    bottom: 16px;
    left: 14px;
    width: 53%;
  }

  .night-hero-copy h2 {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 29px;
  }

  .hero-watch-button {
    min-width: 116px;
    min-height: 36px;
    padding: 6px 12px;
  }

  .feature-card,
  .feature-ranking,
  .feature-small {
    min-height: 72px;
    padding: 10px 8px;
  }

  .feature-card strong {
    font-size: 12px;
  }
}

/* Night Theater ambience — restrained motion, wine-red glass and cover-led light. */
.brand-heart svg,
.brand-heart::before {
  transform-origin: center;
}

.night-hero-image {
  transform: scale(1.008);
}

.feature-card,
.feature-ranking,
.feature-small,
.feature-recommend,
.feature-following {
  background:
    linear-gradient(145deg, rgba(63, 27, 41, 0.7), rgba(19, 9, 14, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 219, 0.05),
    0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

.poster {
  transition:
    transform 420ms ease,
    border-color 420ms ease,
    box-shadow 420ms ease;
}

.poster-image {
  transition:
    transform 800ms cubic-bezier(.2, .75, .2, 1),
    filter 450ms ease;
}

.detail-dialog {
  overflow: hidden;
  background: rgba(19, 9, 14, 0.88);
  backdrop-filter: blur(24px) saturate(118%);
  -webkit-backdrop-filter: blur(24px) saturate(118%);
}

.detail-sheet {
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(35, 16, 24, 0.9), rgba(13, 7, 11, 0.94));
}

.detail-sheet::before,
.detail-sheet::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.detail-sheet::before {
  z-index: 0;
  inset: -16%;
  background-image: var(--detail-cover-image, none);
  background-position: center 24%;
  background-size: cover;
  filter: blur(30px) saturate(.92);
  opacity: .3;
  transform: scale(1.14);
}

.detail-sheet::after {
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(112deg, rgba(16, 7, 12, .82), rgba(21, 9, 15, .68) 48%, rgba(13, 6, 10, .9)),
    radial-gradient(circle at 86% 5%, var(--detail-glow-b, #7e2942), transparent 48%),
    radial-gradient(circle at 4% 100%, var(--detail-glow-a, #321a24), transparent 54%);
}

.detail-poster,
.detail-copy,
.detail-actions {
  position: relative;
  z-index: 2;
}

.detail-copy {
  padding: 12px;
  border: 1px solid rgba(255, 222, 209, .08);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(45, 21, 31, .48), rgba(20, 10, 15, .42));
  box-shadow: inset 0 1px 0 rgba(255, 235, 225, .035);
  backdrop-filter: blur(15px) saturate(112%);
  -webkit-backdrop-filter: blur(15px) saturate(112%);
}

.detail-actions .secondary-button,
.player-controls button,
.episode-button {
  backdrop-filter: blur(14px) saturate(112%);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
}

.player-dialog {
  --player-ambient-a: #361521;
  --player-ambient-b: #c84c70;
  background: linear-gradient(180deg, #120a10 0%, #080609 100%);
}

.player-sheet {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.player-sheet::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -18%;
  background:
    radial-gradient(circle at 12% 12%, var(--player-ambient-a), transparent 38%),
    radial-gradient(circle at 88% 34%, var(--player-ambient-b), transparent 40%);
  filter: blur(34px);
  opacity: .2;
  pointer-events: none;
}

.player-heading,
.player-body {
  position: relative;
  z-index: 1;
}

.player-heading {
  background: rgba(14, 8, 12, .68);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
}

.player-stage {
  isolation: isolate;
  background: #08070a;
}

.player-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 17%;
  left: 50%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--player-ambient-b);
  filter: blur(54px);
  opacity: .13;
  pointer-events: none;
  transform: translateX(-50%);
}

.video-frame {
  z-index: 1;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .52),
    0 0 40px rgba(126, 41, 66, .12);
}

@keyframes heart-soft-beat {
  0%, 24%, 100% { transform: scale(1); }
  6% { transform: scale(1.18); }
  11% { transform: scale(.96); }
  16% { transform: scale(1.11); }
  21% { transform: scale(1); }
}

@keyframes heart-halo-breathe {
  0%, 24%, 100% { opacity: .5; transform: scale(.86); }
  6% { opacity: 1; transform: scale(1.38); }
  11% { opacity: .68; transform: scale(1.02); }
  16% { opacity: .94; transform: scale(1.26); }
  21% { opacity: .56; transform: scale(.92); }
}

@keyframes hero-night-drift {
  from { transform: scale(1.008) translate3d(0, 0, 0); }
  to { transform: scale(1.024) translate3d(-.25%, -.15%, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-heart svg {
    animation: heart-soft-beat 3.8s ease-in-out infinite;
    will-change: transform;
  }

  .brand-heart::before {
    animation: heart-halo-breathe 3.8s ease-in-out infinite;
    will-change: opacity, transform;
  }

  .night-hero-image {
    animation: hero-night-drift 18s ease-in-out infinite alternate;
    transform-origin: 62% 50%;
    will-change: transform;
  }
}

@media (hover: hover) and (pointer: fine) {
  .drama-card:hover .poster {
    border-color: rgba(238, 126, 162, .35);
    box-shadow:
      0 17px 38px rgba(116, 24, 56, .34),
      0 0 0 1px rgba(255, 166, 192, .08);
    transform: translateY(-3px);
  }

  .drama-card:hover .poster-image {
    filter: saturate(1.06) brightness(1.025);
    transform: scale(1.035);
  }

  .drama-card:focus-visible .poster {
    border-color: rgba(238, 126, 162, .42);
    box-shadow: 0 15px 34px rgba(116, 24, 56, .3);
  }
}

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

/* Full-screen vertical episode player */
.player-dialog {
  --player-accent: #e7a98f;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #050305;
}

.player-dialog::backdrop {
  background: rgba(2, 1, 2, .92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.player-sheet,
.player-body,
.player-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.player-sheet::before {
  display: none;
}

.player-body {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 0;
}

.player-body::-webkit-scrollbar {
  display: none;
}

.player-stage {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #050305;
  outline: 0;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.player-stage:focus-visible {
  outline: 2px solid rgba(255, 173, 196, .9);
  outline-offset: -4px;
}

.player-stage::before {
  display: none;
}

.player-stage::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 2, 4, 0) 0%,
    rgba(5, 2, 4, 0) 84%,
    rgba(5, 2, 4, .05) 89%,
    rgba(5, 2, 4, .25) 96%,
    rgba(5, 2, 4, .56) 100%
  );
  pointer-events: none;
  content: "";
}

.player-backdrop {
  position: absolute;
  z-index: 0;
  inset: -7%;
  width: 114%;
  height: 114%;
  object-fit: cover;
  filter: blur(18px) saturate(.82) brightness(.4);
  opacity: .48;
  transform: scale(1.04);
}

.player-backdrop:not([src]) {
  display: none;
}

.video-frame {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow: hidden;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(3, 2, 3, .4);
  box-shadow: none;
}

.player-deck,
.player-pane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-deck {
  z-index: 1;
  overflow: hidden;
  contain: layout;
}

.player-pane {
  top: -1px;
  bottom: auto;
  z-index: 0;
  height: calc(100% + 2px);
  overflow: hidden;
  background: #050305;
  backface-visibility: hidden;
  transform: translate3d(0, 100%, 0);
  will-change: transform;
}

.player-pane.is-active {
  z-index: 1;
  transform: translate3d(0, 0, 0);
}

.player-pane.is-transition-outgoing {
  z-index: 2;
}

.player-pane.is-transition-incoming {
  z-index: 1;
}

.player-pane.is-settling {
  transition: transform var(--player-settle-duration, 220ms) cubic-bezier(.2, .72, .2, 1);
}

.player-deck.is-dragging .player-pane {
  transition: none !important;
}

.player-deck.is-snapshotting .player-pane {
  contain: layout paint;
}

.player-pane[aria-hidden="true"] {
  pointer-events: none;
}

.player-pane video {
  display: block;
  width: 100%;
  height: 100%;
  background: #050305;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.player-snapshot {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  background: #050305;
  pointer-events: none;
}

.player-pane.is-snapshot-active .player-snapshot:not([hidden]) {
  display: block;
}

.player-pane.is-snapshot-active video {
  visibility: hidden;
}

.player-gesture-surface {
  position: absolute;
  z-index: 4;
  inset: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.player-dialog.is-snapshot-motion::backdrop,
.player-stage.is-snapshot-motion * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.player-heading {
  position: absolute;
  z-index: 7;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding:
    calc(10px + env(safe-area-inset-top))
    calc(14px + env(safe-area-inset-right))
    10px
    calc(14px + env(safe-area-inset-left));
  border: 0;
  background: linear-gradient(180deg, rgba(5, 3, 5, .34), rgba(5, 3, 5, .12) 58%, rgba(5, 3, 5, 0));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.player-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 238, 228, .13);
  background: rgba(19, 9, 14, .3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
  color: white;
  font-size: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.player-swipe-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 238, 228, .12);
  border-radius: 99px;
  background: rgba(19, 9, 14, .32);
  color: rgba(255, 244, 239, .76);
  font-size: 10px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.player-resume-button {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid rgba(255, 238, 228, .24);
  border-radius: 99px;
  background: rgba(19, 9, 14, .62);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  color: #fff8f4;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .04em;
  transform: translate(-50%, -50%);
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(112%);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
}

.player-resume-button[hidden] {
  display: none;
}

.player-resume-button:active {
  transform: translate(-50%, -50%) scale(.97);
}

.player-resume-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5c0aa, #dc7892);
  color: #291016;
  font-size: 11px;
  line-height: 1;
  text-indent: 2px;
}

.player-side-actions {
  position: absolute;
  z-index: 7;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(190px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
}

.player-side-button {
  display: grid;
  width: 52px;
  min-height: 58px;
  padding: 7px 3px 5px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: rgba(17, 8, 12, .38);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .2);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
}

.player-side-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.player-side-button span {
  color: rgba(255, 245, 239, .86);
  font-size: 10px;
}

.player-side-button.is-active {
  color: #ff7fa9;
}

.player-side-button.is-active svg {
  fill: currentColor;
  filter: drop-shadow(0 0 9px rgba(255, 78, 139, .52));
}

.player-bottom-copy {
  position: absolute;
  z-index: 6;
  right: calc(78px + env(safe-area-inset-right));
  bottom: calc(75px + env(safe-area-inset-bottom));
  left: calc(18px + env(safe-area-inset-left));
  color: white;
  pointer-events: none;
}

.player-bottom-kicker {
  margin: 0 0 5px;
  color: #f2bba9;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}

.player-bottom-copy h2 {
  overflow: hidden;
  margin: 0;
  color: #fff7f2;
  font-size: clamp(20px, 5.8vw, 27px);
  line-height: 1.18;
  text-overflow: ellipsis;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .55);
  white-space: nowrap;
}

.player-swipe-hint {
  margin: 8px 0 0;
  color: rgba(255, 244, 239, .65);
  font-size: 11px;
}

.player-swipe-hint span {
  display: inline-block;
  margin-right: 3px;
  color: #f0b4a1;
  animation: player-hint-up 1.8s ease-in-out infinite;
}

.player-transport {
  position: absolute;
  z-index: 7;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 238, 228, .1);
  border-radius: 18px;
  background: rgba(14, 7, 10, .42);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px) saturate(108%);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
}

.player-jump-button {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff7f2;
  cursor: pointer;
  touch-action: manipulation;
}

.player-jump-button:active:not(:disabled) {
  background: rgba(255, 255, 255, .1);
  transform: scale(.94);
}

.player-jump-button:disabled {
  color: rgba(255, 247, 242, .34);
  cursor: default;
}

.player-jump-arrow {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.player-jump-value {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.player-timeline {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.player-timeline input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #ef9caa;
  cursor: pointer;
  touch-action: pan-x;
  -webkit-appearance: none;
  appearance: none;
}

.player-timeline input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #f3b0ba 0%,
    #e57d95 var(--player-progress, 0%),
    rgba(255, 255, 255, .28) var(--player-progress, 0%),
    rgba(255, 255, 255, .28) 100%
  );
}

.player-timeline input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -6px;
  border: 2px solid #fff6f2;
  border-radius: 50%;
  background: #e9859b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .36);
  -webkit-appearance: none;
  appearance: none;
}

.player-timeline input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .28);
}

.player-timeline input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f3b0ba, #e57d95);
}

.player-timeline input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff6f2;
  border-radius: 50%;
  background: #e9859b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .36);
}

.player-timeline input[type="range"]:disabled {
  cursor: default;
  opacity: .55;
}

.player-time-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 244, 239, .66);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.player-message {
  z-index: 6;
  right: calc(72px + env(safe-area-inset-right));
  bottom: calc(145px + env(safe-area-inset-bottom));
  left: calc(18px + env(safe-area-inset-left));
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(14, 7, 10, .42);
  color: rgba(255, 246, 241, .8);
  font-size: 11px;
  text-align: left;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.player-message:empty {
  display: none;
}

.player-swipe-feedback {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  min-width: 138px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 238, 228, .16);
  border-radius: 99px;
  background: rgba(20, 9, 14, .68);
  color: #fff7f2;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -34%);
  transition: opacity 130ms ease, transform 130ms ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.player-swipe-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.player-swipe-feedback.is-boundary {
  color: #f4c2b2;
}

.episode-drawer-backdrop {
  position: absolute;
  z-index: 9;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(3, 1, 2, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.episode-drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.episode-drawer {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(66vh, 620px);
  max-height: min(66dvh, 620px);
  overflow: hidden;
  padding:
    8px
    calc(16px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
  border: 1px solid rgba(255, 224, 211, .12);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(139, 40, 70, .2), transparent 36%),
    rgba(20, 10, 15, .97);
  box-shadow: 0 -22px 70px rgba(0, 0, 0, .48);
  pointer-events: none;
  transform: translateY(104%);
  transition: transform 300ms cubic-bezier(.2, .8, .2, 1);
  backdrop-filter: blur(24px) saturate(115%);
  -webkit-backdrop-filter: blur(24px) saturate(115%);
}

.episode-drawer.is-open {
  pointer-events: auto;
  transform: translateY(0);
}

.episode-drawer-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 4px;
  border-radius: 99px;
  background: rgba(255, 239, 230, .25);
}

.episode-drawer .episode-heading {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 0 10px;
  background: transparent;
}

.episode-drawer .episode-heading .eyebrow {
  margin: 0 0 2px;
  color: #c88b91;
  font-size: 9px;
}

.episode-drawer .episode-heading h3 {
  font-size: 18px;
}

.episode-drawer .episode-heading > span {
  color: rgba(255, 238, 230, .56);
  font-size: 11px;
}

.episode-drawer-close {
  width: 40px;
  height: 40px;
  border-color: rgba(255, 238, 230, .11);
  background: rgba(255, 255, 255, .06);
  color: white;
  font-size: 20px;
}

.episode-drawer .player-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  max-width: none;
  margin: 0 0 12px;
}

.episode-drawer .player-controls button {
  min-height: 43px;
  border: 1px solid rgba(255, 229, 218, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .055);
  color: #fceee7;
}

.episode-drawer .player-controls #next-episode:not(:disabled) {
  border-color: rgba(234, 166, 143, .24);
  background: linear-gradient(135deg, rgba(153, 53, 82, .8), rgba(191, 100, 89, .78));
}

.episode-drawer .episode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-height: calc(min(66dvh, 620px) - 150px);
  overflow: auto;
  padding: 2px 1px 8px;
  overscroll-behavior: contain;
}

.episode-drawer .episode-button {
  min-height: 45px;
  border: 1px solid rgba(255, 230, 219, .09);
  border-radius: 13px;
  background: rgba(255, 255, 255, .055);
  color: rgba(255, 242, 235, .8);
}

.episode-drawer .episode-button.is-active {
  border-color: rgba(255, 190, 169, .55);
  background: linear-gradient(145deg, #9e3658, #cf7865);
  box-shadow: 0 8px 22px rgba(126, 41, 66, .34);
  color: white;
}

.video-frame.is-boundary {
  animation: player-boundary 310ms ease-out;
}

@keyframes player-boundary {
  0%, 100% { transform: translate3d(0, 0, 0); }
  35% { transform: translate3d(0, 12px, 0); }
  70% { transform: translate3d(0, -5px, 0); }
}

@keyframes player-hint-up {
  0%, 100% { opacity: .55; transform: translateY(3px); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@media (min-width: 521px) {
  .player-dialog {
    width: min(calc(100% - 36px), 520px);
    height: min(92vh, 880px);
    height: min(92dvh, 880px);
    max-height: min(92vh, 880px);
    max-height: min(92dvh, 880px);
    margin: auto;
    border: 1px solid rgba(255, 228, 216, .1);
    border-radius: 28px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .6);
  }
}

@media (max-width: 365px) {
  .player-side-actions { right: calc(9px + env(safe-area-inset-right)); }
  .player-side-button { width: 48px; }
  .player-bottom-copy {
    right: calc(67px + env(safe-area-inset-right));
    left: calc(14px + env(safe-area-inset-left));
  }
  .player-transport {
    right: calc(8px + env(safe-area-inset-right));
    left: calc(8px + env(safe-area-inset-left));
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 5px;
    padding-right: 5px;
    padding-left: 5px;
  }
  .player-jump-button { width: 40px; }
  .episode-drawer {
    padding-right: calc(12px + env(safe-area-inset-right));
    padding-left: calc(12px + env(safe-area-inset-left));
  }
  .episode-drawer .episode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Episode access and recharge sheet */
.episode-drawer .episode-button.is-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: rgba(255, 230, 219, .07);
  background: rgba(255, 255, 255, .035);
  color: rgba(255, 242, 235, .43);
}

.episode-drawer .episode-button.is-locked:active {
  border-color: rgba(234, 166, 143, .32);
  background: rgba(126, 41, 66, .24);
}

.episode-lock {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 221, 207, .1);
  color: rgba(255, 232, 222, .66);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.paywall-dialog {
  align-self: end;
  width: min(100%, 520px);
  max-height: min(88vh, 780px);
  max-height: min(88dvh, 780px);
  margin: auto auto 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: #fffaf7;
  color: #312126;
  color-scheme: light;
  box-shadow: 0 -20px 72px rgba(16, 5, 10, .38);
}

.paywall-dialog::backdrop {
  background: rgba(8, 3, 6, .7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.paywall-sheet {
  position: relative;
  max-height: min(88vh, 780px);
  max-height: min(88dvh, 780px);
  overflow: auto;
  padding: 13px 18px calc(18px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 88% 0, rgba(255, 203, 196, .35), transparent 27%),
    linear-gradient(180deg, #fffdfb, #fff8f4);
  overscroll-behavior: contain;
}

.paywall-sheet[aria-busy="true"] {
  cursor: progress;
}

.paywall-handle {
  width: 44px;
  height: 4px;
  margin: 0 auto 11px;
  border-radius: 999px;
  background: #e7d7d2;
}

.paywall-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0 0 2px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f2e7e3;
  color: #806b70;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.paywall-heading {
  padding: 1px 48px 12px 2px;
}

.paywall-eyebrow {
  margin: 0 0 4px;
  color: #bd7180;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}

.paywall-heading h2 {
  margin: 0;
  color: #28191e;
  font-size: 24px;
  letter-spacing: -.03em;
}

.paywall-heading p:last-child {
  margin: 5px 0 0;
  color: #88757a;
  font-size: 12px;
}

.paywall-account {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px 0;
  border-top: 1px solid rgba(108, 71, 79, .1);
  border-bottom: 1px solid rgba(108, 71, 79, .1);
}

.paywall-account p {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  gap: 3px;
}

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

.paywall-account p[hidden] + p {
  grid-column: 1 / -1;
  align-items: flex-start;
  text-align: left;
}

.paywall-account p:last-child {
  align-items: flex-end;
  text-align: right;
}

.paywall-account span {
  color: #9d898d;
  font-size: 10px;
}

.paywall-account strong {
  color: #bf5267;
  font-size: 16px;
}

.paywall-notice {
  min-height: 18px;
  margin: 10px 2px 8px;
  color: #6d565c;
  font-size: 11px;
}

.paywall-notice.is-warning,
.paywall-payment-status.is-unavailable {
  color: #c25060;
}

.paywall-unlock-button,
.paywall-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #eaa08e, #d56479);
  box-shadow: 0 10px 24px rgba(177, 75, 96, .2);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.paywall-unlock-button {
  margin-bottom: 13px;
}

.paywall-unlock-button[hidden] {
  display: none;
}

.paywall-unlock-button:disabled,
.paywall-submit:disabled {
  cursor: wait;
  opacity: .62;
}

.paywall-package-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 2px 9px;
}

.paywall-package-heading h3 {
  margin: 0;
  color: #38262b;
  font-size: 15px;
}

.paywall-package-heading span {
  color: #9a858a;
  font-size: 10px;
}

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

.paywall-package {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100px;
  padding: 13px 10px 11px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #eadbd6;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  color: #3a292e;
  text-align: center;
  cursor: pointer;
}

.paywall-package.is-selected {
  border-color: #d77886;
  background: linear-gradient(145deg, #fff, #fff0ed);
  box-shadow: inset 0 0 0 1px rgba(215, 120, 134, .24), 0 8px 20px rgba(112, 50, 65, .08);
}

.paywall-popular {
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 4px 7px;
  border-radius: 0 13px 0 10px;
  background: #4a3138;
  color: #fff5f0;
  font-size: 8px;
  font-weight: 800;
}

.paywall-package-price {
  color: #2e1e23;
  font-size: 17px;
}

.paywall-package-name {
  margin-top: 5px;
  color: #5b444a;
  font-size: 12px;
  font-weight: 700;
}

.paywall-package-description {
  margin-top: 4px;
  color: #c15d70;
  font-size: 9px;
  line-height: 1.4;
}

.paywall-payment-status {
  min-height: 17px;
  margin: 11px 2px 7px;
  color: #7a656a;
  font-size: 10px;
  text-align: center;
}

.paywall-submit {
  min-height: 50px;
  font-size: 15px;
}

.paywall-agreement {
  margin: 9px 4px 0;
  color: #a18f93;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 521px) {
  .paywall-dialog {
    margin-bottom: 18px;
    border-radius: 28px;
  }
}

@media (max-height: 650px) {
  .paywall-package {
    min-height: 86px;
    padding-top: 10px;
    padding-bottom: 9px;
  }

  .paywall-heading {
    padding-bottom: 8px;
  }
}
