/* ─── BASE ─── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body { font-family: 'Noto Sans TC', sans-serif; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

#root { height: 100%; }

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.6s ease;
}

.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0 0.2  0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.5;
  z-index: 0;
}

/* ─── MASTHEAD ─── */
.masthead {
  position: absolute;
  top: 24px; left: 32px; right: 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  z-index: 5; opacity: 0.7;
}
.mast-l { display: flex; align-items: center; gap: 12px; }
.mast-mark { width: 28px; height: 2px; }
.mast-r { font-size: 12px; letter-spacing: 0.1em; text-transform: none; }

.hint {
  position: absolute;
  bottom: 18px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.15em; opacity: 0.55;
  z-index: 5;
}

/* ─── BOOK STAGE ─── */
.book-stage {
  position: relative;
  width: min(95vw, 1320px);
  height: min(82vh, 820px);
  perspective: 2400px;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
}

/* ─── StPageFlip 容器 + 翻頁元素 ─── */
.stpf-stage {
  flex-direction: column;
  gap: 18px;
}
.stpf-book {
  width: 100%;
  height: calc(100% - 60px);
  position: relative;
}
.page-wrapper {
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  position: relative;
}
.page-wrapper .paper {
  position: relative;
  width: 100%;
  height: 100%;
  inset: auto;
  border-radius: 0;
  box-shadow: none;
}
/* 軟頁邊緣陰影、模擬裝訂 */
.stf__item:not(.--simple) .page-wrapper .paper {
  box-shadow: inset 0 0 16px -8px rgba(0,0,0,0.18);
}
/* hardcover (封面 / 封底) */
.page-hard .paper {
  box-shadow: 0 6px 16px -4px rgba(40,15,20,0.4);
}

.book-shadow {
  position: absolute;
  bottom: 4%; left: 8%; right: 8%;
  height: 5%;
  background: radial-gradient(ellipse at center, rgba(40,15,20,0.32), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.book {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.book-stage.closed .book { transform: translateX(-25%); }
.book-stage.finished .book { transform: translateX(25%); }

.spine {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 8px;
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: 0 0 12px rgba(0,0,0,0.15) inset;
}

/* ─── PAGES ─── */
.page {
  position: relative;
  width: 50%;
  height: 100%;
  background: transparent;
}
.page-left { transform-origin: right center; }
.page-right { transform-origin: left center; }

.paper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.06),
    0 18px 40px -20px rgba(50,15,25,0.35);
}
.page-left .paper {
  border-radius: 4px 0 0 4px;
  box-shadow:
    inset -8px 0 16px -10px rgba(0,0,0,0.18),
    0 18px 40px -20px rgba(50,15,25,0.35);
}
.page-right .paper {
  border-radius: 0 4px 4px 0;
  box-shadow:
    inset 8px 0 16px -10px rgba(0,0,0,0.18),
    0 18px 40px -20px rgba(50,15,25,0.35);
}

/* paper texture */
.paper::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.7' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.15  0 0 0 0.04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.6;
  z-index: 1;
}

.back-of-cover .lining {
  position: absolute; inset: 0;
  opacity: 0.5;
}

.page-content {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ─── EDITORIAL FOLIO (running head + page no.) ─── */
.folio-top {
  position: absolute;
  top: clamp(10px, 2.5%, 22px);
  display: flex; align-items: center;
  gap: clamp(6px, 1.5%, 14px);
  font-size: clamp(7px, 1.4vw, 9px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  z-index: 3;
  opacity: 0.85;
}
.folio-top.left  { left: clamp(16px, 5%, 32px); right: clamp(16px, 5%, 32px); flex-direction: row; }
.folio-top.right { left: clamp(16px, 5%, 32px); right: clamp(16px, 5%, 32px); flex-direction: row-reverse; }
.folio-top .ft-rule { flex: 1; height: 1px; }
.folio-top .ft-text { display: inline-flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.folio-top .ft-num { font-style: italic; opacity: 0.55; }
.folio-top .ft-cn { letter-spacing: 0.18em; }
.folio-top .ft-sep { opacity: 0.4; }
.folio-top .ft-mag { letter-spacing: 0.32em; }

.folio-bottom {
  position: absolute;
  bottom: clamp(10px, 2.5%, 20px);
  font-size: clamp(8px, 1.5vw, 11px);
  letter-spacing: 0.18em;
  z-index: 3;
  font-style: italic;
}
.folio-bottom.left  { left: clamp(16px, 5%, 32px); }
.folio-bottom.right { right: clamp(16px, 5%, 32px); }
.folio-bottom .fb-num { font-size: clamp(10px, 1.8vw, 13px); }

/* ─── COVER PAGE ─── */
.cover-page {
  display: flex; align-items: center; justify-content: center;
  background: #2a141a;
}
.cover-page.cover-typeonly { background: #fdf6f0; }
.cover-page.cover-typeonly .cover-frame { color: inherit; }
.cover-page.cover-typeonly .cover-eyebrow { filter: none; }
.cover-page.cover-typeonly .cover-lines { color: inherit; }
.cover-page.cover-typeonly .cover-lines .cl-item { border-left-color: currentColor; opacity: 0.85; }
.cover-page.cover-typeonly .cover-mast { color: inherit; }
.cover-page.cover-typeonly .cover-sku .sku-bars i { background: currentColor; }
.cover-photo { position: absolute; inset: 0; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; }
.cover-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(60,20,30,0.45) 0%, rgba(140,40,60,0.35) 60%, rgba(40,15,20,0.7) 100%);
}
.cover-frame {
  position: relative; z-index: 3;
  text-align: center;
  padding: 60px 40px;
  color: #fff8f0;
  width: 88%;
}
.cover-eyebrow {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-bottom: 28px;
  filter: brightness(1.3) saturate(0.8);
  display: inline-flex; align-items: center; gap: 10px;
  font-style: italic;
}
.cover-eyebrow .ce-rule { width: 28px; height: 1px; display: inline-block; opacity: 0.85; }

/* Cover masthead bar across the very top */
.cover-mast {
  position: absolute;
  top: 22px; left: 32px; right: 32px;
  z-index: 4;
  display: flex; align-items: center; gap: 12px;
  color: #fff8f0;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  opacity: 0.92;
}
.cover-mast .cm-rule { flex: 1; height: 1px; background: rgba(255,248,240,0.55); }
.cover-mast .cm-issue { font-style: italic; }
.cover-mast .cm-date  { font-style: italic; }

/* Vertical coverlines down the left edge */
.cover-lines {
  position: absolute;
  top: 24%; bottom: 18%;
  left: 28px;
  z-index: 4;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff8f0;
  text-align: left;
  max-width: 28%;
}
.cover-lines .cl-item {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.3;
  padding-left: 14px;
  border-left: 1px solid rgba(255,248,240,0.5);
  font-style: italic;
  opacity: 0.92;
}
.cover-lines .cl-item em {
  display: block;
  font-style: italic;
  font-size: 28px;
  letter-spacing: 0;
  margin-bottom: 4px;
  font-weight: 400;
}
.cover-lines .cl-zh {
  display: block;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-top: 4px;
  opacity: 0.75;
}

/* Bottom-right SKU block */
.cover-sku {
  position: absolute;
  bottom: 22px; right: 32px;
  z-index: 4;
  color: #fff8f0;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-align: right;
  opacity: 0.85;
}
.cover-sku .sku-bars {
  display: inline-flex; gap: 1px; height: 18px; align-items: stretch;
  margin-bottom: 4px;
}
.cover-sku .sku-bars i {
  display: inline-block;
  width: 1px;
  background: rgba(255,248,240,0.85);
}
.cover-sku .sku-bars i:nth-child(2n) { width: 2px; opacity: 0.7; }
.cover-sku .sku-bars i:nth-child(3n) { width: 1px; opacity: 0.5; }
.cover-sku .sku-bars i:nth-child(4n) { width: 3px; }
.cover-title {
  font-size: 78px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
}
.cover-title em { font-style: italic; font-weight: 400; font-size: 0.55em; letter-spacing: 0.18em; opacity: 0.92; display: inline-block; margin-top: 12px; }
.cover-rule { width: 60px; height: 2px; margin: 32px auto 18px; opacity: 0.85; }

/* Floral corner decoration (carnation PNG, transparent)
   Toned down to match the album's soft pink palette:
   reduced saturation + slight blend so it sits behind the typography. */
.flora-deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 3;
  filter: saturate(0.65) brightness(1.04) contrast(0.92);
  mix-blend-mode: multiply;
}
/* Cover: a single bouquet at top-right, behind the type panel.
   Source image already has the bouquet in the upper-right region,
   so we don't mirror it — just place + scale. */
.flora-tl {
  top: -40px; right: -60px; left: auto;
  width: 46%;
  opacity: 0.55;
  transform: rotate(8deg);
}
/* Cover bottom-left mirror — a smaller, faded echo for balance */
.flora-br {
  bottom: -50px; left: -60px; right: auto;
  width: 34%;
  opacity: 0.32;
  transform: rotate(-160deg);
}
.flora-ded {
  bottom: -30px; right: -40px;
  width: 52%;
  opacity: 0.5;
  transform: rotate(6deg);
}
.flora-chapter {
  bottom: -30px; right: -40px;
  width: 44%;
  opacity: 0.55;
  transform: rotate(8deg);
}
.flora-blank {
  top: 50%; left: 50%;
  width: 30%;
  opacity: 0.18;
  transform: translate(-50%, -50%) rotate(-4deg);
}
.cover-meta {
  font-size: 11px;
  letter-spacing: 0.25em;
  display: flex; justify-content: center; gap: 14px;
  opacity: 0.85;
  text-transform: uppercase;
}
.carnation-corner {
  position: absolute !important;
  bottom: -20px; right: -20px;
  z-index: 2;
  opacity: 0.45;
}
.carnation-corner.sm { top: 20px; right: 20px; bottom: auto; opacity: 0.5; }

/* ─── DEDICATION ─── */
.dedication {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(56px, 14%) 12%;
  text-align: center;
}
.ded-mark { font-size: clamp(16px, 3.4vw, 24px); letter-spacing: 0.4em; margin-bottom: clamp(16px, 3.5vw, 28px); }
.ded-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(8px, 1.6vw, 10px); letter-spacing: 0.36em; text-transform: uppercase;
  margin-bottom: clamp(20px, 4.5vw, 36px); font-style: italic;
}
.ded-eyebrow .ee-rule { width: 26px; height: 1px; display: inline-block; opacity: 0.7; }
.chapter-fleuron { margin-top: 28px; opacity: 0.9; }
.ded-text { font-size: clamp(13px, 2.4vw, 17px); line-height: 1.9; margin: 0 0 clamp(14px, 3vw, 24px) 0; position: relative; }
.ded-fleuron { margin: 8px 0 24px; opacity: 0.85; }
.ded-en { font-size: clamp(10px, 1.8vw, 12px); letter-spacing: 0.06em; opacity: 0.6; line-height: 1.7; font-style: italic; }

/* Drop cap */
.dropcap {
  font-size: clamp(40px, 8vw, 64px);
  line-height: 0.9;
  float: left;
  margin: 4px 10px 0 -4px;
  font-weight: 400;
}

/* ─── TITLE PAGE ─── */
.title-page {
  display: flex; flex-direction: column; justify-content: center;
  padding: max(56px, 14%) 12%;
}
.title-mark { font-size: clamp(9px, 1.7vw, 11px); letter-spacing: 0.4em; margin-bottom: 18px; }
.title-cn { font-size: clamp(48px, 11vw, 88px); margin: 0; line-height: 1; font-weight: 400; letter-spacing: 0.04em; }
.title-en { font-size: clamp(15px, 3vw, 22px); margin: 8px 0 0 0; font-weight: 400; font-style: italic; letter-spacing: 0.08em; }
.title-rule { width: 48px; height: 2px; margin: clamp(18px, 4vw, 30px) 0; }
.title-body { font-size: clamp(11px, 2vw, 14px); line-height: 1.9; margin: 0 0 18px 0; }
.title-body-en { font-size: clamp(9px, 1.7vw, 11px); line-height: 1.7; opacity: 0.55; font-style: italic; margin: 0 0 clamp(20px, 4vw, 32px) 0; }
.title-foot { font-size: clamp(8px, 1.6vw, 10px); letter-spacing: 0.3em; margin-top: auto; padding-top: 24px; }

/* ─── CHAPTER ─── */
.chapter {
  display: flex; flex-direction: column; justify-content: center;
  padding: max(56px, 14%) 12%;
}
.chapter-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(8px, 1.6vw, 10px); letter-spacing: 0.36em; text-transform: uppercase;
  margin-bottom: clamp(16px, 3.5vw, 28px); font-style: italic;
}
.chapter-eyebrow .ch-bar { width: 26px; height: 1px; display: inline-block; opacity: 0.85; }
.chapter-eyebrow .ch-dot { opacity: 0.5; }
.chapter-num { font-size: clamp(70px, 16vw, 132px); line-height: 0.9; font-weight: 300; letter-spacing: -0.02em; opacity: 0.92; font-style: italic; }
.chapter-rule { width: 80px; height: 2px; margin: clamp(12px, 2.5vw, 18px) 0 clamp(16px, 3vw, 24px); }
.chapter-cn { font-size: clamp(32px, 7vw, 56px); margin: 0; font-weight: 400; letter-spacing: 0.08em; }
.chapter-en { font-size: clamp(11px, 2vw, 14px); margin: 10px 0 0 0; font-weight: 400; letter-spacing: 0.32em; text-transform: uppercase; font-style: italic; opacity: 0.85; }
.chapter-foot {
  position: absolute; left: 12%; right: 12%; bottom: 12%;
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(8px, 1.6vw, 10px); letter-spacing: 0.32em; text-transform: uppercase; font-style: italic; opacity: 0.5;
}
.chapter-foot .cf-rule { width: 28px; height: 1px; display: inline-block; }

/* ─── FULL BLEED ─── */
.fullbleed { background: #000; }
.fullbleed > img { width: 100%; height: 100%; object-fit: cover; }
.fb-caption {
  position: absolute;
  bottom: clamp(20px, 4.5%, 36px); left: clamp(18px, 4.5%, 36px); right: clamp(18px, 4.5%, 36px);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  z-index: 2;
}
.fb-cn { font-size: clamp(16px, 3.4vw, 26px); font-style: italic; line-height: 1.3; margin-bottom: 6px; }
.fb-en { font-size: clamp(9px, 1.6vw, 11px); letter-spacing: 0.2em; opacity: 0.8; text-transform: uppercase; }

/* ─── SINGLE ─── */
.single {
  display: flex; flex-direction: column;
  padding: max(56px, 10%) 10% 6%;
}
.single-frame {
  flex: 1;
  overflow: hidden;
  margin-bottom: clamp(12px, 2.5vw, 22px);
  box-shadow: 0 6px 18px -6px rgba(40,10,15,0.3);
}
.single-frame img { width: 100%; height: 100%; object-fit: cover; }
.single-caption { display: flex; flex-direction: column; gap: clamp(6px, 1.5vw, 10px); }
.cap-eyebrow {
  display: flex; align-items: baseline; gap: clamp(8px, 2vw, 14px);
  font-size: clamp(8px, 1.5vw, 10px); letter-spacing: 0.36em; text-transform: uppercase; font-style: italic;
}
.cap-eyebrow .ce-num { font-size: clamp(8px, 1.6vw, 11px); letter-spacing: 0.18em; opacity: 0.7; }
.cap-cn { font-size: clamp(13px, 2.6vw, 18px); line-height: 1.5; font-style: italic; }
.cap-rule { width: 32px; height: 2px; margin-top: 4px; }
.cap-foot { font-size: clamp(8px, 1.5vw, 10px); letter-spacing: 0.28em; text-transform: uppercase; font-style: italic; }

/* ─── DUO ─── */
.duo {
  display: flex; flex-direction: column;
  padding: max(56px, 10%) 8% 6%;
}
.duo-head { margin-bottom: clamp(10px, 2.5vw, 18px); }
.duo-cn { font-size: clamp(18px, 3.8vw, 28px); line-height: 1.25; }
.duo-en { font-size: clamp(9px, 1.5vw, 11px); letter-spacing: 0.2em; margin-top: 4px; text-transform: uppercase; font-style: italic; }
.duo-grid { flex: 1; display: grid; grid-template-rows: 1fr 1fr; gap: clamp(8px, 1.5vw, 12px); }
.duo-cell { position: relative; overflow: hidden; box-shadow: 0 4px 12px -4px rgba(40,10,15,0.25); }
.duo-cell img { width: 100%; height: 100%; object-fit: cover; }
.duo-tag { position: absolute; bottom: 8px; right: 10px; font-size: clamp(7px, 1.3vw, 9px); letter-spacing: 0.2em; color: #fff; background: rgba(0,0,0,0.3); padding: 2px 6px; }

/* ─── TRIPLE ─── */
.triple {
  display: flex; flex-direction: column;
  padding: max(56px, 10%) 8% 6%;
}
.triple-head { font-size: clamp(16px, 3.6vw, 26px); margin-bottom: clamp(10px, 2vw, 18px); line-height: 1.25; }
.triple-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
.tri-cell { overflow: hidden; box-shadow: 0 4px 12px -4px rgba(40,10,15,0.25); }
.tri-cell img { width: 100%; height: 100%; object-fit: cover; }
.tri-0 { grid-row: span 2; }
.tri-1 { }
.tri-2 { }

/* ─── MOSAIC (right page typically) ─── */
.mosaic { padding: 0; }
.mos-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 2fr 1fr 1fr;
  gap: clamp(6px, 1.2vw, 8px);
  padding: max(50px, 6%) clamp(16px, 4%, 24px) clamp(16px, 4%, 24px);
}
.mos-big { grid-column: 1; grid-row: 1 / 3; overflow: hidden; }
.mos-small { grid-column: 2; grid-row: 1; overflow: hidden; }
.mos-tall { grid-column: 2; grid-row: 2 / 4; overflow: hidden; }
.mos-text { grid-column: 1; grid-row: 3; padding: clamp(10px, 2vw, 14px) 4px; display: flex; flex-direction: column; justify-content: center; gap: clamp(6px, 1.2vw, 8px); }
.mos-grid img { width: 100%; height: 100%; object-fit: cover; }
.mos-h { font-size: clamp(20px, 4.2vw, 32px); line-height: 1.1; }
.mos-line { width: 30px; height: 2px; }
.mos-en { font-size: clamp(9px, 1.6vw, 11px); letter-spacing: 0.25em; text-transform: uppercase; font-style: italic; }

/* ─── HERO ─── */
.hero { display: flex; flex-direction: column; padding-top: max(48px, 7%); }
.hero-photo { flex: 1; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-text {
  padding: clamp(14px, 3vw, 22px) clamp(20px, 5%, 32px);
  display: flex; flex-direction: column; gap: 6px;
}
.hero-cn { font-size: clamp(20px, 4.2vw, 30px); line-height: 1.25; font-style: italic; }
.hero-en { font-size: clamp(9px, 1.6vw, 11px); letter-spacing: 0.25em; text-transform: uppercase; font-style: italic; }

/* ─── QUOTE ─── */
.quote-page {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 14% 12%;
  text-align: center;
}
.quote-page { text-align: left; align-items: flex-start; padding: max(56px, 14%) 12%; }
.quote-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(8px, 1.6vw, 10px); letter-spacing: 0.36em; text-transform: uppercase;
  font-style: italic; margin-bottom: clamp(12px, 2.5vw, 18px);
}
.quote-eyebrow .qe-rule { width: 26px; height: 1px; display: inline-block; opacity: 0.85; }
.quote-mark { font-size: clamp(100px, 22vw, 180px); line-height: 0.7; margin: 0 0 clamp(-20px, -4vw, -30px) -8px; opacity: 0.55; font-style: italic; }
.quote-cn { font-size: clamp(18px, 3.8vw, 30px); line-height: 1.55; margin: 0 0 clamp(16px, 3.5vw, 28px) 0; font-style: italic; max-width: 95%; }
.quote-en { font-size: clamp(11px, 2vw, 13px); letter-spacing: 0.06em; font-style: italic; opacity: 0.8; max-width: 90%; line-height: 1.7; }
.quote-rule { width: 36px; height: 2px; margin: clamp(16px, 3.5vw, 28px) 0 12px; }
.quote-attr { font-size: clamp(8px, 1.6vw, 10px); letter-spacing: 0.3em; text-transform: uppercase; }

/* ─── COLOPHON ─── */
.colophon {
  display: flex; flex-direction: column; justify-content: center;
  padding: max(56px, 14%) 14%;
}
.col-mark { font-size: clamp(11px, 2vw, 14px); letter-spacing: 0.4em; margin-bottom: clamp(16px, 3vw, 24px); }
.col-h { font-size: clamp(20px, 4.5vw, 32px); margin: 0 0 12px 0; font-weight: 400; }
.col-rule { width: 40px; height: 2px; margin-bottom: clamp(18px, 3.5vw, 28px); }
.col-list { display: grid; grid-template-columns: auto 1fr; gap: clamp(8px, 1.5vw, 10px) clamp(16px, 3.5vw, 28px); margin: 0 0 clamp(20px, 4vw, 32px) 0; font-size: clamp(11px, 2vw, 13px); }
.col-list dt { opacity: 0.55; font-size: clamp(9px, 1.7vw, 11px); letter-spacing: 0.2em; text-transform: uppercase; align-self: center; }
.col-list dd { margin: 0; font-size: clamp(11px, 2vw, 14px); line-height: 1.5; }
.col-thanks { font-size: clamp(9px, 1.8vw, 11px); line-height: 1.7; font-style: italic; opacity: 0.6; margin: 0; }

/* ─── BACK COVER ─── */
.back-cover {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #2a141a 0%, #4a1f2a 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
}
.back-mark { font-size: 22px; letter-spacing: 0.18em; opacity: 0.78; white-space: nowrap; }
.back-rule { width: 40px; height: 1px; background: rgba(255,255,255,0.4); margin: 16px 0; }
.back-en { font-size: 12px; letter-spacing: 0.22em; opacity: 0.6; white-space: nowrap; }

/* ─── HOTZONES & CONTROLS ─── */
.hotzone {
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  z-index: 4;
  cursor: pointer;
  background: transparent;
}
.hot-prev { left: 0; }
.hot-next { right: 0; }
.hotzone:disabled { cursor: default; }
.hotzone:not(:disabled):hover {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05));
}
.hot-prev:not(:disabled):hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
}

.controls {
  position: absolute;
  bottom: -50px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  z-index: 6;
}
.ctrl {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}
.ctrl:hover:not(:disabled) { background: rgba(255,255,255,0.9); }
.ctrl:disabled { opacity: 0.3; cursor: default; }
.ctrl-meta { font-size: 11px; letter-spacing: 0.2em; min-width: 100px; text-align: center; opacity: 0.7; }

/* ─── FLIPPER ANIMATION ─── */
.flipper {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  perspective: 2400px;
  z-index: 5;
}
.flipper.next {
  left: 50%;
  transform-origin: left center;
}
.flipper.prev {
  left: 0;
  transform-origin: right center;
}
.flipper-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: flip-out 0.9s ease-in-out forwards;
}
.flipper.next .flipper-inner { transform-origin: left center; animation-name: flip-next; }
.flipper.prev .flipper-inner { transform-origin: right center; animation-name: flip-prev; }

@keyframes flip-next {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(-180deg); }
}
@keyframes flip-prev {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(180deg); }
}

.flipper-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
}
.flipper-face.front {
  /* shows during first half of flip */
}
.flipper.next .flipper-face.front .paper {
  border-radius: 0 4px 4px 0;
  box-shadow: inset 8px 0 16px -10px rgba(0,0,0,0.18), 0 18px 40px -20px rgba(50,15,25,0.45);
}
.flipper.next .flipper-face.back {
  transform: rotateY(180deg);
}
.flipper.next .flipper-face.back .paper {
  border-radius: 4px 0 0 4px;
  box-shadow: inset -8px 0 16px -10px rgba(0,0,0,0.18), 0 18px 40px -20px rgba(50,15,25,0.45);
}
.flipper.prev .flipper-face.front .paper {
  border-radius: 4px 0 0 4px;
  box-shadow: inset -8px 0 16px -10px rgba(0,0,0,0.18), 0 18px 40px -20px rgba(50,15,25,0.45);
}
.flipper.prev .flipper-face.back {
  transform: rotateY(-180deg);
}
.flipper.prev .flipper-face.back .paper {
  border-radius: 0 4px 4px 0;
  box-shadow: inset 8px 0 16px -10px rgba(0,0,0,0.18), 0 18px 40px -20px rgba(50,15,25,0.45);
}

/* highlight crease shadow on flipping page */
.flipper::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.18), transparent 20%, transparent 80%, rgba(0,0,0,0.18));
  pointer-events: none;
  opacity: 0.5;
}

/* ─── COVER PICKER (TWEAKS) ─── */
.cover-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cover-thumb {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid transparent;
  padding: 0;
  transition: border-color 0.2s;
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-thumb span {
  position: absolute;
  bottom: 2px; right: 4px;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 1px 4px;
  border-radius: 2px;
}
.cover-thumb.selected { border-color: currentColor; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .book-stage { width: 95vw; height: 70vh; }
  .cover-title { font-size: 52px; }
  .title-cn { font-size: 56px; }
  .chapter-num { font-size: 64px; }
  .chapter-cn { font-size: 36px; }
  .masthead { font-size: 9px; }
}
