:root {
  --pink-50: #fff7f9;
  --pink-100: #ffeef2;
  --pink-200: #ffd8e0;
  --pink-300: #ffbcc9;
  --pink-400: #f7a0b1;
  --pink-500: #ee8299;
  --pink-600: #d8657e;
  --pink-700: #ad4c63;
  --ink: #242129;
  --muted: #77717d;
  --line: rgba(45, 39, 50, .11);
  --panel: rgba(255, 255, 255, .94);
  --shadow-sm: 0 7px 24px rgba(49, 30, 39, .11);
  --shadow-lg: 0 24px 70px rgba(49, 30, 39, .18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--pink-50);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; background: var(--pink-50); }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: radial-gradient(circle at 50% 42%, #fff 0, #fff7f9 45%, #ffeef2 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-glow {
  position: absolute;
  width: min(58vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(247, 160, 177, .2);
  filter: blur(45px);
  animation: breathe 2.2s ease-in-out infinite;
}
.splash img { position: relative; width: clamp(108px, 22vw, 170px); height: auto; filter: drop-shadow(0 15px 28px rgba(238, 130, 153, .24)); }
.splash-copy { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.splash h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); letter-spacing: -.04em; }
.splash-taglines { display: grid; gap: 4px; }
.splash-taglines p { margin: 0; color: #9a959d; font-size: clamp(9px, 1.35vw, 11px); line-height: 1.5; letter-spacing: 0; font-weight: 500; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .75; } }

.app-shell { position: fixed; inset: 0; overflow: hidden; background: #edf1ed; }
.map { position: absolute; inset: 0; z-index: 2; }
.map-fallback { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #edf1ed; }
.fallback-road { position: absolute; display: block; background: #fff; box-shadow: 0 0 0 3px #dfe4df; }
.road-a { width: 160%; height: 32px; left: -22%; top: 39%; transform: rotate(8deg); }
.road-b { width: 32px; height: 160%; left: 56%; top: -20%; transform: rotate(-12deg); }
.road-c { width: 120%; height: 18px; left: -10%; top: 72%; transform: rotate(-4deg); }
.fallback-block { position: absolute; display: block; border-radius: 8px; background: #d8dfd8; border: 2px solid #ccd4cc; }
.block-a { width: 24%; height: 18%; left: 8%; top: 12%; }
.block-b { width: 20%; height: 25%; right: 8%; top: 10%; }
.block-c { width: 30%; height: 18%; left: 12%; bottom: 9%; }
.block-d { width: 21%; height: 21%; right: 12%; bottom: 12%; }

.top-shell {
  position: absolute;
  z-index: 30;
  top: calc(12px + var(--safe-top));
  left: calc(12px + var(--safe-left));
  right: calc(12px + var(--safe-right));
  display: grid;
  grid-template-columns: 48px minmax(0, 640px) 48px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.top-shell > * { pointer-events: auto; }
.circle-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(15px);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.circle-button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(49,30,39,.15); }
.circle-button:active { transform: scale(.97); }
.circle-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.profile-button { background: linear-gradient(145deg, #fff, var(--pink-100)); color: var(--pink-700); font-weight: 800; }
.profile-button span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-200); }

.search-box {
  height: 52px;
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 7px;
  padding: 0 12px 0 16px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.84);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.search-box:focus-within { border-color: rgba(238,130,153,.6); box-shadow: 0 10px 34px rgba(49,30,39,.16), 0 0 0 3px rgba(238,130,153,.12); }
.search-icon { width: 21px; height: 21px; fill: none; stroke: #7a747e; stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-box input::placeholder { color: #9a949e; }
.clear-search { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f1eef1; color: #716b75; cursor: pointer; font-size: 19px; line-height: 1; }

.search-panel {
  position: absolute;
  z-index: 32;
  top: calc(72px + var(--safe-top));
  left: 50%;
  width: min(calc(100vw - 140px), 640px);
  max-height: min(56vh, 520px);
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 19px;
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  padding: 7px;
  scrollbar-width: thin;
}
.search-summary { padding: 10px 12px 8px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; }
.search-result {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  padding: 10px 11px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.search-result:hover, .search-result:focus-visible { outline: none; background: var(--pink-50); }
.search-result-star { font-size: 21px; color: #a7a4a9; text-align: center; }
.search-result.visited .search-result-star, .search-result.private .search-result-star { color: var(--pink-500); }
.search-result-copy { min-width: 0; }
.search-result-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.search-result-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-distance { color: #8a858d; font-size: 11px; }
.search-empty { padding: 24px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.search-loading { padding: 16px; display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.search-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--pink-200); border-top-color: var(--pink-500); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-status {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  transform: translateX(-50%);
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(36,33,41,.78);
  color: #fff;
  font-size: 11px;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
  backdrop-filter: blur(12px);
  transition: opacity .25s ease;
  pointer-events: none;
}
.map-status.done { opacity: 0; }
.provider-notice {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 9px 13px;
  border: 1px solid #f4d5a8;
  border-radius: 13px;
  background: rgba(255,249,236,.96);
  color: #735329;
  font-size: 11px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.map-actions {
  position: absolute;
  z-index: 28;
  right: calc(16px + var(--safe-right));
  bottom: calc(20px + var(--safe-bottom));
  display: grid;
  gap: 10px;
}
.floating-button {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 17px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.floating-button:hover { transform: translateY(-2px); box-shadow: 0 13px 34px rgba(49,30,39,.18); }
.floating-button:active { transform: scale(.96); }
.floating-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.floating-button.primary { background: linear-gradient(145deg, var(--pink-400), var(--pink-500)); color: white; }
.floating-button.secondary { background: rgba(255,255,255,.95); color: var(--ink); }
.map-pick-bar {
  position: absolute;
  z-index: 35;
  left: 50%;
  top: calc(80px + var(--safe-top));
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 13px 16px;
  border-radius: 17px;
  background: rgba(39,34,42,.92);
  color: #fff;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}
.map-pick-bar strong, .map-pick-bar span { display: block; }
.map-pick-bar strong { font-size: 13px; }
.map-pick-bar span { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 11px; }
.map-pick-bar button { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; padding: 8px 11px; cursor: pointer; }

.backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28,22,27,.3);
  backdrop-filter: blur(3px);
}
.modal-backdrop { z-index: 80; background: rgba(28,22,27,.4); }
.drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(390px, 89vw);
  padding: calc(18px + var(--safe-top)) 15px calc(18px + var(--safe-bottom));
  background: rgba(255,255,255,.98);
  box-shadow: 22px 0 55px rgba(36,24,31,.2);
  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 2px 2px 13px; }
.drawer-title-row { display: flex; align-items: center; gap: 11px; }
.drawer-title-row img { width: 40px; height: 40px; object-fit: contain; }
.drawer-title-row strong, .drawer-title-row span { display: block; }
.drawer-title-row strong { font-size: 18px; }
.drawer-title-row span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.plain-icon-button, .modal-close { border: 0; background: #f2eff2; color: #6f6972; border-radius: 50%; width: 34px; height: 34px; font-size: 23px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.drawer-tools input, .panel-title input { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #faf8fa; padding: 11px 12px; outline: 0; }
.drawer-tools input:focus, .panel-title input:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(238,130,153,.1); }
.visited-list { flex: 1; overflow-y: auto; padding: 10px 1px 0; }
.visited-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; padding: 13px 6px; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; gap: 10px; align-items: center; cursor: pointer; }
.visited-item:hover { background: var(--pink-50); border-radius: 12px; }
.visited-item .star { color: var(--pink-500); font-size: 20px; }
.visited-item strong { display: block; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.visited-item small { display: block; margin-top: 3px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.visited-item .rating { color: var(--pink-600); font-size: 11px; font-weight: 700; }
.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-state .big-star { display: block; color: var(--pink-200); font-size: 46px; margin-bottom: 10px; }
.empty-state strong { color: var(--ink); display: block; margin-bottom: 6px; }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.6; }

.bottom-sheet {
  position: fixed;
  z-index: 65;
  left: 50%;
  bottom: 0;
  width: min(620px, 100%);
  max-height: min(78vh, 690px);
  overflow-y: auto;
  padding: 8px 22px calc(22px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background: rgba(255,255,255,.985);
  box-shadow: 0 -20px 60px rgba(36,24,31,.19);
  transform: translate(-50%, 105%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.bottom-sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 45px; height: 5px; border-radius: 999px; margin: 2px auto 16px; background: #ddd8dd; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.place-heading { min-width: 0; display: flex; gap: 13px; align-items: flex-start; }
.place-star-badge { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #f0eef0; color: #99959b; font-size: 24px; }
.place-star-badge.visited { background: var(--pink-100); color: var(--pink-500); }
.eyebrow { color: var(--pink-600); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.place-heading h2 { margin: 3px 0 4px; font-size: 21px; letter-spacing: -.035em; }
.place-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.private-note { display: flex; align-items: center; gap: 7px; margin: 17px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--pink-50); color: #77646a; font-size: 12px; }
.rating-fieldset { border: 0; margin: 0 0 13px; padding: 0; }
.rating-fieldset legend, .field-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #5e5961; }
.rating-buttons { display: flex; gap: 6px; }
.rating-buttons button { border: 0; background: transparent; color: #d4d0d4; font-size: 34px; padding: 0 2px; cursor: pointer; transition: color .15s ease, transform .15s ease; }
.rating-buttons button.active { color: var(--pink-500); }
.rating-buttons button:hover { transform: scale(1.09); }
textarea { width: 100%; resize: vertical; min-height: 94px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: #fbfafb; color: var(--ink); outline: 0; line-height: 1.55; }
textarea:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(238,130,153,.11); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }

.button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 10px 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  font-weight: 750;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.985); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { color: #fff; background: linear-gradient(145deg, var(--pink-400), var(--pink-500)); box-shadow: 0 8px 20px rgba(238,130,153,.25); }
.button.ghost { color: #59535d; background: #f2eff2; }
.button.soft { color: var(--pink-700); background: var(--pink-100); }
.button.danger { color: #b34357; }
.button.full { width: 100%; }
.button.large { min-height: 48px; font-size: 14px; }
.text-link { color: var(--pink-700); text-decoration: none; font-size: 12px; }
.text-link:hover { text-decoration: underline; }
.centered { display: block; text-align: center; }

.modal-card {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: 50%;
  width: min(450px, calc(100vw - 28px));
  max-height: min(88vh, 760px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 26px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 24px;
  background: rgba(255,255,255,.985);
  box-shadow: var(--shadow-lg);
}
.modal-close { position: absolute; top: 13px; right: 13px; }
.modal-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--pink-100); color: var(--pink-500); font-size: 25px; }
.modal-card h2 { margin: 14px 0 6px; font-size: 22px; letter-spacing: -.035em; }
.modal-copy { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal-card form { display: grid; gap: 12px; }
.modal-card label, .auth-form label { display: grid; gap: 7px; color: #5f5962; font-size: 12px; font-weight: 700; }
.modal-card input, .auth-form input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfafb;
  padding: 0 12px;
  color: var(--ink);
  outline: 0;
  font-weight: 500;
}
.modal-card input:focus, .auth-form input:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(238,130,153,.1); }
.coordinate-card { padding: 10px 12px; border-radius: 12px; background: #f5f3f5; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.profile-card { text-align: center; }
.profile-logo { width: 82px; height: 82px; object-fit: contain; }
.account-details { margin: 18px 0; padding: 4px 14px; border: 1px solid var(--line); border-radius: 15px; text-align: left; }
.account-details div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.account-details div:last-child { border-bottom: 0; }
.account-details dt { color: var(--muted); font-size: 12px; }
.account-details dd { margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.profile-card .button, .profile-card .text-link { margin-top: 10px; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 78;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-top)) calc(16px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background: rgba(255,247,249,.4);
  backdrop-filter: blur(7px) saturate(.9);
}
.auth-card {
  width: min(438px, 100%);
  max-height: min(92vh, 820px);
  overflow-y: auto;
  padding: 25px;
  border-radius: 26px;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; }
.auth-brand img { width: 68px; height: 68px; object-fit: contain; }
.auth-brand-copy { min-width: 0; }
.auth-brand h1 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.auth-taglines { display: grid; gap: 1px; margin-top: 5px; }
.auth-taglines p { margin: 0; color: #9a959d; font-size: 9px; line-height: 1.55; letter-spacing: 0; font-weight: 500; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 13px; background: #f4f1f4; margin-bottom: 17px; }
.auth-tabs button { border: 0; border-radius: 10px; padding: 10px; background: transparent; color: #77707a; font-weight: 750; cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--pink-700); box-shadow: 0 4px 12px rgba(49,30,39,.08); }
.auth-tabs.compact { margin-top: 15px; }
.auth-form { display: grid; gap: 12px; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 52px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 8px; padding: 6px 8px; background: transparent; color: var(--pink-700); font-size: 11px; cursor: pointer; }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; cursor: pointer; font-weight: 500 !important; }
.check-row input { width: 17px !important; height: 17px !important; accent-color: var(--pink-500); box-shadow: none !important; }
.check-row a { color: var(--pink-700); }
.auth-links { display: flex; justify-content: center; align-items: center; gap: 11px; margin-top: 2px; }
.auth-links button { border: 0; background: transparent; color: #746e77; font-size: 12px; cursor: pointer; padding: 4px; }
.auth-links span { width: 1px; height: 11px; background: #d9d4d9; }
.form-message { margin-top: 12px; padding: 11px 12px; border-radius: 12px; background: #f5f3f5; color: #665f68; font-size: 12px; line-height: 1.55; }
.form-message.success { background: #f0f8f3; color: #3f6c4f; }
.form-message.error { background: #fff0f2; color: #9b4052; }
.demo-hint { margin: 13px 0 0; padding: 9px 11px; border-radius: 10px; background: #fff8e7; color: #795d2a; font-size: 11px; text-align: center; }
.recovery-card { width: min(420px, calc(100vw - 28px)); }

.toast {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  max-width: min(500px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: 13px;
  background: rgba(35,31,37,.94);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* MapLibre customizations */
.maplibregl-ctrl-top-right { top: calc(72px + var(--safe-top)); right: calc(10px + var(--safe-right)); }
.maplibregl-ctrl-group { border-radius: 13px !important; overflow: hidden; box-shadow: var(--shadow-sm) !important; }
.maplibregl-ctrl-attrib { font-size: 9px !important; background: rgba(255,255,255,.82) !important; }
.maplibregl-canvas { outline: none; }
.map-picking .maplibregl-canvas { cursor: crosshair; }

/* Admin */
.admin-body { overflow: auto; background: linear-gradient(180deg, #fff8fa, #f8f6f8 45%, #f1f3f1); min-height: 100vh; }
.admin-header { position: sticky; top: 0; z-index: 20; min-height: 70px; padding: 10px max(18px, calc((100vw - 1240px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 18px; background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.admin-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.admin-brand img { width: 44px; height: 44px; object-fit: contain; }
.admin-brand strong, .admin-brand span { display: block; }
.admin-brand strong { font-size: 16px; }
.admin-brand span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.admin-header-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.admin-main { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 70px; }
.admin-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.admin-hero h1 { margin: 5px 0 7px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.05em; }
.admin-hero p { margin: 0; color: var(--muted); }
.admin-error { padding: 16px; margin-bottom: 18px; border-radius: 14px; background: #fff0f2; color: #9b4052; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 20px; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-sm); }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 29px; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 5px; color: var(--pink-600); }
.admin-panel { margin-top: 18px; padding: 21px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-sm); }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.panel-title h2 { margin: 0; font-size: 19px; }
.panel-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-title input { width: min(280px, 100%); }
.rating-chart { display: grid; gap: 10px; }
.rating-row { display: grid; grid-template-columns: 50px minmax(0,1fr) 60px; align-items: center; gap: 11px; font-size: 12px; }
.rating-track { height: 10px; border-radius: 999px; background: #f1eef1; overflow: hidden; }
.rating-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--pink-300), var(--pink-500)); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: var(--muted); font-weight: 700; }
td { color: #4f4953; }
.role-badge { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: #f2eff2; font-size: 10px; }
.role-badge.admin { background: var(--pink-100); color: var(--pink-700); }

/* Simple and policy pages */
.simple-page { overflow: auto; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 20%, #fff, var(--pink-50) 45%, var(--pink-100)); }
.simple-card { width: min(420px, 100%); padding: 30px; border-radius: 25px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-lg); text-align: center; }
.simple-card > img { width: 92px; height: 92px; object-fit: contain; }
.simple-card h1 { margin: 10px 0 7px; font-size: 23px; }
.simple-card > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.simple-card .auth-form { text-align: left; }
.simple-card .text-link { margin-top: 17px; }
.policy-body { overflow: auto; min-height: 100vh; padding: 30px 16px 70px; background: #f8f6f8; }
.policy-card { width: min(760px, 100%); margin: 0 auto; padding: clamp(24px, 5vw, 48px); border-radius: 25px; background: #fff; box-shadow: var(--shadow-sm); }
.policy-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.policy-brand img { width: 38px; height: 38px; object-fit: contain; }
.policy-card h1 { margin: 24px 0 5px; font-size: 32px; letter-spacing: -.04em; }
.policy-date { color: var(--muted); font-size: 12px; }
.policy-card section { margin-top: 25px; }
.policy-card h2 { font-size: 17px; }
.policy-card section p { color: #5e5862; line-height: 1.8; font-size: 14px; }
.policy-card > .button { margin-top: 25px; }

@media (max-width: 760px) {
  .top-shell { grid-template-columns: 44px minmax(0,1fr) 44px; gap: 7px; left: calc(8px + var(--safe-left)); right: calc(8px + var(--safe-right)); }
  .circle-button { width: 44px; height: 44px; border-radius: 14px; }
  .search-box { height: 48px; border-radius: 15px; }
  .search-panel { top: calc(66px + var(--safe-top)); width: calc(100vw - 76px); left: calc(50% + 0px); max-height: 52vh; }
  .maplibregl-ctrl-top-right { display: none; }
  .bottom-sheet { padding-left: 17px; padding-right: 17px; }
  .sheet-actions { flex-direction: column-reverse; }
  .sheet-actions .button { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-hero, .panel-title { align-items: stretch; flex-direction: column; }
  .panel-title input { width: 100%; }
  .admin-header-actions span { display: none; }
}

@media (max-width: 460px) {
  .top-shell { grid-template-columns: 42px minmax(0,1fr) 42px; }
  .circle-button { width: 42px; height: 42px; }
  .search-box { height: 46px; padding-left: 12px; }
  .search-box input { font-size: 14px; }
  .search-panel { width: calc(100vw - 64px); }
  .auth-card { padding: 21px; border-radius: 22px; }
  .auth-brand img { width: 58px; height: 58px; }
  .auth-brand h1 { font-size: 21px; }
  .rating-buttons button { font-size: 31px; }
  .stat-grid { grid-template-columns: 1fr; }
  .admin-main { width: min(100% - 22px, 1240px); padding-top: 24px; }
  .admin-header { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Guest browsing and account drawer */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.profile-button.guest { color: #655f68; }
.profile-button #profileGuestIcon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.account-drawer { overflow: hidden; }
.drawer-guest { display: grid; gap: 10px; padding: 8px 2px 0; overflow-y: auto; }
.guest-welcome { margin: 2px 0 7px; padding: 22px 18px; border: 1px solid var(--pink-200); border-radius: 20px; background: linear-gradient(150deg, #fffafb, var(--pink-50)); text-align: center; }
.guest-welcome-star { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 16px; background: var(--pink-100); color: var(--pink-500); font-size: 27px; }
.guest-welcome strong { display: block; font-size: 16px; letter-spacing: -.025em; }
.guest-welcome p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.drawer-guest-links { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 5px 0 2px; }
.drawer-guest-links button { border: 0; background: transparent; color: #746e77; font-size: 12px; cursor: pointer; padding: 5px; }
.drawer-guest-links span { width: 1px; height: 11px; background: #d9d4d9; }
.drawer-member { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.drawer-profile-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--pink-200); border-radius: 18px; background: linear-gradient(145deg, #fff, var(--pink-50)); }
.drawer-profile-initial { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--pink-400), var(--pink-500)); color: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 7px 18px rgba(238,130,153,.22); }
.drawer-profile-copy { min-width: 0; }
.drawer-profile-copy strong, .drawer-profile-copy span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.drawer-profile-copy strong { font-size: 15px; }
.drawer-profile-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.drawer-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 9px 0 17px; }
.drawer-account-actions button { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #faf8fa; color: #5f5962; font-size: 12px; font-weight: 750; cursor: pointer; }
.drawer-account-actions button:hover { border-color: var(--pink-300); background: var(--pink-50); color: var(--pink-700); }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.library-heading > div strong, .library-heading > div span { display: inline-block; }
.library-heading > div strong { font-size: 16px; }
.library-heading > div span { margin-left: 6px; color: var(--pink-600); font-size: 11px; font-weight: 800; }
.sort-control select { height: 34px; max-width: 118px; border: 1px solid var(--line); border-radius: 10px; background: #faf8fa; color: #5f5962; padding: 0 27px 0 10px; outline: 0; font-size: 11px; font-weight: 700; cursor: pointer; }
.sort-control select:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(238,130,153,.1); }
.drawer-footer { flex: 0 0 auto; padding-top: 9px; border-top: 1px solid var(--line); }
.visited-list { min-height: 0; }
.visited-item-copy { min-width: 0; }
.visited-item .item-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; min-width: 0; }
.item-badge { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 19px; padding: 2px 6px; border-radius: 999px; background: #f1eff1; color: #726c74; font-size: 9px; font-weight: 800; }
.item-badge.review { background: var(--pink-100); color: var(--pink-700); }
.item-badge.saved { background: #eef4f0; color: #4f715c; }
.visited-item .item-detail { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.visited-item .rating.empty { color: #a8a3aa; }
.field-help { margin: -2px 1px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.edit-profile-card .form-message { margin-top: 0; }
.auth-card { position: relative; }
.auth-close { position: absolute; top: 13px; right: 13px; z-index: 1; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #f2eff2; color: #6f6972; font-size: 23px; line-height: 1; cursor: pointer; }
.auth-reason { margin: -5px 0 15px; padding: 11px 12px; border: 1px solid var(--pink-200); border-radius: 12px; background: var(--pink-50); color: #7a5661; font-size: 12px; line-height: 1.55; text-align: center; }
.continue-guest { margin-top: 12px; }
.bottom-sheet.guest-mode .private-note { background: #f5f3f5; color: #6f6972; }
.bottom-sheet.guest-mode .rating-buttons button { cursor: pointer; }
.bottom-sheet.guest-mode #saveReviewButton { background: #4e4851; box-shadow: 0 8px 20px rgba(45,39,50,.16); }

@media (max-width: 460px) {
  .drawer-account-actions { grid-template-columns: 1fr; }
  .guest-welcome { padding: 19px 15px; }
  .sort-control select { max-width: 112px; }
}
