/* Premium ops map chrome — tokens + surfaces
   Dial lock: V=4 M=3 D=7 · calm Linear-quiet + mapcn */

:root {
  --font: "Wanted Sans Variable", "Wanted Sans", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --panel-w: 372px;

  /* Quiet graphite chrome — one warm accent only */
  --bg: #121314;
  --bg-raised: #191a1c;
  --bg-soft: #222326;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #ececec;
  --text-muted: #9a9a9a;
  --text-faint: #6e6e6e;

  --accent: #c96a3a;
  --accent-hover: #b85c30;
  --accent-soft: rgba(201, 106, 58, 0.14);

  --store: #3a86e8;
  --fry: #c4a0dc;
  --ok: #5f8f63;
  --ok-soft: rgba(95, 143, 99, 0.12);
  --danger: #c45c5c;
  --warn: #b8954a;
  --dup: #7a7a7a;

  --light-bg: #faf9f7;
  --light-raised: #f3f1ee;
  --light-line: #e6e2dc;
  --light-text: #1a1a1a;
  --light-muted: #5c5c5c;
  --light-faint: #8a8a8a;

  --map-wash: #d8d5cf;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  /* Snappy out-curve — short durations, GPU-friendly props only */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.14s;
  --dur-exit: 0.12s;
  --dur-enter: 0.18s;
  --dur-row: 0.15s;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  right: var(--panel-w);
  bottom: 0;
  z-index: 1;
  background: var(--map-wash);
  /* right 트랜지션은 상세 패널 열릴 때 타일 relayout을 연속 유발해 제거 */
}

#map.detail-open { right: calc(var(--panel-w) * 2); }

#panel {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--panel-w);
  bottom: 0;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 20px 18px 24px;
  z-index: 500;
  border-left: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
  cursor: default;
  contain: layout style;
  content-visibility: auto;
}

#sheetHandle { display: none; }

/* ---- Store detail panel (light surface) ---- */
#storeDetailPanel {
  display: none;
  position: absolute;
  top: 0;
  right: var(--panel-w);
  width: var(--panel-w);
  bottom: 0;
  background: var(--light-bg);
  color: var(--light-text);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 18px 16px;
  z-index: 480;
  border-left: 1px solid var(--light-line);
  box-shadow: -8px 0 24px rgba(20, 16, 12, 0.08);
  cursor: default;
  contain: layout style;
}

#storeDetailPanel.open {
  display: block;
  animation: panel-slide-in var(--dur-enter) var(--ease) both;
}

@keyframes panel-slide-in {
  from { opacity: 0; transform: translate3d(8px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

#storeDetailPanel .sd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

#storeDetailPanel .sd-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-wrap: balance;
}

.sd-close { flex: 0 0 auto; }

#storeDetailPanel .sd-status {
  font-size: 12px;
  color: var(--ok);
  font-weight: 650;
  margin-bottom: 14px;
  display: none;
}

#storeDetailPanel .sd-status.show { display: block; }

#storeDetailPanel .sd-row {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  color: var(--light-muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

#storeDetailPanel .sd-row .sd-icon {
  flex: 0 0 auto;
  width: 18px;
  color: var(--light-faint);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-align: center;
  padding-top: 2px;
}

#storeDetailPanel .sd-foot { margin-top: 18px; }

/* ---- Shared store status row ---- */
.store-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.ssr-bar {
  flex: 0 0 auto;
  width: 3px;
  align-self: stretch;
  min-height: 28px;
  border-radius: 2px;
  background: var(--light-line);
}

.ssr-info { flex: 1 1 auto; min-width: 0; }

.ssr-name {
  display: block;
  font-weight: 650;
  font-size: 13px;
  color: var(--light-text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-break: auto;
  text-wrap: pretty;
  line-height: 1.35;
}

.ssr-addr {
  display: block;
  font-size: 11px;
  color: var(--light-faint);
  margin-top: 2px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: keep-all;
}

.ssr-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  align-self: center;
}

.status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 0;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--light-line);
  background: #fff;
  color: var(--light-muted);
  transition:
    transform 0.1s ease,
    background var(--dur) ease,
    border-color var(--dur) ease,
    color var(--dur) ease;
}

.status-btn .status-ico {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  overflow: visible;
  transition: transform 0.18s var(--ease), opacity 0.15s ease;
}

.status-btn:hover .status-ico {
  transform: scale(1.05);
}

.status-btn:active {
  transform: scale(0.94);
}

.status-btn:active .status-ico {
  transform: scale(0.92);
}

.status-btn-ok { border-color: rgba(95, 143, 99, 0.4); color: var(--ok); }
.status-btn-ok:hover { background: var(--ok-soft); border-color: rgba(95, 143, 99, 0.65); }
.status-btn-no { border-color: rgba(196, 92, 92, 0.5); color: #c45c5c; }
.status-btn-no:hover { background: rgba(196, 92, 92, 0.08); border-color: rgba(196, 92, 92, 0.7); color: #b44a4a; }
.status-btn-absent { border-color: rgba(184, 149, 74, 0.45); color: var(--warn); }
.status-btn-absent:hover { background: rgba(184, 149, 74, 0.1); border-color: rgba(184, 149, 74, 0.7); }

.status-text {
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: normal;
  text-align: right;
  max-width: 8.5em;
  line-height: 1.3;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--light-raised);
  color: var(--light-muted);
  border: none;
  font-family: inherit;
  transition: background 0.15s ease;
}

.ssr-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  max-width: 9.5em;
}

.status-note-btn {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 2px 6px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--light-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-align: right;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-note-btn:hover { background: #ebe4da; color: var(--light-text); }

.status-text:hover { background: #ebe4da; }

/* ---- Status sheet (dialog overlay) ---- */
#statusSheetBackdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.4);
  z-index: 590;
}

#statusSheetBackdrop.open { display: block; }

#statusSheet {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 92vw);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--light-bg);
  color: var(--light-text);
  box-sizing: border-box;
  padding: 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 601;
  border: 1px solid var(--light-line);
  cursor: default;
}

#statusSheet.open {
  display: block;
  animation: sheet-in var(--dur-enter) var(--ease) both;
}

#statusSheetBackdrop.open {
  display: block;
  animation: scrim-in var(--dur-exit) ease both;
}

@keyframes sheet-in {
  from { opacity: 0; transform: translate3d(-50%, calc(-50% + 8px), 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
}

@keyframes sheet-in-mobile {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

#statusSheet .ss-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

#statusSheet .ss-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--light-text);
}

#statusSheet .ss-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#statusSheet .ss-divider {
  border-top: 1px solid var(--light-line);
  margin: 2px 0;
}

#statusSheet .ss-opt {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--light-line);
  background: var(--light-raised);
  color: var(--light-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

#statusSheet .ss-opt:hover { background: #ebe4da; }
#statusSheet .ss-opt:active { transform: scale(0.98); }

#statusSheet .ss-note-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--light-line);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--light-text);
  resize: vertical;
  margin-bottom: 10px;
  background: #fff;
}

#statusSheet .ss-note-input:focus {
  outline: none;
  border-color: rgba(201, 106, 58, 0.55);
}

#statusSheet .ss-note-actions { display: flex; gap: 8px; }

#statusSheet .ss-note-confirm,
#statusSheet .ss-note-cancel {
  flex: 1;
  padding: 11px 0;
  min-height: 44px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

#statusSheet .ss-note-confirm {
  border: none;
  background: var(--accent);
  color: #fff;
}

#statusSheet .ss-note-confirm:hover { background: var(--accent-hover); }

#statusSheet .ss-note-cancel {
  border: 1px solid var(--light-line);
  background: var(--light-raised);
  color: var(--light-muted);
}

#statusSheet .ss-note-cancel:hover { background: #ebe4da; }

/* ---- Mobile sheet / panel ---- */
@media (max-width: 768px) {
  #map { right: 0; bottom: 0; }
  #map.detail-open { right: 0; }

  #storeDetailPanel {
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    bottom: 0;
    height: 45%;
    border-left: none;
    border-top: 1px solid var(--light-line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
    z-index: 600;
  }

  #statusSheet {
    left: 0;
    top: auto;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: 60vh;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
    z-index: 601;
  }

  #statusSheet.open {
    animation: sheet-in-mobile var(--dur-enter) var(--ease) both;
  }

  #panel {
    top: auto;
    left: 0;
    width: 100%;
    height: 76px;
    bottom: 0;
    border-left: none;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
    transition: height var(--dur-enter) var(--ease);
    padding: 0 16px 16px;
    content-visibility: visible;
  }

  #panel.expanded { height: 68%; }

  #sheetHandle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    margin: 0 -16px;
    cursor: pointer;
    touch-action: none;
  }

  #sheetHandle .bar {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
  }

  #panel .scrollBody { display: none; }
  #panel.expanded .scrollBody { display: block; }
  #panel h1, #panel h2, #panel .sub { display: none; }
  #panel.expanded h1, #panel.expanded h2, #panel.expanded .sub { display: block; }
  #panel:not(.expanded) { overflow: hidden; }

  /* 접힌 시트에서는 로그아웃을 아예 숨김 — 핸들 옆에서 오탭하기 쉬움 */
  #panel:not(.expanded) .panel-head {
    display: none;
  }

  #panel.expanded .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 2px;
    padding-top: 2px;
  }

  #panel.expanded .panel-head h2 {
    font-size: 17px;
    letter-spacing: -0.02em;
  }

  /* 펼쳤을 때만 보이는 조용한 텍스트형 로그아웃 (실수 탭 줄이기) */
  #panel.expanded #logoutBtn {
    font-size: 11px;
    padding: 4px 8px;
    min-height: 28px;
    min-width: 0;
    color: var(--text-faint);
    border-color: transparent;
    background: transparent;
  }

  #panel.expanded #logoutBtn:active {
    border-color: var(--line-strong);
    color: var(--text-muted);
  }

  #panel .sub { font-size: 12px; }
  #toggleFry { font-size: 13px; min-height: 40px; }
  .view-toggle button { font-size: 13px; padding: 10px 8px; }
  .status-filter button { font-size: 12px; padding: 7px 7px; }
  .status-subfilter button { font-size: 12px; padding: 6px 9px; }
  .park-item { padding: 11px 12px; font-size: 14px; }
  .park-item .badge { width: 26px; height: 26px; font-size: 12px; }
  .park-item .pcount { font-size: 12px; }
  #err { right: 12px; }
}

#panel h1,
#panel h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-wrap: balance;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  margin-bottom: 2px;
}

.panel-head h2 {
  flex: 1 1 auto;
  line-height: 1.2;
}

#logoutBtn {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  line-height: 1;
  padding: 6px 10px;
  min-height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

#logoutBtn:hover {
  color: var(--text);
  border-color: rgba(196, 92, 92, 0.45);
  background: rgba(196, 92, 92, 0.08);
}

#panel .sub {
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 6px 0 16px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  letter-spacing: -0.01em;
}

#panel .sub .sub-tail {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  color: var(--text-faint);
  opacity: 0.92;
}

.legend {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.legend-hotel,
.legend-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.legend-hotel { margin-bottom: 0; }
.legend-row { margin-bottom: 0; }

.legend-text {
  flex: 1 1 auto;
  min-width: 0;
}

.legend-note {
  color: var(--text-faint);
}

.legend-chunk {
  white-space: nowrap;
}

.legend-hotel .star {
  color: #d4b45a;
  font-size: 12px;
  line-height: 1;
  width: 9px;
  text-align: center;
}

.legend-row .sw,
#toggleFry .sw {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#toggleFry .sw {
  margin-right: 8px;
  vertical-align: middle;
}

.view-toggle {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}

.view-toggle button {
  flex: 1 1 auto;
  font-size: 12px;
  padding: 8px 10px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.view-toggle button:hover {
  border-color: rgba(255, 244, 230, 0.28);
  color: var(--text);
}

.view-toggle button.active {
  background: var(--accent-soft);
  border-color: rgba(201, 106, 58, 0.45);
  color: var(--text);
  font-weight: 650;
}

.status-filter {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  margin: 0 0 14px;
  width: 100%;
}

.status-filter > button {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  padding: 6px 4px;
  min-height: 32px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.status-filter button:hover {
  border-color: rgba(255, 244, 230, 0.28);
  color: var(--text);
}

.status-filter button.active {
  background: var(--bg-soft);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.status-chip-group {
  display: flex;
  flex: 1.15 1 0;
  min-width: 0;
  gap: 0;
}

.status-chip-group button[data-status="rejected"] {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  padding: 6px 4px;
  min-height: 32px;
  white-space: nowrap;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#rejectedSubToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  font-size: 10px;
  padding: 0;
  width: 24px;
  min-width: 24px;
  min-height: 32px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border: 1px solid var(--line-strong);
  border-left: none;
  background: var(--bg-soft);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: background var(--dur) ease, border-color var(--dur) ease, color var(--dur) ease;
}

.status-chip-group button[data-status="rejected"].active {
  color: var(--text);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--accent);
}

#rejectedSubToggle:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

#rejectedSubToggle.open {
  color: var(--text);
}

#rejectedSubToggle .chev {
  display: inline-block;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
  transform-origin: center;
}

#rejectedSubToggle.open .chev {
  transform: rotate(180deg);
}

.status-subfilter {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  margin: -4px 0 12px;
  padding-left: 2px;
}

.status-subfilter.open { display: flex; }

.status-subfilter button {
  font-size: 11px;
  padding: 5px 8px;
  min-height: 28px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text-faint);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.status-subfilter button:hover {
  border-color: rgba(255, 244, 230, 0.28);
  color: var(--text);
}

.status-subfilter button.active {
  background: var(--accent-soft);
  border-color: rgba(201, 106, 58, 0.45);
  color: var(--text);
  font-weight: 650;
}

#toggleFry {
  display: inline-flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 9px 12px;
  min-height: 40px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur) ease, border-color var(--dur) ease, color var(--dur) ease, transform 0.1s ease;
}

#toggleFry:hover {
  background: var(--bg-soft);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

#toggleFry:active { transform: scale(0.98); }

.search-wrap {
  position: relative;
  margin-bottom: 10px;
}

/* 로그인 필드와 동일한 플로팅 라벨 입력 */
.field {
  position: relative;
}

.field > input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.3;
  padding: 22px 14px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text);
  transition: border-color var(--dur) ease, background var(--dur) ease;
}

.field > input::placeholder { color: transparent; }

.field > label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-faint);
  pointer-events: none;
  transition:
    top var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    color var(--dur) ease,
    font-size var(--dur) ease;
}

.field > input:focus + label,
.field > input:not(:placeholder-shown) + label {
  top: 6px;
  transform: translateY(0) scale(0.78);
  transform-origin: left top;
  color: var(--accent);
}

.field > input:focus {
  outline: none;
  border-color: rgba(201, 106, 58, 0.55);
  background: #1e1f22;
}

#searchInput {
  /* type=search 기본 clear 버튼 여백 + 세로 중앙 정렬 완화 */
  -webkit-appearance: none;
  appearance: none;
  padding: 22px 28px 8px 14px;
}

#searchInput::-webkit-search-decoration,
#searchInput::-webkit-search-cancel-button,
#searchInput::-webkit-search-results-button,
#searchInput::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

#searchResults {
  display: none;
  /* absolute면 아래 상태 필터 칩을 덮어 클릭이 겹친다. 문서 흐름에 넣어 칩을 아래로 민다. */
  position: relative;
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
}

#searchResults.open {
  display: block;
  animation: search-pop var(--dur-exit) var(--ease) both;
}

@keyframes search-pop {
  from { opacity: 0; transform: translate3d(0, -4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.search-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-soft); }

.search-item-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-wrap: pretty;
  line-height: 1.35;
}

.search-item-addr {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 3px;
}

.search-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--text-faint);
}

#err {
  display: none;
  position: absolute;
  top: 12px;
  left: 12px;
  right: calc(var(--panel-w) + 12px);
  background: #3a2220;
  color: #f5e6e4;
  border: 1px solid rgba(196, 92, 92, 0.35);
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  z-index: 999;
}

.stats {
  display: grid;
  gap: 4px;
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

#parkList {
  contain: content;
  content-visibility: auto;
}

.stat {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0;
}

#statVisited {
  color: var(--ok);
  font-weight: 600;
}

.section-title {
  font-size: 11px;
  font-weight: 650;
  margin: 16px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.park-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  font-size: 12.5px;
  cursor: pointer;
  overflow: hidden;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  content-visibility: auto;
  contain-intrinsic-size: auto 44px;
  contain: layout style paint;
  transition:
    border-color var(--dur) ease,
    background var(--dur) ease,
    transform var(--dur-row) var(--ease),
    opacity var(--dur-row) var(--ease);
}

.park-item:hover {
  border-color: rgba(201, 106, 58, 0.45);
  background: var(--bg-soft);
}

.park-item:active { transform: translate3d(0, 0, 0) scale(0.985); }

.park-item.park-item--out {
  opacity: 0;
  transform: translate3d(0, -4px, 0) scale(0.98);
  pointer-events: none;
}

.park-item.park-item--in {
  animation: park-row-in var(--dur-enter) var(--ease) both;
}

.park-item[hidden] { display: none; }

.park-list-empty {
  margin: 4px 0 8px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  color: var(--text-faint);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.45;
}

.park-list-empty.park-list-empty--pop {
  animation: park-row-in var(--dur-enter) var(--ease) both;
}

.park-list-empty[hidden] { display: none; }

@keyframes park-row-in {
  from {
    opacity: 0;
    transform: translate3d(0, 5px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.park-item .badge {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  font-variant-numeric: tabular-nums;
}

.park-item .ptxt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  color: var(--text);
}

.park-item .pcount {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Shape-matched list skeleton */
.park-bone {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.park-bone .b-dot,
.park-bone .b-line,
.park-bone .b-tail {
  display: block;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--bg-soft) 0%,
    #2e2924 50%,
    var(--bg-soft) 100%
  );
  background-size: 200% 100%;
  animation: bone-shimmer 1.45s linear infinite;
}

.park-bone .b-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.park-bone .b-line {
  flex: 1 1 auto;
  height: 11px;
}

.park-bone .b-tail {
  width: 28px;
  height: 10px;
  flex: 0 0 auto;
}

@keyframes bone-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ---- Map popups (light) ---- */
/* 카카오맵 손(잡기) 커서가 오버레이로 새지 않게 팝업/카드는 기본 화살표 */
.gm-iw-anchor,
.gm-iw-card,
.gm-iw-body,
.iw {
  cursor: default;
}

.gm-iw-anchor {
  position: relative;
  z-index: 2147483646;
  pointer-events: auto;
}

.gm-iw-card {
  position: relative;
  background: var(--light-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(40, 30, 20, 0.08);
}

.gm-iw-close {
  position: absolute;
  /* .iw 상단/우측 패딩(14/16)과 맞춰 제목·닫기가 한 줄로 보이게 */
  top: 14px;
  right: 16px;
  z-index: 5;
}

.popup-close-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border: 1px solid var(--light-line);
  background: var(--light-raised);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font);
  line-height: 1;
  color: var(--light-muted);
  pointer-events: auto;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.popup-close-btn:hover {
  background: #ebe4da;
  border-color: rgba(40, 30, 20, 0.16);
  color: var(--light-text);
}

.popup-close-btn:active { transform: scale(0.94); }

.gm-iw-body { padding-right: 0; }

.gm-iw-body .iw {
  width: 320px !important;
  max-width: min(320px, calc(100vw - 24px));
  min-width: 260px;
  overflow: visible;
}

.cluster-row {
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--light-raised);
  border: 1px solid var(--light-line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.cluster-row:last-child { margin-bottom: 0; }

.iw-list .cluster-row .store-status-row {
  width: 100%;
  min-width: 0;
}

.cluster-row .cname {
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: normal;
  text-wrap: pretty;
}

.cluster-row .caddr {
  display: block;
  font-weight: normal;
  font-size: 11px;
  color: var(--light-muted);
  margin-top: 2px;
  overflow-wrap: break-word;
  word-break: keep-all;
  white-space: normal;
}

.cluster-row .visit-btn { margin-top: 2px; align-self: flex-end; }

.iw-title,
.iw-head {
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: keep-all;
}

.iw-meta {
  overflow-wrap: break-word;
  word-break: keep-all;
  white-space: normal;
}

.iw {
  font-family: var(--font);
  padding: 14px 16px 16px;
  box-sizing: border-box;
  position: relative;
}

.iw.iw-compact {
  padding-bottom: 14px;
}

.iw.iw-compact .iw-head {
  margin-bottom: 0;
}

.iw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  margin: 0 0 12px;
  padding-right: 40px; /* 절대배치 닫기 버튼과 겹치지 않게 */
}

.iw-title-hotel {
  color: #e0a800;
}

.iw-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--light-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-wrap: pretty;
  padding-right: 0;
}

.iw-sub {
  font-size: 11px;
  color: var(--light-faint);
  white-space: nowrap;
}

.iw-meta {
  font-size: 12px;
  color: var(--light-muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.iw-meta .mi {
  color: var(--light-faint);
  display: inline-block;
  width: 14px;
  text-align: center;
  margin-right: 3px;
}

.iw-foot {
  display: flex;
  justify-content: flex-end;
}

.iw-foot .store-status-row {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.iw-list {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 -2px;
  /* 오른쪽 여백은 스크롤바와 행 테두리 사이 간격이 된다(스크롤바는 이 패딩 바깥에 놓인다).
     2px 이면 스크롤바가 행에 달라붙어 보여서 8px 로 띄운다. 왼쪽은 그대로 2px. */
  padding: 0 8px 0 2px;
  scrollbar-width: thin;
  scrollbar-color: #c9c0b4 transparent;
  min-height: 1px;
}

.iw-list-empty {
  margin-top: 4px;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--light-line);
  color: var(--light-muted);
  font-size: 12px;
  text-align: center;
  line-height: 1.45;
}

.iw-list::-webkit-scrollbar { width: 6px; }
.iw-list::-webkit-scrollbar-track { background: transparent; }
.iw-list::-webkit-scrollbar-thumb { background: #c9c0b4; border-radius: 999px; }
.iw-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

.store-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--light-raised);
  border: 1px solid var(--light-line);
}

.store-row:last-child { margin-bottom: 0; }
.store-row.done {
  background: rgba(95, 143, 99, 0.08);
  border-color: rgba(95, 143, 99, 0.28);
}

.store-row .stxt { min-width: 0; width: 100%; }

.store-row .sname {
  font-weight: 650;
  font-size: 12.5px;
  color: var(--light-text);
  overflow-wrap: break-word;
  word-break: keep-all;
  white-space: normal;
}

.store-row.done .sname { color: var(--ok); }

.store-row .saddr,
.store-row .sphone {
  color: var(--light-faint);
  font-size: 11px;
  margin-top: 1px;
  overflow-wrap: break-word;
  word-break: keep-all;
  white-space: normal;
}

.store-row .visit-btn {
  margin-top: 2px;
  align-self: flex-end;
}

.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 7px 12px;
  min-height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(95, 143, 99, 0.45);
  background: #fff;
  color: var(--ok);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.visit-btn:hover { background: var(--ok-soft); }
.visit-btn:active { transform: scale(0.97); }

.visit-btn.done {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}

.visit-btn.done:hover { background: #528556; }

/* ---- Auth gate (sign-in form) ---- */
#lockGate {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 106, 58, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity var(--dur-exit) ease,
    transform var(--dur-exit) ease;
}

#lockGate.hidden { display: none; }

#lockGate.leaving {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition:
    opacity 0.38s var(--ease),
    transform 0.38s var(--ease);
}

#lockGate.pending .lock-brand,
#lockGate.pending form,
#lockGate.pending .legal-links {
  visibility: hidden;
}

.lock-brand {
  text-align: center;
  animation: gate-enter var(--dur-enter) var(--ease) both;
}

.lock-brand .mark {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent);
}

#lockGate h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  text-wrap: balance;
}

#lockGate .lock-sub {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

#lockGate form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(300px, 88vw);
  animation: gate-enter 0.28s var(--ease) 0.04s both;
}

#lockGate form.shake {
  animation: gate-shake 0.32s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* 로그인 비밀번호 = 검색창과 동일한 .field 플로팅 라벨.
   네이티브 type=password 사용 (text+disc 마스킹은 입력/IME가 씹히기 쉬움). */
#lockGate .field > input {
  font-size: 16px;
}

#lockGate button[type="submit"] {
  position: relative;
  overflow: hidden;
  font-size: 14px;
  padding: 13px;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transition:
    background 0.2s ease,
    transform 0.2s var(--ease),
    box-shadow 0.2s ease,
    opacity 0.18s ease,
    filter 0.2s ease;
}

#lockGate button[type="submit"]:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 8px 18px rgba(201, 106, 58, 0.28);
}

#lockGate button[type="submit"]:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

#lockGate button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
  filter: saturate(0.85);
}

#lockGate button[type="submit"].is-success {
  background: #5f8f63;
  opacity: 1;
  filter: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 22px rgba(95, 143, 99, 0.28);
  animation: gate-btn-success 0.42s var(--ease) both;
  pointer-events: none;
}

@keyframes gate-btn-success {
  0% { transform: scale(1); }
  35% { transform: scale(1.04); }
  100% { transform: scale(1); filter: brightness(1.05); }
}

#lockGate .msg {
  font-size: 12px;
  color: #d98989;
  min-height: 16px;
  margin-top: -4px;
}

.legal-links {
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: gate-enter 0.3s var(--ease) 0.06s both;
}

.legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) ease;
}

.legal-links a:hover { color: var(--text); }

@keyframes gate-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes gate-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

#cookieBanner {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  max-width: 420px;
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

#cookieBanner p {
  margin: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

#cookieBanner.open { display: block; }
#cookieBanner a { color: var(--accent); white-space: nowrap; }

#cookieBanner button {
  margin-top: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}

#legalModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(20, 16, 12, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#legalModal.open { display: flex; }

#noteModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20010;
  background: rgba(20, 16, 12, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#noteModal.open { display: flex; }

#noteModal .note-card {
  background: var(--light-bg);
  color: var(--light-text);
  max-width: 420px;
  width: 100%;
  border-radius: 14px;
  padding: 20px 20px 16px;
  box-sizing: border-box;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-line);
}

#noteModal .note-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--danger);
}

#noteModal #noteModalBody {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--light-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: keep-all;
  max-height: 50vh;
  overflow-y: auto;
}

#noteModal .note-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

#noteModal .note-modal-actions button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

#noteModalClear {
  border: 1px solid var(--light-line);
  background: var(--light-raised);
  color: var(--light-muted);
}

#noteModalClear:hover { background: #ebe4da; color: var(--light-text); }

#noteModalClose {
  border: none;
  background: var(--accent);
  color: #fff;
}

#noteModalClose:hover { background: var(--accent-hover); }

#legalModal .legal-card {
  background: var(--light-bg);
  color: var(--light-text);
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-sizing: border-box;
  line-height: 1.65;
  box-shadow: var(--shadow);
}

#legalModal .legal-card h2 {
  font-size: 18px;
  margin: 0 56px 12px 0;
  letter-spacing: -0.02em;
  font-weight: 650;
}

#legalModal .legal-card p {
  font-size: 13px;
  margin: 0 0 10px;
  color: var(--light-muted);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  text-wrap: pretty;
}

#legalModal .legal-card code {
  word-break: keep-all;
  white-space: nowrap;
}

#legalModal #legalBody {
  word-break: keep-all;
  overflow-wrap: break-word;
}

#legalModal .legal-close {
  float: right;
  border: 1px solid var(--light-line);
  background: var(--light-raised);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  min-height: 36px;
  cursor: pointer;
  font-size: 13px;
  color: var(--light-muted);
}

#lockGate input:focus-visible,
#lockGate button:focus-visible,
.view-toggle button:focus-visible,
.status-filter button:focus-visible,
.status-subfilter button:focus-visible,
#rejectedSubToggle:focus-visible,
#searchInput:focus-visible,
.visit-btn:focus-visible,
.status-btn:focus-visible,
.status-text:focus-visible,
.status-note-btn:focus-visible,
#noteModalClear:focus-visible,
#noteModalClose:focus-visible,
#statusSheet .ss-opt:focus-visible,
#statusSheet .ss-note-confirm:focus-visible,
#statusSheet .ss-note-cancel:focus-visible,
#logoutBtn:focus-visible,
#toggleFry:focus-visible,
#cookieBanner button:focus-visible,
#legalModal .legal-close:focus-visible,
.popup-close-btn:focus-visible,
.park-item:focus-visible {
  outline: 2px solid rgba(201, 106, 58, 0.7);
  outline-offset: 2px;
}

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

  .park-item.park-item--in,
  .park-list-empty.park-list-empty--pop,
  #searchResults.open {
    animation: none !important;
  }

  .park-bone .b-dot,
  .park-bone .b-line,
  .park-bone .b-tail {
    animation: none;
    background: var(--bg-soft);
  }

  #lockGate form.shake,
  .lock-brand,
  #lockGate form,
  .legal-links,
  #lockGate button[type="submit"].is-success {
    animation: none !important;
  }

  #lockGate button[type="submit"],
  #lockGate.leaving {
    transition: none !important;
  }
}

/* 팝업 카드 위에서도 지도를 드래그할 수 있게: 카드는 클릭 통과, 버튼만 클릭 가능.
   (모바일에서 팝업이 화면을 가려 지도가 안 밀리던 문제 해결. 버튼 동작은 document 캡처 위임으로 유지)

   PC 에서는 적용하지 않는다. 클릭 통과를 켜면 휠 이벤트가 카드를 그냥 지나쳐
   지도에 닿아, 커버 매장 목록(.iw-list)을 스크롤하려 할 때 지도가 확대/축소되고
   스크롤바 드래그와 주소·전화번호 텍스트 선택도 불가능해진다. PC 는 화면이 넓어
   카드가 지도를 가리는 문제도 없으므로, 카드를 원래대로 불투명하게 둔다.
   (app.js 팝업 생성부의 wheel/mousedown stopPropagation 이 지도 확대·이동을 막는다.) */
@media (max-width: 768px) {
  .gm-iw-anchor { pointer-events: none; }
  .gm-iw-anchor .gm-iw-close,
  .gm-iw-anchor .visit-btn,
  .gm-iw-anchor [data-visit-key],
  .gm-iw-anchor button,
  .gm-iw-anchor a,
  .gm-iw-anchor input,
  .gm-iw-anchor select,
  .gm-iw-anchor textarea { pointer-events: auto; }
}

/* ---- Live location controls (현위치 / 위치 공유) ----
   예전에는 app.js 에서 <style> 을 주입했다. 색을 #fff / #2f6fd1 처럼 직접 박아
   앱의 다크 크롬과 따로 놀았고, 쿠키 배너와 겹쳤으며, 효과 없는 규칙도 섞여 있었다.
   스타일은 여기로 모으고 테마 토큰만 쓴다. */
#gmLiveCtrl {
  position: absolute;
  left: 12px;
  bottom: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gm-live-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background var(--dur, 0.15s) ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.gm-live-btn:hover { background: var(--bg-soft); }
.gm-live-btn:active { transform: scale(0.96); }

#gmBtnLocate.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#gmBtnLocate.on:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
#gmBtnShare.on { background: var(--danger); border-color: var(--danger); color: #fff; }
#gmBtnShare.on:hover { background: #b45252; border-color: #b45252; }

#gmLiveStatus {
  align-self: flex-start;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  max-width: 70vw;
  box-shadow: var(--shadow);
  pointer-events: none;
}

/* 쿠키 안내 배너는 좌측 하단 고정(z-index 10000)이라 이 버튼들을 정면으로 덮는다.
   배너가 떠 있는 동안에는 버튼을 위로 올린다. 배너(#cookieBanner)가 문서상
   먼저 오고 #gmLiveCtrl 은 런타임에 body 끝에 붙으므로 형제 선택자로 닿는다. */
#cookieBanner.open ~ #gmLiveCtrl { bottom: 132px; }

@media (max-width: 768px) {
  #gmLiveCtrl { bottom: 96px; }
  #cookieBanner.open ~ #gmLiveCtrl { bottom: 232px; }
  .gm-live-btn { min-height: 48px; font-size: 15px; padding: 12px 16px; }
}

/* 내 위치 / 팀원 위치 마커 */
.gm-me { position: relative; width: 0; height: 0; pointer-events: none; }
.gm-me-rot {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform-origin: 0 0; transition: transform 0.18s ease;
}
.gm-me-dot {
  position: absolute; left: -8px; top: -8px; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid #fff; box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.gm-me-arrow {
  position: absolute; left: -6px; top: -27px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 13px solid var(--accent);
}
.gm-me-label {
  position: absolute; left: 12px; top: -9px; white-space: nowrap;
  background: var(--bg-raised); border: 1px solid var(--line-strong); color: var(--text);
  font-family: var(--font); font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 7px;
}
.gm-me.self .gm-me-dot { animation: gmPulse 1.6s ease-out infinite; }

@keyframes gmPulse {
  0% { box-shadow: 0 0 0 2px rgba(201, 106, 58, 0.55); }
  70% { box-shadow: 0 0 0 13px rgba(201, 106, 58, 0); }
  100% { box-shadow: 0 0 0 2px rgba(201, 106, 58, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .gm-me.self .gm-me-dot { animation: none; }
}
