:root {
  --ivory: #FBF6EC;
  --paper: #F4ECDC;
  --ink: #3A2A21;
  --ink-soft: #6E5A4C;
  --sage: #6F8C6B;
  --sage-deep: #4E6A4C;
  --gold: #B48A3E;
  --gold-soft: #D9C08A;
  --coral: #B9452F;
  --radius: 14px;
  --display-en: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --display: "Noto Serif TC", "Cormorant Garamond", serif;
  --body: "Noto Sans TC", "Noto Sans", system-ui, sans-serif;
}
.lang-en { --display: "Cormorant Garamond", Georgia, serif; --body: "Noto Sans", system-ui, sans-serif; }
.lang-ja { --display: "Noto Serif JP", serif; --body: "Noto Sans JP", system-ui, sans-serif; }
.lang-ko { --display: "Noto Serif KR", serif; --body: "Noto Sans KR", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold-soft);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  text-decoration: none; letter-spacing: 0.02em; color: var(--ink);
}
.lang-en .brand { font-weight: 600; font-size: 1.3rem; font-style: italic; }
.main-nav { display: flex; gap: 20px; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--ink-soft); font-size: 0.95rem; }
.main-nav a:hover { color: var(--coral); }
.langs { display: flex; gap: 4px; border: 1px solid var(--gold-soft); border-radius: 999px; padding: 3px; }
.main-nav + .langs { margin-left: 0; }
.brand + .langs { margin-left: auto; }
.langs a {
  text-decoration: none; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px;
  color: var(--ink-soft); white-space: nowrap;
}
.langs a[aria-current="true"] { background: var(--sage-deep); color: var(--ivory); }
.langs a:hover:not([aria-current]) { color: var(--coral); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--gold); color: var(--ink);
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--paper); transform: translateY(-1px); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.primary:hover { background: #a23a26; }
.btn.ghost { visibility: hidden; }

/* Hero */
.hero { padding: 56px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 24px max(16px, calc(50% - 584px));
  border: 1px solid var(--gold-soft); border-radius: 28px; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; position: relative; padding: 32px; }
.eyebrow {
  margin: 0 0 12px; color: var(--sage-deep); font-size: 0.85rem; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 500;
}
.hero h1 {
  font-family: var(--display); font-weight: 700; margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.2; letter-spacing: 0.02em;
}
.lang-en .hero h1 { font-weight: 600; font-style: italic; letter-spacing: 0; }
.tagline {
  font-family: var(--display); color: var(--coral); font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  margin: 18px 0 10px; line-height: 1.5;
}
.lang-en .tagline { font-style: italic; }
.intro { color: var(--ink-soft); max-width: 34em; margin: 0; }
.soon-note {
  margin-top: 20px; padding: 14px 18px; background: var(--paper);
  border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; color: var(--ink);
}
.hero-art { position: relative; aspect-ratio: 1 / 0.9; }
.hero-art img {
  position: absolute; width: 62%; border-radius: 200px 200px 18px 18px;
  border: 6px solid var(--ivory); box-shadow: 0 0 0 1.5px var(--gold);
  object-fit: cover; aspect-ratio: 3 / 4;
}
.art-fancy { left: 0; top: 0; }
.art-sassy { right: 0; bottom: 0; transform: rotate(2deg); }

/* Sections */
.section { padding: 56px 0; }
.section-title {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem);
  text-align: center; margin: 0 0 40px;
}
.lang-en .section-title { font-weight: 600; font-style: italic; }
.section-title::after, .ornament {
  content: ""; display: block; width: 140px; height: 18px; margin: 14px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 18'%3E%3Cpath d='M2 9h50M88 9h50' stroke='%23B48A3E' stroke-width='1'/%3E%3Cpath d='M70 2c4 4 4 10 0 14c-4-4-4-10 0-14z' fill='%23B9452F'/%3E%3Ccircle cx='58' cy='9' r='2' fill='%23B48A3E'/%3E%3Ccircle cx='82' cy='9' r='2' fill='%23B48A3E'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Cast */
.cast { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cast-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 22px; align-items: center;
  background: var(--paper); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 22px;
}
.cast-card img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; border: 3px solid var(--ivory); box-shadow: 0 0 0 1.5px var(--gold); }
.cast-card h3 { font-family: var(--display); margin: 0 0 6px; font-size: 1.5rem; line-height: 1.3; }
.lang-en .cast-card h3 { font-style: italic; font-weight: 600; }
.cast-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.cast-card .role { color: var(--sage-deep); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }

/* Episodes */
.ep-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.ep-card {
  display: flex; flex-direction: column; text-decoration: none; height: 100%;
  background: #fff; border: 1px solid var(--gold-soft); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.ep-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(58, 42, 33, 0.12); }
.ep-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-no { padding: 14px 18px 0; color: var(--sage-deep); font-size: 0.8rem; letter-spacing: 0.08em; }
.ep-title { padding: 0 18px 16px; font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.lang-en .ep-title { font-weight: 600; font-style: italic; font-size: 1.35rem; }

/* Reader */
.reader { width: min(860px, 100% - 32px); margin: 0 auto; padding: 40px 0 56px; }
.reader-head { text-align: center; margin-bottom: 28px; }
.reader-head h1 { font-family: var(--display); margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.3; }
.reader-head h1 span { display: block; color: var(--coral); }
.lang-zh .reader-head h1 span::before { content: "〈"; }
.lang-zh .reader-head h1 span::after { content: "〉"; }
.lang-en .reader-head h1 { font-weight: 600; font-style: italic; }
.panels { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.panels img { width: 100%; border-radius: 10px; }
.panels img[height] { width: auto; max-width: 100%; max-height: 92vh; }
.end-note { text-align: center; color: var(--ink-soft); margin: 32px 0 0; }
.reader-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 32px; }
.reader-nav > :first-child { justify-self: start; }
.reader-nav > :last-child { justify-self: end; }

/* Landing */
.landing { padding: 56px 0 40px; text-align: center; }
.landing-art { display: flex; justify-content: center; gap: 18px; margin-bottom: 28px; }
.landing-art img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--ivory); box-shadow: 0 0 0 1.5px var(--gold); }
.landing h1 { font-family: "Noto Serif TC", serif; font-size: clamp(2rem, 5vw, 3rem); margin: 0; line-height: 1.3; }
.landing .en-title { display: block; font-family: var(--display-en); font-style: italic; font-weight: 600; color: var(--sage-deep); font-size: 0.75em; margin-top: 6px; }
.landing .tagline { font-size: 1.05rem; }
.lang-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 36px auto 0; max-width: 900px; }
.lang-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 18px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--gold-soft); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.lang-card:hover { border-color: var(--coral); transform: translateY(-2px); }
.lc-label { font-weight: 500; color: var(--coral); }
.lc-series { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; }

/* Footer */
.site-footer { text-align: center; padding: 36px 16px 48px; color: var(--ink-soft); font-size: 0.85rem; border-top: 1px solid var(--gold-soft); }
.site-footer .ornament { margin: 0 auto 10px; }
.site-footer p { margin: 0; }

/* Mobile */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; padding: 24px 8px; gap: 32px; }
  .hero-art { max-width: 420px; width: 100%; margin: 0 auto; }
  .cast { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .header-row { gap: 10px 16px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; gap: 18px; }
  .brand + .langs, .main-nav + .langs { margin-left: auto; }
  .langs a { padding: 2px 7px; }
  .hero { padding: 24px 0 40px; }
  .hero::before { inset: 8px; border-radius: 20px; }
  .cast-card { grid-template-columns: 96px 1fr; padding: 16px; gap: 16px; }
  .cast-card img { width: 96px; height: 96px; }
  .reader-nav { grid-template-columns: 1fr 1fr; }
  .reader-nav > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .btn { padding: 0 16px; }
  .landing-art img { width: 110px; height: 110px; }
}

.no-italic { font-style: normal; font-family: "Noto Serif TC", serif; }
.lang-ja .hero h1, .lang-ko .hero h1 { word-break: keep-all; font-size: clamp(1.9rem, 4.4vw, 3.1rem); }

.hero-cover { justify-self: center; max-width: 440px; width: 100%; }
.hero-cover img { width: 100%; border-radius: 12px; box-shadow: 0 18px 40px rgba(58,42,33,.18); }
.landing-cover { max-width: 380px; margin: 0 auto 8px; }
.landing-cover img { width: 100%; border-radius: 12px; box-shadow: 0 18px 40px rgba(58,42,33,.18); }
.landing .lang-cards { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) { .hero-cover { max-width: 360px; } }

#start { scroll-margin-top: 80px; }

/* 發布排程 */
.sched-on [data-release]:not(.released) { display: none; }
.sched-on main.reader:not(.released) .panels,
.sched-on main.reader:not(.released) .reader-nav { display: none; }
.reader.not-yet .reader-nav { display: grid !important; }
#not-yet { text-align: center; margin: 24px auto; max-width: 32em; }
.ghost-note { border-style: dashed; color: var(--ink-soft); cursor: default; font-size: .9rem; }
.ep-date { padding: 0 18px 14px; margin-top: -8px; font-size: .8rem; color: var(--coral); }

.site-footer .rights { margin-top: 4px; font-size: .78rem; opacity: .85; }
