:root {
  --bg-top: #fff5e8;
  --bg-bottom: #fbfaf7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #fffdf9;
  --text: #271d19;
  --muted: #776257;
  --accent: #d56538;
  --accent-2: #ffcd73;
  --line: rgba(121, 88, 69, 0.14);
  --shadow: 0 24px 60px rgba(117, 76, 52, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 211, 140, 0.35), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 241, 212, 0.8), transparent 34%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 55%, #f6f2ec 100%);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.comic-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: grid;
  gap: 22px;
}

.comic-hero,
.stage-card,
.info-card,
.raw-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.comic-hero {
  border-radius: 28px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  overflow: hidden;
}

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

.comic-hero h1,
.stage-card h2,
.info-card h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.comic-hero h1 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 46ch;
}

.hero-meta,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.chip {
  border: 1px solid rgba(121, 88, 69, 0.14);
  background: rgba(255, 249, 242, 0.95);
  color: #73584b;
}

.badge {
  background: rgba(213, 101, 56, 0.12);
  color: #a5512d;
  border: 1px solid rgba(213, 101, 56, 0.12);
}

.hero-accent {
  display: grid;
  align-items: stretch;
}

.accent-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(255, 214, 150, 0.9), rgba(255, 166, 122, 0.95)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.08), transparent);
}

.accent-panel::before,
.accent-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.accent-panel::before {
  width: 160px;
  height: 160px;
  right: -32px;
  top: -24px;
}

.accent-panel::after {
  width: 120px;
  height: 120px;
  left: 18px;
  bottom: -24px;
}

.accent-label {
  position: absolute;
  left: 22px;
  bottom: 20px;
  color: #7c3f27;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 24px;
  letter-spacing: 0.04em;
}

.comic-stage,
.source-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
}

.stage-card,
.info-card,
.raw-shell {
  border-radius: 24px;
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.stage-main .main-image-shell,
.mosaic-shell {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(121, 88, 69, 0.12);
  background: #fffaf4;
  min-height: 320px;
}

.main-image-shell img,
.mosaic-shell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: linear-gradient(180deg, #fff8f0, #fffdf8);
}

.empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: #998171;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.source-card {
  border: 1px solid rgba(121, 88, 69, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 251, 246, 0.96);
}

.source-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.source-card-meta {
  padding: 10px 12px 12px;
  display: grid;
  gap: 6px;
}

.source-card-meta strong {
  font-size: 14px;
}

.source-card-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.body-text {
  margin: 0;
  line-height: 1.85;
  white-space: pre-wrap;
}

.muted {
  color: var(--muted);
}

.raw-details {
  border: 1px solid rgba(121, 88, 69, 0.12);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.88);
  overflow: hidden;
}

.raw-details summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  color: #6f5649;
}

.code {
  margin: 0;
  padding: 18px;
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid rgba(121, 88, 69, 0.08);
  background: rgba(250, 246, 240, 0.92);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  line-height: 1.65;
  color: #45362f;
}

@media (max-width: 920px) {
  .comic-page {
    width: min(100% - 20px, 1180px);
    padding: 18px 0 32px;
  }

  .comic-hero,
  .comic-stage,
  .source-layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
  }
}
