/* Layout: 모바일은 한 열(조건 ↔ 가이드를 탭으로 전환, 엄지 닿는 하단 바), 960px 이상은 왼쪽 조건 패널 + 오른쪽 가이드 */
:root {
  /* 색: 동해 깊은 바다(잉크) · 해무 낀 종이 · 익은 대게 껍데기(강조) · 블루로드(보조) */
  --paper: #EFF3F4;
  --surface: #FFFFFF;
  --surface-2: #E4EBEE;
  --ink: #0F2838;
  --ink-2: #4A6372;
  --line: #CCD9DF;
  --sea: #1B5E8A;
  --sea-soft: #DDEAF2;
  --crab: #C4432A;
  --crab-soft: #F7E4DD;
  --on-crab: #FFFFFF;
  --sun: #9A6512;
  --warn-bg: #FBF0DC;
  --warn-fg: #7A4D05;
  --ok-bg: #E2F1E8;
  --ok-fg: #1E6141;
  --bar-bg: #0F2838;
  --bar-fg: #EAF1F4;
  --bar-sub: #9DB6C4;
  --land: #E2E8E1;
  --water: #D4E5EF;
  --route: #C4432A;

  /* 글꼴: 제목은 바탕체 계열로 안내 책자 느낌, 본문은 플렉스 산스, 시각·숫자는 모노 */
  --font-display: 'Gowun Batang', 'Nanum Myeongjo', 'AppleMyungjo', serif;
  --font-body: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.125rem;

  --r: 14px;
  --r-sm: 9px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --bar-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A1720;
    --surface: #102330;
    --surface-2: #17303F;
    --ink: #E2ECF0;
    --ink-2: #98AFBC;
    --line: #23404F;
    --sea: #7DBAE4;
    --sea-soft: #15344A;
    --crab: #FF8862;
    --crab-soft: #3A2119;
    --on-crab: #1C0D07;
    --sun: #E7B355;
    --warn-bg: #33270F;
    --warn-fg: #F2CB80;
    --ok-bg: #16342A;
    --ok-fg: #8FD3AE;
    --bar-bg: #071119;
    --bar-fg: #E2ECF0;
    --bar-sub: #8AA4B3;
    --land: #16293A;
    --water: #0C1D29;
    --route: #FF8862;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0A1720;
  --surface: #102330;
  --surface-2: #17303F;
  --ink: #E2ECF0;
  --ink-2: #98AFBC;
  --line: #23404F;
  --sea: #7DBAE4;
  --sea-soft: #15344A;
  --crab: #FF8862;
  --crab-soft: #3A2119;
  --on-crab: #1C0D07;
  --sun: #E7B355;
  --warn-bg: #33270F;
  --warn-fg: #F2CB80;
  --ok-bg: #16342A;
  --ok-fg: #8FD3AE;
  --bar-bg: #071119;
  --bar-fg: #E2ECF0;
  --bar-sub: #8AA4B3;
  --land: #16293A;
  --water: #0C1D29;
  --route: #FF8862;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bar-bg);
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--sea); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ── 상단 바 ─────────────────────────────── */
.appbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bar-bg);
  color: var(--bar-fg);
}
.appbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.bm-sun { fill: var(--crab); }
.bm-wave { fill: none; stroke: var(--bar-fg); stroke-width: 2; stroke-linecap: round; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); line-height: 1.2; }
.brand-sub { font-size: var(--fs-xs); color: var(--bar-sub); letter-spacing: 0.02em; }
.tabs { display: flex; gap: 4px; }
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  color: var(--bar-sub);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-md);
  border-bottom: 3px solid transparent;
}
.tab[aria-current="page"] { color: var(--bar-fg); border-bottom-color: var(--crab); }
.tab-count { font-family: var(--font-mono); font-size: var(--fs-xs); background: rgb(255 255 255 / 0.12); padding: 1px 7px; border-radius: 99px; }
.tab-count:empty { display: none; }

/* ── 레이아웃 ─────────────────────────────── */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 20px calc(var(--bar-h) + 32px + env(safe-area-inset-bottom, 0px));
}
.panel { min-width: 0; }
body[data-view="plan"] .panel-guide,
body[data-view="guide"] .panel-plan { display: none; }
.guide-bar { display: none; }
body[data-view="guide"] .guide-bar { display: flex; }
.live-note { display: none; }

/* ── 조건 폼 ─────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-head { display: flex; flex-direction: column; gap: 6px; padding-block: 4px 6px; }
.form-title { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.25; font-weight: 700; }
.form-lead { color: var(--ink-2); font-size: var(--fs-md); max-width: 36em; }
.fs {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.fs-title {
  display: flex;
  align-items: center;
  gap: 10px;
  float: left;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  padding: 0;
}
.fs-title + * { clear: both; }
.fs-step {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sea-soft);
  color: var(--sea);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.fs-optional { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-xs); color: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.label small, .switch small { font-weight: 400; color: var(--ink-2); font-size: var(--fs-xs); }
input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 46px;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.time-range { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 8px; }
.time-range select { font-family: var(--font-mono); font-weight: 500; }
.time-sep { color: var(--ink-2); font-size: var(--fs-sm); }
.sun-line { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); color: var(--ink-2); }
.sun-line span { display: inline-flex; align-items: center; gap: 5px; }
.sun-line .ic { width: 16px; height: 16px; color: var(--sun); }
.sun-line b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.field-error { color: var(--crab); font-size: var(--fs-sm); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-md);
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--sea); }
.chip[aria-pressed="true"] { background: var(--sea); border-color: var(--sea); color: var(--surface); font-weight: 600; }
.chips-sm .chip { min-height: 34px; padding: 4px 12px; font-size: var(--fs-sm); background: var(--surface-2); border-color: transparent; }
.seg {
  display: flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
}
.seg button {
  flex: 1;
  min-height: 42px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  line-height: 1.3;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgb(15 40 56 / 0.15); }
.seg-stack { flex-direction: column; }
.seg-stack button { text-align: left; padding-inline: 12px; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { width: 76px; text-align: center; font-family: var(--font-mono); font-weight: 600; }
.stepper-unit { color: var(--ink-2); }
.step-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line); transition: background-color .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--sea); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--sea); outline-offset: 2px; }

.fs-note { font-size: var(--fs-sm); color: var(--ink-2); }
.pinned-stay { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sea-soft); font-size: var(--fs-sm); }

.must summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.must summary::-webkit-details-marker { display: none; }
.summary-hint { font-weight: 400; font-size: var(--fs-sm); color: var(--sea); }
.must[open] .summary-hint { visibility: hidden; }
.must-list { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.must-zone h4 { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); letter-spacing: 0.04em; }
.must-zone .chip { font-size: var(--fs-sm); min-height: 36px; padding: 4px 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-md);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--crab); border-color: var(--crab); color: var(--on-crab); }
.btn-ghost { background: var(--surface); }
.btn-block { width: 100%; min-height: 54px; font-size: var(--fs-lg); }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: var(--fs-sm); }

.cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.guide-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  gap: 8px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.guide-bar .btn { flex: 1; padding-inline: 8px; }

/* ── 가이드 ─────────────────────────────── */
.guide { display: flex; flex-direction: column; gap: 22px; }
.g-head { display: flex; flex-direction: column; gap: 12px; }
.g-eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--crab); }
.g-title { font-family: var(--font-display); font-size: var(--fs-3xl); line-height: 1.2; font-weight: 700; }
.g-sub { color: var(--ink-2); font-size: var(--fs-md); }
.g-route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.g-route .ic { width: 14px; height: 14px; color: var(--crab); }
.g-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.g-stats div { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.g-stats div + div { border-left: 1px solid var(--line); }
.g-stats dt { font-size: var(--fs-xs); color: var(--ink-2); }
.g-stats dd { margin: 0; font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.g-stats dd small { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2); margin-left: 1px; }
.g-actions { display: none; gap: 8px; flex-wrap: wrap; }

.notices { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sea-soft); font-size: var(--fs-sm); }
.notice .ic { margin-top: 2px; color: var(--sea); }
.notice.warn { background: var(--warn-bg); color: var(--warn-fg); }
.notice.warn .ic { color: var(--warn-fg); }

.excluded { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.excluded .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 10px 4px 12px; font-size: var(--fs-sm); text-decoration: line-through; text-decoration-color: var(--ink-2); }
.excluded .chip .ic { width: 14px; height: 14px; }

.day { display: flex; flex-direction: column; gap: 14px; }
.day + .day { padding-top: 18px; border-top: 1px dashed var(--line); }
.day-head { display: flex; flex-direction: column; gap: 4px; }
.day-title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-no { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 600; color: var(--on-crab); background: var(--crab); border-radius: 6px; padding: 1px 8px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); color: var(--ink-2); }
.day-meta span { display: inline-flex; align-items: center; gap: 5px; }
.day-meta .ic { width: 15px; height: 15px; color: var(--sun); }
.day-meta b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }

.map {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--water);
  max-width: 100%;
}
.map svg { display: block; width: 100%; height: auto; }
.map figcaption { font-size: var(--fs-xs); color: var(--ink-2); padding: 6px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.m-water { fill: var(--water); }
.m-land { fill: var(--land); stroke: var(--sea); stroke-width: 1.4; stroke-opacity: .55; }
.m-town { fill: var(--ink-2); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.m-sea-label { fill: var(--sea); font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.3em; opacity: .6; }
.m-route { fill: none; stroke: #b62e1e; stroke-width: 3; stroke-dasharray: 6 5; stroke-linecap: round; stroke-linejoin: round; paint-order: stroke; }
.m-pin circle { stroke: #fff; stroke-width: 2; }
.m-pin text { font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.m-pin.sight circle { fill: #b62e1e; }
.m-pin.sight text { fill: #fff; }
.m-pin.meal circle { fill: #15577e; }
.m-pin.meal text, .m-pin.cafe text { fill: #fff; }
.m-pin.cafe circle { fill: #4a6372; }
.m-pin.base rect { fill: #0f2838; stroke: #fff; stroke-width: 2; }
.m-pin.base text { fill: #fff; font-size: 10px; }
.m-scale line { stroke: var(--ink); stroke-width: 2; }
.m-scale text, .m-north text { fill: var(--ink); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.m-north path { fill: var(--ink); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl {
  position: relative;
  display: grid;
  grid-template-columns: 52px 30px minmax(0, 1fr);
  column-gap: 8px;
}
.tl::before {
  content: "";
  position: absolute;
  left: calc(52px + 8px + 14px);
  top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
}
.tl:first-child::before { top: 16px; }
.tl:last-child::before { bottom: calc(100% - 16px); }
.tl-time { display: flex; flex-direction: column; align-items: flex-end; padding-top: 4px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--fs-md); line-height: 1.3; }
.tl-time span + span { font-weight: 500; font-size: var(--fs-xs); color: var(--ink-2); }
.tl-mark { position: relative; z-index: 1; display: flex; justify-content: center; padding-top: 2px; }
.tl-dot {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--crab);
  color: var(--on-crab);
  border: 3px solid var(--paper);
}
.tl-dot .ic { width: 15px; height: 15px; }
.tl.meal .tl-dot { background: var(--sea); color: var(--surface); }
.tl.cafe .tl-dot { background: var(--ink-2); color: var(--surface); }
.tl.base .tl-dot { background: var(--ink); color: var(--paper); border-radius: 8px; }
.tl-body { padding-block: 4px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-kicker { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: var(--fs-xs); color: var(--ink-2); font-weight: 500; }
.tl-kind { font-weight: 700; color: var(--crab); letter-spacing: 0.04em; }
.tl.meal .tl-kind { color: var(--sea); }
.tl.cafe .tl-kind { color: var(--ink-2); }
.tl-name { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; line-height: 1.35; }
.tl.base .tl-name { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; }
.tl-menu { font-weight: 600; font-size: var(--fs-sm); }
.tl-photo { margin: 2px 0 2px; display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.tl-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.tl-photo img.contain, .food-photo img.contain, .meal-thumb img.contain { object-fit: contain; }
.tl-photo figcaption { font-size: 0.6875rem; color: var(--ink-2); line-height: 1.4; }
.tl-photo figcaption a { color: inherit; }
.tl-desc { color: var(--ink); font-size: var(--fs-md); max-width: 40em; }
.tl-tip { font-size: var(--fs-sm); color: var(--ink-2); }
.tl-tip b { color: var(--ink); font-weight: 600; }
.tl-facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: var(--fs-sm); }
.tl-facts dt { color: var(--ink-2); }
.tl-facts dd { margin: 0; }
.tl-card {
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl.meal .tl-card { background: var(--sea-soft); border-color: transparent; }
.meal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.meal-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.meal-thumb { margin: 0; width: 96px; display: flex; flex-direction: column; gap: 3px; }
.meal-thumb img { display: block; width: 96px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.meal-thumb figcaption { font-size: 0.625rem; color: var(--ink-2); text-align: center; line-height: 1.3; }
.tl-alts { font-size: var(--fs-sm); color: var(--ink-2); }
.tl-links { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.tl-links a, .tl-links button {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.tl-links .ic { width: 14px; height: 14px; }
.tl-links .drop { color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 0 8px; font-size: var(--fs-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.badge.crowd-low { background: var(--ok-bg); color: var(--ok-fg); }
.badge.crowd-high { background: var(--warn-bg); color: var(--warn-fg); }
.badge.hot { background: var(--crab-soft); color: var(--crab); }
.kto-facts { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.kto-head { font-size: var(--fs-xs); font-weight: 700; color: var(--sea); letter-spacing: 0.04em; }
.tl-also { font-size: var(--fs-sm); color: var(--ink-2); }
.tl-also b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.badge.check { background: var(--warn-bg); color: var(--warn-fg); }
.badge.price { font-family: var(--font-mono); }

.tl-move {
  display: grid;
  grid-template-columns: 52px 30px minmax(0, 1fr);
  column-gap: 8px;
  position: relative;
}
.tl-move::before {
  content: "";
  position: absolute;
  left: calc(52px + 8px + 14px);
  top: 0; bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--crab) 0 5px, transparent 5px 10px);
  opacity: .7;
}
.tl-move .mv {
  grid-column: 3;
  display: inline-flex; align-items: center; gap: 6px;
  padding-block: 2px 14px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.tl-move .mv b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.tl-move .ic { width: 16px; height: 16px; }

.tl.stay .tl-dot { background: var(--sea); color: var(--surface); border-radius: 8px; }
.tl.stay .tl-card { background: var(--sea-soft); border-color: transparent; }

.stays { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stay-card { padding: 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stay-card.chosen { border-color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); }
.stay-card h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; line-height: 1.35; }
.stay-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: var(--fs-xs); color: var(--ink-2); font-weight: 500; }
.stay-kind { font-weight: 700; color: var(--sea); letter-spacing: 0.04em; }
.stay-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.stay-price { font-size: var(--fs-sm); font-weight: 600; }
.stay-why { font-size: var(--fs-sm); color: var(--ink-2); }
.sub-h { font-size: var(--fs-md); font-weight: 700; padding-top: 4px; }

.spare { font-size: var(--fs-sm); color: var(--ink-2); padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); }

.g-section { display: flex; flex-direction: column; gap: 12px; }
.g-section h2 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; }
.foods { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.foods li { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.food-photo { margin: 0 0 4px; display: flex; flex-direction: column; gap: 4px; }
.food-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.food-photo figcaption { font-size: 0.6875rem; color: var(--ink-2); line-height: 1.4; }
.food-photo figcaption a { color: inherit; }
.foods h3 { font-size: var(--fs-md); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.foods .badge { background: var(--crab-soft); color: var(--crab); }
.foods p { font-size: var(--fs-sm); color: var(--ink-2); }
.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-md); }
.checklist li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border: 1.5px solid var(--ink-2); border-radius: 4px; }
.sources { font-size: var(--fs-xs); color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.sources ul { margin: 0; padding-left: 18px; }

.empty { padding: 32px 16px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 12px; align-items: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-sm);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.copy-sheet { position: fixed; inset: 0; z-index: 50; background: rgb(5 15 22 / .55); display: flex; align-items: flex-end; justify-content: center; }
.copy-sheet-inner {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: var(--r) var(--r) 0 0;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.copy-sheet-title { font-weight: 700; }
.copy-sheet textarea { font-family: var(--font-mono); font-size: 13px; line-height: 1.5; resize: vertical; }

/* 작은 화면에서는 입력 카드와 일정의 정보 밀도를 조정한다. */
@media (max-width: 639px) {
  .appbar-inner { gap: 4px; padding-top: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 1rem; }
  .brand-sub { font-size: .6875rem; }
  .tab { min-height: 40px; }
  .layout { padding-top: 22px; }
  .form { gap: 12px; }
  .form-head { padding: 2px 2px 10px; gap: 8px; }
  .form-title { font-size: clamp(1.5rem, 6vw, 1.75rem); }
  .form-lead { line-height: 1.65; }
  .fs { padding: 18px 16px; gap: 16px; border-radius: 16px; }
  .fs-title { font-size: 1.125rem; }
  .chip, .chips-sm .chip, .must-zone .chip { min-height: 44px; }
  .seg button { min-width: 0; }
  .time-range { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 5px; }
  .time-range select { padding-left: 8px; padding-right: 25px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; }
  .cta-bar, .guide-bar { box-shadow: 0 -6px 24px rgb(15 40 56 / .08); }
  .guide-bar .btn { font-size: .8125rem; gap: 4px; }
  .g-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-stats div:nth-child(3) { border-left: 0; }
  .g-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .g-stats div { padding: 10px 8px; }
  .tl, .tl-move { grid-template-columns: 44px 26px minmax(0, 1fr); column-gap: 6px; }
  .tl::before, .tl-move::before { left: 62px; }
  .tl-dot { width: 26px; height: 26px; }
  .tl-time { font-size: .8125rem; }
  .tl-links a, .tl-links button { min-height: 44px; }
  .map figcaption { line-height: 1.55; padding: 9px 12px; }
}

/* ── 넓은 화면 ─────────────────────────────── */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .foods { grid-template-columns: 1fr 1fr; }
  .meal-thumb, .meal-thumb img { width: 128px; }
  .meal-thumb img { height: 85px; }
  .g-title { font-size: 2.5rem; }
}
@media (min-width: 960px) {
  .appbar-inner { flex-direction: row; align-items: center; justify-content: space-between; padding-block: 12px; }
  .tabs { display: none; }
  .layout {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    padding-block: 28px 48px;
  }
  body[data-view] .panel-plan, body[data-view] .panel-guide { display: block; }
  .panel-plan {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 70px);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
  }
  .form-title { font-size: var(--fs-xl); }
  .cta-bar, body[data-view="guide"] .guide-bar { display: none; }
  .live-note { display: block; font-size: var(--fs-xs); color: var(--ink-2); text-align: center; }
  .g-actions { display: flex; }
  .map { max-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── 인쇄: 가이드만 A4 안내서로 ─────────────────────────────── */
@media print {
  :root { --paper: #fff; --surface: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, .appbar, .panel-plan, .cta-bar, .guide-bar, .g-actions, .tl-links, .toast, .excluded, .live-note { display: none !important; }
  body[data-view] .panel-guide { display: block !important; }
  .layout { display: block; padding: 0; max-width: none; }
  .tl, .tl-move, .foods li, .notice { break-inside: avoid; }
  .day { break-before: auto; }
  .map { max-width: 12cm; break-inside: avoid; }
  .tl-photo { max-width: 7cm; }
  a { color: inherit; text-decoration: none; }
}

/* 동행자와 함께 고르는 일정 · 먹거리 */
.vote-invite { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; border-radius: var(--r); background: var(--bar-bg); color: var(--bar-fg); }
.vote-invite h2 { font-family: var(--font-display); font-size: var(--fs-xl); margin: 4px 0; }
.vote-invite p:not(.vote-eyebrow) { color: var(--bar-sub); font-size: var(--fs-sm); }
.vote-eyebrow { color: #d87b60; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; }
.vote-invite .btn { flex: none; }
.vote-view .tabs, .vote-view .guide-bar, .vote-view .panel-plan { display: none !important; }
.vote-view .panel-guide { display: block !important; }
.vote-view .layout { display: block; max-width: 760px; padding-bottom: 48px; }
.vote-view .appbar-inner { padding-block: 12px; }
.vote-panel { display: flex; flex-direction: column; gap: 28px; }
.vote-head { padding: 24px; border-radius: 18px; background: var(--bar-bg); color: var(--bar-fg); }
.vote-head h1, .vote-panel > h1 { font: 700 var(--fs-2xl)/1.3 var(--font-display); margin: 6px 0 10px; }
.vote-head .vote-intro { color: var(--bar-sub); }
.vote-intro { font-size: var(--fs-md); }
.vote-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.vote-status { color: var(--bar-fg); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.vote-status:not(:empty) { margin-top: 12px; }
.vote-section { display: flex; flex-direction: column; gap: 12px; }
.vote-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vote-section-head h2 { font: 700 var(--fs-xl)/1.4 var(--font-display); }
.vote-section-head p, .vote-foot { color: var(--ink-2); font-size: var(--fs-sm); }
.vote-section-head > span { flex: none; padding: 3px 10px; border-radius: 99px; background: var(--sea-soft); color: var(--sea); font-size: var(--fs-sm); font-weight: 700; }
.vote-options { display: grid; gap: 8px; }
.vote-option { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.vote-option[aria-pressed="true"] { border-color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); background: var(--sea-soft); }
.vote-option:disabled { opacity: .7; cursor: wait; }
.vote-option-main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.vote-option-main strong { font-size: var(--fs-md); }
.vote-option-main > span { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
.vote-count { flex: none; font-family: var(--font-mono); font-weight: 600; color: var(--sea); }
@media (max-width: 639px) {
  .vote-invite { align-items: stretch; flex-direction: column; padding: 20px; }
  .vote-invite .btn { width: 100%; }
  .vote-head { padding: 22px 20px; }
  .vote-actions .btn { flex: 1; }
  .vote-option { min-height: 64px; }
}
@media print { .vote-invite { display: none; } }
