@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;800&family=Noto+Serif+KR:wght@500;700;900&display=swap');

:root {
  --bg: #f5efe3;
  --surface: rgba(255, 251, 244, 0.88);
  --surface-strong: rgba(255, 248, 238, 0.96);
  --ink: #201b17;
  --muted: #685d55;
  --line: rgba(72, 54, 40, 0.14);
  --accent: #c56a4d;
  --accent-soft: rgba(197, 106, 77, 0.12);
  --shadow: 0 22px 60px rgba(72, 54, 40, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1840px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Noto Sans KR', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(197, 106, 77, 0.12), transparent 25%),
    radial-gradient(circle at 86% 10%, rgba(48, 111, 125, 0.14), transparent 24%),
    radial-gradient(circle at 14% 82%, rgba(123, 108, 36, 0.12), transparent 22%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.18) 28px,
      rgba(245, 235, 218, 0.45) 28px,
      rgba(245, 235, 218, 0.45) 29px
    ),
    linear-gradient(180deg, #faf6ef 0%, #f1e8d8 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:not(.worksheet-input):focus-visible,
textarea:not(.worksheet-input):focus-visible {
  outline: 2px solid rgba(197, 106, 77, 0.48);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 28px 120px;
}

.site-header,
.hero-panel,
.cover-panel,
.section-block,
.modal-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 30;
  padding: 16px 20px;
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.header-top {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: center;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(197, 106, 77, 0.95), rgba(209, 125, 49, 0.92));
  color: white;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 34px rgba(197, 106, 77, 0.24);
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-size: 1.02rem;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.header-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.switch-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}

.switch-row .switch-chip,
.switch-row button {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.switch-row a.switch-chip:hover,
.switch-row button:hover,
.switch-row .switch-chip.active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-color: rgba(72, 54, 40, 0.12);
  transform: translateY(-1px);
}

.switch-row .switch-chip.disabled {
  background: rgba(255, 255, 255, 0.46);
  color: rgba(72, 54, 40, 0.42);
  border-color: rgba(72, 54, 40, 0.08);
  cursor: not-allowed;
  transform: none;
}

.report-switch-row {
  flex: 1 1 auto;
  justify-content: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.report-switch-row::-webkit-scrollbar,
.lang-switch-row::-webkit-scrollbar {
  display: none;
}

.lang-switch-row {
  overflow-x: auto;
  scrollbar-width: none;
}

.report-switch-row .switch-chip.active {
  background: linear-gradient(140deg, rgba(197, 106, 77, 0.18), rgba(209, 125, 49, 0.18));
  border-color: rgba(197, 106, 77, 0.18);
}

.pdf-button {
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(29, 26, 23, 0.92);
  color: white;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.info-button {
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(72, 54, 40, 0.1);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.menu-button {
  display: none;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  cursor: pointer;
}

.section-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
  white-space: nowrap;
  font-weight: 700;
}

.section-nav a.active,
.section-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-shell {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(72, 54, 40, 0.1);
  background: rgba(255, 255, 255, 0.8);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.search-input:focus {
  outline: none;
}

.search-clear {
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(197, 106, 77, 0.14);
  color: #7b3b29;
  font-weight: 700;
  cursor: pointer;
}

.search-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(360px, 0.64fr);
  gap: 32px;
  margin-bottom: 34px;
}

.hero-panel {
  padding: 42px;
  position: relative;
  overflow: hidden;
}

.page-shell.is-detail-report .hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-panel::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  left: -40px;
  bottom: -92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(197, 106, 77, 0.16), transparent 72%);
}

.eyebrow {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.page-shell.is-detail-report .hero-title {
  font-size: clamp(2.2rem, 3.5vw, 3.8rem);
  line-height: 1.08;
  max-width: 12ch;
}

.hero-title span {
  display: block;
  color: var(--accent);
}

.hero-subtitle {
  margin: 18px 0 10px;
  color: #453931;
  font-size: 1.32rem;
  font-weight: 800;
}

.hero-description {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.8;
}

.page-shell.is-detail-report .hero-description {
  max-width: 42rem;
  margin-top: 6px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hero-stats article {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(72, 54, 40, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

.hero-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-actions a {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.hero-actions a.primary {
  background: linear-gradient(140deg, rgba(197, 106, 77, 0.98), rgba(209, 125, 49, 0.96));
  color: white;
}

.keyword-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.keyword-bar button {
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent-soft);
  color: #7b3b29;
  font-weight: 700;
  cursor: pointer;
}

.cover-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cover-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.cover-button {
  border: none;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  box-shadow: 0 24px 54px rgba(72, 54, 40, 0.16);
}
.cover-static {
  cursor: default;
}

.section-block {
  padding: 30px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 150px;
  content-visibility: auto;
  contain-intrinsic-size: 960px;
}

.section-block::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  left: -60px;
  top: -80px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--rgb, 197, 106, 77), 0.18), transparent 72%);
}

.section-intro {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.section-intro .kicker {
  margin: 0;
  color: rgba(var(--rgb, 197, 106, 77), 1);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  font-weight: 800;
  text-transform: uppercase;
}

.section-intro h2 {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 64ch;
}

.section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-meta span {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(var(--rgb, 197, 106, 77), 0.12);
  color: #46352c;
  font-weight: 700;
}

.card-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-workbook-report .card-grid {
  grid-template-columns: 1fr;
}

.content-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 244, 0.68));
  content-visibility: auto;
  contain-intrinsic-size: 560px;
}

.is-workbook-card {
  contain: layout paint;
}

.is-workbook-card .card-body {
  grid-template-columns: 1fr;
}

.workbook-reader {
  display: grid;
  gap: 16px;
}

.workbook-reader-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(72, 54, 40, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.workbook-reader-status {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.workbook-reader-status strong {
  font-size: 1rem;
}

.workbook-reader-status span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.workbook-reader-button {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(var(--rgb, 197, 106, 77), 0.14);
  color: rgb(var(--rgb, 197, 106, 77));
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
}

.workbook-reader-button:disabled {
  opacity: 0.44;
  cursor: default;
}

.workbook-reader-jumps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.workbook-reader-jumps::-webkit-scrollbar {
  display: none;
}

.workbook-page-jump-chip {
  border: 1px solid rgba(72, 54, 40, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-weight: 700;
  padding: 10px 14px;
  white-space: nowrap;
  cursor: pointer;
}

.workbook-page-jump-chip.active {
  background: rgba(var(--rgb, 197, 106, 77), 0.16);
  border-color: rgba(var(--rgb, 197, 106, 77), 0.28);
  color: rgb(var(--rgb, 197, 106, 77));
}

.workbook-card-grid {
  grid-template-columns: 1fr;
}

.workbook-page-panel {
  display: none;
}

.workbook-page-panel.is-active {
  display: block;
}

.workbook-page-panel.search-hidden {
  display: none;
}
.card-head {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-head h3 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.95rem);
  line-height: 1.35;
}

.card-eyebrow {
  margin: 0 0 8px;
  color: rgba(var(--rgb, 197, 106, 77), 1);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.range-pill {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(var(--rgb, 197, 106, 77), 0.12);
  color: #46352c;
  font-size: 0.9rem;
  font-weight: 800;
}

.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(220px, 0.82fr);
  gap: 16px;
}

.lead-panel,
.fact-panel {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(72, 54, 40, 0.08);
}

.lead-panel h4 {
  margin: 0 0 12px;
  font-size: 0.94rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--rgb, 197, 106, 77), 1);
}

.summary-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #40362d;
  line-height: 1.78;
}

.summary-list li::marker {
  color: rgba(var(--rgb, 197, 106, 77), 1);
}

.mini-graph {
  margin-top: 16px;
}

.graph-frame {
  position: relative;
  min-height: 336px;
  border-radius: 24px;
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.18);
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--rgb, 197, 106, 77), 0.14), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(var(--rgb, 197, 106, 77), 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 244, 236, 0.8));
  overflow: hidden;
}

.graph-lines {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
}

.graph-lines line {
  stroke: rgba(var(--rgb, 197, 106, 77), 0.45);
  stroke-width: 0.9;
}

.graph-orbit {
  fill: none;
  stroke: rgba(var(--rgb, 197, 106, 77), 0.16);
  stroke-width: 0.9;
  stroke-dasharray: 2.6 3.4;
}

.graph-edge-primary {
  stroke: rgba(var(--rgb, 197, 106, 77), 0.42);
  stroke-width: 1.15;
}

.graph-edge-secondary,
.graph-loop {
  stroke: rgba(var(--rgb, 197, 106, 77), 0.22);
  stroke-dasharray: 2.6 2.6;
}

.graph-core {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(42%, 250px);
  min-height: 124px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.22);
  background: linear-gradient(180deg, rgba(var(--rgb, 197, 106, 77), 0.18), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 36px rgba(var(--rgb, 197, 106, 77), 0.12);
  display: grid;
  align-content: center;
  gap: 8px;
  text-align: center;
  z-index: 2;
}

.graph-core-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--rgb, 197, 106, 77), 1);
  font-weight: 800;
}

.graph-core strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.55;
}

.graph-nodes {
  position: absolute;
  inset: 0;
}

.graph-node {
  position: absolute;
  inset: var(--y) auto auto var(--x);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  gap: 4px;
  max-width: 154px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(72, 54, 40, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #3f342c;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 20px rgba(36, 28, 24, 0.06);
  z-index: 1;
}

button.graph-node {
  cursor: pointer;
}

button.graph-node:hover {
  border-color: rgba(var(--rgb, 197, 106, 77), 0.24);
  box-shadow: 0 14px 24px rgba(var(--rgb, 197, 106, 77), 0.14);
}

.graph-node-role {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--rgb, 197, 106, 77), 0.95);
}

.card-tags {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tag {
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  background: rgba(var(--rgb, 197, 106, 77), 0.12);
  color: rgb(var(--rgb, 197, 106, 77));
  font-weight: 700;
  cursor: pointer;
}

.card-tag.is-static {
  cursor: default;
}

.fact-panel {
  display: grid;
  gap: 10px;
}

.fact-panel article {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(72, 54, 40, 0.08);
}

.fact-panel article:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.fact-panel span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.page-details {
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(72, 54, 40, 0.08);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.76);
  contain: layout paint;
}

.page-details summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-details summary::-webkit-details-marker {
  display: none;
}

.page-details summary::after {
  content: '+';
  color: rgba(var(--rgb, 197, 106, 77), 1);
}

.page-details[open] summary::after {
  content: '-';
}

.thumb-grid {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.thumb-button {
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(72, 54, 40, 0.08);
}

.thumb-button img {
  width: 100%;
  aspect-ratio: 0.72 / 1;
  object-fit: cover;
  background: #f2ebdc;
}

.thumb-button span {
  display: block;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #41362d;
}

.worksheet-details {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(72, 54, 40, 0.08);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
}

.worksheet-details summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.worksheet-details summary::-webkit-details-marker {
  display: none;
}

.worksheet-details summary::after {
  content: '+';
  color: rgba(var(--rgb, 197, 106, 77), 1);
}

.worksheet-details[open] summary::after {
  content: '-';
}

.worksheet-editor {
  padding: 0 20px 20px;
  display: grid;
  gap: 18px;
}

.worksheet-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-top: 4px;
}

.worksheet-copy strong,
.worksheet-panel-title {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--rgb, 197, 106, 77), 1);
  font-weight: 800;
}

.worksheet-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.worksheet-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.worksheet-toolbar-actions button {
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}

.worksheet-reset {
  background: rgba(var(--rgb, 197, 106, 77), 0.12);
  color: rgb(var(--rgb, 197, 106, 77));
}

.worksheet-download {
  background: rgba(29, 26, 23, 0.92);
  color: white;
}

.worksheet-toolbar-actions button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.worksheet-shared-panel,
.worksheet-pages-panel {
  display: grid;
  gap: 12px;
}

.worksheet-shared-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.worksheet-shared-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.worksheet-shared-field input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(72, 54, 40, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
}

.worksheet-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.worksheet-page {
  display: grid;
  gap: 10px;
}

.worksheet-page-tools {
  display: grid;
  gap: 10px;
}

.worksheet-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.worksheet-field-add,
.worksheet-layout-toggle,
.worksheet-tool-toggle,
.worksheet-tool-clear {
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #473830;
  font-weight: 800;
  padding: 9px 14px;
  cursor: pointer;
}

.worksheet-field-add.active,
.worksheet-layout-toggle.active,
.worksheet-tool-toggle.active {
  background: rgba(var(--rgb, 197, 106, 77), 0.16);
  color: rgb(var(--rgb, 197, 106, 77));
  border-color: rgba(var(--rgb, 197, 106, 77), 0.32);
}

.worksheet-page-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.worksheet-page-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.worksheet-page-top strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.worksheet-canvas {
  position: relative;
  aspect-ratio: var(--page-ratio);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(72, 54, 40, 0.08);
  background: #f2ebdc;
  box-shadow: 0 16px 32px rgba(72, 54, 40, 0.08);
}

.worksheet-canvas img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.worksheet-canvas.is-drawing,
.worksheet-canvas.is-inking,
.worksheet-canvas.is-checking {
  cursor: crosshair;
}

.worksheet-ink-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.worksheet-draw-preview,
.worksheet-custom-field,
.worksheet-choice-shell {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
}

.worksheet-draw-preview {
  border: 2px dashed rgba(var(--rgb, 197, 106, 77), 0.75);
  border-radius: 12px;
  background: rgba(var(--rgb, 197, 106, 77), 0.12);
  pointer-events: none;
  z-index: 4;
}

.worksheet-custom-field,
.worksheet-choice-shell {
  z-index: 3;
}

.worksheet-custom-field .worksheet-input,
.worksheet-choice-shell .worksheet-input {
  position: absolute;
  inset: 0;
}

.worksheet-page.is-layout-edit .worksheet-custom-field .worksheet-input {
  pointer-events: none;
}

.worksheet-page.is-layout-edit .worksheet-custom-field {
  outline: 2px dashed rgba(var(--rgb, 197, 106, 77), 0.48);
  outline-offset: 2px;
}

.worksheet-custom-move,
.worksheet-custom-remove {
  position: absolute;
  top: 6px;
  border: none;
  border-radius: 999px;
  background: rgba(29, 26, 23, 0.84);
  color: white;
  font-weight: 800;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.worksheet-custom-move {
  left: 6px;
  padding: 0 10px;
  height: 24px;
  font-size: 0.72rem;
}

.worksheet-custom-remove {
  right: 6px;
  width: 24px;
  height: 24px;
}

.worksheet-page.is-layout-edit .worksheet-custom-move,
.worksheet-page.is-layout-edit .worksheet-custom-remove {
  opacity: 1;
  pointer-events: auto;
}

.worksheet-input {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  color: #1f1b17;
  padding: 6px 8px;
  box-shadow: 0 4px 10px rgba(72, 54, 40, 0.06);
  resize: none;
  font-family: 'Noto Sans KR', sans-serif;
  overflow: hidden;
}

.worksheet-input.is-text {
  font-size: clamp(0.68rem, 1vw, 0.86rem);
}

.worksheet-input.is-textarea {
  font-size: clamp(0.64rem, 0.92vw, 0.82rem);
  line-height: 1.35;
}

.worksheet-choice-shell .worksheet-input {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.worksheet-choice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
}

.worksheet-choice.is-single {
  justify-content: flex-start;
}

.worksheet-choice-option {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #5b4637;
  padding: 0 4px;
  font: 600 clamp(0.58rem, 0.88vw, 0.8rem)/1 'Noto Sans KR', sans-serif;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.worksheet-choice-option:hover {
  border-color: rgba(var(--rgb, 197, 106, 77), 0.46);
}

.worksheet-choice-option.active {
  border-color: rgba(var(--rgb, 197, 106, 77), 0.92);
  background: rgba(var(--rgb, 197, 106, 77), 0.86);
  box-shadow: 0 4px 10px rgba(72, 54, 40, 0.12);
  color: #fff;
}

.worksheet-choice-option.is-single {
  flex: 0 0 auto;
  width: min(100%, 24px);
  padding: 0;
  color: transparent;
  position: relative;
  background: rgba(255, 255, 255, 0.66);
}

.worksheet-choice-option.is-single::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(var(--rgb, 197, 106, 77), 0.44);
  border-radius: 4px;
  background: transparent;
}

.worksheet-choice-option.is-single.active::after {
  border-color: rgba(var(--rgb, 197, 106, 77), 0.88);
  background: rgba(var(--rgb, 197, 106, 77), 0.88);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.88);
}

.worksheet-choice-option:focus-visible {
  outline: 2px solid rgba(var(--rgb, 197, 106, 77), 0.38);
  outline-offset: 1px;
}

.worksheet-input:focus,
.worksheet-shared-field input:focus {
  outline: 2px solid rgba(var(--rgb, 197, 106, 77), 0.3);
  outline-offset: 0;
}

.credit-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.info-grid + .credit-grid {
  margin-top: 18px;
}

.credit-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.credit-card strong {
  display: block;
  font-size: 1.04rem;
  margin-bottom: 6px;
}

.credit-card span {
  color: var(--muted);
  line-height: 1.7;
}

.footer-note {
  margin-top: 12px;
  padding: 22px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--muted);
  line-height: 1.8;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(29, 26, 23, 0.84);
  backdrop-filter: blur(14px);
  padding: 18px;
}

.modal.open {
  display: grid;
  place-items: center;
}

.modal-panel {
  width: min(1200px, 100%);
  max-height: calc(100vh - 36px);
  background: var(--surface-strong);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.modal-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(72, 54, 40, 0.08);
}

.modal-title {
  font-weight: 800;
}

.page-modal-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.page-modal-status {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.page-modal-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.page-modal-step {
  min-width: 48px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(197, 106, 77, 0.12);
  color: #7b3b29;
  font-weight: 800;
  cursor: pointer;
}

.page-modal-step:disabled {
  opacity: 0.4;
  cursor: default;
}

.modal-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(29, 26, 23, 0.08);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-body {
  overflow: auto;
  padding: 18px;
}

.page-modal .modal-body {
  display: grid;
  place-items: center;
  background: #f7efdf;
}

.page-modal img {
  width: min(100%, 980px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 20px 54px rgba(72, 54, 40, 0.18);
}

.keyword-modal .modal-body {
  display: grid;
  gap: 18px;
}

.keyword-copy {
  display: grid;
  gap: 12px;
}

.keyword-copy p {
  margin: 0;
  color: #40362d;
  line-height: 1.84;
}

.keyword-copy .term {
  font-family: 'Noto Serif KR', serif;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.keyword-quote {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(72, 54, 40, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.keyword-quote h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.keyword-quote p {
  margin: 0;
  line-height: 1.82;
}

.keyword-occurrences {
  display: grid;
  gap: 12px;
}

.keyword-occurrences h4 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.keyword-occurrences article {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(72, 54, 40, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.keyword-occurrences span {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(var(--rgb, 197, 106, 77), 1);
  font-size: 0.86rem;
  font-weight: 800;
}

.keyword-occurrences p {
  margin: 0;
  line-height: 1.82;
}
.keyword-pages {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.keyword-pages button {
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(197, 106, 77, 0.12);
  color: #7b3b29;
  font-weight: 700;
  cursor: pointer;
}

.info-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.info-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(var(--rgb, 197, 106, 77), 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.info-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.info-card strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.6;
}

.search-hidden {
  display: none !important;
}

mark.search-hit {
  padding: 0 0.1em;
  border-radius: 0.3em;
  background: rgba(255, 204, 102, 0.55);
  color: inherit;
}
@media (max-width: 1120px) {
  .hero-grid,
  .card-body {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .graph-frame {
    min-height: 300px;
  }

  .worksheet-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 18px 16px 96px;
  }

  .header-top {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand menu'
      'tools tools';
    gap: 12px;
  }

  .brand {
    grid-area: brand;
  }

  .header-tools {
    grid-area: tools;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .section-nav {
    display: none;
    flex-direction: column;
  }

  body.menu-open .section-nav {
    display: flex;
  }

  .hero-panel,
  .section-block {
    padding: 24px;
  }

  .page-shell.is-detail-report .hero-title {
    max-width: none;
  }

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

  .range-pill {
    width: 100%;
    text-align: center;
  }

  .worksheet-page-grid {
    grid-template-columns: 1fr;
  }

  .workbook-reader-bar {
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: 2.4rem;
  }

  .page-shell.is-detail-report .hero-title {
    font-size: 2rem;
  }

  .thumb-grid {
    grid-template-columns: 1fr;
  }

  .workbook-reader-bar {
    grid-template-columns: 1fr;
  }

  .workbook-reader-button {
    width: 100%;
  }

  .page-modal .modal-top {
    flex-wrap: wrap;
  }

  .page-modal-nav {
    width: 100%;
    justify-content: flex-start;
    order: 3;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row {
    align-items: stretch;
  }

  .graph-frame {
    min-height: auto;
    padding: 18px;
    display: grid;
    gap: 14px;
  }

  .graph-lines {
    display: none;
  }

  .graph-core {
    position: static;
    inset: auto;
    transform: none;
    width: auto;
    min-height: 0;
  }

  .graph-nodes {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .graph-node {
    position: static;
    inset: auto;
    transform: none;
    max-width: none;
  }

  .report-switch-row,
  .lang-switch-row {
    flex-direction: row;
    align-items: center;
  }

  .worksheet-toolbar-actions,
  .worksheet-shared-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions a,
  .search-shell,
  .search-clear,
  .pdf-button,
  .info-button {
    text-align: center;
    justify-content: center;
    width: 100%;
  }
}

