/* glancies.com — dark navy theme */
:root {
  --bg: #060913;
  --panel: #0d1530;
  --panel2: #121d3f;
  --card: #101b36;
  --line: #22305c;
  --text: #eef2ff;
  --dim: #8fa0cc;
  --blue: #5a76c9;
  --blue-soft: #64779f;
  --accent: #4c8dff;
  --orange: #f2622e;
  --heat0: #2a3a66;
  --heat1: #64779f;
  --heat2: #ffffff;
  --heat3: #f2622e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
a { color: var(--accent); }

.btn {
  border: none; border-radius: 999px; padding: 9px 16px;
  background: var(--panel2); color: var(--text); font-weight: 600; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--dim); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.iconbtn {
  background: transparent; border: none; color: var(--text);
  font-size: 18px; padding: 6px 9px; border-radius: 8px; position: relative;
}
.iconbtn:hover { background: var(--panel2); }

/* ---------- age gate ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 10000;
  background: radial-gradient(1200px 700px at 50% -10%, #14224d 0%, var(--bg) 60%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.age-gate-box {
  max-width: 460px; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 38px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.logo-big { font-size: 42px; font-weight: 800; letter-spacing: -1px; }
.logo-big-img { width: 200px; max-width: 80%; height: auto; }
.logo-dot { color: var(--orange); }
.age-gate-box h1 { margin: 18px 0 4px; font-size: 22px; }
.age-gate-box p { color: var(--dim); margin: 6px 0; }
.age-q { color: var(--text) !important; font-weight: 700; margin-top: 18px !important; }
.age-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ---------- layout ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; background: rgba(6,9,19,.92);
  border-bottom: 1px solid var(--line); z-index: 1200; position: relative;
}
.brand { cursor: pointer; display: flex; align-items: center; }
.brand img { height: 32px; display: block; }
.searchwrap { flex: 1; max-width: 480px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.viewtoggle { display: flex; background: var(--panel2); border-radius: 999px; padding: 2px; }
.vt-btn { background: transparent; border: none; color: var(--dim); padding: 6px 12px; border-radius: 999px; font-size: 15px; }
.vt-btn.active { background: var(--accent); color: #fff; }
.badge {
  position: absolute; top: 0; right: 0; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; min-width: 16px;
}
.me-chip { display: flex; align-items: center; gap: 7px; cursor: pointer; background: var(--panel2); border-radius: 999px; padding: 4px 12px 4px 4px; }
.me-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--panel); }

#map { flex: 1; background: var(--bg); }
/* navy-tint the dark tiles */
.leaflet-tile-pane { filter: sepia(.9) hue-rotate(185deg) saturate(2.4) brightness(1.05); }
.leaflet-container { background: #0a1228; font: inherit; }
.leaflet-control-attribution { background: rgba(6,9,19,.7) !important; color: var(--dim) !important; }
.leaflet-control-attribution a { color: var(--dim) !important; }

.pin {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel2); border: 2px solid var(--blue);
  font-size: 16px; box-shadow: 0 3px 10px rgba(0,0,0,.55);
}
.pin.glory { border-color: var(--orange); }
.user-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #4c8dff; border: 3px solid #fff;
  box-shadow: 0 0 0 rgba(76,141,255,.55); animation: userpulse 2.2s infinite;
}
@keyframes userpulse {
  0% { box-shadow: 0 0 0 0 rgba(76,141,255,.55); }
  70% { box-shadow: 0 0 0 16px rgba(76,141,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,141,255,0); }
}
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(76,141,255,.25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background: var(--accent) !important; color: #fff !important; font-weight: 700;
}

/* ---------- list ---------- */
.list-panel {
  position: absolute; top: 53px; bottom: 0; left: 0; right: 0;
  background: var(--bg); z-index: 900; display: flex; flex-direction: column;
}
.list-controls { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.list-controls select { width: auto; }
.favonly { color: var(--dim); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.favonly input { width: auto; }
.list-count { color: var(--dim); font-size: 13px; margin-left: auto; }
.list-rows { overflow-y: auto; flex: 1; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-bottom: 1px solid rgba(34,48,92,.5); cursor: pointer;
}
.list-row:hover { background: var(--panel); }
.lr-icon { font-size: 22px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--panel2); border-radius: 10px; flex: none; }
.lr-main { flex: 1; min-width: 0; }
.lr-name { font-weight: 700; }
.lr-sub { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-stats { text-align: right; color: var(--dim); font-size: 12px; flex: none; }
.lr-heart { font-size: 18px; background: none; border: none; color: var(--dim); }
.lr-heart.on { color: var(--orange); }

/* ---------- place card ---------- */
.place-card, .msg-drawer {
  position: absolute; top: 53px; bottom: 0; left: 0; width: 420px; max-width: 100%;
  background: #000; z-index: 1000; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); box-shadow: 20px 0 60px rgba(0,0,0,.5);
}
.pc-header {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  background: #04060d; border-bottom: 1px solid var(--line);
}
.pc-name { flex: 1; text-align: center; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-star { font-size: 20px; }
.pc-star.on { color: gold; }
.pc-scroll { overflow-y: auto; flex: 1; }
.pc-hero { position: relative; min-height: 150px; background: linear-gradient(160deg, #16224a, #0a1128); }
.pc-hero-imgs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.pc-hero-imgs img { width: 100%; flex: none; height: 210px; object-fit: cover; scroll-snap-align: start; }
.pc-checkins {
  position: absolute; left: 12px; bottom: 10px; display: flex; gap: 14px; align-items: flex-end;
}
.ck { position: relative; text-align: center; }
.ck-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--blue); background: var(--panel2); display: block;
}
.ck-you {
  width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--accent);
  background: rgba(6,9,19,.75); color: var(--accent); font-size: 26px; font-weight: 700;
}
.ck-you-label {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: #fff; color: #0a1128; font-size: 10px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px;
}
.ck-time {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 600;
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.pc-lines { padding: 16px 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.pc-line { font-size: 15px; }
.pc-line b { color: #fff; }
.pc-dim { color: var(--dim); font-size: 13px; }
.pc-desc { padding: 8px 16px; color: var(--dim); white-space: pre-wrap; }
.crown { color: var(--orange); }

.pc-heat {
  margin: 12px 16px 8px; background: var(--card); border-radius: var(--radius);
  padding: 14px; display: flex; gap: 12px;
}
.heat-grid { display: grid; grid-template-columns: repeat(7, 24px); gap: 6px 8px; }
.heat-day { text-align: center; color: var(--blue-soft); font-weight: 700; font-size: 13px; }
.heat-day.today { color: #fff; }
.dot { display: inline-block; width: 15px; height: 15px; border-radius: 50%; }
.heat-cell { display: flex; align-items: center; justify-content: center; height: 24px; }
.dot-0 { background: var(--heat0); opacity: .45; }
.dot-1 { background: var(--heat1); }
.dot-2 { background: var(--heat2); }
.dot-3 { background: var(--heat3); }
.heat-times { display: flex; flex-direction: column; justify-content: space-between; padding: 30px 0 2px; }
.heat-time { color: var(--blue-soft); font-size: 12.5px; height: 24px; display: flex; align-items: center; white-space: nowrap; }
.heat-time.now { color: #fff; font-weight: 700; }
.heat-legend {
  margin: 0 16px 8px; background: var(--card); border-radius: var(--radius);
  padding: 12px 16px; display: flex; justify-content: space-between; font-size: 13px;
}
.heat-legend span { display: flex; align-items: center; gap: 7px; }
.heat-legend .dot { width: 13px; height: 13px; }

.pc-comments { padding: 12px 16px 30px; }
.pc-comments-title { font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.pc-newcomment { display: flex; gap: 8px; margin-bottom: 8px; }
.replying-to { color: var(--dim); font-size: 12px; margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(34,48,92,.5); }
.comment.reply { margin-left: 42px; border-top: none; padding-top: 2px; }
.cm-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel2); cursor: pointer; flex: none; }
.cm-main { flex: 1; min-width: 0; }
.cm-head { font-size: 12.5px; color: var(--dim); }
.cm-head b { color: var(--text); font-size: 13px; cursor: pointer; }
.cm-body { margin: 2px 0 4px; overflow-wrap: break-word; }
.cm-reply { background: none; border: none; color: var(--dim); font-size: 12px; padding: 0; }
.cm-reply:hover { color: var(--accent); }
.pc-meta { padding: 0 16px 26px; color: var(--dim); font-size: 12px; }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 5000; background: rgba(2,4,10,.7);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  width: 100%; max-width: 420px; padding: 20px 22px; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
.modal-title { font-weight: 800; font-size: 17px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-x { background: none; border: none; color: var(--dim); font-size: 16px; }
.modal-box label { display: block; margin: 10px 0; color: var(--dim); font-size: 13px; }
.modal-box label input, .modal-box label select, .modal-box label textarea { margin-top: 4px; }
.modal-box .chk { display: flex; align-items: center; gap: 8px; color: var(--text); }
.modal-box .chk input { width: auto; margin: 0; }
.modal-box form .btn { width: 100%; margin-top: 12px; }

.auth-tabs { display: flex; background: var(--panel2); border-radius: 10px; padding: 3px; margin-bottom: 6px; }
.auth-tab { flex: 1; background: none; border: none; color: var(--dim); padding: 8px; border-radius: 8px; font-weight: 600; }
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-div { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 16px 0 10px; }
.auth-div::before, .auth-div::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn { display: flex; justify-content: center; min-height: 40px; }
.alt-providers { display: flex; gap: 8px; margin-top: 10px; }
.prov-btn {
  flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 9px 4px; font-weight: 600; font-size: 13px;
}
.prov-btn:hover { border-color: var(--accent); }

.prof-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.big-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--panel2); }
.blocked-list { margin: 14px 0; }
.blocked-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--dim); font-size: 14px; }
.blocked-row img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--panel2); }
.blocked-row button { margin-left: auto; }

/* ---------- user popover ---------- */
.user-pop {
  position: fixed; z-index: 6000; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; width: 230px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.up-name { font-weight: 800; margin-top: 8px; }
.up-x { display: inline-block; margin-top: 6px; font-size: 13px; }
.up-btns { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }

/* ---------- messages ---------- */
.msg-drawer { left: auto; right: 0; border-right: none; border-left: 1px solid var(--line); }
.conv-list { overflow-y: auto; flex: 1; }
.conv-row { display: flex; gap: 12px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid rgba(34,48,92,.5); align-items: center; }
.conv-row:hover { background: var(--panel); }
.conv-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex: none; }
.cv-main { flex: 1; min-width: 0; }
.cv-name { font-weight: 700; }
.cv-last { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-right { text-align: right; font-size: 11px; color: var(--dim); }
.cv-unread { background: var(--orange); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; display: inline-block; margin-top: 4px; }
.thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.thread-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg-bubble { max-width: 78%; background: var(--panel2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; align-self: flex-start; overflow-wrap: break-word; }
.msg-bubble.mine { background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; align-self: flex-end; }
.msg-bubble img { max-width: 100%; border-radius: 8px; display: block; margin-top: 4px; }
.msg-time { font-size: 10px; opacity: .65; margin-top: 3px; }
.thread-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: center; }
.attach { flex: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 10px 20px; z-index: 9000; font-weight: 600;
  box-shadow: 0 10px 40px rgba(0,0,0,.6); max-width: 90vw; text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .searchwrap { max-width: none; }
  .brand img { height: 26px; }
  #addPlaceBtn { padding: 9px 10px; }
  .place-card, .msg-drawer { width: 100%; }
  .topbar { flex-wrap: wrap; }
}
