:root {
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f5f5f7;
  --paper: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --blue: #007aff;
  --blue-soft: #e8f2ff;
  --green: #0a7f5a;
  --radius: 8px;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfbfd 0%, #ffffff 42%, #f7f8fb 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 999px;
}

.nav-links a:hover {
  background: var(--soft);
  color: var(--ink);
}

.nav-links a.is-active,
.nav-links a.is-active:hover {
  background: var(--blue);
  color: #fff;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  gap: 28px;
  align-items: start;
}

.tool-hero > *,
.intro,
.calculator,
.photo-panel {
  min-width: 0;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 24px;
}

.intro-copy {
  padding-top: 28px;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

h1 {
  max-width: 720px;
  margin: 20px 0 16px;
  color: var(--ink);
  font-size: 74px;
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.title-line {
  display: block;
}

.lead {
  width: 100%;
  max-width: min(620px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.photo-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 290px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  box-shadow: var(--shadow-soft);
}

.photo-panel img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.02);
}

.photo-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.52));
}

.photo-caption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 1;
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
}

.calculator {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(180%) blur(18px);
}

.panel-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
}

.rate-badge {
  min-width: fit-content;
  padding: 7px 10px;
  border: 1px solid #cfe2ff;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #0759bd;
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* 도시·인원·숙박은 짧은 필드라 한 줄(3열)로 — 모바일에서도 유지 */
.form-section .form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-section {
  margin-bottom: 16px;
}

.form-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* 최상단 결과 요약 — 총액이 가장 먼저 보이도록 */
#resultSummary:not(:empty) {
  margin-bottom: 18px;
}
#resultSummary .result-card {
  margin-top: 0;
}

/* 컴팩트: 섹션 간격 축소 */
.calculator .form-section {
  margin-bottom: 12px;
}

/* 항공권 카드 본문 — 출발공항(+실패 시 수동칸)만, 세로로 쌓아 컴팩트 */
.flight-controls {
  grid-template-columns: 1fr;
}
.flight-card {
  padding: 14px;
}
.flight-card-head {
  margin-bottom: 10px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.toggle-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.14);
}

/* 인원·숙박 스텝퍼 (−/+ 버튼) */
.stepper {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: stretch;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}
.stepper:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.14);
}
.stepper-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stepper-btn:hover {
  background: var(--blue-soft, #eaf2ff);
}
.stepper-btn:active {
  background: #d8e7ff;
}
.stepper-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.stepper-value input {
  width: 2.2ch;
  height: 100%;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  text-align: right;
  font-weight: 700;
  padding: 0 !important;
  box-shadow: none !important;
}
.stepper-unit {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.stepper input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  width: 100%;
  padding-right: 34px;
}

.input-suffix::after {
  content: attr(data-suffix);
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

.input-suffix input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.input-suffix input[type="number"]::-webkit-outer-spin-button,
.input-suffix input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.segmented input:checked + label {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.flight-lookup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfd;
}

.flight-lookup b,
.flight-result-head b {
  display: block;
  font-size: 14px;
}

.flight-lookup span,
.flight-result-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.lookup-button,
.text-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #cfe2ff;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #0759bd;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.lookup-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.flight-result {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.flight-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.flight-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.flight-price-grid div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfd;
}

.flight-price-grid b,
.flight-price-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.flight-price-grid span {
  display: block;
  margin: 5px 0 3px;
  font-weight: 800;
}

.flight-result p,
.flight-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.airline-offers {
  margin-top: 14px;
}
.airline-offers > b {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}
.airline-note {
  font-weight: 600;
  color: var(--muted);
}
.airline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.airline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}
.airline-row.is-best {
  border-color: var(--blue);
  background: rgba(0, 122, 255, 0.06);
}
.airline-best {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
.airline-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.airline-price {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}
.airline-price small {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
}
.airline-price strong {
  font-weight: 700;
}

/* 기본 예산표 — 카드형 (가로 스크롤 제거) */
.budget-cards {
  display: grid;
  gap: 10px;
}
.budget-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}
.budget-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.budget-card-head b {
  font-size: 15px;
}
.budget-total {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.budget-desc {
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.budget-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* 항공권 — 한 곳에서 관리하는 카드 */
.flight-card {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(0, 122, 255, 0.025);
}
.flight-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.flight-card-title b {
  display: block;
  font-size: 15px;
  font-weight: 800;
}
.flight-card-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.flight-card-body {
  transition: opacity 0.15s ease;
}
.flight-card-body .form-grid {
  margin-bottom: 12px;
}
.flight-card.is-off .flight-card-body {
  opacity: 0.4;
  pointer-events: none;
}
.flight-card .lookup-button {
  width: 100%;
  margin-top: 2px;
}

/* 항공권 요약 줄(접힘 상태에서 항상 보임) */
.flight-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.flight-summary-price {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.flight-summary-price small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.flight-toggle {
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.flight-toggle-caret {
  display: inline-block;
  transition: transform 0.15s ease;
}
.flight-card:not(.is-collapsed) .flight-toggle-caret {
  transform: rotate(180deg);
}
/* 접힘: 본문 숨김 + 요약만 */
.flight-card.is-collapsed .flight-card-body {
  display: none;
}
.flight-card:not(.is-collapsed) .flight-card-summary {
  margin-bottom: 12px;
}

/* 토글 스위치 */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.switch > input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}
.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.15s ease;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.switch > input:checked + .switch-track {
  background: var(--blue);
}
.switch > input:checked + .switch-track .switch-thumb {
  transform: translateX(18px);
}
.switch > input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}
.switch-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* 시세 자동 반영 시 입력칸 강조 */
@keyframes fieldFlash {
  from { background: rgba(0, 122, 255, 0.18); }
  to { background: rgba(255, 255, 255, 0.92); }
}
.input-suffix input.just-filled {
  animation: fieldFlash 0.9s ease;
}

.result-card {
  padding: 18px;
  border-radius: var(--radius);
  background: #111827;
  color: #fff;
}

.result-label {
  margin: 0 0 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.result-total {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

[data-animate-value] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: transform 180ms ease, opacity 180ms ease;
}

[data-animate-value].is-updating {
  opacity: 0.92;
  transform: translateY(-1px);
}

.result-sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric b {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.metric span {
  font-weight: 800;
}

/* 라벨 옆 보조 힌트 칩 */
.field-hint {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--blue-soft, #eaf2ff);
  color: #0759bd;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* 비용 구성 — 비중 막대 + 항목 리스트 */
.cost-breakdown {
  margin: 14px 0;
}
.cost-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
}
.cost-bar .seg {
  height: 100%;
  min-width: 2px;
  transition: width 0.35s ease;
}
.seg-air      { background: #1f6feb; }
.seg-lodging  { background: #2da44e; }
.seg-food     { background: #fb8500; }
.seg-shopping { background: #d63384; }
.seg-activities { background: #8957e5; }
.seg-transport  { background: #0aa2c0; }

.cost-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.cost-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}
.cost-row:last-child {
  border-bottom: 0;
}
.cost-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cost-name {
  font-weight: 700;
}
.cost-share {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.cost-krw {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.section {
  margin-top: 42px;
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: saturate(180%) blur(18px);
}

.share-kicker {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.share-copy h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.share-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.share-button:hover {
  transform: translateY(-1px);
  border-color: #cfe2ff;
  background: var(--blue-soft);
}

.share-button-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.share-button-primary:hover {
  background: #006be0;
  color: #fff;
}

.share-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 32px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.breakdown-table {
  min-width: 0;
}

.breakdown-table th,
.breakdown-table td {
  white-space: normal;
}

.breakdown-table th:nth-child(2),
.breakdown-table th:nth-child(3),
.breakdown-table td:nth-child(2),
.breakdown-table td:nth-child(3) {
  text-align: right;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #fbfbfd;
  font-size: 13px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.grid-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.link-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: #cfe2ff;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.1);
}

.link-card b {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.link-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.fx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fx-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.fx-value {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 800;
}

.note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 60px;
  }
}

@media (max-width: 900px) {
  .tool-hero {
    grid-template-columns: 1fr;
  }

  /* 모바일은 세로 스택 → sticky 해제(계산기 가림 방지) */
  .intro {
    position: static;
  }

  .intro-copy {
    padding-top: 8px;
  }

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

  .share-panel {
    grid-template-columns: 1fr;
  }

  .share-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 12px 0;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .page-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 22px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .lead {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    font-size: 16px;
    word-break: keep-all;
  }

  .photo-panel,
  .photo-panel img {
    min-height: 360px;
  }

  .calculator {
    padding: 14px;
  }

  .panel-title {
    flex-direction: column;
  }

  .result-total {
    font-size: 38px;
  }

  .form-grid,
  .metrics,
  .fx-grid,
  .flight-price-grid {
    grid-template-columns: 1fr;
  }

  .flight-lookup,
  .flight-result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .share-panel {
    padding: 16px;
  }

  .share-button {
    flex: 1 1 auto;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 35px;
  }
}
