/* Gyeongju Guide: shared styles for the travel website. */
:root {
  --paper: oklch(100% 0 0);
  --ink: oklch(23% 0.015 65);
  --muted: oklch(43% 0.015 65);
  --edge: oklch(84% 0.008 65);
  --soft: oklch(94% 0.006 65);
  --accent: oklch(42% 0.105 36);
  --accent-hover: oklch(33% 0.09 36);
  --focus: oklch(38% 0.14 240);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Noto Sans JP", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-display: "Iowan Old Style", "Noto Serif KR", "Noto Serif JP", "Noto Serif SC", Georgia, serif;
  --content-width: 72rem;
  --reading-width: 54rem;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.72 var(--font-body); }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.top { border-bottom: 1px solid var(--edge); background: var(--paper); }
.bar, .menu, main, .foot { width: min(100% - 2rem, var(--content-width)); margin-inline: auto; }
.bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.125rem 0.875rem; }
.brand { color: var(--ink); font: 700 1.375rem/1.2 var(--font-display); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--accent); }
.langs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; font-size: 0.8125rem; }
.langs a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.langs a:hover, .langs [aria-current] { color: var(--ink); }
.langs [aria-current] { border-bottom: 1px solid var(--ink); font-weight: 700; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.625rem; padding-block: 0.65rem 0.8rem; border-top: 1px solid var(--edge); font-size: 0.9375rem; }
.menu a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.menu a:hover { color: var(--accent); text-decoration: underline; }

main { padding-block: 2.5rem 4rem; }
h1, h2, h3 { font-style: normal; overflow-wrap: anywhere; }
h1 { max-width: var(--reading-width); margin: 0.25rem 0 0.45rem; font: 700 clamp(2rem, 4.4vw, 3.25rem)/1.22 var(--font-display); letter-spacing: -0.035em; }
h2 { margin: 3rem 0 1rem; font: 700 clamp(1.4rem, 2.5vw, 1.875rem)/1.32 var(--font-display); letter-spacing: -0.02em; }
h3 { margin: 2rem 0 0.65rem; font-size: 1.125rem; line-height: 1.38; }
h4 { margin: 1.5rem 0 0.5rem; color: var(--muted); font-size: 0.9375rem; }
p { margin: 0.65rem 0; }
main > p:not(.sub), main > section:not(.area):not(.stores):not(.tours):not(.tips),
main > .facts, main > .src { max-width: var(--reading-width); }
main > section:not(.area):not(.stores):not(.tours):not(.tips) > p { max-width: 46rem; }
.sub { max-width: var(--reading-width); margin: 0 0 1.75rem; color: var(--muted); font-size: 0.9375rem; }
.lead { font-size: 1.125rem; line-height: 1.68; }
.meta { color: var(--muted); font-size: 0.875rem; }
.src { margin-top: 2.5rem; padding-top: 0.75rem; border-top: 1px solid var(--edge); font-size: 0.8125rem; }
.crumbs { margin-bottom: 1rem; color: var(--muted); font-size: 0.8125rem; }
.crumbs a { color: var(--muted); }
.app-icon { float: right; width: 4.25rem; height: 4.25rem; margin: 0 0 1rem 1.25rem; border-radius: 0.75rem; }
.app-screenshots { max-width: var(--reading-width); margin-top: 2.5rem; }
.app-screenshots h2 { margin: 0 0 0.9rem; }
.screen-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.screen-gallery figure { min-width: 0; margin: 0; }
.screen-gallery a { display: block; border: 1px solid var(--edge); background: var(--soft); }
.screen-gallery a:hover { border-color: var(--accent); }
.screen-gallery img { width: 100%; aspect-ratio: 9 / 20; object-fit: contain; }
.screen-gallery figcaption { padding-top: 0.4rem; color: var(--muted); font-size: 0.875rem; }

.hero { max-width: 62rem; margin: 1.75rem 0 2rem; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.hero figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.75rem; }
.facts { margin: 1.25rem 0 2rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--edge); }
.facts > div { display: grid; grid-template-columns: minmax(8rem, 25%) minmax(0, 1fr); gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--edge); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: 0.875rem; }
.facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.facts.compact { margin: 0.75rem 0 1rem; border-top-color: var(--edge); }
.facts.compact > div { padding-block: 0.55rem; }

.scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9375rem; }
th, td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--edge); vertical-align: top; overflow-wrap: anywhere; }
thead th { border-top: 1px solid var(--ink); color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.buses { table-layout: fixed; }
.buses th:first-child, .buses td:first-child { width: 15%; }
.buses th:last-child, .buses td:last-child { width: 15%; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.no { font-weight: 700; white-space: nowrap; }
.routeno { display: inline-block; margin: 0 0.4rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.rates { margin-top: 0.75rem; }
.rates th { width: 40%; font-weight: 600; }

.tip, .store, .tour { margin: 0; padding: 1.25rem 0 1.5rem; border-top: 1px solid var(--edge); }
.tip h3, .store h3, .tour h3 { margin-top: 0; }
.tip:last-child, .store:last-child, .tour:last-child { border-bottom: 1px solid var(--edge); }
.figures { color: var(--ink); font-variant-numeric: tabular-nums; }
.figures strong { font-weight: 700; }
.stores, .tours, .tips { margin-top: 1.75rem; }
.stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
.stores .store:nth-last-child(-n+2) { border-bottom: 1px solid var(--edge); }
.tours { max-width: var(--reading-width); }
.near { display: flex; flex-wrap: wrap; gap: 0.375rem 1.5rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.near li { padding-bottom: 0.4rem; border-bottom: 1px solid var(--edge); }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; margin: 1.5rem 0 3rem; border-top: 1px solid var(--ink); }
.quick a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.75rem; min-width: 0; padding: 0.8rem 0; border-bottom: 1px solid var(--edge); color: var(--ink); text-decoration: none; }
.quick a:hover strong { color: var(--accent); text-decoration: underline; }
.quick strong { font-weight: 700; }
.quick .meta { overflow-wrap: anywhere; }
.area { margin-top: 2.5rem; }
.area h3 { margin: 0 0 0.15rem; font: 700 1.375rem/1.35 var(--font-display); }
.area > p { margin: 0 0 0.75rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.card { min-width: 0; border-top: 1px solid var(--edge); }
.card:nth-last-child(-n+2) { border-bottom: 1px solid var(--edge); }
.card a { display: grid; grid-template-columns: 7.75rem minmax(0, 1fr); align-items: start; gap: 1rem; min-width: 0; padding: 0.875rem 0; color: var(--ink); text-decoration: none; }
.card a:hover strong { color: var(--accent); text-decoration: underline; }
.card img { width: 7.75rem; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.card:has(a:not(:has(img))) a { grid-template-columns: minmax(0, 1fr); }
.card-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.card-text strong { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }

ol.route { max-width: var(--reading-width); margin: 1.5rem 0 0; padding: 0; list-style: none; }
ol.route .step a { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--edge); color: var(--ink); text-decoration: none; font-weight: 700; }
ol.route .step a:hover { color: var(--accent); }
ol.route .step img { width: 7rem; aspect-ratio: 4 / 3; object-fit: cover; flex: none; }
ol.route .index { display: inline-block; min-width: 1.5rem; margin-right: 0.25rem; color: var(--muted); font-variant-numeric: tabular-nums; }
ol.route .move { margin: 0 0 0 2.5rem; padding: 0.55rem 0; color: var(--muted); font-size: 0.875rem; }
.stops { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.stops li { margin-bottom: 0.25rem; }

.play, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; margin-top: 0.5rem; padding: 0.45rem 0.8rem; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--paper); font-size: 0.875rem; font-weight: 700; line-height: 1.35; text-decoration: none; white-space: nowrap; }
.play:hover, .button:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.play:active, .button:active { transform: translateY(1px); }
.foot { padding-block: 1.25rem 2rem; border-top: 1px solid var(--edge); color: var(--muted); font-size: 0.8125rem; }
.foot p { margin: 0; }
.foot a { color: var(--muted); }

@media (max-width: 48rem) {
  .bar { padding-block: 1rem 0.75rem; }
  .brand { font-size: 1.25rem; }
  .menu { gap: 0.35rem 1.25rem; padding-block: 0.6rem 0.7rem; font-size: 0.875rem; }
  main { padding-block: 1.75rem 3rem; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap-inline: 1.25rem; }
  .cards { column-gap: 1.5rem; }
  .card a { grid-template-columns: 5.75rem minmax(0, 1fr); gap: 0.75rem; }
  .card img { width: 5.75rem; }
  .stores { column-gap: 1.5rem; }
}
@media (max-width: 40rem) {
  .bar, .menu, main, .foot { width: min(100% - 1.5rem, var(--content-width)); }
  .bar { gap: 0.65rem; }
  .langs { width: 100%; gap: 0.25rem 0.9rem; }
  .menu { column-gap: 1rem; }
  .quick, .cards, .stores { grid-template-columns: minmax(0, 1fr); }
  .quick { margin-bottom: 2.5rem; }
  .quick a { gap: 0.2rem 0.75rem; }
  .card:nth-last-child(-n+2), .stores .store:nth-last-child(-n+2) { border-bottom: 0; }
  .card:last-child, .store:last-child { border-bottom: 1px solid var(--edge); }
  .card a { grid-template-columns: 6.25rem minmax(0, 1fr); }
  .card img { width: 6.25rem; }
  .area { margin-top: 2.25rem; }
  .facts > div { grid-template-columns: minmax(6rem, 30%) minmax(0, 1fr); gap: 0.75rem; }
  .buses th, .buses td { padding: 0.5rem 0.35rem; font-size: 0.8125rem; }
  .buses th:first-child, .buses td:first-child { width: 16%; }
  .buses th:last-child, .buses td:last-child { width: 14%; }
  .screen-gallery { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hero { margin-block: 1.25rem 1.75rem; }
  .hero img { aspect-ratio: 3 / 2; }
}
@media (prefers-reduced-motion: reduce) {
  .play:active, .button:active { transform: none; }
}

/* 문답 · 휴대폰 아래 설치 띠 */
.faq { max-width: var(--reading-width); }
.faq h3 { margin: 1.5rem 0 0.35rem; font-size: 1rem; }
.faq p { margin: 0; }
.appbar { display: none; }
@media (max-width: 40rem) {
  .appbar:not([hidden]) { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--ink); background: var(--paper); }
  .appbar img { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 0.5rem; }
  .appbar-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
  .appbar-text strong { font-size: 0.9375rem; }
  .appbar-text span { overflow: hidden; color: var(--muted); font-size: 0.8125rem; text-overflow: ellipsis; white-space: nowrap; }
  .appbar .play { margin: 0; background: var(--ink); color: var(--paper); }
  .appbar-close { flex: none; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; background: none; color: var(--muted); font-size: 1.375rem; line-height: 1; cursor: pointer; }
  body.has-appbar { padding-bottom: 4.5rem; }
}
.routes-all { line-height: 2.1; }
.routes-all .routeno { margin-right: 0.85rem; }
a.routeno { color: var(--accent); }
.routestops { max-width: var(--reading-width); margin: 0.5rem 0 0; padding-left: 2.25rem; columns: 2; column-gap: 2.5rem; font-size: 0.9375rem; }
.routestops li { break-inside: avoid; padding: 0.15rem 0; }
@media (max-width: 40rem) { .routestops { columns: 1; } }
.buses.route-sights th:first-child, .buses.route-sights td:first-child { width: 32%; }
@media (max-width: 40rem) { .buses.route-sights th:first-child, .buses.route-sights td:first-child { width: 32%; } }

/* 앱 받기 상자 — 짙은 띠, 앱 아이콘, Google Play 배지, 실제 앱 화면 */
.promo { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; grid-template-areas: "head shot" "title shot" "points shot" "badge shot" "more shot"; align-content: start; column-gap: 2.5rem; max-width: 62rem; margin: 3rem 0; padding: 2rem 2.25rem; border-radius: 1rem; background: var(--ink); color: var(--paper); }
.promo-head { grid-area: head; display: flex; align-items: center; gap: 0.9rem; }
.promo-head img { width: 4.5rem; height: 4.5rem; flex: none; border-radius: 1rem; }
.promo-head p { margin: 0; }
.promo-name { font: 700 1.25rem/1.3 var(--font-display); }
.promo-tag { color: oklch(85% 0.01 65); font-size: 0.875rem; }
.promo h2 { grid-area: title; margin: 1.25rem 0 0.5rem; color: var(--paper); font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.3 var(--font-display); }
.promo-points { grid-area: points; margin: 0; padding: 0; list-style: none; font-size: 1.0625rem; }
.promo-points li { position: relative; padding: 0.3rem 0 0.3rem 1.6rem; }
.promo-points li::before { content: "✓"; position: absolute; left: 0; color: oklch(80% 0.12 145); font-weight: 700; }
.promo .badge { grid-area: badge; justify-self: start; display: block; margin: 1rem 0 0 -0.75rem; }
.promo .badge img { width: 13.5rem; height: auto; }
.promo .badge:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.promo-more { grid-area: more; margin: 0.25rem 0 0; font-size: 0.875rem; }
.promo-more a, .promo-more a:hover { color: var(--paper); }
.promo-shot { grid-area: shot; align-self: center; margin: 0; }
.promo-shot img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; border: 1px solid oklch(45% 0.01 65); border-radius: 1.25rem; background: var(--paper); }
.appbar-badge { display: block; flex: none; margin: -0.5rem -0.25rem; }
.appbar-badge img { width: 7.5rem; height: auto; }
@media (max-width: 40rem) {
  .promo { grid-template-columns: minmax(0, 1fr) 7rem; grid-template-areas: "head head" "title title" "points shot" "badge badge" "more more"; column-gap: 1rem; margin: 2.5rem 0; padding: 1.5rem 1.25rem; }
  .promo-head img { width: 3.5rem; height: 3.5rem; border-radius: 0.8rem; }
  .promo-points { font-size: 1rem; }
  .promo-shot { align-self: start; }
  .promo-shot img { border-radius: 0.8rem; }
  .promo .badge img { width: 12.5rem; }
}
