:root {
  --bg: #0E1116;
  --card: #171B22;
  --card-hi: #1D232C;
  --line: #262D38;
  --text: #F2F4F7;
  --muted: #8D96A5;
  --accent: #2FD9A8;
  --accent-ink: #06231A;
  --warn: #FF9F6B;
  --bg-rgb: 14, 17, 22;
  --radius: 18px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3FBF8; --card: #FFFFFF; --card-hi: #E7F7F0; --line: #D7EEE5;
    --text: #12211B; --muted: #5B6F67; --accent: #0F9D74; --accent-ink: #FFFFFF; --warn: #B3540A;
    --bg-rgb: 243, 251, 248;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F3FBF8; --card: #FFFFFF; --card-hi: #E7F7F0; --line: #D7EEE5;
  --text: #12211B; --muted: #5B6F67; --accent: #0F9D74; --accent-ink: #FFFFFF; --warn: #B3540A;
  --bg-rgb: 243, 251, 248;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* 라이트/다크 전환이 뚝 끊기지 않고 부드럽게 이어지도록. prefers-reduced-motion에서는 아래 미디어쿼리가 다시 꺼준다. */
*, *::before, *::after { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: var(--bg) radial-gradient(60% 260px at 50% -40px, rgba(47, 217, 168, .16), transparent 72%) no-repeat;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: break-word;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
body > * { max-width: 480px; margin-inline: auto; padding-inline: 20px; }
a { color: var(--accent); }
h1 { margin: 0; font-size: 30px; line-height: 1.25; letter-spacing: -.03em; }
h2 { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.crumb { margin: 14px 0 0; font-size: 13px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.theme-toggle {
  position: fixed; z-index: 20; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(14px, calc((100% - 480px) / 2 + 14px));
  width: 38px; height: 38px; margin: 0; padding: 0; max-width: none; border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4);
}
.theme-toggle:hover { border-color: var(--accent); }

.hero { padding-top: 40px; padding-bottom: 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.accent { color: var(--accent); }
.lead { margin: 10px 0 0; color: var(--muted); text-wrap: balance; }

.locate-row { margin-bottom: 4px; }
.locate {
  width: 100%; height: 50px; border: 1px solid rgba(47, 217, 168, .45); border-radius: 14px;
  background: rgba(47, 217, 168, .1); color: var(--accent); font: inherit; font-weight: 800; cursor: pointer;
  transition: background .2s, transform .1s;
}
.locate:hover:not(:disabled) { background: rgba(47, 217, 168, .16); }
.locate:active:not(:disabled) { transform: scale(.98); }
.locate:disabled { opacity: .6; cursor: progress; }

main { padding-top: 14px; }
.status { min-height: 1.5em; margin: 10px 0 12px; font-size: 13px; color: var(--muted); }
.list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }
.card.open { border-color: rgba(47, 217, 168, .4); }
.card-top { display: flex; align-items: center; gap: 8px; }
.badge { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.badge.open { background: rgba(47, 217, 168, .15); color: var(--accent); }
.badge.closed { background: var(--card-hi); color: var(--muted); }
.dist { margin-left: auto; padding: 3px 9px; border-radius: 99px; background: rgba(125, 184, 255, .12); color: #7DB8FF; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.name { margin: 10px 0 0; font-size: 17px; font-weight: 700; }
.hours { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.addr { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex; flex: 1; align-items: center; justify-content: center; height: 36px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card-hi);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: border-color .2s, transform .1s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }

.skel { height: 120px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(100deg, var(--card) 30%, var(--card-hi) 50%, var(--card) 70%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
.notice { display: grid; justify-items: center; gap: 4px; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.notice strong { color: var(--text); font-size: 17px; }
.notice .btn { flex: none; margin-top: 14px; padding: 0 20px; }

.disclaimer { margin: 20px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.foot { padding-block: 32px 40px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
