/* 스미스 카페 연구소 — 에스프레소·크림·캐러멜 */
:root {
  --bg: #1f1410; --ink: #2b1d16; --cream: #fbf6ef; --latte: #f1e4d3; --mut: #8a7464; --acc: #c8873a; --acc2: #e9b872;
  --esp: #3b2418; --card: rgba(251, 246, 239, .96); --line: rgba(59, 36, 24, .12); --top: 60px; --r: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif; }
a { color: #9a5b1e; }
button, input, textarea, select { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 16px; background: rgba(31, 20, 16, .94); backdrop-filter: blur(10px); color: var(--cream); }
.logo { display: flex; align-items: center; gap: 9px; color: var(--cream); text-decoration: none; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; }
.logo b { display: block; font-size: 15px; line-height: 1.1; letter-spacing: -.01em; }
.logo small { color: var(--acc2); font-size: 11px; letter-spacing: .12em; }
.search { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.search input { width: 100%; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: var(--cream); outline: none; }
.search input::placeholder { color: #bba895; }
.search input:focus { border-color: var(--acc2); background: rgba(255,255,255,.12); }
.suggest { position: absolute; left: 0; right: 0; top: 44px; margin: 0; padding: 6px; list-style: none; background: var(--cream); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(31,20,16,.3); max-height: 62vh; overflow: auto; }
.suggest li { padding: 8px 10px; border-radius: 10px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest li small { color: var(--mut); margin-left: 6px; }
.suggest li:hover, .suggest li.on { background: var(--latte); }
.suggest .sg-h { cursor: default; font-size: 11.5px; color: var(--mut); padding: 6px 10px 2px; }
.suggest .sg-h:hover { background: none; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { color: #d8c6b4; text-decoration: none; font-size: 14px; }

.btn { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--acc); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: rgba(255,255,255,.1); color: var(--cream); font-weight: 600; }
.panel .btn.ghost, .page .btn.ghost { background: var(--latte); color: var(--esp); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.wide { width: 100%; justify-content: center; margin: 12px 0 4px; }

.stage { position: relative; height: calc(100vh - var(--top)); height: calc(100svh - var(--top)); min-height: 460px; overflow: hidden; background: #efe7dc; }
#map { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10.5px; }
.maplibregl-ctrl-bottom-right { bottom: 26px; }

.types { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; z-index: 5; pointer-events: none; }
.types::-webkit-scrollbar { display: none; }
.tchip { pointer-events: auto; flex: none; border: 1px solid var(--line); background: rgba(251,246,239,.94); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(31,20,16,.12); display: inline-flex; align-items: center; gap: 5px; }
.tchip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tchip small { color: var(--mut); font-size: 11px; }
.tchip.off { opacity: .45; background: rgba(251,246,239,.75); }
.tchip.all { background: var(--esp); color: var(--cream); border-color: transparent; }
.tchip.all small { color: var(--acc2); }

.hint { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: rgba(31,20,16,.78); color: var(--cream); font-size: 14px; pointer-events: none; white-space: nowrap; transition: opacity .4s; }
.hint b { color: var(--acc2); }
.stamp { position: absolute; left: 12px; bottom: 26px; margin: 0; font-size: 11.5px; color: var(--esp); background: rgba(251,246,239,.85); padding: 3px 9px; border-radius: 8px; }
.mini-links { position: absolute; left: 12px; bottom: 4px; margin: 0; font-size: 11px; color: var(--mut); }
.mini-links a { color: var(--esp); }

.maplibregl-popup-content { border-radius: 10px; padding: 6px 10px; font-size: 13px; background: var(--esp); color: var(--cream); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.maplibregl-popup-tip { border-top-color: var(--esp) !important; border-bottom-color: var(--esp) !important; }
.maplibregl-popup-content small { color: var(--acc2); display: block; font-size: 11px; }

/* 패널 */
.panel { position: absolute; top: 58px; right: 12px; bottom: 12px; width: min(440px, calc(100% - 24px)); overflow-y: auto; padding: 18px 16px 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(31,20,16,.28); backdrop-filter: blur(12px); z-index: 10; overscroll-behavior: contain; }
.close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--latte); color: var(--esp); cursor: pointer; z-index: 2; }
.p-head { display: flex; gap: 12px; align-items: center; padding-right: 36px; }
.p-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--latte); }
.p-head h2 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.p-sub { margin: 2px 0 0; color: var(--mut); font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--latte); color: var(--esp); }
.badge.t { color: #fff; }
.p-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.p-actions .naver { background: #03c75a; color: #fff; }
.p-actions .kakao { background: #fee500; color: #191600; }
.info { margin: 10px 0; padding: 0; list-style: none; font-size: 14px; }
.info li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.info li span:first-child { flex: none; width: 22px; text-align: center; }
.sec { margin: 18px 0 8px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.sec small { color: var(--mut); font-weight: 400; }
.note { font-size: 12.5px; color: var(--mut); margin: 6px 0; }

.score { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #3b2418, #6b4128); color: var(--cream); }
.score b { font-size: 30px; line-height: 1; }
.score .stars { color: var(--acc2); font-size: 17px; letter-spacing: 1px; }
.score small { display: block; color: #d9c4ae; font-size: 12px; }
.stars-s { color: var(--acc); font-size: 12px; letter-spacing: .5px; }

.rv { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rv-h { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--mut); }
.rv-h b { color: var(--ink); font-size: 13.5px; }
.rv p { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }
.rv .rep { margin-left: auto; border: 0; background: none; color: var(--mut); font-size: 11.5px; cursor: pointer; }
.rform { margin-top: 10px; padding: 12px; border-radius: 16px; background: var(--latte); }
.rform .pick { display: flex; gap: 2px; font-size: 28px; line-height: 1; margin-bottom: 8px; }
.rform .pick button { border: 0; background: none; cursor: pointer; padding: 0 2px; color: #cdb9a2; }
.rform .pick button.on { color: var(--acc); }
.rform input, .rform textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; margin-bottom: 6px; }
.rform textarea { min-height: 76px; resize: vertical; }
.rform .hp { position: absolute; left: -9999px; }
.rform .msg { font-size: 13px; margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { border-color: var(--acc); }
.chip.on { background: var(--esp); color: var(--cream); border-color: var(--esp); }
.chip small { color: var(--mut); }
.chip.on small { color: var(--acc2); }

.tbars { margin: 8px 0 4px; }
.tbar { display: grid; grid-template-columns: 128px 1fr 54px; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; border-radius: 8px; }
.tbar:hover { background: var(--latte); }
.tbar .bar { height: 9px; border-radius: 6px; background: var(--latte); overflow: hidden; }
.tbar .bar i { display: block; height: 100%; border-radius: 6px; }
.tbar span:last-child { text-align: right; color: var(--mut); font-variant-numeric: tabular-nums; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--esp); line-height: 1.1; }
.big small { font-size: 14px; font-weight: 500; color: var(--mut); margin-left: 4px; }

.list { margin: 6px 0 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 10px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.list li:hover { background: var(--latte); }
.list .dot { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; background: var(--latte); }
.list .tx { min-width: 0; flex: 1; }
.list .tx b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .tx small { display: block; color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .rt { flex: none; font-size: 12px; color: var(--acc); }
.sortbar { display: flex; gap: 6px; align-items: center; margin: 10px 0 0; font-size: 12.5px; color: var(--mut); }
.sortbar select { border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; background: #fff; }
.loading { padding: 30px 10px; text-align: center; color: var(--mut); }
.loading span { display: block; width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--latte); border-top-color: var(--acc); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.credit { font-size: 11.5px; color: var(--mut); margin: 14px 2px 0; }

/* 지역 고르기 */
.picker { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); max-height: calc(100% - 76px); display: flex; flex-direction: column; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(31,20,16,.3); z-index: 12; overflow: hidden; }
.pk-head { display: flex; align-items: center; gap: 10px; padding: 14px 54px 10px 16px; position: relative; }
.pk-head b small { color: var(--mut); font-weight: 400; font-size: 12px; }
.pk-head input { flex: 1; max-width: 240px; margin-left: auto; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.pk-tabs { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
.pk-tabs button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; }
.pk-tabs button.on { background: var(--esp); color: var(--cream); border-color: var(--esp); }
.pk-grid { overflow-y: auto; padding: 4px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pk-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 9px 11px; cursor: pointer; }
.pk-item:hover { border-color: var(--acc); background: var(--latte); }
.pk-item b { display: block; font-size: 14px; }
.pk-item small { color: var(--mut); font-size: 12px; }
.pk-item.sido { background: var(--latte); }

/* 일반 페이지 (지역 목록·소개) */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.page { padding: 34px 18px 40px; }
.page h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.02em; color: var(--esp); }
.page h2 { font-size: 20px; margin: 30px 0 10px; color: var(--esp); }
.page .lead { color: #5c483a; font-size: 16px; }
.crumb { font-size: 13px; color: var(--mut); margin-bottom: 8px; }
.crumb a { color: var(--mut); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.card { display: block; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--acc); }
.card b { display: block; }
.card small { color: var(--mut); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { color: var(--mut); font-weight: 600; font-size: 12.5px; }
.tbl td.n { text-align: right; font-variant-numeric: tabular-nums; }
.cafes { columns: 3 220px; column-gap: 18px; padding: 0; list-style: none; font-size: 14px; }
.cafes li { break-inside: avoid; padding: 3px 0; }
.cafes small { color: var(--mut); }
.cta { display: inline-flex; margin: 14px 0; }
.foot { padding: 24px 18px 40px; color: var(--mut); font-size: 13px; border-top: 1px solid var(--line); }
.foot a { color: var(--esp); }
body:not(.home) .top .nav-links { margin-left: auto; }

@media (max-width: 720px) {
  :root { --top: 56px; }
  .top { gap: 8px; padding: 0 10px; }
  .logo span { display: none; }
  .search { max-width: none; }
  .nav-links a { display: none; }
  .btn { padding: 8px 11px; }
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 72%; border-radius: 22px 22px 0 0; padding-top: 22px; }
  .panel::before { content: ''; position: absolute; top: 8px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 4px; background: var(--line); }
  .hint { font-size: 12.5px; bottom: 44px; white-space: normal; width: max-content; max-width: calc(100% - 24px); text-align: center; }
  .stamp { bottom: 22px; }
  .tbar { grid-template-columns: 112px 1fr 48px; }
}

/* 총점·항목별 평점 (성수카페) */
.score { align-items: flex-start; }
.sc-big { flex: none; text-align: center; min-width: 74px; }
.sc-big b { display: block; font-size: 40px; line-height: 1; color: #fff; }
.sc-big small { color: var(--acc2); font-size: 11.5px; }
.sc-r { flex: 1; min-width: 0; }
.cbars { margin-top: 8px; }
.cbar { display: grid; grid-template-columns: 84px 1fr 30px; align-items: center; gap: 6px; font-size: 12.5px; color: #f1e4d3; padding: 1px 0; }
.cbar .bar { height: 7px; border-radius: 5px; background: rgba(255,255,255,.16); overflow: hidden; }
.cbar .bar i { display: block; height: 100%; background: var(--acc2); border-radius: 5px; }
.cbar span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.crit { margin: 8px 0 4px; }
.crow { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.crow .pick { display: flex; gap: 0; font-size: 24px; margin: 0; }
.rform .total { margin: 4px 0 8px; font-size: 14px; color: var(--esp); }
.rform .total b { font-size: 20px; color: var(--acc); }
.rform .chips { margin: 4px 0 8px; }
.rv-sc { color: var(--acc); font-weight: 700; }
.rv-c { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.stars-big { color: var(--acc); }
.cafe-score { margin: 14px 0; }
.gal { margin: 10px 0; }
.ph-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; align-items: stretch; }
.ph-row .ph { flex: none; width: 150px; height: 112px; position: relative; border-radius: 12px; overflow: hidden; background: var(--latte); scroll-snap-align: start; }
.ph-row .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-row .ph span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 6px 3px; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-h { flex: none; writing-mode: vertical-rl; font-size: 11px; color: var(--mut); align-self: center; }
.intro { font-size: 14.5px; margin: 4px 0 8px; }
.menu { list-style: none; padding: 0; margin: 6px 0; font-size: 14px; }
.menu li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px dashed var(--line); }
.menu li.sig { font-weight: 700; color: var(--esp); }
.menu li span:last-child { color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tips { padding-left: 18px; font-size: 14px; margin: 4px 0; }
.rform .file { display: block; font-size: 13px; color: var(--esp); margin: 2px 0 8px; }
.rform .file input { display: block; margin-top: 4px; font-size: 12.5px; }
@media (max-width: 720px) {
  .nav-links .lbl { display: none; }
  .hint { bottom: 64px; left: 12px; right: 12px; transform: none; width: auto; max-width: none; }
  .stamp { bottom: 30px; }
  .maplibregl-ctrl-bottom-right { bottom: 40px; }
}
/* 내 위치 = 캐릭터 라떼 */
.me { position: relative; width: 68px; height: 88px; pointer-events: none; }
.me img { position: absolute; left: 0; bottom: 6px; width: 68px; height: 79px; animation: mehop 1.6s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(31,20,16,.3)); }
.me b { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); background: #2f7cf6; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.me-ring { position: absolute; left: 50%; bottom: 0; width: 44px; height: 14px; margin-left: -22px; border-radius: 50%; background: rgba(47,124,246,.35); animation: mering 1.6s ease-out infinite; }
@keyframes mehop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes mering { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
