/* 맛집 노트 — 대한민국 지도 × 메신저 맛집 노트 */
:root {
  --bg: #fdfbf7;
  --panel: #ffffff;
  --ink: #202836;
  --ink-2: #4a5568;
  --muted: #8a94a3;
  --line: #eae5dc;
  --line-soft: #f1ede6;
  --accent: #ff5a2b;
  --accent-ink: #b93a12;
  --accent-soft: #ffe8df;
  --sea-1: #f7fbff;
  --sea-2: #e4effa;
  --land: #cfdff0;
  --land-hover: #b9d3ee;
  --land-active: #ffd9c8;
  --bubble: #ffffff;
  --chat-bg: #f7f4ee;
  --shadow-sm: 0 1px 2px rgba(24, 39, 62, .06), 0 2px 8px rgba(24, 39, 62, .05);
  --shadow-md: 0 6px 24px rgba(24, 39, 62, .10);
  --shadow-lg: 0 24px 60px rgba(24, 39, 62, .16);
  --r: 14px;
  --topbar-h: 64px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
          "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--bg);
}

/* ---------- top bar ---------- */
.topbar {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, .92);
  backdrop-filter: blur(10px);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.brand-text { min-width: 0; }
.brand h1 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.brand p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand p b { color: var(--ink-2); }

.topbar-actions { position: relative; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: background .15s, transform .15s, color .15s;
}
.icon-btn:hover { background: #fff8f2; color: var(--accent-ink); }
.icon-btn:active { transform: scale(.96); }
.icon-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: #ffc9b5; color: var(--accent-ink); }

.menu {
  position: fixed; top: 64px; right: 16px; width: 262px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-md);
  padding: 8px; z-index: 60;
  animation: pop .16s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 10px 11px;
  border: 0; border-radius: 10px; background: none;
  font-size: 13.5px; text-align: left;
}
.menu button:hover { background: #fbf7f1; }
.menu .menu-link {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 10px 11px; margin: 0;
  border: 0; border-radius: 10px; background: none;
  font-size: 13.5px; line-height: 1.4; text-align: left;
  color: var(--ink); text-decoration: none;
}
.menu .menu-link:hover { background: #fbf7f1; }
.menu button.danger { color: #c0392b; }
.menu-note {
  margin: 6px 4px 2px; padding-top: 8px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
}

/* ---------- layout ---------- */
.layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(380px, .78fr) minmax(400px, 1.22fr);
  gap: 0;
}

/* ---------- map ---------- */
.map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(90% 70% at 50% 8%, var(--sea-1) 0%, var(--sea-2) 60%, #dfeaf6 100%);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 6px 4px 0;
}
.map-fit { position: relative; }
#map { display: block; width: 100%; height: 100%; overflow: visible; position: relative; z-index: 1; }
#g-regions { filter: drop-shadow(0 3px 6px rgba(30, 60, 100, .10)); }

.region path {
  fill: var(--land);
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill .18s ease, opacity .18s ease;
}
.region:hover path,
.region.is-hover path { fill: var(--land-hover); }
.region.is-active path { fill: var(--land-active); stroke: #fff; stroke-width: 1.6; }
.region.is-active .active-stroke {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linejoin: round;
  pointer-events: none;
}
.region:focus { outline: none; }
.region:focus-visible path { stroke: var(--accent); stroke-width: 2; }
.inset-box {
  fill: rgba(255, 255, 255, .72);
  stroke: #b9cde3;
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
  rx: 10px;
}
.inset .region path { fill: var(--land); stroke: #fff; stroke-width: 1; }
.inset .region:hover path, .inset .region.is-hover path { fill: var(--land-hover); }
.inset .region.is-active path { fill: var(--land-active); }
.leader-line { stroke: #a9bed6; stroke-width: 1.1; stroke-dasharray: 3 3; fill: none; }
.seoul-dot { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.inset-note { fill: #93a5b8; font-size: 9px; letter-spacing: .02em; }
.inset-cap { fill: #6b7d90; font-size: 11px; font-weight: 700; }

/* labels (HTML overlay, crisp at every size) */
.map-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.map-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px 2px 8px;
  background: rgba(255, 255, 255, .93);
  border: 1px solid rgba(32, 40, 54, .09);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(24, 39, 62, .10);
  font-size: 11.5px; font-weight: 700; line-height: 1.2;
  color: #2c3849; white-space: nowrap;
  cursor: pointer; pointer-events: auto;
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.map-label .lines { display: block; text-align: center; }
.map-label:hover { background: #fff; transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 4px 14px rgba(24, 39, 62, .16); }
.map-label.is-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(255, 90, 43, .35); }
.map-label .badge {
  display: inline-grid; place-items: center;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--accent);
  color: #fff; font-size: 9.5px; font-weight: 800;
}
.map-label.is-active .badge { background: #fff; color: var(--accent-ink); }
.map-label .badge.zero { background: #e6eaf0; color: #93a0b1; }
.map-label.seoul-label { font-size: 11px; }
.map-label.inset-label { font-size: 11.5px; padding: 3px 7px; }
.map-label.inset-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.map-foot {
  flex: 0 0 auto;
  padding: 6px 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.map-hint {
  margin: 0; font-size: 12.5px; color: #6b7d90;
  background: rgba(255, 255, 255, .7);
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .8);
  backdrop-filter: blur(6px);
}
.chips { display: none; }
.map-legal {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #9aa3b0; letter-spacing: .01em;
}
.map-legal a { color: #6b7d90; text-decoration: none; font-weight: 600; }
.map-legal a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- room ---------- */
.room {
  display: flex; flex-direction: column;
  min-height: 0; min-width: 0;
  background: var(--chat-bg);
  position: relative;
}
.room-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 5;
}
.back-btn {
  display: none;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 7px 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.back-btn:hover { background: #fff8f2; color: var(--accent-ink); }
.room-title-wrap { flex: 1 1 auto; min-width: 0; }
.room-title {
  margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.room-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.room-search-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2);
}
.room-search-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: #ffc9b5; color: var(--accent-ink); }
.room-more { display: none; }

.search-row {
  flex: 0 0 auto;
  display: flex; gap: 6px; align-items: center;
  padding: 8px 14px;
  background: #fff; border-bottom: 1px solid var(--line-soft);
}
.search-row input {
  flex: 1 1 auto; min-width: 0;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #faf8f4;
  font-size: 13.5px; outline: none;
}
.search-row input:focus { border-color: #ffb79e; background: #fff; box-shadow: 0 0 0 3px rgba(255, 90, 43, .1); }
.search-row button {
  border: 0; background: none; color: var(--muted); font-size: 14px; padding: 6px;
}

.room-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px 18px;
  scroll-behavior: smooth;
  background-image: radial-gradient(rgba(32, 40, 54, .045) 1px, transparent 1px);
  background-size: 18px 18px;
}
.day-divider { display: flex; justify-content: center; margin: 2px 0 14px; }
.day-divider span {
  font-size: 11px; font-weight: 700; color: #7c8796;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line-soft);
  padding: 3px 10px; border-radius: 999px;
}

.empty-room {
  height: 100%; min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 4px; padding: 24px;
}
.empty-emoji { font-size: 42px; margin-bottom: 8px; opacity: .9; }
.empty-title { margin: 0; font-size: 15.5px; font-weight: 800; }
.empty-desc { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

.bubbles { display: flex; flex-direction: column; gap: 10px; }
.bubble {
  position: relative;
  align-self: flex-start;
  max-width: 92%;
  background: var(--bubble);
  border: 1px solid #eee8de;
  border-radius: 4px 16px 16px 16px;
  padding: 12px 14px 10px;
  box-shadow: 0 1px 2px rgba(24, 39, 62, .05);
  animation: bubble-in .22s ease-out;
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.bubble::before {
  content: ""; position: absolute; left: -6px; top: 0;
  border: 6px solid transparent; border-top-color: var(--bubble); border-right-color: var(--bubble);
}
.bubble.is-new { box-shadow: 0 0 0 2px rgba(255, 90, 43, .28), 0 2px 8px rgba(24, 39, 62, .06); }
.bubble-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bubble-name { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; }
.chip {
  font-size: 10px; font-weight: 800; letter-spacing: .02em;
  color: #9a6b00; background: #fff3cf; border: 1px solid #ffe7a3;
  padding: 1px 6px; border-radius: 999px;
}
.bubble-loc { margin-top: 3px; font-size: 12px; color: #7b8494; display: flex; align-items: center; gap: 4px; }
.bubble-desc { margin: 7px 0 0; font-size: 13.5px; line-height: 1.55; color: #333d4d; white-space: pre-wrap; word-break: keep-all; }
.bubble-actions {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line-soft);
}
.bubble-actions .act {
  border: 1px solid transparent; background: none; border-radius: 8px;
  padding: 4px 7px; font-size: 11.5px; font-weight: 700; color: #6b7788;
  text-decoration: none; display: inline-flex; align-items: center; gap: 3px;
}
.bubble-actions .act:hover { background: #f7f3ec; color: var(--ink); }
.bubble-actions .act.map { color: #1f7a4d; }
.bubble-actions .act.map:hover { background: #eaf7f0; }
.bubble-actions .act.del:hover { background: #fdecea; color: #c0392b; }
.bubble-time { margin-left: auto; font-size: 10.5px; color: #b3bbc7; }

/* edit mode */
.bubble.editing { background: #fffdf8; border-color: #ffd3c0; }
.edit-form { display: flex; flex-direction: column; gap: 6px; }
.edit-form input, .edit-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; font-size: 13px; outline: none;
}
.edit-form input:focus, .edit-form textarea:focus { border-color: #ffb79e; box-shadow: 0 0 0 3px rgba(255, 90, 43, .1); }
.edit-form .row { display: flex; gap: 6px; }
.edit-actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn-sm {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 6px 11px; font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.btn-sm.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm.primary:hover { background: #f04a1b; }

.no-result { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 10px; margin: 0; }

/* composer */
.composer {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.composer-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.composer-label { font-size: 12.5px; font-weight: 800; color: var(--accent-ink); }
.composer-hint { font-size: 11px; color: var(--muted); }
.composer-rows { display: flex; flex-direction: column; gap: 6px; }
.composer-row { display: flex; gap: 6px; align-items: stretch; }
.composer-row input {
  flex: 1 1 0; min-width: 0;
  padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line);
  background: #faf8f5; font-size: 13.5px; outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.composer-row textarea {
  flex: 1 1 auto; min-width: 0; resize: none;
  padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line);
  background: #faf8f5; font-size: 13.5px; outline: none;
  max-height: 92px; line-height: 1.4;
}
.composer-row input:focus, .composer-row textarea:focus {
  border-color: #ffb79e; background: #fff; box-shadow: 0 0 0 3px rgba(255, 90, 43, .1);
}
.composer-row input::placeholder, .composer-row textarea::placeholder { color: #a9b2c0; }
.send {
  flex: 0 0 auto; width: 44px; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(255, 90, 43, .3);
  transition: background .15s, transform .15s;
}
.send:hover { background: #f04a1b; }
.send:active { transform: scale(.95); }
.send:disabled { background: #e3ded5; box-shadow: none; cursor: not-allowed; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: rgba(30, 38, 50, .94); color: #fff;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 90; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  :root { --topbar-h: 58px; }
  .layout { grid-template-columns: 1fr; }
  .map-panel { border-right: 0; border-bottom: 0; }
  .topbar { padding: 0 14px; }
  .brand h1 { font-size: 16px; }
  .brand p { font-size: 11.5px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }

  .room {
    position: fixed; inset: 0; z-index: 50;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.22, .8, .3, 1);
    visibility: hidden;
    box-shadow: var(--shadow-lg);
  }
  .app.room-open .room { transform: translateY(0); visibility: visible; }
  .back-btn { display: inline-flex; align-items: center; }
  .room-head { padding: 10px 12px; gap: 8px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .room-more { display: grid; }
  .room-title { font-size: 15.5px; }
  .room-body { padding: 12px 12px 16px; }
  .bubble { max-width: 96%; }
  .composer { padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); }
  .composer-hint { display: none; }
  .composer-row input, .composer-row textarea { font-size: 16px; } /* iOS zoom 방지 */
  .search-row input { font-size: 16px; }

  .chips {
    display: flex; gap: 6px; overflow-x: auto;
    width: 100%; padding: 2px 2px 2px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 11px; border-radius: 999px;
    border: 1px solid rgba(32, 40, 54, .08); background: rgba(255, 255, 255, .86);
    font-size: 12.5px; font-weight: 700; color: #3a4657;
    box-shadow: 0 1px 3px rgba(24, 39, 62, .06);
  }
  .chip-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .chip-btn .n { font-size: 10.5px; font-weight: 800; opacity: .75; }
  .map-foot { padding: 4px 12px 14px; }
}

@media (max-width: 380px) {
  .brand p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* active outline duplicate path */
.region .active-stroke { display: none; }
.region.is-active .active-stroke { display: block; }

/* map label variants */
.map-label.tiny {
  font-size: 9.5px; font-weight: 600; color: #7f8f9f;
  padding: 1px 5px; background: rgba(255, 255, 255, .66);
  border: 0; box-shadow: none; pointer-events: none;
  letter-spacing: .02em;
}
.map-label:not(.is-active).is-hover { background: #fff; }

[hidden] { display: none !important; }


/* ---------- Ulleungdo / Dokdo inset card ---------- */
.inset-card {
  position: absolute; top: 10px; right: 10px;
  width: 118px; padding: 4px 4px 0;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(32, 40, 54, .09);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(24, 39, 62, .12);
  cursor: pointer; z-index: 3;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.inset-card:hover, .inset-card.is-hover { transform: translateY(-1px); background: #fff; box-shadow: 0 10px 24px rgba(24, 39, 62, .18); }
.inset-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inset-card.is-active { box-shadow: 0 0 0 2px var(--accent), 0 10px 24px rgba(255, 90, 43, .22); }
.inset-head {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  font-size: 10.5px; font-weight: 800; color: #3a4657; padding: 1px 3px 3px;
}
.inset-head .badge {
  display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 800;
}
.inset-head .badge.zero { background: #e6eaf0; color: #93a0b1; }
.inset-card.is-active .inset-head .badge { background: #fff; color: var(--accent-ink); }
.inset-card svg { display: block; width: 100%; height: auto; overflow: visible; }
.inset-frame { fill: #f4f9ff; stroke: #b9cde3; stroke-width: 1; stroke-dasharray: 4 3; }
.inset-land { fill: var(--land); stroke: #fff; stroke-width: 1.2; }
.inset-dokdo { fill: #fff; stroke: #4a5568; stroke-width: 1.4; }
.inset-cap { font-size: 8px; fill: #7a8b9d; text-anchor: middle; font-family: var(--font); font-weight: 700; }
.inset-note { display: block; text-align: right; font-size: 7.5px; color: #b6c2ce; padding: 1px 4px 3px; }

@media (max-width: 900px) {
  .inset-card { width: 92px; padding: 3px 3px 0; border-radius: 11px; }
  .inset-head { font-size: 8.5px; padding: 0 2px 1px; }
  .inset-head .badge { min-width: 13px; height: 13px; font-size: 8.5px; }
  .inset-cap { font-size: 7px; }
  .inset-note { display: none; }
}

/* ---------- 제보·홍보 안내 ---------- */
.contact-card {
  width: 100%; max-width: 520px;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(32, 40, 54, .08);
  border-radius: 12px; padding: 8px 12px;
  text-align: center; backdrop-filter: blur(6px);
}
.contact-title { margin: 0 0 2px; font-size: 11.5px; font-weight: 800; color: #3a4657; }
.contact-desc { margin: 0 0 4px; font-size: 10.5px; line-height: 1.5; color: #6b7d90; word-break: keep-all; }
.contact-mail { font-size: 11px; font-weight: 800; color: var(--accent-ink); text-decoration: none; }
.contact-mail:hover { text-decoration: underline; }

.room-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  text-align: center;
  backdrop-filter: blur(8px);
}
.room-foot-title { margin: 0 0 1px; font-size: 11.5px; font-weight: 800; color: var(--accent-ink); }
.room-foot-desc { margin: 0 0 4px; font-size: 11px; line-height: 1.45; color: var(--muted); word-break: keep-all; }
.room-foot-mail { font-size: 11.5px; font-weight: 800; color: var(--ink-2); text-decoration: none; }
.room-foot-mail:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- 업종 필터 ---------- */
.cat-bar {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 5px;
  padding: 8px 14px;
  background: #fff; border-bottom: 1px solid var(--line-soft);
}
/* 칩과 뽑기 버튼이 한 흐름에서 줄바꿈되어, 좁은 화면에서도 잘리지 않습니다. */
.cat-scroll { display: contents; }
.cat-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #faf8f4;
  color: #4a5568; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.cat-chip .n { font-size: 10.5px; font-weight: 800; opacity: .62; }
.cat-chip:hover { background: #fff5ee; border-color: #ffd3c0; }
.cat-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-chip.is-active .n { opacity: .92; }
.dice-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid #ffc9b5; background: var(--accent-soft);
  color: var(--accent-ink); font-size: 12px; font-weight: 800; white-space: nowrap;
}
.dice-btn:hover { background: #ffdccd; }
.dice-btn:active { transform: scale(.97); }

/* ---------- 오늘 뭐 먹지? 카드 ---------- */
.pick-layer {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px;
  background: rgba(24, 39, 62, .42);
  backdrop-filter: blur(3px);
}
.pick-card {
  position: relative; width: 100%; max-width: 360px;
  background: #fff; border-radius: 20px; padding: 20px 20px 16px;
  box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out;
}
.pick-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border: 0; border-radius: 10px;
  background: #f6f2ec; color: #6b7788; font-size: 13px; line-height: 1;
}
.pick-close:hover { background: #efe8df; color: var(--ink); }
.pick-eyebrow { margin: 0 0 8px; font-size: 11.5px; font-weight: 800; color: var(--accent-ink); }
.pick-name { margin: 0 0 4px; font-size: 20px; letter-spacing: -.02em; }
.pick-loc { margin: 0 0 8px; font-size: 12.5px; color: #7b8494; }
.pick-desc { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: #333d4d; word-break: keep-all; }
.pick-actions { display: flex; gap: 6px; }
.pick-act {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 10px 6px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 12px; font-weight: 800;
  text-decoration: none; white-space: nowrap;
}
.pick-act.naver { color: #1f7a4d; border-color: #cfe9d9; background: #f2fbf6; }
.pick-act.kakao { color: #3c1e1e; border-color: #f6e6a8; background: #fffbe6; }
.pick-act.share { color: #4a5568; }
.pick-act:hover { filter: brightness(.97); }
.pick-again {
  width: 100%; margin-top: 10px; padding: 11px;
  border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 800;
}
.pick-again:hover { background: #f04a1b; }

/* 카드 액션: 카카오맵·공유 추가 */
.bubble-actions .act.kakao { color: #8a6d00; }
.bubble-actions .act.kakao:hover { background: #fffbe6; color: #6b5400; }
.bubble-actions .act.share { color: #5b6b8c; }
.bubble-actions .act.share:hover { background: #eef2f9; color: #33415c; }

@media (max-width: 900px) {
  .cat-bar { padding: 7px 12px; gap: 5px; }
  .cat-chip { padding: 6px 9px; font-size: 11.5px; }
  .dice-btn { padding: 6px 9px; font-size: 11.5px; }
  .bubble-actions { gap: 2px; }
  .bubble-actions .act { padding: 4px 5px; font-size: 11px; }
  .bubble-time { font-size: 10px; }
  .contact-card { padding: 7px 10px; }
  .contact-desc { font-size: 10px; }
  .room-foot { padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); }
  .room-foot-title { font-size: 11px; }
  .room-foot-desc { font-size: 10.5px; line-height: 1.4; }
  .pick-card { padding: 18px 16px 14px; max-width: 330px; }
  .pick-name { font-size: 18px; }
  .pick-act { font-size: 11.5px; padding: 9px 4px; }
}

/* ---------- 🎡 랜덤 여행 룰렛 ---------- */
/* 지도 아래에 두는 진입 버튼 */
.trip-cta {
  width: 100%; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #ff7a45 0%, #ff5a2b 55%, #f04a1b 100%);
  color: #fff; text-align: left;
  box-shadow: 0 6px 18px rgba(255, 90, 43, .28);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.trip-cta:hover { filter: brightness(1.03); box-shadow: 0 8px 22px rgba(255, 90, 43, .34); }
.trip-cta:active { transform: scale(.985); }
.trip-cta-emoji { font-size: 20px; line-height: 1; flex: 0 0 auto; }
.trip-cta-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.trip-cta-text b { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.trip-cta-text small { font-size: 11px; opacity: .9; }
.trip-cta-go {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 800;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35);
  padding: 5px 9px; border-radius: 999px; white-space: nowrap;
}

/* 전체 화면 시트 */
.trip-layer {
  position: fixed; inset: 0; z-index: 130;
  display: flex; align-items: center; justify-content: center;
  padding: 18px 14px;
  background: rgba(24, 39, 62, .46);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html.trip-open body { overflow: hidden; }
.trip-sheet {
  position: relative; width: 100%; max-width: 430px;
  max-height: calc(100dvh - 36px);
  overflow-y: auto; overscroll-behavior: contain;
  background: #fffdfa; border-radius: 22px;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-lg);
  animation: pop .2s ease-out;
}
.trip-head { display: flex; align-items: flex-start; gap: 10px; }
.trip-head-text { flex: 1 1 auto; min-width: 0; }
.trip-eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 800; color: var(--accent-ink); letter-spacing: .01em; }
.trip-title { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.trip-close {
  flex: 0 0 auto; width: 34px; height: 34px;
  border: 0; border-radius: 11px; background: #f6f2ec; color: #6b7788;
  font-size: 13px; line-height: 1;
}
.trip-close:hover { background: #efe8df; color: var(--ink); }

/* 권역 필터 */
.trip-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.trip-filter {
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #faf8f4;
  color: #4a5568; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.trip-filter:hover { background: #fff5ee; border-color: #ffd3c0; }
.trip-filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 원판 */
.trip-wheel-wrap {
  position: relative; width: min(300px, 76vw); aspect-ratio: 1 / 1;
  margin: 10px auto 4px;
  display: grid; place-items: center;
}
.trip-wheel { width: 100%; height: 100%; display: block; }
.trip-wheel-rotor {
  transform-box: fill-box;      /* 회전 중심 = 원판(부채꼴 전체)의 한가운데 */
  transform-origin: 50% 50%;
  will-change: transform;
}
.trip-wedge-label {
  font-family: var(--font); font-size: 9.5px; font-weight: 800;
  fill: #3d2f27; letter-spacing: -.01em; pointer-events: none;
  paint-order: stroke; stroke: rgba(255, 255, 255, .55); stroke-width: 2px;
}
.trip-hub { filter: drop-shadow(0 2px 6px rgba(24, 39, 62, .12)); }
.trip-pointer {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 19px solid var(--accent);
  filter: drop-shadow(0 2px 4px rgba(255, 90, 43, .45));
}
.trip-spin {
  position: absolute; z-index: 2;
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 38% 32%, #ff8f5f, #ff5a2b 62%, #e8451a 100%);
  color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: -.01em;
  box-shadow: 0 8px 20px rgba(255, 90, 43, .35);
  transition: transform .14s, box-shadow .14s, opacity .14s;
}
.trip-spin:hover { transform: scale(1.04); }
.trip-spin:active { transform: scale(.97); }
.trip-spin:disabled { opacity: .75; transform: none; cursor: default; }

/* 안내 + 결과 */
.trip-stage { margin-top: 8px; }
.trip-idle {
  margin: 0; padding: 10px 12px; border-radius: 12px;
  background: #f8f5ef; border: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.6; color: #6b7d90; text-align: center;
  word-break: keep-all;
}
.trip-result { animation: pop .22s ease-out; }
.trip-result-eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 800; color: var(--accent-ink); }
.trip-dest { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.trip-theme { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: #4a5568; word-break: keep-all; }
.trip-picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trip-pick {
  border: 1px solid var(--line); border-radius: 13px;
  background: #fff; padding: 10px 11px;
}
.trip-pick-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.trip-pick-name { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; }
.trip-pick-loc { font-size: 11.5px; color: #7b8494; }
.trip-pick-desc { font-size: 12.5px; color: #333d4d; line-height: 1.45; word-break: keep-all; }
.trip-pick-acts { display: flex; gap: 4px; margin-top: 7px; }
.trip-act {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 4px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 11px; font-weight: 800;
  text-decoration: none; white-space: nowrap;
}
.trip-act.naver { color: #1f7a4d; border-color: #cfe9d9; background: #f2fbf6; }
.trip-act.kakao { color: #8a6d00; border-color: #f6e6a8; background: #fffbe6; }
.trip-act.share { color: #5b6b8c; }
.trip-act:hover { filter: brightness(.97); }
.trip-pick-empty {
  border: 1px dashed #d8d2c8; border-radius: 13px; padding: 12px;
  font-size: 12.5px; color: var(--muted); text-align: center; word-break: keep-all;
}

.trip-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.trip-go, .trip-again, .trip-share {
  border-radius: 12px; font-size: 12.5px; font-weight: 800; padding: 11px 10px;
}
.trip-go { flex: 1 1 100%; border: 0; background: var(--accent); color: #fff; }
.trip-go:hover { background: #f04a1b; }
.trip-again { flex: 1 1 0; border: 1px solid #ffc9b5; background: var(--accent-soft); color: var(--accent-ink); }
.trip-again:hover { background: #ffdccd; }
.trip-share { flex: 1 1 0; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.trip-share:hover { background: #f7f4ee; }

@media (max-height: 720px) {
  .trip-wheel-wrap { width: min(240px, 62vw); }
  .trip-spin { width: 72px; height: 72px; font-size: 11.5px; }
}

@media (max-width: 900px) {
  .trip-cta { padding: 8px 12px; border-radius: 13px; gap: 9px; }
  .trip-cta-emoji { font-size: 18px; }
  .trip-cta-text b { font-size: 13.5px; }
  .trip-cta-text small { font-size: 10.5px; }
  .trip-cta-go { display: none; }
  .trip-layer { padding: 0; align-items: flex-start; }
  .trip-sheet {
    max-width: 100%; max-height: 100dvh; border-radius: 0 0 20px 20px;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  }
  .trip-wedge-label { font-size: 9px; }
  .trip-dest { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .trip-result, .trip-sheet { animation: none; }
  .trip-spin, .trip-cta { transition: none; }
}
