:root {
  --ink: #18201d;
  --paper: #f3f0e8;
  --panel: #fffdf7;
  --line: #c9c4b7;
  --signal: #ff5c35;
  --mint: #b9e4d0;
  --muted: #626963;
  --shadow: 8px 8px 0 rgba(24, 32, 29, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(24,32,29,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,32,29,.045) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }
.wrap { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243,240,232,.94);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 900; text-decoration: none; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--signal); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg); }
.brand-mark::after { content: "✓"; color: white; transform: rotate(4deg); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.nav a { font-size: 14px; font-weight: 800; text-decoration: none; }
.nav a:hover { color: var(--signal); }

.hero { padding: 88px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 48px; align-items: end; }
.eyebrow { display: inline-block; margin: 0 0 16px; padding: 6px 10px; border: 1px solid var(--ink); background: var(--mint); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(46px, 7vw, 88px); line-height: .98; letter-spacing: -.075em; }
.hero-copy { max-width: 680px; font-size: 19px; color: var(--muted); }
.hero-stamp { min-height: 270px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); color: white; border: 2px solid var(--ink); box-shadow: var(--shadow); transform: rotate(1.5deg); }
.hero-stamp strong { font-size: 54px; letter-spacing: -.06em; }
.hero-stamp span { color: var(--mint); font-weight: 800; }

.section { padding: 66px 0; border-top: 2px solid var(--ink); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.055em; }
.section-heading p { max-width: 480px; margin: 0; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tool-card { min-height: 310px; display: flex; flex-direction: column; padding: 26px; background: var(--panel); border: 2px solid var(--ink); box-shadow: var(--shadow); text-decoration: none; transition: transform .18s, box-shadow .18s; }
.tool-card:hover { transform: translate(-3px,-3px); box-shadow: 12px 12px 0 rgba(24,32,29,.17); }
.tool-card.featured { background: var(--signal); color: white; }
.tool-number { font: 900 13px/1 ui-monospace, monospace; letter-spacing: .08em; }
.tool-card h3 { margin: auto 0 12px; font-size: 34px; letter-spacing: -.055em; }
.tool-card p { margin-bottom: 22px; opacity: .82; }
.arrow { font-weight: 900; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ink); border: 2px solid var(--ink); }
.feature { min-height: 190px; padding: 28px; background: var(--panel); }
.feature b { display: block; margin-bottom: 13px; font-size: 18px; }
.feature p { color: var(--muted); }

.page-hero { padding: 72px 0 42px; }
.page-hero h1 { font-size: clamp(40px, 6vw, 72px); }
.page-intro { max-width: 760px; font-size: 19px; color: var(--muted); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 42px; align-items: start; padding-bottom: 80px; }
.prose { min-width:0; word-break:keep-all; overflow-wrap:anywhere; padding: 36px; background: var(--panel); border: 2px solid var(--ink); box-shadow: var(--shadow); }
.prose section + section { margin-top: 38px; padding-top: 32px; border-top: 1px solid var(--line); }
.prose h2 { font-size: 27px; letter-spacing: -.04em; }
.prose h3 { margin: 22px 0 8px; font-size: 19px; letter-spacing: -.02em; }
.prose ol, .prose ul { padding-left: 22px; }
.feature p a { font-weight: 800; }
.prose a { color: #b52e10; font-weight: 800; }
.side-note { padding: 24px; background: var(--mint); border: 2px solid var(--ink); position: sticky; top: 94px; }
.side-note b { display: block; margin-bottom: 8px; }

.finder-shell { padding-bottom: 80px; }
.finder-controls { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-bottom: 14px; }
.search, .select, .control-button { min-height: 52px; border: 2px solid var(--ink); background: var(--panel); padding: 0 15px; }
.search:focus, .select:focus { outline: 4px solid rgba(255,92,53,.26); }
.control-button { font-weight: 900; background: var(--signal); color: white; }
.control-button.secondary { background: var(--mint); color: var(--ink); }
.finder-status { display: flex; justify-content: space-between; gap: 14px; margin: 18px 0; font-size: 14px; font-weight: 800; }
.spot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.spot-card { padding: 22px; background: var(--panel); border: 2px solid var(--ink); }
.spot-top { display: flex; justify-content: space-between; gap: 16px; }
.spot-card h3 { margin-bottom: 7px; font-size: 21px; letter-spacing: -.035em; }
.distance { flex: 0 0 auto; color: var(--signal); font-weight: 950; }
.spot-address { min-height: 50px; color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.tag { padding: 4px 8px; background: #ebe7dc; font-size: 12px; font-weight: 800; }
.spot-actions { display: flex; gap: 8px; }
.spot-actions a { padding: 8px 11px; border: 1px solid var(--ink); font-size: 13px; font-weight: 900; text-decoration: none; }
.spot-actions a:first-child { background: var(--ink); color: white; }
.load-more { display: block; width: 100%; margin-top: 18px; min-height: 54px; background: var(--ink); color: white; border: 0; font-weight: 900; }
.notice { margin-bottom: 24px; padding: 18px 20px; background: #fff5cc; border-left: 6px solid var(--signal); }
.empty { grid-column: 1/-1; padding: 50px 24px; text-align: center; background: var(--panel); border: 2px dashed var(--ink); }

.footer { padding: 36px 0; background: var(--ink); color: #e8ebe7; }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; }
.footer a { color: white; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.muted { color: var(--muted); }
.guide-link { display:inline-flex; align-items:center; padding:12px 18px; text-decoration:none; }
.table-scroll { overflow-x:auto; margin:20px 0; border:1px solid var(--line); }
.prose table { width:100%; min-width:410px; border-collapse:collapse; font-size:15px; }
.prose caption { padding:12px; text-align:left; font-weight:800; }
.prose th, .prose td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--line); }
.prose thead, .prose tbody tr:nth-child(even) { background:#f0eee5; }
.prose li + li { margin-top:12px; }
.sample-links { display:flex; flex-wrap:wrap; gap:12px; }
.sample-links a { padding:10px 14px; border:1px solid var(--ink); text-decoration:none; }
.prose code { padding:2px 5px; background:#efeadf; overflow-wrap:anywhere; }
.guide-meta { color:var(--muted); font-size:14px; }
.side-note ol { padding-left:20px; }
.side-note li + li { margin-top:8px; }
.prose details { border-top:1px solid var(--line); padding:15px 0; }
.prose summary { cursor:pointer; font-weight:800; }
.prose details p { margin:12px 0 0; }

@media (max-width: 820px) {
  .header-inner { align-items: flex-start; padding: 15px 0; }
  .nav { justify-content: flex-end; gap: 10px 15px; }
  .hero { padding-top: 58px; }
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .hero-stamp { min-height: 210px; }
  .tool-grid, .feature-row { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .side-note { position: static; }
  .spot-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, 1160px); }
  .brand span:last-child { display: none; }
  .nav a:nth-child(3) { display: none; }
  .finder-controls { grid-template-columns: 1fr 1fr; }
  .finder-controls .search { grid-column: 1 / -1; }
  .prose { padding: 24px; }
  .footer-inner { flex-direction: column; }
}
