:root {
  --bg: #05070f;
  --panel: #0d1222;
  --text: #f3efe6;
  --muted: #a9b0c6;
  --gold: #ffd27a;
  --gold-ink: #2a1c00;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--gold); }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; }
#globe { position: fixed; inset: 0; background: transparent; }
#globe .maplibregl-canvas { background: transparent; }
.maplibregl-ctrl-attrib { font-size: 10px; }

.top { position: fixed; top: 14px; left: 16px; pointer-events: none; z-index: 3;
  background: #05070fb8; backdrop-filter: blur(6px); padding: 8px 16px 10px; border-radius: 14px; }
.top h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 1.8rem; letter-spacing: .02em; color: var(--gold); }
.top p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

.search { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); z-index: 5; }
.search input { width: 100%; padding: 12px 16px; border-radius: 99px; border: 1px solid #ffd27a55; background: #0b1020ee;
  color: var(--text); font: inherit; outline: none; box-shadow: 0 4px 24px #0008; }
.search input:focus { border-color: var(--gold); }
.search ul { list-style: none; margin: 6px 0 0; padding: 6px; background: #0b1020f5; border: 1px solid #ffffff22; border-radius: 14px; box-shadow: 0 8px 30px #000a; }
.search li { padding: 8px 10px; border-radius: 9px; cursor: pointer; display: flex; flex-direction: column; }
.search li:hover { background: #ffd27a1a; }
.search li span { color: var(--muted); font-size: .8rem; }

.lang { position: fixed; top: 18px; right: 16px; z-index: 4; background: #05070fcc; color: var(--text);
  border: 1px solid #ffffff26; border-radius: 99px; padding: 7px 10px; font: inherit; font-size: .85rem; }

.actions { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 3; }
.count { color: var(--text); font-size: .8rem; background: #05070fb8; padding: 3px 10px; border-radius: 99px; }
.foot { position: fixed; left: 16px; bottom: 10px; font-size: .75rem; color: var(--muted); z-index: 3; background: #05070fb8; padding: 3px 10px; border-radius: 99px; }

.btn { border: 0; border-radius: 99px; padding: 12px 22px; font: inherit; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 24px #ffd27a66; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.wide { width: 100%; }
.btn.small { padding: 6px 12px; font-size: .85rem; background: #2a2140; color: var(--text); }
.btn.candle { background: #2a2140; color: var(--text); width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .7; cursor: default; }
.link { background: none; border: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font: inherit; }

.hint { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); background: #000c; border: 1px solid #ffd27a55;
  padding: 10px 16px; border-radius: 12px; z-index: 6; max-width: calc(100vw - 32px); text-align: center; }

.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 100vw); background: var(--panel); z-index: 10;
  border-left: 1px solid #ffffff1a; padding: 24px 22px; overflow-y: auto; box-shadow: -10px 0 40px #0008; }
.close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.panel h2 { margin: 10px 0 2px; font-family: Georgia, serif; font-weight: normal; font-size: 1.7rem; }
.panel h3 { margin: 18px 0 2px; font-size: 1rem; color: var(--gold); }
.meta { color: var(--muted); margin: 0; font-size: .88rem; }
blockquote { margin: 16px 0; padding: 0 0 0 14px; border-left: 3px solid var(--gold); font-style: italic; white-space: pre-wrap; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos img, .photos .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #1c2440; display: grid; place-items: center; font-size: 42px; }
.photos:empty { display: none; }
.share { display: flex; gap: 6px; margin-top: 10px; }
.share-main { margin-top: 14px; }
#share-note { margin-top: 8px; }
.share input { flex: 1; min-width: 0; padding: 6px 10px; border-radius: 9px; border: 1px solid #ffffff26; background: #0a0f1f; color: var(--text); font-size: .8rem; }

#form label { display: block; margin: 10px 0; color: var(--muted); font-size: .85rem; }
#form input, #form select, #form textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid #ffffff26; background: #0a0f1f; color: var(--text); font: inherit; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amounts { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.amount { flex: 1; min-width: 60px; padding: 9px 6px; border-radius: 10px; border: 1px solid #ffd27a55; background: #0a0f1f; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.amount.sel { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
#f-amount { margin: 0 0 10px; }
.error { color: #ff9a8a; font-size: .88rem; }
#pay-box { margin-top: 10px; min-height: 50px; }

.marker-wrap { pointer-events: auto; }
.marker { cursor: pointer; pointer-events: auto;
  filter: drop-shadow(0 0 1.2px #3a2400) drop-shadow(0 0 5px #ffd27acc) drop-shadow(0 0 12px #ffb84d88);
  animation: twinkle 3.2s ease-in-out infinite; transition: transform .2s; }
.marker:hover { transform: scale(1.35); }
.marker svg { display: block; }
.marker.example { opacity: .55; filter: grayscale(.5) drop-shadow(0 0 4px #ffd27a88); }
.marker.pending { animation: pulse 1.2s ease-in-out infinite; cursor: default; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

@media (max-width: 700px) {
  .top { top: 70px; left: 50%; transform: translateX(-50%); text-align: center; padding: 6px 12px; }
  .top h1 { font-size: 1.3rem; }
  .top p { font-size: .78rem; }
  .lang { top: auto; bottom: 10px; right: 50px; }
  .foot { bottom: 10px; }
  .actions { bottom: 52px; }
  .panel { top: auto; height: 80vh; width: 100vw; border-left: 0; border-top: 1px solid #ffffff1a; border-radius: 16px 16px 0 0; }
}
