:root {
  --night: #130a18;
  --night-soft: #211126;
  --coral: #ff6037;
  --rose: #ed174f;
  --paper: #fff9f2;
  --muted: #bbaebd;
  --line: rgba(255, 249, 242, 0.14);
  --shadow: 0 24px 70px rgba(9, 3, 13, 0.38);
  color: var(--paper);
  background: var(--night);
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 0%, rgba(255, 96, 55, 0.22), transparent 25rem),
    radial-gradient(circle at 92% 16%, rgba(237, 23, 79, 0.2), transparent 28rem),
    linear-gradient(180deg, #1d0b23 0%, var(--night) 38%, #0c0610 100%);
  color: var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.25;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a { color: inherit; }

a:focus-visible,
button:focus-visible { outline: 3px solid #ffc26e; outline-offset: 4px; }

.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--coral), var(--rose));
  box-shadow: 0 10px 24px rgba(255, 96, 55, 0.28);
  color: white;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 700;
}

.brand strong,
.brand small { display: block; }

.brand strong { font-family: Georgia, serif; font-size: 22px; letter-spacing: -0.04em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: 0.05em; }

.main-nav,
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.main-nav a,
.footer nav a { min-height: 44px; padding: 11px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
.main-nav a:hover,
.footer nav a:hover { background: rgba(255, 249, 242, 0.08); color: var(--paper); }

main { padding-bottom: 80px; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-block: 8px 28px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { color: #ffd0af; text-decoration: none; }
.breadcrumbs span[aria-current="page"] { max-width: min(520px, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

h1,
h2,
p { margin-top: 0; }

h1,
h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -0.045em; }
h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(42px, 7vw, 86px); line-height: 0.94; overflow-wrap: anywhere; }
h2 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 43px); line-height: 1; }

.eyebrow,
.section-kicker {
  margin-bottom: 12px;
  color: #ffc38e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255, 96, 55, 0.12); content: ""; }

.lead { max-width: 680px; color: #e7dce5; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.55; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(100deg, var(--coral), var(--rose)); box-shadow: 0 14px 34px rgba(237, 23, 79, 0.28); color: white; }
.button.secondary { border-color: var(--line); background: rgba(255, 249, 242, 0.06); color: var(--paper); }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: clamp(34px, 8vw, 110px);
  min-height: 540px;
  padding-block: 54px 84px;
}

.home-hero h1 { max-width: 700px; }
.home-hero .button { margin-top: 12px; }

.feature-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transform: rotate(3deg);
  text-decoration: none;
}

.feature-poster img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.feature-poster::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10, 3, 13, 0.94)); content: ""; }
.feature-poster span { position: absolute; right: 16px; bottom: 16px; left: 16px; z-index: 1; font-family: Georgia, serif; font-size: 21px; line-height: 1.05; }

section + section { margin-top: 78px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > a { min-height: 44px; padding: 11px 0; color: #ffc38e; font-size: 14px; text-underline-offset: 4px; }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.drama-card {
  display: block;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 249, 242, 0.09), rgba(255, 249, 242, 0.035));
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.drama-card:hover { border-color: rgba(255, 192, 136, 0.7); background: rgba(255, 249, 242, 0.12); transform: translateY(-4px); }
.card-poster { display: block; }
.drama-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--night-soft); }
.card-copy { display: block; padding: 13px 13px 15px; }
.card-copy strong { display: block; min-height: 38px; font-family: Georgia, serif; font-size: 17px; line-height: 1.12; }
.card-copy small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.card-watch,
.card-detail { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; text-decoration: none; }
.card-watch { background: linear-gradient(100deg, var(--coral), var(--rose)); color: white; }
.card-detail { border: 1px solid var(--line); color: #ffd2b6; }
.card-watch:hover,
.card-detail:hover { filter: brightness(1.12); }

.drama-hero { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 84px); padding-bottom: 20px; }
.poster-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.poster-frame img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.drama-intro h1 { max-width: 680px; font-size: clamp(40px, 6vw, 76px); }
.drama-intro .lead { max-width: 680px; color: #f2e5eb; overflow-wrap: anywhere; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px; }
.tag { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border: 1px solid rgba(255, 192, 136, 0.25); border-radius: 999px; background: rgba(255, 249, 242, 0.05); color: #ffd8bd; font-size: 12px; text-decoration: none; }
.tag:hover { background: rgba(255, 96, 55, 0.16); }

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.facts span { display: grid; gap: 3px; min-width: 100px; padding: 12px 14px; border-left: 2px solid var(--coral); background: rgba(255, 249, 242, 0.055); color: var(--muted); font-size: 11px; }
.facts b { color: var(--paper); font-family: Georgia, serif; font-size: 18px; }

.prose { max-width: 800px; }
.prose p:last-child { color: #e6dae4; font-size: 17px; line-height: 1.75; }

.faq { max-width: 800px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 54px; padding: 17px 30px 17px 0; cursor: pointer; color: var(--paper); font-size: 15px; font-weight: 700; list-style-position: outside; }
.faq details p { max-width: 680px; margin: -2px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.episode-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; border: 1px solid rgba(255, 96, 55, 0.33); border-radius: 20px; background: linear-gradient(120deg, rgba(255, 96, 55, 0.14), rgba(237, 23, 79, 0.05)); }
.episode-panel h2 { margin-bottom: 8px; font-size: 31px; }
.episode-panel p:last-child { max-width: 570px; margin-bottom: 0; color: var(--muted); line-height: 1.5; }

.collection-main { padding-top: 28px; }
.collection-hero { max-width: 820px; padding: 36px 0 12px; }
.collection-hero h1 { max-width: 820px; }
.collection-count { margin-top: 20px; color: #ffc38e; font-size: 13px; font-weight: 700; }
.topic-directory { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 249, 242, 0.04); }
.topic-links { display: flex; flex-wrap: wrap; gap: 10px; }
.topic-links a { min-height: 44px; padding: 12px 15px; border-radius: 999px; background: rgba(255, 249, 242, 0.08); color: #ffe1cd; font-size: 13px; text-decoration: none; }
.topic-links a:hover { background: var(--coral); color: white; }

.editorial { padding: 28px; border-top: 1px solid var(--line); }
.editorial-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.editorial-links a { color: #ffd1b5; text-underline-offset: 4px; line-height: 1.4; }

.footer { display: flex; justify-content: space-between; gap: 28px; padding-block: 34px 80px; border-top: 1px solid var(--line); color: var(--muted); }
.footer strong { color: var(--paper); font-family: Georgia, serif; font-size: 20px; }
.footer p { margin: 6px 0 0; font-size: 12px; }
.footer nav { justify-content: flex-end; }

.attribution-status { min-height: 28px; padding-bottom: 28px; color: #f4bf9e; font-size: 12px; }
.not-found { min-height: 58vh; padding-top: 100px; }
.not-found h1 { max-width: 620px; }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .drama-hero { grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 560px); }
  .topbar { align-items: flex-start; flex-wrap: wrap; min-height: 0; padding-block: 16px 22px; }
  .main-nav { width: 100%; justify-content: space-between; }
  .main-nav a { flex: 1; padding-inline: 8px; text-align: center; }
  .home-hero { grid-template-columns: 1fr; min-height: 0; padding-block: 34px 62px; }
  .home-hero h1 { font-size: clamp(42px, 13vw, 68px); }
  .feature-poster { width: min(220px, 65vw); margin: 0 auto; }
  h1 { font-size: clamp(40px, 12vw, 64px); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .drama-card { border-radius: 13px; }
  .card-copy { padding: 11px 10px 13px; }
  .card-copy strong { min-height: 34px; font-size: 15px; }
  .card-copy small { font-size: 10px; }
  .card-watch,
  .card-detail { font-size: 10px; }
  .drama-hero { grid-template-columns: 104px minmax(0, 1fr); align-items: start; gap: 16px; }
  .poster-frame { border-radius: 13px; }
  .drama-intro h1 { font-size: clamp(28px, 9vw, 46px); }
  .drama-intro .lead { grid-column: 1 / -1; margin-top: 4px; font-size: 16px; }
  .drama-intro .tag-list,
  .drama-intro .facts,
  .drama-intro .button { grid-column: 1 / -1; }
  .drama-intro { display: grid; grid-template-columns: minmax(0, 1fr); }
  .drama-intro .eyebrow { margin-bottom: 8px; }
  .facts span { flex: 1; min-width: 88px; }
  .episode-panel { align-items: flex-start; flex-direction: column; padding: 22px 20px; }
  .episode-panel .button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading > a { padding-block: 0 6px; }
  .topic-directory { padding: 20px 16px; }
  .editorial { padding-inline: 0; }
  .editorial-links { grid-template-columns: 1fr; }
  .footer { flex-direction: column; padding-bottom: 52px; }
  .footer nav { justify-content: flex-start; margin-inline: -7px; }
  .footer nav a { padding-inline: 7px; }
}

@media (max-width: 520px) {
  .drama-hero { grid-template-columns: 1fr; gap: 22px; }
  .poster-frame { width: min(190px, 58vw); margin-inline: auto; }
  .drama-intro { display: grid; grid-template-columns: minmax(0, 1fr); }
  .drama-intro h1,
  .drama-intro .lead { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .feature-poster, .button:hover, .drama-card:hover { transform: none; }
}
