:root {
  --canvas: #f4f0e7;
  --canvas-deep: #e8e1d3;
  --paper: #fffdf8;
  --paper-soft: #faf6ee;
  --ink: #17322f;
  --muted: #66736f;
  --line: #d8d2c5;
  --forest: #173f3a;
  --forest-2: #235a53;
  --mint: #c9e2d5;
  --mint-soft: #e9f3ed;
  --persimmon: #dd6848;
  --persimmon-soft: #f8e0d6;
  --gold: #d5a742;
  --danger: #a44236;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(35, 46, 42, 0.07);
  --shadow-md: 0 18px 50px rgba(35, 46, 42, 0.12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --content: 1180px;
  --font:
    "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(221, 104, 72, 0.08), transparent 28rem),
    var(--canvas);
  font-family: var(--font);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(221, 104, 72, 0.55);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 10px;
  color: var(--white);
  background: var(--forest);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(23, 63, 58, 0.11);
  background: rgba(244, 240, 231, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--content));
  min-height: 76px;
  margin: auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.brand small {
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 10px 10px 14px 10px;
  background: var(--forest);
}

.brand-mark span {
  display: block;
  width: 6px;
  border-radius: 3px 3px 1px 1px;
  background: var(--paper);
}

.brand-mark span:nth-child(1) {
  height: 14px;
}

.brand-mark span:nth-child(2) {
  height: 21px;
  background: var(--persimmon);
}

.brand-mark span:nth-child(3) {
  height: 17px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav button,
.mobile-nav button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.desktop-nav button {
  padding: 10px 14px;
  border-radius: 999px;
  color: #3d4f4b;
  font-size: 14px;
  font-weight: 700;
}

.desktop-nav button:hover,
.desktop-nav button[aria-current="page"] {
  color: var(--forest);
  background: var(--mint-soft);
}

#shelf-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 99px;
  color: var(--white);
  background: var(--persimmon);
  font-size: 11px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(213, 167, 66, 0.14);
}

.connection-pill.live .status-dot {
  background: #2a8f5b;
  box-shadow: 0 0 0 4px rgba(42, 143, 91, 0.14);
}

.connection-pill.demo .status-dot {
  background: var(--persimmon);
  box-shadow: 0 0 0 4px rgba(221, 104, 72, 0.14);
}

#main-content {
  min-height: calc(100vh - 76px);
}

.page {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 48px 0 100px;
  animation: page-in 420ms ease both;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: center;
  min-height: 570px;
  gap: 68px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--persimmon);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
}

.hero h1,
.page-heading h1,
.book-title {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 850;
}

.hero h1 em {
  color: var(--persimmon);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 28px;
  color: #53625f;
  font-size: clamp(16px, 2vw, 20px);
  word-break: keep-all;
}

.search-form {
  display: flex;
  align-items: center;
  max-width: 720px;
  padding: 8px;
  border: 1px solid rgba(23, 63, 58, 0.12);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.search-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.search-form input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.search-form button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.search-form button:hover,
.button:hover {
  transform: translateY(-2px);
  background: var(--forest-2);
  box-shadow: 0 10px 22px rgba(23, 63, 58, 0.18);
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--forest);
  background: var(--paper);
  box-shadow: none;
}

.button.ghost {
  color: var(--forest);
  background: var(--mint-soft);
  box-shadow: none;
}

.button.small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.suggestions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(23, 63, 58, 0.13);
  border-radius: 999px;
  color: #425450;
  background: rgba(255, 253, 248, 0.5);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 460px;
}

.visual-halo {
  position: absolute;
  inset: 15% 2% 8% 0;
  border-radius: 50%;
  background: var(--mint);
  filter: blur(1px);
}

.book-stack {
  position: absolute;
  inset: 28px 0 0 18px;
}

.display-book {
  position: absolute;
  width: 210px;
  height: 294px;
  padding: 24px;
  border-radius: 7px 16px 16px 7px;
  box-shadow: 0 26px 50px rgba(23, 50, 47, 0.22);
  transform-origin: bottom center;
}

.display-book::before {
  position: absolute;
  inset: 0 auto 0 9px;
  width: 2px;
  background: rgba(255, 255, 255, 0.32);
  content: "";
}

.display-book small {
  display: block;
  margin-bottom: 40px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.display-book strong {
  display: block;
  max-width: 140px;
  font-family: Georgia, serif;
  font-size: 33px;
  line-height: 1.05;
}

.display-book.one {
  left: 28px;
  top: 92px;
  color: var(--paper);
  background: var(--forest);
  transform: rotate(-10deg);
}

.display-book.two {
  left: 158px;
  top: 22px;
  color: #5f2a22;
  background: #e7a28f;
  transform: rotate(7deg);
}

.display-book.three {
  left: 200px;
  top: 142px;
  color: #3e361f;
  background: #dfc878;
  transform: rotate(16deg);
}

.wait-card-mini {
  position: absolute;
  right: -8px;
  bottom: 12px;
  z-index: 3;
  width: 250px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.wait-card-mini span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.wait-card-mini strong {
  display: block;
  margin: 5px 0;
  font-size: 19px;
}

.wait-card-mini small {
  color: var(--persimmon);
  font-weight: 800;
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 32px 0 80px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.55);
}

.value-item {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.value-item:last-child {
  border: 0;
}

.value-item strong,
.value-item span {
  display: block;
}

.value-item strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.value-item span {
  color: var(--muted);
  font-size: 13px;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin: 0 0 24px;
}

.section-heading h2,
.panel-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.045em;
}

.section-heading p,
.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.feature-card:nth-child(2) {
  background: var(--mint-soft);
}

.feature-card:nth-child(3) {
  background: var(--persimmon-soft);
}

.feature-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 42px;
  border-radius: 13px;
  color: var(--white);
  background: var(--forest);
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.feature-card p {
  margin: 0;
  color: #586864;
  font-size: 14px;
  word-break: keep-all;
}

.setup-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  color: var(--paper);
  background: var(--forest);
}

.setup-note strong,
.setup-note span {
  display: block;
}

.setup-note span {
  margin-top: 3px;
  color: #c9d9d5;
  font-size: 13px;
}

.setup-note code {
  padding: 8px 12px;
  border-radius: 9px;
  color: #183d38;
  background: var(--mint);
  font-size: 12px;
}

.page-heading {
  margin-bottom: 34px;
}

.page-heading h1 {
  font-size: clamp(38px, 5vw, 58px);
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.book-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  min-height: 196px;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.book-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  min-height: 160px;
  overflow: hidden;
  border-radius: 5px 11px 11px 5px;
  color: var(--paper);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.2), transparent 45%),
    var(--forest);
  box-shadow: 0 12px 24px rgba(23, 50, 47, 0.16);
}

.book-cover::after {
  position: absolute;
  inset: 0 auto 0 7px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  content: "";
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-letter {
  max-width: 80px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.book-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.book-card h3 {
  display: -webkit-box;
  margin: 3px 0 7px;
  overflow: hidden;
  font-size: 18px;
  letter-spacing: -0.035em;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.tag,
.confidence {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
}

.tag.warm {
  color: #843c2b;
  background: var(--persimmon-soft);
}

.book-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.empty-state,
.error-state,
.loading-state {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 40px;
  border: 1px dashed #c9c1b2;
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 12px 0 4px;
}

.empty-state p,
.error-state p,
.loading-state p {
  color: var(--muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background: var(--mint-soft);
  font-size: 30px;
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid var(--mint);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.book-detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
}

.book-poster {
  position: sticky;
  top: 108px;
  align-self: start;
}

.book-poster .book-cover {
  width: 100%;
  min-height: 430px;
  border-radius: 9px 20px 20px 9px;
}

.book-poster .cover-letter {
  max-width: 210px;
  font-size: 54px;
}

.poster-note {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
  font-size: 12px;
}

.detail-main {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.book-title {
  max-width: 720px;
  font-size: clamp(38px, 5vw, 62px);
}

.detail-byline {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.detail-description {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #4c5c58;
  line-height: 1.75;
}

.panel {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.wait-panel {
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 226, 213, 0.2), transparent 35%),
    var(--forest);
  border-color: var(--forest);
}

.wait-panel .panel-title,
.wait-panel .form-label {
  color: var(--paper);
}

.wait-panel .panel-copy {
  color: #c7d8d4;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.panel-title {
  font-size: 24px;
}

.panel-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-label {
  color: #43534f;
  font-size: 12px;
  font-weight: 800;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
}

.calculator-submit {
  grid-column: 1 / -1;
  margin-top: 6px;
  background: var(--persimmon);
}

.calculator-submit:hover {
  background: #c65538;
}

.policy-advice {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
}

.policy-advice strong {
  font-size: 13px;
}

.policy-advice span {
  color: #c7d8d4;
  font-size: 11px;
  line-height: 1.55;
}

.wait-result {
  display: none;
  margin-top: 20px;
  padding: 22px;
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
}

.wait-result.visible {
  display: block;
  animation: page-in 300ms ease both;
}

.wait-result-label {
  color: var(--persimmon);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.wait-result h3 {
  margin: 5px 0 8px;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.confidence {
  margin-left: 8px;
  vertical-align: middle;
}

.confidence.low {
  color: #843c2b;
  background: var(--persimmon-soft);
}

.basis-list {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}

.basis-list li::before {
  margin-right: 8px;
  color: var(--forest);
  content: "✓";
  font-weight: 900;
}

.region-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.region-row select {
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.library-list {
  display: grid;
  gap: 10px;
}

.library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.library-item strong,
.library-item span {
  display: block;
}

.library-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.availability {
  min-width: 88px;
  text-align: right;
}

.availability strong {
  color: var(--forest);
  font-size: 12px;
}

.availability .available {
  color: #167345;
}

.availability .unavailable {
  color: var(--danger);
}

.recommendation-row {
  display: grid;
  grid-auto-columns: minmax(230px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 3px 2px 14px;
  scroll-snap-type: x mandatory;
}

.recommendation-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  min-height: 142px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-soft);
  scroll-snap-align: start;
}

.recommendation-card .book-cover {
  width: 76px;
  min-height: 108px;
}

.recommendation-card h3 {
  margin: 4px 0 6px;
  font-size: 14px;
  line-height: 1.35;
}

.recommendation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.shelf-list {
  display: grid;
  gap: 14px;
}

.shelf-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(220px, 0.65fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.shelf-item .book-cover {
  width: 82px;
  min-height: 116px;
}

.shelf-item h3 {
  margin: 0 0 5px;
}

.shelf-wait {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mint-soft);
}

.shelf-wait strong,
.shelf-wait span {
  display: block;
}

.shelf-wait strong {
  font-size: 14px;
}

.shelf-wait span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}

.dashboard-hero {
  padding: 32px;
  border-radius: var(--radius-lg);
  color: var(--paper);
  background:
    linear-gradient(125deg, transparent 55%, rgba(201, 226, 213, 0.16)),
    var(--forest);
}

.dashboard-hero .page-heading {
  margin: 0;
}

.dashboard-hero .page-heading p {
  color: #bfd0cc;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.metric-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.metric-card span,
.metric-card strong,
.metric-card small {
  display: block;
}

.metric-card span {
  color: #bcd0cb;
  font-size: 11px;
}

.metric-card strong {
  margin: 8px 0 2px;
  font-size: 28px;
}

.metric-card small {
  color: #e0e9e7;
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.pressure-list {
  display: grid;
  gap: 10px;
}

.pressure-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 120px 76px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.pressure-row:last-child {
  border: 0;
}

.rank {
  color: var(--persimmon);
  font-family: Georgia, serif;
  font-size: 24px;
  font-style: italic;
}

.pressure-book strong,
.pressure-book span {
  display: block;
}

.pressure-book span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.pressure-bar {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--canvas-deep);
}

.pressure-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--persimmon);
}

.pressure-score {
  text-align: right;
}

.pressure-score strong,
.pressure-score span {
  display: block;
}

.pressure-score strong {
  font-size: 14px;
}

.pressure-score span {
  color: var(--muted);
  font-size: 10px;
}

.action-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.action-list li {
  padding: 14px;
  border-radius: 14px;
  background: var(--paper-soft);
}

.action-list strong,
.action-list span {
  display: block;
}

.action-list strong {
  font-size: 13px;
}

.action-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.data-note {
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  color: #6e5423;
  background: #fff4d4;
  font-size: 11px;
}

.dashboard-source {
  margin-top: 12px;
}

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 14px 17px;
  border-radius: 13px;
  color: var(--white);
  background: var(--forest);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 700;
  animation: toast-in 300ms ease both;
}

.mobile-nav {
  display: none;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 44px;
  }

  .hero-visual {
    min-height: 400px;
  }

  .hero h1 {
    max-width: 740px;
  }

  .book-grid,
  .book-detail-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .book-poster {
    position: relative;
    top: 0;
    width: min(280px, 80vw);
    margin: 0 auto;
  }

  .book-poster .book-cover {
    min-height: 380px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 72px;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    width: min(calc(100% - 28px), var(--content));
    min-height: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .connection-pill {
    min-width: 40px;
    padding: 8px 11px;
  }

  .connection-pill span:last-child {
    display: none;
  }

  .page {
    width: min(calc(100% - 28px), var(--content));
    padding: 30px 0 70px;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 64px);
  }

  .hero-copy {
    font-size: 16px;
  }

  .search-form {
    border-radius: 17px;
  }

  .search-form input {
    padding: 0 10px;
  }

  .search-form button {
    padding: 0 16px;
  }

  .hero-visual {
    min-height: 340px;
    transform: scale(0.84);
    transform-origin: left top;
  }

  .visual-halo {
    right: -18%;
  }

  .book-stack {
    left: -10px;
  }

  .wait-card-mini {
    right: -54px;
  }

  .value-strip,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .value-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-heading,
  .page-heading,
  .setup-note,
  .panel-header {
    align-items: start;
    flex-direction: column;
  }

  .setup-note code {
    width: 100%;
    overflow-x: auto;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 14px;
  }

  .book-cover {
    width: 92px;
    min-height: 136px;
  }

  .book-actions {
    flex-direction: column;
  }

  .book-title {
    font-size: clamp(36px, 12vw, 52px);
  }

  .panel {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-field:last-of-type {
    grid-column: 1 / -1;
  }

  .library-item {
    grid-template-columns: 1fr;
  }

  .availability {
    text-align: left;
  }

  .shelf-item {
    grid-template-columns: 72px 1fr auto;
  }

  .shelf-item .book-cover {
    width: 72px;
    min-height: 102px;
  }

  .shelf-wait {
    grid-column: 1 / -1;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pressure-row {
    grid-template-columns: 28px minmax(0, 1fr) 62px;
  }

  .pressure-bar {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-nav button {
    display: grid;
    justify-items: center;
    min-height: 52px;
    gap: 2px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-nav button span {
    font-size: 21px;
    line-height: 1;
  }

  .mobile-nav button[aria-current="page"] {
    color: var(--forest);
    background: var(--mint-soft);
  }

  .toast-region {
    right: 14px;
    bottom: 82px;
    left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
