/* Seoul Shelf travel tools — editorial, light, no build step. */
:root {
  --paper: #f7f5f0;
  --card: #fffdf9;
  --ink: #1c1a17;
  --muted: #6d665c;
  --line: #e2dcd1;
  --line-strong: #c8bfaf;
  --accent: #1f513f;
  --accent-soft: #e7efe9;
  --warn: #8a3d1e;
  --warn-soft: #f8ece5;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

.site-head {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.brand span {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.langs { display: flex; gap: 4px; }
.langs button {
  border: 1px solid var(--line);
  background: transparent;
  padding: 6px 8px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 2px;
  min-width: 44px;
  white-space: nowrap;
}
.langs button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 0 0 auto;
  padding: 12px 12px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }

main { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; }

.hero { padding: 52px 0 36px; max-width: 860px; }
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 18ch;
}
.hero-lede { font-size: 1.06rem; max-width: 62ch; margin: 0 0 12px; }
.hero-note { color: var(--muted); font-size: 0.86rem; margin: 0; }

.section-title {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 8px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.tool-card:hover, .tool-card:focus-visible {
  border-color: var(--line-strong);
  background: #fff;
  transform: translateY(-2px);
}
.tool-card .num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.tool-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.18rem;
  line-height: 1.2;
  margin: 10px 0 8px;
  letter-spacing: -0.01em;
}
.tool-card p { font-size: 0.85rem; color: var(--muted); margin: 0 0 16px; }
.tool-card .go {
  margin-top: auto;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.tool-card .go::after { content: " →"; }

/* Tool page */
.tool { padding-top: 26px; }
.tool-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.back { font-size: 0.78rem; color: var(--muted); text-decoration: none; }
.back::before { content: "← "; }
.back:hover { color: var(--ink); }
.kicker { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; }
.tool h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.lede { font-size: 0.98rem; color: #45403a; max-width: 66ch; margin: 0 0 26px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid2.onecol { grid-template-columns: 1fr; }
.grid2 > * { min-width: 0; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 2px;
  margin: 0;
  min-width: 0;
}
.result { background: #fff; min-height: 200px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.hint { font-size: 0.76rem; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }

.stepper {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  border: 1px solid var(--line-strong);
  background: #fff;
  height: 52px;
}
.stepper input {
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 1.22rem;
  font-variant-numeric: tabular-nums;
  width: 100%;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.step-btn:hover { background: var(--accent-soft); }
.step-btn:active { background: var(--line); }

.seg { display: flex; border: 1px solid var(--line-strong); background: #fff; flex-wrap: wrap; }
.seg button {
  flex: 1 1 0;
  min-width: 72px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-size: 0.84rem;
  cursor: pointer;
  line-height: 1.25;
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }

select, .money {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line-strong);
  background-color: #fff;
  padding: 0 36px 0 12px;
  font-size: 0.95rem;
  border-radius: 0;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d665c' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.money { padding-right: 12px; font-size: 1.15rem; font-variant-numeric: tabular-nums; background-image: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.9rem;
  cursor: pointer;
  border-top: 1px solid var(--line);
}
.switch input { width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }

/* Result blocks */
.result .big {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.6vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
  font-variant-numeric: tabular-nums;
}
.result .big small { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; margin-left: 6px; }
.result .res-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
  font-weight: 600;
}
.result .res-sub { font-size: 0.86rem; color: var(--muted); margin: 0 0 16px; }
.result h3 {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 8px;
  font-weight: 600;
}
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.chip { border: 1px solid var(--line); padding: 10px; background: #fbf9f4; }
.chip .k { display: block; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.chip strong { font-size: 0.95rem; font-weight: 600; display: block; line-height: 1.25; }
.chip span.v { font-size: 0.76rem; color: var(--muted); display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin: 6px -2px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
th {
  text-align: left;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.best td { background: var(--accent-soft); }
tr.muted td { color: #9b948a; }
.badge {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 2px 5px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: 1px;
}
.note { font-size: 0.74rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.note.warn { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-left: 2px solid var(--warn); }
.only-mobile { display: none; }

.note-list { margin-top: 22px; }
.note-list p {
  border-left: 2px solid var(--line-strong);
  padding-left: 12px;
  margin: 10px 0;
  font-size: 0.83rem;
  color: var(--muted);
  max-width: 78ch;
}

.aff { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 18px; }
.aff h3, .sources h3 {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.aff-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.aff-links a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.aff-links a:hover { color: var(--ink); }
.disclosure { font-size: 0.72rem; color: var(--muted); margin: 12px 0 0; max-width: 90ch; }

details.faq { border-top: 1px solid var(--line); margin-top: 18px; }
details.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.94rem;
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 14px; font-size: 0.9rem; color: #4a453e; max-width: 76ch; }

.sources { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.sources ul { margin: 0; padding-left: 18px; }
.sources li { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.sources a { color: var(--muted); }

/* Size tool */
.subtabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.subtab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.subtab.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.power-big { font-family: var(--serif); font-size: 1.5rem; margin: 6px 0 4px; }
.power-type { font-size: 0.95rem; margin: 0 0 14px; color: var(--accent); }
.power-note { font-size: 0.88rem; margin: 0 0 10px; }
.power-note.warn { color: var(--warn); background: var(--warn-soft); padding: 10px 12px; border-left: 2px solid var(--warn); }
.size-table { min-width: 360px; }
.size-table tr.hit td { background: var(--accent-soft); font-weight: 600; }
.equiv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.equiv div { border: 1px solid var(--line); padding: 8px; text-align: center; background: #fbf9f4; }
.equiv span { display: block; font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.equiv strong { font-size: 1rem; font-variant-numeric: tabular-nums; }

.site-foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px 64px;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
}
.site-foot .src-line { font-size: 0.72rem; max-width: 90ch; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .result { min-height: 0; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .site-head { padding: 16px 16px 12px; }
  .brand { font-size: 1.2rem; }
  main { padding: 0 16px 32px; }
  .tabs { padding: 0 8px; }
  .tabs a { padding: 11px 9px 9px; font-size: 0.74rem; }
  .hero { padding: 32px 0 26px; }
  .hero h1 { font-size: 2.05rem; max-width: none; }
  .hero-lede { font-size: 0.98rem; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { min-height: 0; padding: 14px 16px; }
  .tool-card h3 { margin-top: 4px; font-size: 1.1rem; }
  .tool-card p { margin-bottom: 10px; }
  .panel { padding: 16px; }
  .chips { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .chip { display: flex; align-items: baseline; gap: 8px; }
  .chip .k { margin: 0; flex: 0 0 auto; }
  .chip span.v { margin: 0; }
  .equiv { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .result .big { font-size: 1.9rem; }
  table { font-size: 0.8rem; }
  .t2-table th:nth-child(5), .t2-table td:nth-child(5) { display: none; }
  .only-mobile { display: block; }
  .site-foot { padding: 22px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
