:root {
  --paper: #f0e8d8;
  --paper-light: #f7f0e0;
  --paper-deep: #e2d6bc;
  --accent: #962b14;
  --accent-soft: #e0cdb8;
  --accent-deep: #6e1f0e;
  --ink: #1a1410;
  --ink-body: #2c241c;
  --ink-muted: #6b5d4e;
  --ink-faint: #a89880;
  --line: #1a1410;
  --line-soft: #c4b89e;
  --font-body: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --detail-max: 880px;
  --t-display: clamp(38px, 5.5vw, 64px);
  --t-h2: clamp(22px, 3vw, 30px);
  --t-lead: clamp(17px, 1.6vw, 19px);
  --t-body: 16px;
  --t-small: 14px;
  --leading-tight: 1.15;
  --leading-body: 1.75;
}

* {
  box-sizing: border-box;
}

body.sikrok-detail-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--paper-light), var(--paper));
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sikrok-detail-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.07 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}

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

.site-header,
.detail-main,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--accent-soft);
  background: rgba(247, 240, 224, 0.92);
  backdrop-filter: blur(10px);
}

.site-header-inner {
  width: min(var(--detail-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-brand-ko {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-brand-en {
  color: var(--ink-muted);
  font-size: 12px;
  opacity: 0.55;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--ink-muted);
  font-size: 14px;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.detail-main {
  width: min(var(--detail-max), calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 96px;
}

.detail-article {
  width: 100%;
}

.detail-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--accent-soft);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.meta-dot {
  color: var(--accent-soft);
}

.detail-hero h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: var(--t-display);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

.detail-lead {
  max-width: 620px;
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--t-lead);
  line-height: var(--leading-body);
}

.detail-lead + .detail-lead {
  margin-top: 12px;
}

.detail-section,
.image-section,
.map-section,
.fact-section,
.visit-section,
.sources-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--accent-soft);
}

.section-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-section h2,
.image-section h2,
.visit-section h2,
.bottom-cta h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: var(--t-h2);
  line-height: 1.25;
}

.detail-section p,
.image-section p,
.visit-section p,
.map-note,
.bottom-cta p {
  color: var(--ink-muted);
  font-size: var(--t-body);
  line-height: var(--leading-body);
}

.image-placeholder-card {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  background:
    linear-gradient(var(--accent-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-soft) 1px, transparent 1px),
    color-mix(in srgb, var(--accent-soft) 28%, var(--paper-light));
  background-size: 34px 34px;
}

.image-section > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: min(520px, calc((100vw - 40px) * 9 / 16));
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
}

.image-placeholder-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(150, 43, 20, 0.22);
  pointer-events: none;
}

.image-placeholder-label {
  position: relative;
  z-index: 1;
  padding: 16px 20px;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  background: rgba(247, 240, 224, 0.88);
  text-align: center;
}

.image-placeholder-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 700;
}

.image-placeholder-caption {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.keyword-bar {
  margin: 0 0 32px;
  padding: 16px;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  background: rgba(247, 240, 224, 0.72);
}

.keyword-list,
.tag-row,
.dot-list,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  white-space: nowrap;
  border: 1px solid rgba(150, 43, 20, 0.16);
  border-radius: 9999px;
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--paper-light));
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}

.map-wrap {
  overflow: hidden;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  background-color: var(--paper-light);
}

#anchorMap {
  width: 100%;
  height: 340px;
}

.map-caption,
.map-note {
  border-top: 1px solid var(--accent-soft);
  color: var(--ink-muted);
}

.map-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(247, 240, 224, 0.92);
  font-family: var(--font-mono);
  font-size: 12px;
}

.map-note {
  margin: 0;
  padding: 16px;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  background: var(--accent-soft);
}

.fact-cell {
  min-height: 96px;
  padding: 16px;
  background: var(--paper-light);
}

.fact-label {
  margin: 0 0 6px;
  color: var(--ink-muted);
  opacity: 0.72;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-value {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
}

.text-stack {
  display: grid;
  gap: 16px;
}

.text-stack p {
  margin: 0;
}

.dictionary-card {
  position: relative;
  margin: 32px 0;
  padding: 36px 28px 24px;
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  background: var(--paper-light);
}

.dictionary-card::before {
  content: "사전 항목 · DICTIONARY ENTRY";
  position: absolute;
  top: -10px;
  left: 18px;
  padding: 0 10px;
  background: var(--paper);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.dictionary-card p {
  margin-top: 0;
}

.dictionary-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  border-top: 1px solid var(--accent-soft);
}

.dictionary-grid dt,
.dictionary-grid dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--accent-soft);
  font-size: 15px;
  line-height: 1.55;
}

.dictionary-grid dt {
  color: var(--ink-muted);
  font-weight: 700;
}

.dictionary-grid dd {
  color: var(--ink);
}

.tag-group {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.tag-row-label {
  align-self: center;
  margin-right: 4px;
  color: var(--ink-muted);
  opacity: 0.72;
  font-family: var(--font-mono);
  font-size: 12px;
}

.callout {
  margin: 28px 0;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  border-radius: 0 2px 2px 0;
  background: color-mix(in srgb, var(--accent-soft) 30%, var(--paper-light));
}

.callout-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.callout-list li,
.tip-list li {
  color: var(--ink-muted);
  font-size: var(--t-body);
  line-height: var(--leading-body);
}

.dot-list {
  margin: 18px 0 0;
}

.dot-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: var(--t-small);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-note {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--accent-soft);
  color: var(--ink-muted);
  font-size: var(--t-small);
  font-style: italic;
  line-height: var(--leading-body);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 14px;
  border: 1px solid rgba(150, 43, 20, 0.25);
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent-soft) 35%, var(--paper-light));
  color: var(--accent);
  font-size: var(--t-small);
  font-weight: 700;
}

.tip-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tip-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
}

.tip-num {
  color: var(--ink-muted);
  opacity: 0.72;
  font-family: var(--font-mono);
  font-size: 12px;
}

.bottom-cta {
  margin: 48px 0;
  padding: 44px 40px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.bottom-cta-label {
  margin: 0 0 12px;
  color: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bottom-cta h2 {
  color: var(--paper);
}

.bottom-cta p {
  max-width: 620px;
  margin: 0 auto 28px;
  color: rgba(240, 232, 216, 0.72);
}

.cta-row {
  justify-content: center;
}

.cta-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 2px;
  font-size: var(--t-small);
  font-weight: 700;
}

.cta-btn {
  background: var(--accent);
  color: #fff;
}

.cta-btn:hover {
  background: var(--accent-deep);
}

.secondary-btn {
  border: 1px solid rgba(240, 232, 216, 0.35);
  color: rgba(240, 232, 216, 0.85);
}

.secondary-btn:hover {
  color: var(--paper);
}

.sources-section {
  border-bottom: 0;
}

.sources-title {
  margin: 0 0 10px;
  color: var(--ink-muted);
  opacity: 0.5;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sources-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
  opacity: 0.58;
  font-family: var(--font-mono);
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--accent-soft);
}

.site-footer-inner {
  width: min(var(--detail-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-muted);
  opacity: 0.68;
  font-size: 12px;
}

.footer-brand {
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .site-header-inner,
  .detail-main,
  .site-footer-inner {
    width: min(100% - 32px, var(--detail-max));
  }

  .detail-hero {
    padding-top: 40px;
  }

  .image-placeholder-card {
    min-height: 200px;
  }

  .image-section > img {
    height: calc((100vw - 32px) * 3 / 4);
    aspect-ratio: 4 / 3;
  }

  #anchorMap {
    height: 260px;
  }

  .map-caption,
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .fact-strip {
    grid-template-columns: 1fr 1fr;
  }

  .dictionary-card {
    padding: 34px 20px 22px;
  }

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

  .dictionary-grid dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .dictionary-grid dd {
    padding-top: 0;
  }

  .bottom-cta {
    padding: 36px 22px;
  }

  .cta-row {
    flex-direction: column;
  }
}
