* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #e2e8f0; color: #0f172a;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: #f1f5f9;
  box-shadow: 0 4px 32px rgba(15, 23, 42, 0.1);
}
@media (max-width: 430px) {
  body {
    max-width: none;
    box-shadow: none;
  }
  html, body { background: #f1f5f9; }
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px 8px; background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0; flex-wrap: wrap; gap: 8px;
}
.topbar > div:first-child { min-width: 0; }
.topbar h1 { margin: 0; font-size: 1.15rem; white-space: nowrap; }
.sub { margin: 2px 0 0; font-size: 0.8rem; color: #64748b; white-space: nowrap; }
.topbar-actions {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  flex-wrap: wrap; justify-content: flex-end;
}
.topbar-btn {
  padding: 6px 10px; font-size: 0.78rem; min-height: 32px;
}
.auth-badge {
  font-size: 0.7rem; color: #475569; max-width: 72px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth-sheet-panel input {
  width: 100%; margin: 8px 0; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 10px; font-size: 0.95rem;
}
.auth-sheet-lead { margin: 0 0 12px; font-size: 0.85rem; color: #64748b; }
.mypage-meta { margin: 0 0 8px; font-size: 0.82rem; color: #64748b; word-break: break-all; }
.mypage-status { margin: 0 0 12px; font-size: 0.95rem; font-weight: 700; color: #1e40af; }
.mypage-actions { flex-direction: column; align-items: stretch; }
.mypage-link-btn {
  display: block; text-align: center; text-decoration: none;
  padding: 10px 12px; border-radius: 10px;
}
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 14px; font-size: 0.78rem; color: #94a3b8;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.auth-divider span { flex-shrink: 0; }
.auth-error { margin: 8px 0 0; font-size: 0.85rem; color: #dc2626; min-height: 1.2em; }
.subscribe-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: #fef3c7; border-bottom: 1px solid #fcd34d;
  font-size: 0.82rem; color: #92400e;
  flex-shrink: 0;
}
.subscribe-banner .btn.sm { padding: 6px 10px; font-size: 0.78rem; min-height: 28px; }
.badge-live {
  font-size: 0.72rem; font-weight: 700; color: #166534;
  background: #dcfce7; padding: 4px 10px; border-radius: 999px;
}
.type-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: relative; z-index: 21;
  flex-shrink: 0;
}
.type-picker {
  flex: 1; display: flex; align-items: center; gap: 8px;
  border: 1px solid #bfdbfe; background: #eff6ff; color: #1e3a8a;
  border-radius: 12px; padding: 10px 12px; cursor: pointer;
  font-size: 0.95rem; text-align: left;
}
.type-picker-label { font-weight: 700; color: #1d4ed8; flex-shrink: 0; }
.type-picker-value {
  flex: 1; font-weight: 700; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.type-picker-arrow { color: #64748b; font-size: 0.85rem; flex-shrink: 0; }
.type-picker.has-value { background: #fef3c7; border-color: #fbbf24; color: #92400e; }
.type-picker.has-value .type-picker-label { color: #b45309; }
.type-clear {
  flex-shrink: 0; width: 40px; height: 40px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc; color: #64748b; font-size: 1rem;
  cursor: pointer;
}
.type-expand {
  flex-shrink: 0; width: 40px; height: 40px;
  border: 1px solid #bfdbfe; border-radius: 10px;
  background: #eff6ff; color: #1d4ed8; font-size: 1.1rem;
  font-weight: 700; cursor: pointer;
}
.type-expand.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.filter-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: #fff;
  border-bottom: 1px solid #e2e8f0; overflow-x: auto;
  position: relative; z-index: 20;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.filter-date {
  width: auto; min-width: 130px; flex-shrink: 0;
  padding: 6px 8px; font-size: 0.8rem;
}
.filter-apply { flex-shrink: 0; }
.filter-divider {
  width: 1px; height: 22px; background: #e2e8f0; flex-shrink: 0; margin: 0 4px;
}
.filter-date-tab { flex-shrink: 0; }
.filter-bar.filter-since-active .filter-date {
  border-color: #2563eb; background: #eff6ff;
}
.filter-label {
  font-size: 0.78rem; font-weight: 700; color: #334155; white-space: nowrap;
  flex-shrink: 0;
}
.filter-chip {
  border: 1px solid #cbd5e1; background: #f8fafc; color: #475569;
  border-radius: 999px; padding: 6px 10px; font-size: 0.76rem;
  font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.filter-chip.active {
  background: #2563eb; border-color: #2563eb; color: #fff;
}
.panel { display: none; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.panel.active { display: flex; }
#panel-board.panel.active { min-height: 0; }
#panel-map { position: relative; }
#kakao-map { flex: 1; min-height: 220px; width: 100%; }
.map-toolbar, .search-toolbar {
  display: flex; gap: 8px; padding: 10px 12px; background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
input, textarea {
  font-size: 16px; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 10px 12px; width: 100%;
}
.map-toolbar input, .search-toolbar input { flex: 1; }
.map-actions { padding: 0 12px 8px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.btn.gps {
  width: 100%; background: #f8fafc; color: #334155;
  border: 1px solid #cbd5e1;
}
.btn.gps:disabled { opacity: 0.6; }
.btn {
  border: none; border-radius: 10px; padding: 10px 14px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: #2563eb; color: #fff; }
.btn.ghost { background: #e2e8f0; color: #334155; }
.btn.block { width: 100%; margin: 10px 12px; width: calc(100% - 24px); }
.status {
  font-size: 0.8rem; color: #64748b; padding: 6px 12px; background: #f8fafc;
}
#map-status { position: absolute; top: 96px; left: 12px; right: 12px; z-index: 2;
  background: rgba(255,255,255,.92); border-radius: 8px; pointer-events: none; }
.map-legend {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  padding: 8px 10px; background: rgba(255,255,255,.92);
  border-radius: 10px; font-size: 0.7rem; font-weight: 600; color: #475569;
  pointer-events: none; box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.map-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.map-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-none { background: #2563eb; }
.dot-planned { background: #f59e0b; }
.dot-visited { background: #16a34a; }
.dot-interested { background: #7c3aed; }
.dot-rejected { background: #94a3b8; }
.list { flex: 1; overflow-y: auto; padding: 10px 12px 80px; }
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 14px; margin-bottom: 10px; cursor: pointer;
}
.card.status-planned { border-color: #fcd34d; background: #fffbeb; }
.card.status-visited { border-color: #86efac; background: #f0fdf4; }
.card.status-interested { border-color: #c4b5fd; background: #f5f3ff; }
.card.status-rejected { border-color: #cbd5e1; background: #f8fafc; }
.card-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; margin-bottom: 6px;
}
.card-badge.status-planned { color: #b45309; background: #fef3c7; }
.card-badge.status-visited { color: #166534; background: #dcfce7; }
.card-badge.status-interested { color: #5b21b6; background: #ede9fe; }
.card-badge.status-rejected { color: #475569; background: #e2e8f0; }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card-type { margin: 0 0 4px; font-size: 0.88rem; color: #1d4ed8; font-weight: 700; }
.card-date { margin: 0 0 4px; font-size: 0.78rem; color: #64748b; font-weight: 500; }
.card p { margin: 4px 0; font-size: 0.85rem; color: #64748b; }
.card a { color: #2563eb; text-decoration: none; }
.tabbar {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: #fff; border-top: 1px solid #e2e8f0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  position: relative; z-index: 10;
  flex-shrink: 0;
}
.tab {
  background: none; border: none; padding: 12px 8px;
  font-size: 0.9rem; color: #64748b; font-weight: 600;
}
.tab.active { color: #2563eb; }
.board-header { padding: 10px 12px; background: #fff; border-bottom: 1px solid #e2e8f0; display:flex; flex-direction:column; gap:10px; }
.board-category-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.board-cat {
  border:1px solid #e2e8f0; background:#f8fafc; color:#475569;
  border-radius:999px; padding:6px 12px; font-size:0.78rem; font-weight:600; cursor:pointer;
}
.board-cat.active { background:#2563eb; color:#fff; border-color:#2563eb; }
.board-form-select { width:100%; margin-bottom:8px; padding:10px 12px; border-radius:10px; border:1px solid #e2e8f0; font-size:0.9rem; }
.board-images { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.board-images img { max-width:100%; border-radius:10px; max-height:220px; object-fit:cover; }
.board-bookmark-btn.active { color:#2563eb; border-color:#bfdbfe; background:#eff6ff; }
.board-comments { margin-top:20px; padding-top:16px; border-top:1px solid #e2e8f0; }
.board-comments-title { margin:0 0 12px; font-size:0.95rem; }
.board-comment-list { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.board-comment-item { background:#f8fafc; border-radius:10px; padding:10px 12px; font-size:0.88rem; }
.board-comment-meta { font-size:0.75rem; color:#64748b; margin-bottom:4px; }
.board-comment-form { display:flex; flex-direction:column; gap:8px; }
.board-comment-form textarea { border:1px solid #e2e8f0; border-radius:10px; padding:10px; font-size:0.9rem; resize:vertical; }
.badge-writing { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.board-table-head, .board-row {
  display: grid;
  grid-template-columns: 36px 1fr 52px 72px;
  gap: 8px; align-items: center;
  padding: 10px 12px; font-size: 0.82rem;
}
.board-table-head {
  background: #f1f5f9; color: #64748b; font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
}
.board-rows { flex: 1; overflow-y: auto; padding-bottom: 80px; background: #fff; }
.board-row {
  border-bottom: 1px solid #f1f5f9; cursor: pointer;
}
.board-row:active { background: #f8fafc; }
.board-row .col-title {
  font-weight: 600; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.board-empathy-pill { font-size: 0.72rem; color: #e11d48; font-weight: 700; flex-shrink: 0; }
.board-row .col-author, .board-row .col-date { color: #64748b; text-align: right; }
.board-row .col-no { color: #94a3b8; text-align: center; }
.board-empty { padding: 24px 12px; text-align: center; color: #64748b; font-size: 0.9rem; }
.board-author-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 100%; }
.board-author-name { font-size: 0.82rem; color: #64748b; }
.board-author-badges { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; }
.board-meta { margin: 6px 0 0; font-size: 0.85rem; color: #64748b; }
.board-meta-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.board-empathy-bar { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.board-empathy-btn.active { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.board-empathy-count { font-size: 0.88rem; color: #64748b; font-weight: 600; }
.badge-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  line-height: 1.3; white-space: nowrap;
}
.badge-chip.badge-icon-only { padding: 2px 5px; font-size: 0.75rem; }
.badge-invite { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-earnings { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-empathy { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.mypage-badges { margin: 12px 0 4px; }
.mypage-badges-title { margin: 0 0 8px; font-size: 0.78rem; font-weight: 700; color: #94a3b8; }
.mypage-badge-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.mypage-badge-empty { margin: 0; font-size: 0.82rem; color: #94a3b8; }
.board-detail, .board-form { padding: 12px; overflow-y: auto; flex: 1; background: #fff; }
.board-body { white-space: pre-wrap; line-height: 1.6; margin-top: 12px; }
.hidden { display: none !important; }
.toast {
  position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 0.85rem; z-index: 99; max-width: 90%;
}
.map-key-warn {
  margin: 12px; padding: 14px; background: #fef3c7; border-radius: 12px;
  color: #92400e; font-size: 0.9rem; line-height: 1.5;
}
.type-sheet-panel {
  max-height: min(88dvh, calc(100dvh - 56px));
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.type-sheet-hint { margin: 0 0 8px; font-size: 0.78rem; color: #64748b; flex-shrink: 0; }
.type-list {
  flex: 1 1 auto; min-height: 100px; max-height: 52dvh;
  overflow-y: auto; margin-bottom: 0;
  -webkit-overflow-scrolling: touch;
}
.type-sheet-footer {
  flex-shrink: 0; border-top: 1px solid #e2e8f0;
  padding-top: 10px; margin-top: 8px; background: #fff;
}
.type-sheet-close-btn { width: 100%; margin-top: 8px; }
.type-item {
  display: grid; grid-template-columns: 22px 1fr auto;
  gap: 8px; align-items: center;
  width: 100%; text-align: left; border: none; background: #fff;
  border-bottom: 1px solid #f1f5f9; padding: 12px 4px; cursor: pointer;
  font-size: 0.9rem;
}
.type-item:active { background: #f8fafc; }
.type-item.active { background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.type-item .type-check {
  width: 18px; color: #cbd5e1; font-size: 0.9rem; flex-shrink: 0;
}
.type-item.active .type-check { color: #2563eb; }
.type-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-item-count { color: #64748b; font-size: 0.8rem; flex-shrink: 0; text-align: right; }
.visit-sheet {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.visit-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.4);
}
.visit-sheet-panel {
  position: relative; width: 100%; max-width: 430px;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.15);
}
.visit-sheet-panel h3 { margin: 0 0 6px; font-size: 1.05rem; }
.sheet-type {
  margin: 0 0 12px; font-size: 0.9rem; font-weight: 700; color: #1d4ed8;
  line-height: 1.4;
}
.sheet-info {
  margin: 0 0 14px; padding: 12px; background: #f8fafc;
  border-radius: 12px; border: 1px solid #e2e8f0;
  display: grid; gap: 8px;
}
.sheet-info div {
  display: grid; grid-template-columns: 72px 1fr; gap: 8px;
  font-size: 0.85rem; line-height: 1.45;
}
.sheet-info dt { margin: 0; color: #64748b; font-weight: 600; }
.sheet-info dd { margin: 0; color: #0f172a; word-break: break-word; }
.sheet-info a { color: #2563eb; text-decoration: none; font-weight: 600; }
.status-chips-label {
  margin: 0 0 8px; font-size: 0.82rem; font-weight: 700; color: #64748b;
}
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.status-chip {
  border: 2px solid #e2e8f0; background: #fff; border-radius: 999px;
  padding: 8px 12px; font-size: 0.82rem; font-weight: 700; color: #475569; cursor: pointer;
}
.status-chip[data-status="none"].active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.status-chip[data-status="planned"].active { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.status-chip[data-status="visited"].active { border-color: #16a34a; background: #f0fdf4; color: #166534; }
.status-chip[data-status="interested"].active { border-color: #7c3aed; background: #f5f3ff; color: #5b21b6; }
.status-chip[data-status="rejected"].active { border-color: #94a3b8; background: #f8fafc; color: #475569; }
.sheet-external {
  margin: 0 0 14px; font-size: 0.78rem; color: #94a3b8; text-align: center;
}
.sheet-external-label { margin-right: 4px; }
.sheet-external-links a {
  color: #64748b; text-decoration: none; font-weight: 600;
}
.sheet-external-links a:hover { color: #2563eb; text-decoration: underline; }
.sheet-external-sep { margin: 0 5px; color: #cbd5e1; }
.sheet-external-q {
  display: block; margin-top: 6px; font-size: 0.72rem; color: #94a3b8;
}
.sheet-actions { display: flex; gap: 8px; margin-top: 0; }
.sheet-actions .btn { flex: 1; min-height: 44px; }

.app-splash {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  background: linear-gradient(165deg, #0f172a 0%, #1e3a5f 55%, #0f172a 100%);
}
body.screen-booting .app-splash { display: flex; }
body:not(.screen-booting) .app-splash { display: none; }
body.screen-booting #welcome-screen,
body.screen-booting #onboarding-screen { display: none !important; }
body:not(.screen-app) #app-shell { display: none !important; }
.app-splash-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff;
  animation: app-splash-spin 0.8s linear infinite;
}
@keyframes app-splash-spin { to { transform: rotate(360deg); } }

.welcome-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 20px; overflow-y: auto;
  background: linear-gradient(165deg, #0f172a 0%, #1e3a5f 55%, #0f172a 100%);
}
.welcome-screen.hidden { display: none; }

/* ===== 가입완료(온보딩) 화면 ===== */
.onboarding-screen { z-index: 210; }
.onboarding-card { text-align: left; }
.onboarding-label {
  display: block; margin: 14px 0 6px; font-size: 0.82rem; font-weight: 700; color: #cbd5e1;
}
.onboarding-input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid #334155; border-radius: 10px;
  background: #0b1220; color: #f8fafc;
}
.onboarding-input::placeholder { color: #64748b; }
.onboarding-row { display: flex; gap: 8px; align-items: stretch; }
.onboarding-row .onboarding-input { flex: 1; }
.onboarding-send { white-space: nowrap; flex-shrink: 0; min-height: 46px; }
.onboarding-row.hidden { display: none; }
.onboarding-ok { margin: 8px 0 0; font-size: 0.85rem; font-weight: 700; color: #4ade80; }
.onboarding-ok.hidden { display: none; }
.welcome-phone-gate { margin: 4px 0 2px; }
.welcome-phone-gate.hidden { display: none; }
.welcome-phone-label {
  margin: 0 0 8px; font-size: 0.86rem; font-weight: 600; color: #cbd5e1; text-align: center;
}
.welcome-phone-gate .onboarding-row { margin-top: 8px; }
.welcome-phone-msg { margin: 8px 0 0; min-height: 1.2em; font-size: 0.82rem; color: #94a3b8; text-align: center; }
.welcome-phone-msg.is-error { color: #f87171; }
.welcome-login-hint {
  margin: 0 0 14px; color: #94a3b8; font-size: 0.8rem; line-height: 1.4; text-align: center;
}
.welcome-social-msg {
  margin: 0 0 12px; font-size: 0.86rem; font-weight: 700; color: #4ade80; text-align: center;
}
.welcome-social-msg.is-warn { color: #fbbf24; }
.welcome-social-msg.hidden { display: none; }

.onboarding-agree {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 18px 0 4px; font-size: 0.82rem; color: #cbd5e1; line-height: 1.4;
}
.onboarding-agree input { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; }
.onboarding-done { margin-top: 14px; }
.onboarding-done:disabled { opacity: 0.45; cursor: not-allowed; }
.onboarding-logout {
  display: block; width: 100%; margin-top: 14px; background: none; border: none;
  color: #94a3b8; font-size: 0.8rem; text-decoration: underline; cursor: pointer;
}
#recaptcha-container { position: fixed; bottom: 0; left: 0; z-index: 2147483647; }
/* welcome-active: 하위 호환 — 실제 숨김은 #app-shell 규칙이 담당 */
.welcome-inner {
  width: 100%; max-width: 380px; text-align: center; color: #f8fafc;
  margin: auto 0; padding: 12px 0 32px;
}
.welcome-brand {
  margin: 0 0 16px; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em;
  color: #fff;
}
.welcome-title {
  margin: 0 0 10px; font-size: 1.3rem; font-weight: 700; line-height: 1.35; color: #e2e8f0;
}
.welcome-lead {
  margin: 0 0 20px; font-size: 0.88rem; color: #94a3b8; line-height: 1.5;
}
.login-card {
  text-align: left;
  margin-bottom: 8px;
  padding: 20px 18px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}
.login-card-label {
  margin: 0 0 14px; font-size: 0.72rem; font-weight: 700;
  color: #94a3b8; letter-spacing: 0.08em; text-transform: uppercase;
}
.welcome-auth {
  text-align: left; margin-bottom: 0;
}
.welcome-auth.hidden { display: none; }
.welcome-field { display: block; margin-bottom: 10px; }
.welcome-field-label {
  display: block; margin-bottom: 4px; font-size: 0.78rem; font-weight: 600; color: #cbd5e1;
}
.welcome-auth input {
  width: 100%; margin: 0; padding: 11px 12px;
  border: 1px solid #334155; border-radius: 10px; font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.75); color: #f8fafc;
  box-sizing: border-box;
}
.welcome-auth input:focus {
  outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.welcome-auth input::placeholder { color: #64748b; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #fff; color: #1e293b; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.btn-google:hover { background: #f8fafc; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.btn-google-icon { display: flex; flex-shrink: 0; }
.btn-kakao {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 14px; margin-bottom: 10px;
  border: none; border-radius: 10px;
  background: #fee500; color: #191600; font-size: 0.92rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.btn-kakao:hover { background: #f5dc00; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.btn-kakao-icon { display: flex; flex-shrink: 0; font-size: 1rem; line-height: 1; }
.btn-kakao.hidden { display: none; }
.welcome-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 14px; font-size: 0.78rem; color: #64748b;
}
.welcome-divider::before,
.welcome-divider::after {
  content: ''; flex: 1; height: 1px; background: #334155;
}
.welcome-divider span { flex-shrink: 0; }
.welcome-link-btn {
  display: block; margin: -2px 0 12px; padding: 0;
  background: none; border: none; font-size: 0.78rem; color: #93c5fd;
  cursor: pointer; text-align: right; width: 100%;
}
.welcome-link-btn:hover { color: #bfdbfe; text-decoration: underline; }
.welcome-link-btn.hidden { display: none; }
.btn-social-highlight {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.35);
  animation: social-highlight-pulse 1.2s ease-in-out infinite;
}
@keyframes social-highlight-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(251, 191, 36, 0.15); }
}
.welcome-auth-actions { display: flex; gap: 8px; margin-top: 4px; }
.welcome-auth-actions .btn { flex: 1; min-height: 44px; }
.welcome-signup-btn { color: #e2e8f0; border-color: #475569; }
.welcome-auth-error { text-align: center; min-height: 1.2em; margin: 10px 0 0; font-size: 0.82rem; }
.welcome-firebase-hint {
  margin: 0 0 12px; padding: 10px 12px;
  font-size: 0.8rem; line-height: 1.45; color: #fde68a;
  background: rgba(120, 53, 15, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
}
.welcome-dev-hero {
  min-height: 48px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.welcome-dev-more {
  margin-top: 4px;
}
.welcome-dev-more summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #93c5fd;
  text-align: center;
  list-style: none;
  padding: 6px 0;
}
.welcome-dev-more summary::-webkit-details-marker { display: none; }
.welcome-dev-more .welcome-dev-inner input {
  width: 100%; margin: 8px 0 10px; padding: 11px 12px;
  border: 1px solid #334155; border-radius: 10px; font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.75); color: #f8fafc; box-sizing: border-box;
}
.auth-dev-more { margin-top: 10px; }
.auth-dev-more summary { color: #64748b; }
.auth-dev-more .welcome-dev-inner input {
  width: 100%; margin: 8px 0 10px; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 10px; font-size: 0.95rem;
  box-sizing: border-box;
}
.welcome-dev-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #334155;
}
.welcome-dev-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  list-style: none;
  text-align: center;
}
.welcome-dev-details summary::-webkit-details-marker { display: none; }
.welcome-dev-details summary::after { content: " ▾"; font-size: 0.7rem; }
.welcome-dev-details[open] summary::after { content: " ▴"; }
.welcome-dev-inner { margin-top: 10px; }
.welcome-dev-quick {
  margin-bottom: 8px;
  min-height: 40px;
  color: #cbd5e1;
  border-color: #475569;
  font-size: 0.85rem;
}
.auth-dev-details { margin-top: 12px; border-top-color: #e2e8f0; }
.auth-dev-details summary { color: #64748b; }
.auth-dev-details .welcome-dev-inner input {
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.welcome-dev-wrap { margin-top: 0; }
.welcome-dev-wrap.hidden { display: none; }
.welcome-dev-lead { margin: 0 0 10px; font-size: 0.82rem; color: #94a3b8; line-height: 1.45; }
.welcome-dev-wrap input {
  width: 100%; margin: 0 0 10px; padding: 11px 12px;
  border: 1px solid #334155; border-radius: 10px; font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.75); color: #f8fafc; box-sizing: border-box;
}
.welcome-section-label {
  margin: 20px 0 10px; font-size: 0.72rem; font-weight: 700;
  color: #64748b; letter-spacing: 0.06em; text-transform: uppercase;
}
.welcome-guest-btn { margin-bottom: 8px; min-height: 44px; color: #e2e8f0; border-color: #475569; }
.welcome-hint {
  margin: 0 0 16px; font-size: 0.75rem; color: #64748b; line-height: 1.45;
}
.welcome-subscribe {
  background: none; border: none; padding: 8px;
  font-size: 0.78rem; color: #64748b; cursor: pointer; text-decoration: underline;
}
.welcome-subscribe:hover { color: #94a3b8; }

.guest-search-banner {
  padding: 14px 16px 10px; background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  border-bottom: 1px solid #bfdbfe;
}
.guest-search-banner h2 {
  margin: 0 0 4px; font-size: 1.05rem; color: #1e3a8a;
}
.guest-search-banner p {
  margin: 0; font-size: 0.8rem; color: #64748b;
}
.guest-toolbar {
  justify-content: center; background: #f8fafc;
}
.guest-toolbar-label {
  font-size: 0.88rem; font-weight: 700; color: #475569;
}
body.mode-guest .filter-bar { pointer-events: none; opacity: 0.55; }
body.mode-guest #filter-bar .filter-chip[data-days="7"] { opacity: 1; }
.tab-lock { margin-left: 3px; font-size: 0.7rem; }
.tab.locked { color: #94a3b8; }

/* PWA 홈화면 추가 안내 시트 (iOS) */
.ios-install-sheet {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.ios-install-sheet.hidden { display: none; }
.ios-install-card {
  background: #fff; width: 100%; max-width: 460px;
  border-radius: 18px 18px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
}
.ios-install-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 8px; color: #0f172a; }
.ios-install-where { margin: 0 0 12px; font-size: 0.86rem; color: #2563eb; font-weight: 600; line-height: 1.45; }
.ios-install-steps { margin: 0 0 18px; padding-left: 20px; color: #334155; line-height: 1.7; font-size: 0.92rem; }
.ios-install-steps strong { color: #2563eb; }

/* 미구독(무료회원): 최근 오픈일 필터 잠금 (지도 탭처럼) */
body.mode-free #filter-bar .filter-chip { opacity: 0.55; color: #94a3b8; }
body.mode-free #filter-bar .filter-chip.active { background: #f8fafc; border-color: #cbd5e1; color: #94a3b8; }
body.mode-free #filter-bar .filter-chip::after { content: " 🔒"; font-size: 0.66rem; }
body.mode-free #filter-bar .filter-date { display: none; }

.guest-list-wrap { position: relative; }
.guest-locked-card {
  position: relative; overflow: hidden; pointer-events: none; user-select: none;
  background: #fff; border-bottom: 1px solid #e2e8f0;
}
.guest-locked-inner {
  padding: 14px 16px;
  filter: blur(5px);
  opacity: 0.85;
}
.guest-locked-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 999px;
  margin-bottom: 6px;
}
.guest-blur-text { color: #94a3b8 !important; }
.guest-list-cta {
  position: sticky; bottom: 0; margin-top: 8px; padding: 16px;
  background: linear-gradient(180deg, rgba(241,245,249,0) 0%, #f1f5f9 24%, #f1f5f9 100%);
  text-align: center;
}
.guest-cta-lead {
  margin: 0 0 12px; font-size: 0.85rem; font-weight: 600; color: #334155;
}
.guest-list-cta .btn { margin: 0 0 8px; width: 100%; min-height: 44px; }

/* ===== PC / 데스크톱 레이아웃 (모바일 폭 고정 해제) ===== */
@media (min-width: 768px) {
  html, body { background: #e2e8f0; }
  body {
    max-width: 1200px;
    box-shadow: 0 4px 40px rgba(15, 23, 42, 0.12);
  }
  .topbar { padding: 16px 24px 12px; }
  .topbar h1 { font-size: 1.35rem; }
  .sub { font-size: 0.85rem; }
  .topbar-btn { padding: 8px 14px; font-size: 0.82rem; min-height: 36px; }
  .auth-badge { max-width: 160px; font-size: 0.78rem; }
  .map-toolbar, .search-toolbar, .map-actions,
  .board-header, .filter-bar, .type-bar, .status {
    padding-left: 24px; padding-right: 24px;
  }
  #map-status { left: 24px; right: 24px; }
  /* 회원 검색 결과: 화면 폭에 맞춰 카드 다단 배치 */
  body.mode-member #panel-search .list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    padding: 16px 24px 96px;
    align-content: start;
  }
  body.mode-member #panel-search .list .card { margin-bottom: 0; }
  /* 게시판: 본문/작성 폼은 가독성 위해 폭 제한 */
  .board-table-head, .board-row { padding-left: 24px; padding-right: 24px; }
  .board-detail, .board-form { max-width: 860px; }
}

/* 배지 메탈 인장 */
.badge-seal {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.45), 0 1px 2px rgba(15,23,42,0.2);
}
.badge-seal-bronze { background: linear-gradient(145deg, #fcd9b6, #b87333); }
.badge-seal-silver { background: linear-gradient(145deg, #f8fafc, #94a3b8); }
.badge-seal-gold { background: linear-gradient(145deg, #fde68a, #d97706); }
.badge-seal-diamond { background: linear-gradient(145deg, #e0f2fe, #38bdf8); }

.mypage-referral { margin: 12px 0; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.mypage-referral-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0;
}
.mypage-referral-stats dt { font-size: 0.72rem; color: #64748b; margin: 0; }
.mypage-referral-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 0.9rem; color: #0f172a; }

.notice-popup {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.notice-popup.hidden { display: none; }
.notice-popup-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.55); }
.notice-popup-panel {
  position: relative; z-index: 1; width: min(420px, 100%); max-height: 85vh; overflow: auto;
  background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 12px 40px rgba(15,23,42,0.2);
}
.notice-popup-panel h3 { margin: 0 0 12px; font-size: 1.1rem; }
.notice-popup-content { margin: 0 0 12px; color: #334155; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }
.notice-popup-image img { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.notice-popup-dismiss { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #64748b; margin: 12px 0; }
.notice-popup .btn.block { width: 100%; margin-top: 8px; }
