:root {
  --surface: rgba(13, 18, 24, 0.74);
  --surface-strong: rgba(15, 21, 28, 0.92);
  --line: rgba(220, 210, 188, 0.12);
  --text: #f5f0e4;
  --muted: #cec7bc;
  --soft: #a4b0bf;
  --accent: #cb8f57;
  --shadow: rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(203, 143, 87, 0.12), transparent 25%),
    radial-gradient(circle at 80% 22%, rgba(113, 133, 154, 0.15), transparent 28%),
    linear-gradient(135deg, #070a0e, #0d1218 42%, #090d12 100%);
  color: var(--text);
  font-family: Inter, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.canvas {
  width: min(1820px, 100%);
}

.sheet {
  position: relative;
  aspect-ratio: 8 / 4.28;
  width: 100%;
  overflow: hidden;
  border-radius: 28px;
  padding: 15px 18px 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005)),
    linear-gradient(135deg, #07090c, #0a1015 40%, #0b1016 100%);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow:
    0 30px 60px var(--shadow),
    0 0 0 1px rgba(203,143,87,0.06),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -20px 40px rgba(0,0,0,0.14);
  display: grid;
  grid-template-rows: auto auto 1fr 1.16fr;
  gap: 7px;
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 22px;
  pointer-events: none;
}

.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.12;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.88), rgba(0,0,0,0.25));
  pointer-events: none;
}

.noise,
.hero-glow {
  position: absolute;
  pointer-events: none;
}

.noise {
  inset: 0;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.3) 0.4px, transparent 0.8px),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,0.2) 0.5px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.15) 0.5px, transparent 1px);
  background-size: 24px 24px, 30px 30px, 36px 36px;
}

.hero-glow {
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.75;
}

.glow-left {
  left: -8%;
  top: 10%;
  width: 34%;
  height: 38%;
  background: radial-gradient(circle, rgba(203,143,87,0.22), transparent 65%);
}

.glow-right {
  right: -6%;
  bottom: 8%;
  width: 26%;
  height: 34%;
  background: radial-gradient(circle, rgba(113,133,154,0.18), transparent 65%);
}

.topbar,
.masthead,
.row,
.block {
  position: relative;
  z-index: 1;
}

.topbar,
.brand-topline,
.hero-meta .k,
.hero-meta .v,
.hero-tags span,
.section-head span,
.mono,
code,
pre,
.mono-list,
.mono-kv dt,
.kv dd,
.eyebrow,
.subtitle {
  font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  color: rgba(245,240,228,0.56);
  padding-bottom: 2px;
}

.block {
  background: linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.012));
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  padding: 7px 8px;
}

.hero-block {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(203,143,87,0.06), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.012));
}

.brand-stack { display: grid; gap: 7px; }

.brand-topline {
  font-size: 10px;
  color: rgba(245,240,228,0.58);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.brand-mark-wrap {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(203,143,87,0.18), rgba(255,255,255,0.03)),
    rgba(9,11,15,0.75);
  border: 1px solid rgba(203,143,87,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(1.08);
}

.title-group { display: grid; gap: 4px; }

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,h2,h3,p,ul,ol,dl,dd,dt,pre { margin: 0; }

h1 {
  font-size: clamp(28px, 2.2vw, 40px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 14.5px;
  letter-spacing: -0.03em;
  color: var(--text);
}

h3 {
  font-size: 11.5px;
  letter-spacing: -0.02em;
  color: var(--text);
}

p, li, dd, dt {
  font-size: 9.5px;
  line-height: 1.24;
  color: var(--muted);
}

.subtitle {
  font-size: 10px;
  color: rgba(245,240,228,0.82);
  line-height: 1.35;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--soft);
  font-size: 9.8px;
}

.hero-meta { display: grid; gap: 5px; }

.panel-grid div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.018);
  border: 1px solid rgba(255,255,255,0.05);
}

.hero-meta .k {
  font-size: 9.6px;
  color: rgba(203,143,87,0.9);
  text-transform: uppercase;
}

.hero-meta .v {
  font-size: 9.9px;
  color: var(--text);
}

.hero-meta code { font-size: 9px; }

.row { display: grid; gap: 7px; }
.top-grid { grid-template-columns: 0.94fr 1.08fr 0.98fr 0.88fr 0.82fr; }
.bottom-grid-2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 6px;
  margin: -2px -3px 2px;
  border-radius: 12px;
  background: rgba(255,255,255,0.022);
  border: 1px solid rgba(255,255,255,0.05);
}

.section-head span {
  font-size: 8.6px;
  color: rgba(245,240,228,0.74);
  white-space: nowrap;
}

.mono-list,
.bullet,
.prompt-refs { padding-left: 16px; }
.mono-list li + li,
.bullet li + li,
.prompt-refs li + li { margin-top: 3px; }
.compact li + li,
.tight li + li { margin-top: 2px; }

code {
  font-size: 9.2px;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1px 4px;
}

.command-list-tight code { line-height: 1.22; }

.kv { display: grid; gap: 4px; }

.kv div {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 7px;
  align-items: start;
  padding-bottom: 4px;
  border-bottom: 1px dotted rgba(255,255,255,0.12);
}

.kv div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.short-left div { grid-template-columns: 0.9fr 1.15fr; }
.mono-kv dt,.mono-kv dd { font-size: 9px; }

.prompt-refs {
  display: grid;
  gap: 5px;
}

.prompt-refs li {
  padding-left: 0;
  list-style: none;
  border-bottom: 1px dotted rgba(255,255,255,0.12);
  padding-bottom: 4px;
}

.prompt-refs li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.prompt-refs b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 10.8px;
}

.prompt-refs span {
  display: block;
  color: var(--muted);
  font-size: 9.6px;
  line-height: 1.24;
}

.mode-stack {
  display: grid;
  gap: 6px;
}

.mode-stack div {
  background: rgba(255,255,255,0.018);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 6px 7px;
}

.mode-stack b {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 10.8px;
}

.prompt-box {
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.07);
  white-space: pre-wrap;
  line-height: 1.28;
  font-size: 9.2px;
  color: #ece6db;
}

.small-prompt { margin-bottom: 2px; }
.wide-card { min-width: 0; }
.emphasis {
  background:
    linear-gradient(135deg, rgba(203,143,87,0.08), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.012));
}

@media (max-width: 1500px) {
  .sheet {
    aspect-ratio: auto;
    grid-template-rows: auto;
  }
  .hero-block,
  .top-grid,
  .bottom-grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

@page {
  size: A3 landscape;
  margin: 10mm;
}

@media print {
  html, body {
    background: #0a0f14;
    width: 420mm;
    height: 297mm;
  }

  body {
    padding: 0;
    display: block;
  }

  .canvas {
    width: 400mm;
    height: 277mm;
  }

  .sheet {
    width: 400mm;
    height: 277mm;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    padding: 12mm 12mm 10mm;
    gap: 6px;
  }

  .topbar {
    font-size: 9px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 13.5px;
  }

  h3 {
    font-size: 10.5px;
  }

  p,
  li,
  dd,
  dt,
  .subtitle,
  .prompt-refs span,
  .mono-kv dt,
  .mono-kv dd {
    font-size: 8.8px;
    line-height: 1.2;
  }

  code,
  pre,
  .hero-meta .k,
  .hero-meta .v,
  .brand-topline,
  .section-head span {
    font-size: 8.4px;
  }
}
