:root {
  --ink: #1d2a30; --muted: #6b7a80; --paper: #f6f3ec; --card: #fff; --line: #e2ddd2;
  --teal: #1f4e5f; --coral: #e07a5f; --gold: #c9a227; --green: #3d8361;
  font-family: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; padding-bottom: env(safe-area-inset-bottom); }
button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 10px; color: var(--ink); }
button.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
button.icon { border: 0; background: none; font-size: 18px; padding: 4px 8px; }
input { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: #fff; color: var(--ink); }

.top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--teal); color: #fff; position: sticky; top: 0; z-index: 900; }
.top h1 { font-size: 17px; margin: 0; flex: 1; letter-spacing: -.3px; }
.top .hotel { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); font-size: 13px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .icon { color: #fff; }

.ask { padding: 10px 12px 6px; position: relative; }
.row { display: flex; gap: 6px; align-items: center; }
.row #q { flex: 1; min-width: 0; }
.row.small { margin-top: 8px; font-size: 13px; flex-wrap: wrap; gap: 10px; }
.row.small input[type=time] { padding: 4px 6px; }
.seg { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.suggest { position: absolute; left: 12px; right: 12px; top: 52px; background: #fff; border: 1px solid var(--line); border-radius: 8px; z-index: 950; max-height: 260px; overflow: auto; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.suggest div { padding: 9px 12px; border-bottom: 1px solid #f0ece3; }
.suggest div small { color: var(--muted); margin-left: 6px; }
.note { margin-top: 8px; font-size: 13px; color: #8a5a00; background: #fff6dc; border-radius: 8px; padding: 7px 10px; }

#map { height: 36vh; min-height: 220px; margin: 6px 12px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }

section#pick, section#result { padding: 4px 12px 12px; }
h2 { font-size: 17px; margin: 10px 0 4px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.muted { color: var(--muted); font-weight: normal; font-size: 12px; }
.stay { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.stay button { padding: 0 8px; line-height: 22px; }
.stay b { color: var(--ink); min-width: 26px; text-align: center; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 6px; scrollbar-width: none; }
.tabs button { flex: none; border-radius: 16px; padding: 5px 12px; font-size: 13px; }
.tabs button.on { background: var(--coral); border-color: var(--coral); color: #fff; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; display: flex; gap: 10px; align-items: center; }
.list li.on { border-color: var(--teal); box-shadow: inset 4px 0 0 var(--teal); }
.list li .nm { font-weight: 600; }
.list li .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list li .grow { flex: 1; min-width: 0; }
.list li a { font-size: 12px; color: var(--teal); text-decoration: none; white-space: nowrap; }
.list li.more { justify-content: center; color: var(--muted); font-size: 13px; }
.list li.empty { color: var(--muted); font-size: 13px; }
.walk { font-size: 12px; background: #eef4f1; color: var(--green); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

.sum { background: var(--teal); color: #fff; border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.sum .big { font-size: 22px; font-weight: 700; }
.sum .sub { font-size: 13px; opacity: .85; margin-top: 3px; }
.tl { list-style: none; padding: 0; margin: 12px 0 0; position: relative; }
.tl li { position: relative; padding: 0 0 12px 22px; }
.tl li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li.stop::after { content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--coral); }
.tl li.stop.hotel::after { background: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.tl .t { font-size: 12px; color: var(--muted); }
.tl .stop .nm { font-weight: 700; }
.tl .move { font-size: 13px; }
.tl .move .card { background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 7px 9px; }
.tl .move .head { font-weight: 600; }
.tl .move .step { color: var(--muted); margin-top: 2px; }
.tl .move a { font-size: 12px; color: var(--teal); }
.est { color: #8a5a00; font-size: 12px; }

.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1000; display: flex; align-items: flex-end; }
.sheet .panel { background: var(--paper); width: 100%; max-height: 86vh; overflow: auto; border-radius: 14px 14px 0 0; padding: 12px 14px 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.field { margin: 10px 0; font-size: 13px; }
.field label { display: block; color: var(--muted); margin-bottom: 4px; }
.field input { width: 100%; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ok { color: var(--green); } .no { color: #b3261e; }

.pin { background: var(--coral); color: #fff; border: 2px solid #fff; border-radius: 14px; padding: 2px 7px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.pin.spot { background: var(--teal); }
.pin.hotel { background: #333; }
.pin.dim { background: #fff; color: var(--ink); border-color: var(--coral); font-weight: 500; opacity: .9; }
.pin.dim.cafe { border-color: #8d6e63; }

.pin.dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; background: var(--coral); border: 2px solid #fff; }
.pin.dot.cafe { background: #8d6e63; }
.bar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 950; background: var(--ink); color: #fff; border-radius: 12px; padding: 11px 14px; display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.bar b { font-size: 16px; } .bar span { flex: 1; font-size: 12px; opacity: .8; } .bar button { background: var(--coral); border: 0; color: #fff; }
body.hasbar { padding-bottom: 80px; }
