/* ==========================================================================
   플레이스북 — 여행 사이트형 디자인
   참고: 트립닷컴(히어로+검색 카드), 대한민국 구석구석(테마 칩),
        참좋은여행(헤더 검색·가운데 정렬 섹션·사진 카드)
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff4ff;
  --primary-100: #dbe7ff;
  --rose: #e11d48;
  --rose-50: #fff1f3;
  --kakao: #fee500;
  --green: #059669;
  --green-50: #e9f8f1;
  --danger: #dc2626;
  --warn: #b45309;
  --warn-50: #fff7e8;

  --text: #111827;
  --text-2: #4b5563;
  --text-3: #8b93a1;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --soft: #f2f4f7;
  --line: #e8eaee;
  --line-2: #d6dae1;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06);
  --shadow: 0 2px 6px rgba(17, 24, 39, .05), 0 10px 28px rgba(17, 24, 39, .08);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, .20);

  --gnb-h: 68px;
  --lnb-h: 48px;
  --wrap: 1200px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ic { flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- 버튼 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-outline { border-color: var(--line-2); }
.btn-outline:hover:not(:disabled) { border-color: var(--text-3); background: var(--soft); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--soft); color: var(--text); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover:not(:disabled) { background: var(--primary-100); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #fef2f2; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.btn-kakao {
  background: var(--kakao); color: rgba(0, 0, 0, .86);
  height: 54px; border-radius: 12px; font-size: 16px; font-weight: 700; gap: 10px;
}
.btn-kakao:hover { background: #f5dc00; }

/* ---------------------------------------------------------------- 입력 */

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.select-sm { min-height: 34px; padding: 5px 32px 5px 11px; font-size: 13px; width: auto; border-radius: 8px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.field { display: block; }
.field + .field { margin-top: 18px; }
.two-col > .field + .field { margin-top: 0; }   /* 나란히 둘 때는 위 여백이 칸을 어긋나게 만든다 */
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.field-hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

/* ---------------------------------------------------------------- 칩 */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  transition: all .15s;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.is-on { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.chip .count { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
.chip-sm { height: 28px; padding: 0 11px; font-size: 12.5px; }

.hashtag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--soft); color: var(--text-2);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.hashtag.is-strong { background: var(--primary-50); color: var(--primary); }

.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.pill-green { background: var(--green-50); color: var(--green); }
.pill-rose { background: var(--rose-50); color: var(--rose); }
.pill-blue { background: var(--primary-50); color: var(--primary); }
.pill-warn { background: var(--warn-50); color: var(--warn); }
.pill-gray { background: var(--soft); color: var(--text-2); }

/* ---------------------------------------------------------------- 헤더 */

.gnb { position: sticky; top: 0; z-index: 50; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.gnb-inner { height: var(--gnb-h); display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .3);
}
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }

.gnb-search {
  flex: 1; max-width: 540px; position: relative; display: flex; align-items: center;
  height: 46px; background: var(--soft); border-radius: 999px; border: 2px solid transparent;
  transition: border-color .15s, background .15s;
}
.gnb-search:focus-within { border-color: var(--primary); background: var(--surface); }
.gnb-search input {
  flex: 1; height: 100%; border: 0; background: transparent; outline: none;
  padding: 0 8px 0 22px; font-size: 15px; min-width: 0;
}
.gnb-search input::placeholder { color: var(--text-3); }
.gnb-search-btn {
  width: 38px; height: 38px; margin-right: 3px; border: 0; border-radius: 999px;
  background: var(--primary); color: #fff; display: grid; place-items: center;
}
.gnb-search-btn:hover { background: var(--primary-600); }

.gnb-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.btn-insta { gap: 7px; }

.sync {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 0; background: transparent; border-radius: 8px; font-size: 12.5px; color: var(--text-3);
}
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync[data-state="saving"]::before, .sync[data-state="pending"]::before { background: var(--primary); animation: pulse 1s infinite; }
.sync[data-state="error"] { color: var(--danger); background: #fef2f2; }
.sync[data-state="error"]::before { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

.icon-btn {
  width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--soft); color: var(--primary); }

.account { position: relative; }
.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; overflow: hidden;
  background: var(--primary-50); color: var(--primary); display: grid; place-items: center;
  font-weight: 800; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line);
}
.avatar-btn img, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800;
}
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 96px; height: 96px; font-size: 36px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }

.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 240px; padding: 8px; background: var(--surface);
  border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.menu-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
  width: 100%; border-width: 0 0 1px; background: transparent; text-align: left; cursor: pointer; border-radius: 10px 10px 0 0;
}
.menu-head:hover { background: var(--soft); }
.menu-head strong { display: block; font-size: 15px; }
.menu-head span { font-size: 12.5px; color: var(--text-3); }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px;
  border: 0; background: transparent; border-radius: 8px; font-size: 14px; color: var(--text-2); text-align: left;
}
.menu-item:hover { background: var(--soft); color: var(--text); }
.menu-item.is-danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

.lnb { border-top: 1px solid var(--line); }
.lnb-inner { height: var(--lnb-h); display: flex; align-items: stretch; gap: 30px; overflow-x: auto; scrollbar-width: none; }
.lnb-inner::-webkit-scrollbar { display: none; }
.lnb a {
  display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600;
  color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap;
}
.lnb a:hover { color: var(--text); }
.lnb a.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.lnb .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.view { min-height: calc(100vh - var(--gnb-h) - var(--lnb-h) - 70px); min-height: calc(100dvh - var(--gnb-h) - var(--lnb-h) - 70px); }

.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 64px; }
.footer-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-3); }
.footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- 홈: 히어로 + 검색 카드 */

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(125, 211, 252, .55), transparent 60%),
    radial-gradient(600px 300px at 10% 110%, rgba(99, 102, 241, .5), transparent 60%),
    linear-gradient(120deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
}
.hero-inner { padding: 56px 24px 112px; text-align: center; }
.hero-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); margin-bottom: 16px; }
.hero h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.3; }
.hero p { margin: 12px 0 0; font-size: 16.5px; opacity: .88; }

.search-card {
  position: relative; z-index: 2; max-width: 960px; margin: -76px auto 0;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 8px 24px 24px;
}
/* 가운데 정렬을 justify-content:center 로 하면, 폭이 좁아 넘칠 때 왼쪽 끝이 잘려
   스크롤로도 닿지 못한다. 양끝 자동 여백으로 가운데를 맞춰서 넘쳐도 처음부터 보이게 한다. */
.search-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.search-tabs > :first-child { margin-left: auto; }
.search-tabs > :last-child { margin-right: auto; }
.search-tabs::-webkit-scrollbar { display: none; }
.search-tab {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 84px; padding: 14px 10px 12px; border: 0; background: transparent;
  border-bottom: 3px solid transparent; color: var(--text-2); font-size: 13.5px; font-weight: 600;
}
.search-tab:hover { color: var(--text); }
.search-tab.is-on { color: var(--primary); border-bottom-color: var(--primary); }
.search-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 12px; margin-top: 20px; }
.search-field {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.search-field .ic { color: var(--text-3); }
.search-field label { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.search-field small { font-size: 12px; font-weight: 700; color: var(--text-3); }
.search-field input { border: 0; outline: none; padding: 2px 0 0; font-size: 16px; font-weight: 600; background: transparent; min-width: 0; }
.search-field input::placeholder { font-weight: 500; color: #b3b9c4; }
.search-go { height: 60px; padding: 0 30px; font-size: 16px; border-radius: 12px; }

/* ---------------------------------------------------------------- 섹션 */

.section { margin-top: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.section-head p { margin: 4px 0 0; font-size: 14.5px; color: var(--text-3); }
.section-head.is-center { flex-direction: column; align-items: center; text-align: center; }
.section-link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.section-link:hover { color: var(--primary); }

/* 테마 칩 — 동그란 아이콘 줄 (대한민국 구석구석) */
.theme-row { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.theme-chip {
  flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 0; background: transparent; scroll-snap-align: start; text-align: center; padding: 0;
}
.theme-icon {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  font-size: 30px; border: 2px solid transparent; transition: transform .15s, border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.theme-chip:hover .theme-icon { transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-chip.is-on .theme-icon { border-color: var(--primary); }
.theme-name { font-size: 13px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-count { font-size: 12px; color: var(--text-3); margin-top: -4px; }
.theme-chip.is-add .theme-icon { background: var(--surface); border: 2px dashed var(--line-2); color: var(--text-3); box-shadow: none; }
.theme-chip.is-add:hover .theme-icon { border-color: var(--primary); color: var(--primary); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tag-cloud .hashtag { height: 36px; padding: 0 16px; font-size: 14px; background: var(--surface); border: 1px solid var(--line); }
.tag-cloud .hashtag:hover { border-color: var(--primary); color: var(--primary); }

/* 통계 띠 */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.stat-band div { background: var(--surface); padding: 18px 22px; }
.stat-band strong { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-band span { font-size: 13px; color: var(--text-3); }

/* ---------------------------------------------------------------- 카드 그리드 */

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

.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s, border-color .18s; cursor: pointer; text-align: left;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.04); }

.tile { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.tile::before, .tile::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.tile::before { width: 70%; aspect-ratio: 1; right: -18%; top: -30%; }
.tile::after { width: 45%; aspect-ratio: 1; left: -12%; bottom: -22%; background: rgba(255, 255, 255, .22); }
.tile-icon { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: rgba(255, 255, 255, .7); backdrop-filter: blur(4px); }
.tile-sm .tile-icon { width: 40px; height: 40px; border-radius: 12px; }

.card-badges { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; gap: 6px; align-items: flex-start; z-index: 2; }
.card-badges .spacer { flex: 1; }
.cat-badge {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px;
  border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 12px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.like-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px;
  border-radius: 999px; border: 0; background: rgba(255, 255, 255, .94); color: var(--text-2);
  font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums;
}
.like-btn:hover { color: var(--rose); }
.like-btn.is-on { color: var(--rose); }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.card-memo { font-size: 13.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--text-3); }
.card-foot .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stars { display: inline-flex; gap: 1px; color: #f59e0b; }
.stars .off { color: #e5e7eb; }

/* 목록 보기 — 담은 곳이 많을 때 한 화면에 많이 보려는 줄 모양 */
.rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.row-item {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px;
  border-top: 1px solid var(--line); cursor: pointer; text-align: left;
  transition: background .15s;
}
.row-item:first-child { border-top: 0; }
.row-item:hover { background: var(--soft); }
.row-media { position: relative; width: 56px; height: 56px; flex: none; border-radius: var(--radius-sm); overflow: hidden; background: var(--soft); }
.row-media img { width: 100%; height: 100%; object-fit: cover; }
.row-media .tile-icon { width: 30px; height: 30px; border-radius: 9px; }
.row-body { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.row-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 한 줄로 고정한다. 줄바꿈을 허용하면 장소마다 높이가 달라져 목록이 울퉁불퉁해진다 */
.row-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub .cat, .row-sub .in, .row-sub .who { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; vertical-align: middle; }
.row-sub .dot { color: var(--line-2); margin: 0 5px; }
.row-memo { margin-top: 3px; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.row-side .card-tags { margin: 0; justify-content: flex-end; flex-wrap: nowrap; }
.row-side .like-btn { box-shadow: none; background: var(--soft); height: 26px; }

/* ---------------------------------------------------------------- 내 주변 */

/* 묶음 탭 한 줄 + 그 묶음의 테마 한 줄. 스무 개를 다 펼치면 휴대폰에서 결과가 화면 밖으로 밀린다 */
.themes { margin-bottom: 20px; }
.theme-tabs {
  display: flex; gap: 4px; margin-bottom: 12px; padding-bottom: 2px;
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.theme-tabs::-webkit-scrollbar { display: none; }
.theme-tab {
  flex: none; height: 38px; padding: 0 12px; border: 0; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--text-3); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -3px;
}
.theme-tab:hover { color: var(--text-2); }
.theme-tab.is-on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
/* 칩 줄은 좁은 화면에서 옆으로 민다. min-width 를 풀지 않으면 화면이 통째로 늘어난다 */
.theme-chips { min-width: 0; flex-wrap: wrap; }

/* 테마에 없는 것을 직접 찾는 칸. 한 줄만 쓴다 — 결과가 아래로 밀리면 안 된다 */
.theme-find {
  display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 0 6px 0 12px;
  height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.theme-find:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.theme-find.is-on { border-color: var(--primary); }
.theme-find > svg { flex: none; color: var(--text-3); }
.theme-find .input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent;
  font-size: 14px; border-radius: 0;
}
.theme-find .input:focus { outline: none; box-shadow: none; }
.theme-find .btn { flex: none; border-radius: 999px; }
.find-clear {
  flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: var(--soft); color: var(--text-3); display: grid; place-items: center;
}
.find-clear:hover { color: var(--text); }

.nearby-note {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.5;
  background: var(--soft); color: var(--text-2);
}
.nearby-note svg { flex: none; color: var(--text-3); }
.nearby-note span { flex: 1; min-width: 0; }
.nearby-note.is-widened { background: var(--primary-50); color: var(--primary-600); }
.nearby-note.is-widened svg { color: var(--primary); }
.nearby-note.is-thin, .nearby-note.is-empty { background: var(--warn-50); color: var(--warn); }
.nearby-note.is-thin svg, .nearby-note.is-empty svg { color: var(--warn); }

.peek-head { display: flex; align-items: flex-start; gap: 12px; }
.peek-head h2 { margin: 8px 0 2px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.peek-sub { font-size: 13.5px; color: var(--text-2); }
.peek-addr { margin-top: 2px; font-size: 13px; color: var(--text-3); }
.peek-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 6px; }

/* ---------------------------------------------------------------- 코스 */

.crumb { margin: 0 0 6px; font-size: 13px; }
.crumb a { display: inline-flex; align-items: center; gap: 2px; color: var(--text-3); }
.crumb a:hover { color: var(--primary); }

.course-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.course-card {
  display: block; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.course-card:hover { border-color: transparent; box-shadow: var(--shadow); }
.course-card-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.course-card-head .emoji { font-size: 20px; }
.course-card-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-card-head .count { flex: none; font-size: 12.5px; color: var(--text-3); }
.course-card-line {
  margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.course-card-line .arrow { color: var(--line-2); margin: 0 2px; }
.course-card-line .muted { color: var(--text-3); }

/* 코스 줄: 번호 동그라미가 세로선으로 이어진다 */
.course-line { margin-bottom: 28px; }
.course-stop {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.stop-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 800;
}
.stop-body { flex: 1; min-width: 0; }
.stop-name { font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.stop-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-sub .cat { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; vertical-align: middle; }
.stop-sub .dot { color: var(--line-2); margin: 0 5px; }
.stop-memo { margin-top: 5px; font-size: 13px; color: var(--text-2); }
.stop-acts { flex: none; display: flex; gap: 2px; }
.stop-acts .icon-btn { width: 30px; height: 30px; }
.stop-acts .icon-btn:disabled { opacity: .3; cursor: default; }

.course-gap { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 27px; min-height: 38px; }
.gap-line { align-self: stretch; width: 2px; margin-right: 8px; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }
.gap-text { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.gap-link { font-size: 12.5px; font-weight: 700; color: var(--primary); }

.course-next { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.course-next h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.course-next h2 svg { color: var(--primary); flex: none; }
.course-next h2 b { font-weight: 800; }
.course-next-hint { margin: 6px 0 16px; font-size: 13px; color: var(--text-3); }
.link-btn { border: 0; background: none; padding: 0; margin-left: 6px; font: inherit; font-weight: 700; color: var(--primary); text-decoration: underline; }
.finder-status { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); }

.pick-list { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pick-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0;
  border-top: 1px solid var(--line); background: transparent; text-align: left;
}
.pick-item:first-child { border-top: 0; }
.pick-item:hover:not(:disabled) { background: var(--soft); }
.pick-item:disabled { opacity: .55; cursor: default; }
.pick-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-sub { flex: none; font-size: 12.5px; color: var(--text-3); font-weight: 600; }

/* ---------------------------------------------------------------- 플레이리스트 */

/* flex 로 두면 안의 <b> 가 칸이 되어 글이 세 토막으로 갈라진다. 그냥 글줄로 둔다 */
.page-note {
  margin: 0 0 22px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--soft);
  color: var(--text-2); font-size: 13.5px; line-height: 1.6;
}
.page-note svg { vertical-align: -3px; margin-right: 6px; color: var(--text-3); }
/* 중요하지만 첫 줄에서 자리를 많이 먹으면 안 되는 안내 */
.page-note.is-slim { margin-bottom: 16px; padding: 8px 12px; font-size: 12.5px; line-height: 1.5; }

.song-row .row-body { padding: 2px 0; }
.song-row.is-sung .row-title .name { color: var(--text-3); text-decoration: line-through; }
.song-check {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--line-2);
  transition: background .15s, color .15s, border-color .15s;
}
.song-check:hover { border-color: var(--green); color: var(--green); }
.song-check.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.row-side-wide { flex-direction: row; align-items: center; gap: 8px; }

.song-find { display: flex; gap: 8px; margin-bottom: 14px; }
.song-find .input { flex: 1; min-width: 0; }
.song-find .btn { flex: none; }

.find-list {
  display: flex; flex-direction: column; max-height: 260px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px;
}
.find-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0;
  border-top: 1px solid var(--line); background: transparent;
}
.find-item:first-child { border-top: 0; }
.find-item:hover { background: var(--soft); }
.find-main { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); }
.find-artist { font-weight: 600; color: var(--primary); }
.find-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.find-raw {
  display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75;
}
.find-note { margin: 0 0 14px; font-size: 12.5px; color: var(--text-3); line-height: 1.55; }

/* ---------------------------------------------------------------- 목록 화면 공통 */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 36px 0 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.035em; display: flex; align-items: center; gap: 10px; }
.page-head .meta { margin-top: 6px; font-size: 14px; color: var(--text-3); }
.page-head .emoji { font-size: 28px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.toolbar .grow { flex: 1; }
.segmented { display: inline-flex; padding: 3px; background: var(--soft); border-radius: 10px; }
.segmented button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; background: transparent; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.segmented button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-label { font-size: 12.5px; font-weight: 700; color: var(--text-3); align-self: center; min-width: 38px; }

.layout-side { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
/* 격자 칸은 기본값이 min-content 라 줄 안의 긴 글이 화면을 옆으로 늘린다 */
.layout-side > * { min-width: 0; }
.side-nav { position: sticky; top: calc(var(--gnb-h) + var(--lnb-h) + 24px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.side-nav h3 { margin: 4px 8px 10px; font-size: 12.5px; font-weight: 800; color: var(--text-3); letter-spacing: .02em; }
.side-link {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--text-2);
}
.side-link:hover { background: var(--soft); color: var(--text); }
.side-link.is-on { background: var(--primary-50); color: var(--primary); }
.side-link .emoji { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); font-size: 16px; }
.side-link.is-on .emoji { background: var(--surface); }
.side-link .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .num { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.side-nav .btn { margin-top: 8px; }

.mobile-collections { display: none; }

/* ---------------------------------------------------------------- 지도 · 분할 화면 */

.map-slot { position: relative; background: #e8edf3; overflow: hidden; }
.map-slot .map-canvas { position: absolute; inset: 0; }
.map-canvas { width: 100%; height: 100%; }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--text-2); font-size: 14px; }
.map-empty strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 6px; }
.map-label {
  padding: 6px 11px; border-radius: 8px; background: var(--text); color: #fff;
  font: 700 12.5px/1.2 var(--font); white-space: nowrap; box-shadow: var(--shadow);
}

.split { display: grid; grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); height: calc(100vh - var(--gnb-h) - var(--lnb-h)); height: calc(100dvh - var(--gnb-h) - var(--lnb-h)); border-top: 1px solid var(--line); }
.split-list { overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); }
.split-head { position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.split-head h1 { margin: 0; font-size: 20px; font-weight: 800; }
.split-head .meta { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.split-head .target { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.split-head .target .select { flex: 1; }
.split .map-slot { height: 100%; }
.split-toggle { display: none; }

.result { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.result:hover, .result.is-focus { background: #f8fafc; }
.result-thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; flex: none; }
/* 목록 줄의 가게 사진 — 대분류 그림 위에 덮는다. 못 불러오면 사진이 스스로 빠져서 그림이 드러난다 */
.thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
  animation: thumb-in .25s ease-out;
}
@keyframes thumb-in { from { opacity: 0; } to { opacity: 1; } }

/* 큰 카드용. 카카오 썸네일은 130×130 뿐이라 카드 전체로 늘리면 뭉개진다.
   흐리게 깐 배경 위에, 대분류 그림의 아이콘 네모 자리에 선명한 사진을 올린다. */
.thumb-big { position: absolute; inset: 0; z-index: 1; overflow: hidden; animation: thumb-in .25s ease-out; }
/* 앞에 .card-media 를 붙여야 한다 — ".card-media img { width:100%; height:100% }" 와
   ".card:hover .card-media img { transform: scale() }" 가 더 세서 가운데 사진을 통째로 덮어쓴다 */
.card-media .thumb-bg {
  position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover;
  filter: blur(16px) saturate(1.15); opacity: .85;
}
.thumb-big::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .18); }
.card-media .thumb-center {
  position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%);
  height: 62%; aspect-ratio: 1 / 1; width: auto; max-width: 130px; max-height: 130px;
  object-fit: cover; border-radius: 18px; border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(17, 24, 39, .18);
}
.card:hover .card-media .thumb-bg { transform: none; }
.card:hover .card-media .thumb-center { transform: translate(-50%, -50%) scale(1.05); }
.card-media .card-badges { z-index: 2; }

/* 코스 안의 곳은 이름 쪽을 누르면 미리보기가 뜬다 */
.stop-body[data-action] { cursor: pointer; border-radius: 8px; }
.stop-body[data-action]:hover .stop-name { color: var(--primary); }
.row-item[data-action] { cursor: pointer; }
.result-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.result-name { font-size: 15.5px; font-weight: 700; }
.result-sub { font-size: 13px; color: var(--text-3); }
.result-addr { font-size: 13px; color: var(--text-2); }
.result-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.more-row { padding: 18px 20px 28px; text-align: center; }

.map-page { position: relative; height: calc(100vh - var(--gnb-h) - var(--lnb-h)); height: calc(100dvh - var(--gnb-h) - var(--lnb-h)); border-top: 1px solid var(--line); }
.map-page .map-slot { position: absolute; inset: 0; }
.map-panel {
  position: absolute; left: 20px; top: 20px; z-index: 5; width: 300px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px;
}
.map-panel h2 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.legend { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.legend label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.legend input { width: 17px; height: 17px; accent-color: var(--primary); }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; }
.legend .num { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-weight: 500; }

/* ---------------------------------------------------------------- 상세 패널 */

.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .42); animation: fade .18s; }
.scrim-top { z-index: 100; }
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(540px, 100vw);
  background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto; overscroll-behavior: contain;
  animation: slide .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-media { position: relative; aspect-ratio: 16 / 9; max-height: 260px; background: var(--soft); overflow: hidden; }
/* 사진이 없으면 대분류 그림만 보이므로 더 낮게 — 화면을 차지할 이유가 없다 */
.drawer-media.is-empty { aspect-ratio: auto; height: 116px; }
.drawer-media.is-empty .tile { height: 100%; }
.drawer-media img { width: 100%; height: 100%; object-fit: cover; }
.drawer-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .95); display: grid; place-items: center; box-shadow: var(--shadow);
}
.drawer-photo-actions { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; gap: 6px; }
.drawer-photo-actions .btn { background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-sm); }
.drawer-body { padding: 24px 28px 48px; }
.drawer-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.drawer-title { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.drawer-info { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.drawer-info div { display: flex; gap: 8px; align-items: flex-start; }
.drawer-info .ic { color: var(--text-3); margin-top: 2px; }
.drawer-actions { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin-top: 20px; }
.drawer-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 12px; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-section h3 small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.star-picker { display: flex; align-items: center; gap: 2px; }
.star-btn { border: 0; background: transparent; padding: 2px; color: #e5e7eb; }
.star-btn.is-on { color: #f59e0b; }
.star-btn:hover { transform: scale(1.1); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.share-box { background: var(--soft); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.share-box p { margin: 0; flex: 1; font-size: 13.5px; color: var(--text-2); }
.share-box.is-on { background: var(--rose-50); }
.share-box.is-on p { color: var(--rose); font-weight: 600; }
.author { display: flex; align-items: center; gap: 10px; }
.author strong { font-size: 14.5px; }
.author span { font-size: 12.5px; color: var(--text-3); }
.quote { margin: 14px 0 0; padding: 14px 16px; background: var(--soft); border-radius: 12px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
.danger-zone { margin-top: 32px; display: flex; justify-content: flex-end; }

/* ---------------------------------------------------------------- 모달 */

.modal {
  position: fixed; z-index: 101; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px;
  animation: pop .18s cubic-bezier(.2, .8, .2, 1);
}
.modal.is-wide { width: min(640px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
.modal h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
.modal .lead { margin: 0 0 22px; font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; }
.modal-actions .grow { flex: 1; }
.modal .error { margin: 12px 0 0; color: var(--danger); font-size: 13.5px; }

.insta-found { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.insta-found .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.insta-found .k { width: 40px; color: var(--text-3); font-weight: 700; }
.insta-found a { color: var(--primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.insta-tip { background: var(--warn-50); color: var(--text-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.6; margin-top: 12px; }
.insta-tip ol { margin: 6px 0 6px; padding-left: 18px; }
.insta-hits { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.insta-hit { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.insta-hit .result-thumb { width: 52px; height: 52px; border-radius: 10px; }
.insta-hit .main { flex: 1; min-width: 0; }
.insta-hit strong { display: block; font-size: 14.5px; }
.insta-hit span { font-size: 12.5px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basket { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--green-50); }
.basket b { font-size: 13px; color: var(--green); }
.basket .chips { margin-top: 8px; gap: 6px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }

/* ---------------------------------------------------------------- 빈 화면 · 안내 */

.empty {
  padding: 56px 24px; text-align: center; background: var(--surface);
  border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.empty h3 { margin: 0; font-size: 18px; font-weight: 800; }
.empty p { margin: 8px 0 0; font-size: 14.5px; color: var(--text-2); line-height: 1.7; }
.empty .btn { margin-top: 20px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--warn-50); color: #7c4a03; font-size: 14px; line-height: 1.6; }
.notice .ic { margin-top: 2px; }

/* ---------------------------------------------------------------- 관리자 */

.admin-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-row .who strong { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.admin-row .who span { font-size: 12.5px; color: var(--text-3); }
.admin-row .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 로그인 · 대기 화면 */

.screen-boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
.boot-mark { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); animation: pulse 1.2s infinite; }

.screen-gate { min-height: 100vh; min-height: 100dvh; }
.gate { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; min-height: 100dvh; }
.gate-visual {
  position: relative; overflow: hidden; color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 360px at 90% 0%, rgba(125, 211, 252, .55), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(99, 102, 241, .55), transparent 60%),
    linear-gradient(135deg, #1e3a8a, #2563eb 60%, #0ea5e9);
}
.gate-visual .logo-text { color: #fff; }
.gate-visual .logo-mark { background: rgba(255, 255, 255, .18); box-shadow: none; }
.gate-copy h1 { margin: 0; font-size: 42px; font-weight: 800; line-height: 1.25; letter-spacing: -0.04em; }
.gate-copy p { margin: 16px 0 0; font-size: 17px; opacity: .88; line-height: 1.7; max-width: 440px; }
.gate-cards { display: flex; gap: 14px; margin-top: 40px; }
.gate-card { width: 170px; border-radius: 16px; overflow: hidden; background: #fff; color: var(--text); box-shadow: 0 20px 40px rgba(15, 23, 42, .25); transform: rotate(var(--r, 0deg)); }
.gate-card .card-media { aspect-ratio: 4 / 3; }
.gate-card div.t { padding: 10px 12px; font-size: 13px; font-weight: 700; }
.gate-card div.t span { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.gate-foot { font-size: 13px; opacity: .7; }
.gate-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px;
  padding: 12px 14px; border-radius: 10px; background: var(--soft);
  font-size: 13px; color: var(--text-2); line-height: 1.55; cursor: pointer;
}
.gate-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
.gate-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); text-align: center; line-height: 1.6; }
.gate-check a { color: var(--text-2); text-decoration: underline; }

.gate-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.gate-box { width: min(380px, 100%); }
.gate-box h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.035em; }
.gate-box .lead { margin: 10px 0 28px; font-size: 15px; color: var(--text-2); line-height: 1.7; }
.gate-box .notice { margin-top: 22px; }
.gate-steps { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gate-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.gate-steps b { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 13px; flex: none; }
.gate-steps li.is-done b { background: var(--green); color: #fff; }
.gate-steps li.is-now { color: var(--text); font-weight: 700; }
.gate-error { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #fef2f2; color: var(--danger); font-size: 14px; }
.gate-user { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.gate-user strong { font-size: 17px; }
.gate-actions { display: flex; gap: 8px; margin-top: 26px; }

/* ---------------------------------------------------------------- 토스트 */

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200;
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
  padding: 13px 18px; border-radius: 14px; background: #111827; color: #fff;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast .2s;
}
.toast button { border: 0; background: transparent; color: #93c5fd; font-weight: 700; padding: 0; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }

.skeleton { background: linear-gradient(90deg, #eef0f3 0%, #f7f8fa 50%, #eef0f3 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- 반응형 */

/* ---------------------------------------------------------------- 장소 미리보기 */

.insights { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; cursor: default; }

/* 검색 결과에서 고른 곳: 지도 왼쪽 위에 떠 있는 카드 (폰에서는 아래 시트) */
.map-card {
  position: absolute; z-index: 6; left: 16px; top: 16px; width: 396px; max-height: calc(100% - 32px);
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.map-card.is-new { animation: card-in .18s ease-out; }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes sheet-in { from { transform: translateY(40%); opacity: 0; } }
.map-card-head { display: flex; gap: 10px; align-items: flex-start; padding: 18px 18px 0; }
.map-card-title { flex: 1; min-width: 0; }
.map-card-title h2 { margin: 6px 0 4px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.map-card-sub, .map-card-addr { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.map-card-sub a { color: inherit; }
.map-card-addr { color: var(--text-2); }
.map-card-close {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--soft);
  display: grid; place-items: center; color: var(--text-2); cursor: pointer;
}
.map-card-close:hover { background: var(--line); }
.map-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 18px 14px; border-bottom: 1px solid var(--line); }
.map-card-body { overflow-y: auto; padding: 2px 18px 18px; overscroll-behavior: contain; }
.map-card-body .insights { margin-top: 14px; }
.ins-rating { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.ins-rating.is-empty { color: var(--text-3); }
.ins-score { display: inline-flex; align-items: center; gap: 3px; font-size: 17px; font-weight: 800; color: var(--text); }
.ins-score svg { color: #f59e0b; }
.ins-photos { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.ins-photo {
  position: relative; flex: none; width: 92px; height: 92px; border-radius: 10px; overflow: hidden;
  background: var(--soft); display: block;
}
.ins-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
a.ins-photo:hover img { transform: scale(1.05); }
.ins-photo em {
  position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px;
  background: rgba(15, 23, 42, .7); color: #fff; font-size: 11px; font-style: normal; font-weight: 700;
}
.ins-photos.is-loading .ins-photo { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
/* 장점은 가로로 흐르는 칩. 세로로 쌓으면 카드가 길어져 아래 내용이 화면 밖으로 밀린다. */
.ins-strengths { display: flex; flex-wrap: wrap; gap: 6px; }
.ins-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px;
  border: 0; border-radius: 999px; background: var(--primary-50); color: var(--primary);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s;
}
.ins-chip b { font-weight: 700; opacity: .6; font-variant-numeric: tabular-nums; }
.ins-chip:hover { background: var(--primary-100); }
.ins-chip.is-plain { background: var(--soft); color: var(--text-2); cursor: default; }
.ins-chip[aria-expanded="true"] { background: var(--primary); color: #fff; }
.ins-chip[aria-expanded="true"] b { opacity: .8; }
.ins-src { color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.ins-ev { padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.ins-ev-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.ins-ev ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ins-ev li { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.ins-ev q { quotes: none; }
.ins-ev a { color: var(--primary); font-weight: 600; white-space: nowrap; }
.ins-note { margin: 0; font-size: 12px; color: var(--text-3); line-height: 1.5; display: flex; gap: 4px; align-items: flex-start; }
.ins-consent { padding: 12px 14px; border-radius: 12px; background: var(--primary-50); font-size: 13px; line-height: 1.55; color: var(--text-2); }
.ins-consent p { margin: 0 0 8px; }
.ins-consent b { color: var(--text); }
.ins-consent-acts { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- 휴대폰에 앱 설치 */

.install h2 { margin: 0 0 6px; }
.install .lead { margin: 0 0 20px; }
.install-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.install-qr svg { border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.install-qr .hint { margin: 0; font-size: 13px; color: var(--text-3); }
.install-url {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px; background: var(--soft); margin-bottom: 20px;
}
.install-url code { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; word-break: break-all; }
.install-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.install-steps h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.install-steps ol { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* ---------------------------------------------------------------- 내 정보 */

.profile-photo { display: flex; align-items: center; gap: 20px; margin: 18px 0 22px; }
.profile-photo-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.profile-photo-acts .hint { flex-basis: 100%; }
.profile-form .hint { margin: 6px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.profile-share { margin-top: 20px; align-items: flex-start; font-weight: 400; line-height: 1.5; }
.profile-share .track { flex: none; margin-top: 2px; }
.profile-share small { color: var(--text-3); font-size: 12.5px; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-insta span { display: none; }
  .btn-insta { width: 40px; padding: 0; }
}

@media (max-width: 900px) {
  .layout-side { grid-template-columns: 1fr; gap: 0; }
  .side-nav { display: none; }
  .mobile-collections { display: block; margin-bottom: 8px; }
  .split { grid-template-columns: 1fr; }
  .split .map-slot { display: none; }
  .split.show-map .split-list { display: none; }
  .split.show-map .map-slot { display: block; }
  .split-toggle { display: inline-flex; }
  .map-card {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62%;
    border-radius: 18px 18px 0 0; border-width: 1px 0 0;
  }
  .map-card.is-new { animation-name: sheet-in; }
  .map-card::before {
    content: ""; align-self: center; width: 40px; height: 4px; border-radius: 4px;
    background: var(--line-2); margin-top: 8px;
  }
  .map-card-head { padding-top: 10px; }
  .map-card-body { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .gate { grid-template-columns: 1fr; }
  .gate-visual { min-height: 320px; padding: 32px 24px; }
  .gate-copy h1 { font-size: 30px; }
  .gate-cards { display: none; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --gnb-h: 112px; }
  .wrap { padding: 0 16px; }
  .gnb-inner { flex-wrap: wrap; gap: 10px 12px; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .gnb-search { order: 3; flex-basis: 100%; max-width: none; height: 44px; }
  .sync { display: none !important; }
  .lnb-inner { gap: 22px; }
  .hero-inner { padding: 36px 16px 96px; }
  .hero h1 { font-size: 25px; }
  .hero p { font-size: 14.5px; }
  .search-card { margin: -72px 12px 0; padding: 4px 14px 16px; }
  .search-tab { min-width: 64px; font-size: 12.5px; }
  .search-row { grid-template-columns: 1fr; }
  .search-field, .search-go { height: 54px; }
  .grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .card-body { padding: 11px 12px 13px; }
  .card-title { font-size: 14.5px; }
  .section { margin-top: 40px; }
  .section-head h2 { font-size: 20px; }
  .page-head h1 { font-size: 23px; }
  .course-list { grid-template-columns: 1fr; }
  .course-next { padding: 16px 14px; }
  .course-stop { padding: 10px 10px 10px 12px; gap: 10px; }
  /* 휴대폰에서는 단추 넷이 이름 자리를 다 먹는다. 앞뒤 옮기기만 남기고 둘은 작게 */
  .stop-acts .icon-btn { width: 28px; height: 28px; }

  /* 좁은 화면에서는 테마 칩도 한 줄로 두고 옆으로 민다. 두 줄로 접히면
     그만큼 결과가 아래로 밀려 "무엇을 해야 하는지" 가 안 보인다 */
  .theme-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .theme-chips::-webkit-scrollbar { display: none; }
  .theme-tab { height: 36px; padding: 0 10px; font-size: 13.5px; }
  /* 아이폰이 입력칸을 누를 때 화면을 확대하지 않도록 16px 를 지킨다 */
  .theme-find .input { font-size: 16px; }
  .theme-find .input::placeholder { font-size: 13.5px; }

  /* 좁은 화면에서는 태그까지 넣으면 줄이 밀린다. 별점·좋아요만 남긴다 */
  .row-item { gap: 11px; padding: 10px 12px; }
  .row-media { width: 46px; height: 46px; }
  .row-media .tile-icon { width: 26px; height: 26px; border-radius: 8px; }
  .row-side .card-tags { display: none; }
  .drawer { left: 0; right: 0; width: auto; }
  .drawer-media { max-height: 200px; }
  .drawer-media.is-empty { height: 96px; }
  .drawer-body { padding: 20px 18px calc(40px + env(safe-area-inset-bottom)); }

  /* 입력칸 글자가 16px 보다 작으면 아이폰이 칸을 누를 때마다 화면을 확대한다 */
  .input, .select, .textarea, .gnb-search input { font-size: 16px; }
  .select-sm { font-size: 14px; }
  .drawer-actions { grid-template-columns: 1fr 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .map-panel { left: 12px; right: 12px; top: 12px; width: auto; }
  .admin-row { grid-template-columns: 40px minmax(0, 1fr); }
  .admin-row .status, .admin-row .acts { grid-column: 2; justify-content: flex-start; }
  .footer-inner { flex-direction: column; justify-content: center; gap: 4px; }
  .modal { padding: 22px; }
  .profile-photo { flex-direction: column; text-align: center; }
  .profile-photo-acts { justify-content: center; }
  .install-steps { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .theme-chip { width: 80px; }
  .theme-icon { width: 62px; height: 62px; font-size: 26px; }
}

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