:root {
  --night: #070b12;
  --panel-line: #243149;
  --text: #e6e9ef;
  --text-dim: #9aa4b5;
  --text-faint: #5f6a7c;
  --gold: #f2a91f;
  --gold-2: #ffc862;
  --gold-ink: #b0862f;
  --paper: #f8f5ec;
  --paper-2: #efe8d8;
  --paper-line: #ddd4c1;
  --ink: #232a36;
  --ink-dim: #6b6456;
  --navy: #14263b;
  --serif: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --book-h: clamp(520px, calc(100svh - 210px), 760px);
  --pad-t: 56px;
  --pad-b: 48px;
  --pad-x: 42px;
  --gap: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(47, 127, 134, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(242, 169, 31, 0.05), transparent 60%),
    var(--night);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button, a { font-family: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.site-top { position: sticky; top: 0; z-index: 40; }
.site-header {
  position: relative;
  z-index: 1;
  background: rgba(7, 11, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #141d2c;
}
.site-header__inner {
  width: min(1080px, 100% - 24px);
  margin: 0 auto;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  line-height: 1.25;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #ffc862, #f09a12);
  color: #1b1204;
  font: 800 13px var(--sans);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(242, 169, 31, 0.28);
}
.brand strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}
.site-header__nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: none;
  border: 1px solid transparent;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.is-active {
  color: #fff;
  background: #1a2334;
  border-color: #33415a;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn svg circle { fill: currentColor; stroke: none; }
.icon-btn:hover { color: var(--text); background: #151e2d; }
.icon-btn.is-on { color: var(--gold); }
.icon-btn.is-on svg path { fill: currentColor; }
.toast {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  font-size: 12px;
  color: #1b1204;
  background: var(--gold-2);
  padding: 4px 10px;
  border-radius: 6px;
}

.speak-dock {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #141d2c;
  background: rgba(7, 18, 24, 0.94);
  backdrop-filter: blur(10px);
}
.speak-card {
  width: min(1080px, 100% - 24px);
  margin: 0 auto;
  min-height: 52px;
  display: flex;
  align-items: center;
}
.speak-card__panel {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.speak-card__note {
  flex: 0 1 220px;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gold-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.speak-gauge {
  position: relative;
  flex: 1 1 80px;
  height: 24px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.speak-gauge::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.speak-gauge span {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #a07a3a, #eac083);
}
.speak-gauge__thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border: 2px solid #1a140c;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 1px rgba(234, 192, 131, 0.6);
}
.speak-card__percent {
  flex: none;
  margin: 0;
  min-width: 36px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.speak-rate {
  flex: none;
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--gold-2);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.speak-card__row { display: flex; flex: none; gap: 6px; }
.speak-card__row button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: #041719;
  background: var(--gold-2);
  cursor: pointer;
}
.speak-card__row button svg { fill: currentColor; }
.speak-card__row button:disabled { opacity: 0.35; cursor: default; }
#voice { position: absolute; width: 0; height: 0; opacity: 0; }

.site-main {
  width: min(1080px, 100% - 24px);
  margin: 0 auto;
  padding: 22px 0 28px;
}
.bk-stage { display: flex; justify-content: center; padding-top: 10px; }
.bk-book {
  position: relative;
  display: flex;
  width: min(560px, 100%);
  height: var(--book-h);
}
.bk-page { position: relative; flex: 1 1 0; min-width: 0; height: 100%; }
.bk-left { transform-origin: right center; }
.bk-right { transform-origin: left center; }
.bk-paper {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.78;
  border-radius: 6px;
  box-shadow:
    0 1px 0 #e7e0cf,
    0 2px 0 #cfc6b1,
    0 3px 0 #e7e0cf,
    0 4px 0 #c9bfa8,
    0 5px 0 #e2dac7,
    0 26px 50px rgba(0, 0, 0, 0.55);
}
.bk-paper::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(120, 100, 60, 0.14);
  border-radius: 3px;
  pointer-events: none;
}
.bk-left.bk-paper {
  border-radius: 6px 0 0 6px;
  background-image: linear-gradient(to left, rgba(60, 45, 20, 0.16), rgba(60, 45, 20, 0) 9%);
}
.bk-right.bk-paper {
  border-radius: 0 6px 6px 0;
  background-image: linear-gradient(to right, rgba(60, 45, 20, 0.16), rgba(60, 45, 20, 0) 9%);
}
.bk-solo.bk-paper {
  background-image: linear-gradient(to right, rgba(60, 45, 20, 0.12), rgba(60, 45, 20, 0) 5%);
}
.bk-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 30px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.14) 42%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.14) 58%, transparent);
  pointer-events: none;
  z-index: 3;
}
.bk-ribbon {
  position: absolute;
  top: -8px;
  right: 26px;
  width: 20px;
  height: 62px;
  background: linear-gradient(#e0433a, #a8231b);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
  z-index: 6;
  pointer-events: none;
}
.bk-running {
  position: absolute;
  top: 22px;
  left: var(--pad-x);
  right: var(--pad-x);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--paper-line);
  font: 500 11px/1.4 var(--sans);
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-running__r,
.bk-right .bk-running__l,
.bk-solo .bk-running__l { display: none; }
.bk-right .bk-running__r,
.bk-solo .bk-running__r { display: inline; }
.bk-right .bk-running,
.bk-solo .bk-running { text-align: right; padding-right: 34px; }
.bk-folio {
  position: absolute;
  bottom: 20px;
  left: var(--pad-x);
  right: var(--pad-x);
  font: 700 11px var(--sans);
  color: var(--gold-ink);
}
.bk-right .bk-folio,
.bk-solo .bk-folio { text-align: right; }
.bk-window, .bk-scroll {
  position: absolute;
  top: var(--pad-t);
  bottom: var(--pad-b);
  left: var(--pad-x);
  right: var(--pad-x);
}
.bk-window { overflow: hidden; }
.bk-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.bk-measure {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}
.bk-flow {
  height: 100%;
  column-count: 1;
  column-gap: var(--gap);
  column-fill: auto;
  transform: translateX(calc(var(--p, 0) * -1 * (100% + var(--gap))));
  text-align: justify;
}
.bk-flow h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
}
.bk-kicker {
  margin: 0 0 6px;
  font: 700 12px var(--sans);
  letter-spacing: 0.14em;
  color: var(--gold-ink);
}
.bk-lead {
  margin: 0 0 16px;
  font: 500 12px var(--sans);
  color: var(--ink-dim);
}
.bk-flow p { margin: 0 0 0.85em; }
.line {
  margin-left: 0.2em;
  font-family: var(--serif);
}
.action {
  font-family: var(--sans);
}
.who {
  font: 700 15.5px var(--sans);
  color: var(--navy);
}
.who::after {
  content: " : ";
}
.cap .label {
  margin-right: 0.45em;
  font: 700 11px var(--sans);
  letter-spacing: 0.12em;
  color: var(--gold-ink);
}
.bk-flow .end {
  margin-top: 1.4em;
  font-weight: 700;
  text-align: center;
  color: var(--navy);
}
.bk-flow .afterword {
  margin-top: 1.2em;
  padding-top: 0.8em;
  border-top: 1px solid var(--paper-line);
  color: var(--ink-dim);
  font-size: 14px;
}
.is-reading {
  background: linear-gradient(#f8e7b8, #f8e7b8);
  border-radius: 2px;
}
.bk-sentinel { display: block; height: 1px; }
.bk-toc-title {
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 800;
  color: #141a24;
}
.bk-part {
  margin: 16px 0 4px;
  font: 700 13px var(--sans);
  letter-spacing: 0.08em;
  color: var(--gold-ink);
}
.bk-toc { list-style: none; margin: 0; padding: 0; }
.bk-toc button {
  display: grid;
  grid-template-columns: 30px 1fr 14px;
  align-items: end;
  gap: 6px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--paper-line);
  background: none;
  color: var(--ink);
  text-align: left;
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
}
.bk-toc .no {
  align-self: start;
  padding-top: 2px;
  font: 700 12px var(--sans);
  color: var(--gold-ink);
}
.bk-toc .t { display: flex; align-items: flex-end; }
.bk-toc .t::after {
  content: "";
  flex: 1 1 14px;
  min-width: 14px;
  margin: 0 0 6px 8px;
  border-bottom: 1px dotted #b8ad95;
}
.bk-toc .arr { font-weight: 700; }
.bk-toc button:hover .t span { color: #8a5a12; }

.bk-cover {
  overflow: hidden;
  background: #0b1422;
  color: var(--text);
  border-radius: 3px 12px 12px 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 30px 60px rgba(0, 0, 0, 0.6);
}
.bk-cover::before { display: none; }
.bk-cover::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(255, 255, 255, 0.1) 55%, transparent);
  pointer-events: none;
}
.cv { position: absolute; inset: 0; }
.cv-art {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 280px at 78% 18%, rgba(242, 169, 31, 0.38), transparent 60%),
    radial-gradient(640px 360px at 10% 90%, rgba(47, 127, 134, 0.32), transparent 62%),
    linear-gradient(165deg, #1c2c48 0%, #0b1422 46%, #24180c 100%);
}
.cv-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 22, 0.9) 0%, rgba(8, 13, 22, 0.55) 36%, rgba(8, 13, 22, 0.35) 52%, rgba(8, 13, 22, 0.86) 74%, rgba(8, 13, 22, 0.97) 100%);
}
.cv-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 30px 22px;
}
.cv-edition {
  font: italic 14px Georgia, "Times New Roman", serif;
  color: #c9a45a;
}
.cv-kicker {
  margin: 34px 0 6px;
  font: 500 13px var(--serif);
  letter-spacing: 0.32em;
  color: #c8cfdb;
}
.cv-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0 0 12px;
  font: 900 clamp(40px, 5.4vw, 58px) / 1.12 var(--serif);
  color: #fff;
}
.cv-title-note {
  font: 500 15px / 1.45 var(--serif);
  letter-spacing: 0;
  color: #c8cfdb;
}
.cv-title em {
  font-style: normal;
  background: linear-gradient(180deg, #ffd27a, #f2a01c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cv-site {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-2);
}
.cv-spacer { flex: 1; }
.cv-tags {
  align-self: flex-start;
  margin: 0;
  padding: 6px 10px;
  border: 1px dashed rgba(242, 169, 31, 0.55);
  border-radius: 4px;
  background: rgba(242, 169, 31, 0.07);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 600;
}
.cv-desc {
  margin: 14px 0 20px;
  font: 14.5px/1.72 var(--serif);
  color: #d6dbe4;
}
.cv-open, .cv-resume {
  display: block;
  width: 100%;
  border-radius: 10px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.cv-open {
  padding: 14px;
  border: 0;
  background: linear-gradient(90deg, #f6ab26, #e0850c);
  color: #1a1204;
  box-shadow: 0 10px 30px rgba(242, 150, 20, 0.35);
}
.cv-resume {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(242, 169, 31, 0.5);
  background: transparent;
  color: var(--gold-2);
  font-size: 13.5px;
}
.cv-hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
}

.bk-controls { width: min(560px, 100%); margin: 18px auto 0; }
.bk-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-dim);
}
.bk-status__label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--gold-2);
  font-weight: 700;
}
.bk-status__label::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold);
}
.bk-status__label, .bk-status__detail {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-progress {
  position: relative;
  display: block;
  width: 100%;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.bk-progress::before, .bk-progress span {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  height: 4px;
  border-radius: 999px;
}
.bk-progress::before { right: 0; background: #1b2433; }
.bk-progress span {
  background: linear-gradient(90deg, #f2a91f, #ffc862);
}
.bk-turns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.bk-hint { flex: 1; font-size: 11.5px; color: var(--text-faint); text-align: center; }
.bk-turn {
  max-width: 48%;
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid #2c384c;
  background: #141c29;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.bk-turn:disabled { opacity: 0.4; cursor: default; }
.bk-turn.is-jump {
  border-color: rgba(242, 169, 31, 0.55);
  background: rgba(242, 169, 31, 0.12);
  color: var(--gold-2);
}

@keyframes bk-in-right {
  from { transform: perspective(2200px) rotateY(-22deg); opacity: 0.35; }
}
@keyframes bk-in-left {
  from { transform: perspective(2200px) rotateY(22deg); opacity: 0.35; }
}
@keyframes bk-fade { from { opacity: 0.3; } }
@keyframes bk-slide-next { from { transform: translateX(26px); opacity: 0.2; } }
@keyframes bk-slide-prev { from { transform: translateX(-26px); opacity: 0.2; } }
.bk-turn-next .bk-right { animation: bk-in-right 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bk-turn-next .bk-left, .bk-turn-prev .bk-right { animation: bk-fade 0.8s ease; }
.bk-turn-prev .bk-left { animation: bk-in-left 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bk-turn-next .bk-solo { animation: bk-slide-next 0.6s ease; }
.bk-turn-prev .bk-solo { animation: bk-slide-prev 0.6s ease; }

@media (min-width: 900px) {
  .bk-book, .bk-controls { width: min(1080px, 100%); }
  .bk-measure { width: 50%; }
  .cv-inner { padding: 32px 36px 26px; }
}
@media (max-width: 899px) {
  .bk-page.bk-blank { display: none; }
  .bk-spine { display: none; }
  .bk-book.is-spread { width: min(560px, 100%); }
}
@media (max-width: 640px) {
  .speak-card__panel { flex-wrap: wrap; gap: 8px; }
  .speak-card__note { flex-basis: 100%; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-book * { animation: none !important; }
}
