:root {
  --ink: #2c3554;
  --ink-soft: #5a6488;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --line: rgba(80, 100, 150, 0.16);
  --accent: #6c8cff;
  --accent-2: #9b7bff;
  --shadow: 0 6px 24px rgba(40, 60, 110, 0.16), 0 1px 3px rgba(40, 60, 110, 0.12);
  --radius: 22px;
  --tray-h: 232px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: "Jua", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --ui: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #a9c8ec; }
body {
  font-family: var(--ui);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid rgba(108, 140, 255, 0.7); outline-offset: 2px; }

#app { position: fixed; inset: 0; }
.view { position: absolute; inset: 0; transition: opacity 0.5s ease; }
.view { opacity: 0; pointer-events: none; visibility: hidden; }
#app[data-view="globe"] #globe-view, #app[data-view="sky"] #sky-view, #app[data-view="missing"] #missing-view { opacity: 1; pointer-events: auto; visibility: visible; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 0 18px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s;
}
.pill:active:not(:disabled) { transform: scale(0.96); }
.pill:disabled { opacity: 0.45; }
.pill.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.pill.primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #7d9bff, #a787ff);
  box-shadow: 0 6px 20px rgba(120, 110, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: none; display: grid; place-items: center; font-size: 20px; flex: none;
  background: transparent;
}
.icon-btn.glass { background: var(--glass); }

/* ---------- Globe ---------- */
#globe-view { background: radial-gradient(ellipse at 50% 40%, #2b3a78 0%, #151c45 55%, #0b1030 100%); }
#globe-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#globe-canvas:active { cursor: grabbing; }
.markers { position: absolute; inset: 0; pointer-events: none; }
.marker {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  border: none; background: transparent; padding: 0;
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
}
.marker .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 0 14px rgba(255, 255, 255, 0.85);
}
.marker.capital .dot { width: 16px; height: 16px; }
.marker .label {
  position: absolute; left: 50%; top: calc(50% + 12px); transform: translateX(-50%);
  font-family: var(--display); font-size: 13px; color: white; white-space: nowrap;
  text-shadow: 0 1px 4px rgba(10, 20, 60, 0.9); pointer-events: none;
}
.marker .dot {
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
}
/* Live counts: 0 white, 1–4 pale lime, 5–19 green, 20+ deep green. */
.marker[data-heat="0"] .dot { background: #fff; color: #334155; }
.marker[data-heat="1"] .dot {
  width: 22px; height: 22px; background: #d9f99d; color: #24451b;
  box-shadow: 0 0 0 3px rgba(217, 249, 157, 0.35), 0 0 14px rgba(190, 242, 100, 0.65);
}
.marker[data-heat="2"] .dot {
  width: 26px; height: 26px; background: #86c94a; color: #173512;
  box-shadow: 0 0 0 3px rgba(134, 201, 74, 0.45), 0 0 18px rgba(134, 201, 74, 0.8);
}
.marker[data-heat="3"] .dot {
  width: 31px; height: 31px; font-size: 12px; background: #166534; color: #fff;
  box-shadow: 0 0 0 4px rgba(74, 170, 93, 0.5), 0 0 24px rgba(34, 139, 67, 0.85);
}
.marker.cluster .dot {
  width: auto; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 16px; font-size: 12px;
  outline: 2px solid rgba(255, 255, 255, 0.55); outline-offset: 2px;
}
.cluster-pick {
  position: absolute; z-index: 7; min-width: 220px; max-width: min(320px, 90vw); max-height: 50vh; overflow: auto;
  border-radius: 18px; padding: 8px; background: var(--glass-strong); transform: translate(-50%, 12px);
}
.cluster-pick h3 { margin: 4px 10px 6px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.cluster-pick button {
  display: flex; justify-content: space-between; gap: 12px; width: 100%; border: none; background: transparent;
  border-radius: 12px; padding: 10px 12px; min-height: 44px; text-align: left; font-weight: 600;
}
.cluster-pick button:hover, .cluster-pick button:focus-visible { background: rgba(108, 140, 255, 0.12); }
.cluster-pick .w { color: var(--ink-soft); font-weight: 500; font-size: 13px; white-space: nowrap; }
.marker:hover .dot, .marker:focus-visible .dot { transform: scale(1.25); }
.marker .dot { transition: transform 0.15s, background-color 0.25s, color 0.25s, box-shadow 0.25s; }

.globe-top {
  position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px;
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
}
.brand { margin: 4px 6px; color: white; line-height: 1; text-shadow: 0 2px 12px rgba(0, 0, 30, 0.5); }
.brand-ko { font-family: var(--display); font-weight: normal; font-size: 32px; margin: 0; }
.brand-tag { font-size: 13px; opacity: 0.8; margin: 6px 0 0; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input {
  width: 100%; height: 46px; border-radius: 999px; padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.6); background: var(--glass-strong);
  font-size: 16px; color: var(--ink); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.search-results {
  position: absolute; top: 52px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 18px; box-shadow: var(--shadow); max-height: min(60vh, 420px); overflow: auto; z-index: 5;
}
.search-results li button, .sheet-list li button {
  width: 100%; text-align: left; border: none; background: transparent; border-radius: 12px;
  padding: 10px 12px; min-height: 48px; display: flex; flex-direction: column; justify-content: center;
}
.search-results li button:hover, .search-results li button[aria-selected="true"],
.sheet-list li button:hover { background: rgba(108, 140, 255, 0.12); }
.r-main { font-weight: 700; font-size: 16px; }
.r-sub { font-size: 13px; color: var(--ink-soft); }
.search-empty { padding: 14px; color: var(--ink-soft); }

.globe-hint {
  position: absolute; left: 0; right: 0; bottom: calc(86px + var(--safe-b)); margin: 0; text-align: center;
  color: rgba(255, 255, 255, 0.85); font-size: 14px; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 40, 0.6);
}
.globe-actions {
  position: absolute; left: 0; right: 0; bottom: calc(20px + var(--safe-b));
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 12px;
}
.center-note {
  position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 16px; pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 40, 0.6);
}

.sheet {
  position: absolute; top: calc(10px + var(--safe-t)); bottom: calc(10px + var(--safe-b)); right: 10px;
  width: min(380px, calc(100% - 20px)); border-radius: var(--radius);
  background: var(--glass-strong); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 6;
  animation: sheet-in 0.25s ease;
}
@keyframes sheet-in { from { transform: translateX(20px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 16px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 18px; font-family: var(--display); font-weight: normal; }
.sheet-list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow: auto; flex: 1; }
.sheet-list .count { font-size: 12px; color: var(--ink-soft); }

/* ---------- Sky ---------- */
#sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.draft-layer { position: absolute; inset: 0; pointer-events: none; }
.block {
  position: absolute; left: 0; top: 0; pointer-events: auto; touch-action: none; cursor: grab;
  border: none; padding: 0; background: transparent; border-radius: 30%;
  display: grid; place-items: center;
  transition: filter 0.15s, transform 0.12s;
}
.block canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; pointer-events: none; }
.block.selected::before, .block.target::before, .block.reject::before {
  content: ""; position: absolute; inset: -8%; border-radius: 34%;
  border: 2px dashed rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.35);
}
.block.target::before { border-style: solid; border-color: #fff6b0; box-shadow: 0 0 22px 6px rgba(255, 238, 150, 0.75); }
.block.reject::before { border-style: solid; border-color: rgba(255, 140, 150, 0.95); box-shadow: 0 0 16px 4px rgba(255, 120, 140, 0.5); }
.block .preview {
  position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px);
  background: #fffbe0; color: var(--ink); border-radius: 12px; padding: 2px 10px;
  font-family: var(--display); font-size: 20px; box-shadow: var(--shadow); white-space: nowrap; pointer-events: none;
}
.block .pop {
  position: absolute; right: -14px; top: -14px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: white; box-shadow: var(--shadow); font-size: 16px; line-height: 1; pointer-events: auto;
  display: grid; place-items: center;
}
.block.dragging { opacity: 0.85; z-index: 5; cursor: grabbing; }
.guide {
  position: absolute; height: 2px; background: rgba(255, 255, 255, 0.85); border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9); pointer-events: none;
}

.sky-top {
  position: absolute; top: calc(10px + var(--safe-t)); left: 10px; right: 10px;
  display: flex; align-items: flex-start; gap: 10px; pointer-events: none;
}
.sky-top > * { pointer-events: auto; }
.place {
  flex: 0 1 auto; margin: 0 auto; border-radius: 20px; padding: 8px 16px; text-align: center; min-width: 0;
}
.place-name { font-family: var(--display); font-size: 22px; line-height: 1.15; }
.place-name #place-region { font-family: var(--ui); font-size: 13px; color: var(--ink-soft); margin-left: 8px; }
.place-time { font-size: 14px; display: flex; gap: 8px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.place-time strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.place-time span { color: var(--ink-soft); font-size: 12.5px; }
.place-sky { font-size: 12.5px; color: var(--ink-soft); display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.place-sky > span + span::before { content: "· "; }
.place-sky > .badge::before { content: none; }
@media (max-width: 600px) {
  .sun-times { display: none; }
  .place { padding: 6px 12px; }
  .place-name { font-size: 19px; }
  .place-name #place-region { font-size: 12px; margin-left: 6px; }
  .place-time { gap: 6px; flex-wrap: nowrap; }
  .place-time strong { font-size: 15px; }
  .place-time span { font-size: 11.5px; }
  .sky-top { gap: 6px; }
}
.badge { background: #fff1c9; color: #7a5a00; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.badge.warn { background: #ffe0e4; color: #8a2234; }

.sky-note {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  max-width: min(360px, 86vw); text-align: center; padding: 14px 18px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--ink); font-size: 15px; line-height: 1.5; box-shadow: var(--shadow); pointer-events: none;
}
.sky-note.error { pointer-events: auto; }
.sky-note button { margin-top: 10px; }
.sky-controls {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 2;
}
.sky-controls > * { pointer-events: auto; }
#zoom-level { padding: 4px 8px; border-radius: 12px; background: var(--glass); font-size: 12px; pointer-events: none; }
#sky-view, #globe-view { touch-action: none; }
.sky-controls .icon-btn { font-size: 22px; line-height: 1; }

.compose-bar {
  position: absolute; right: 12px; left: 12px; bottom: calc(var(--tray-space) + 10px);
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; pointer-events: none;
}
.compose-bar > * { pointer-events: auto; }

.tray-open {
  position: absolute; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  min-height: 50px; padding: 0 24px; font-size: 16px;
}
.tray-open:active:not(:disabled) { transform: translateX(-50%) scale(0.96); }
.tray-close { margin-left: auto; }
.tray {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--tray-h); z-index: 3;
  animation: tray-in 0.22s ease;
  padding: 8px 0 calc(8px + var(--safe-b));
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top-left-radius: 28px; border-top-right-radius: 28px;
  box-shadow: 0 -6px 30px rgba(40, 60, 110, 0.14);
  display: flex; flex-direction: column; gap: 2px;
}
.tray-head { display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 30px; }
.tray-title { font-family: var(--display); font-size: 16px; }
@keyframes tray-in { from { transform: translateY(24px); opacity: 0; } }
.tray-tabs { display: none; gap: 4px; background: rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 3px; }
.tray-tabs button { border: none; background: transparent; border-radius: 999px; padding: 4px 14px; min-height: 32px; font-weight: 600; font-size: 14px; }
.tray-tabs button[aria-selected="true"] { background: white; box-shadow: 0 1px 4px rgba(40, 60, 110, 0.15); }
.tray-group { display: flex; flex-direction: column; min-height: 0; }
.group-label {
  font-size: 11px; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0 18px; font-weight: 700; line-height: 14px;
}
.tray-row {
  flex: 1; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 2px 12px 4px 12px;
  scroll-snap-type: x proximity; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.tray-row::-webkit-scrollbar { height: 4px; }
.tray-row::-webkit-scrollbar-thumb { background: rgba(80, 100, 150, 0.25); border-radius: 4px; }
.letter {
  flex: none; position: relative; width: 58px; height: 64px; border: none; padding: 0;
  background: linear-gradient(180deg, #8fb6ea 0%, #b5d0f3 70%, #cfe0f7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px rgba(40, 60, 110, 0.12);
  scroll-snap-align: start; touch-action: pan-x; border-radius: 18px; user-select: none; -webkit-user-select: none;
  transition: transform 0.12s ease;
}
.letter:hover:not(:disabled) { transform: translateY(-2px); }
.letter:active:not(:disabled) { transform: scale(0.95); }
.letter canvas { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); pointer-events: none; }
.letter .pile {
  position: absolute; left: 50%; bottom: 4px; width: 40px; height: 12px; transform: translateX(-50%);
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.95), rgba(220, 230, 250, 0.6) 60%, transparent 72%);
}
.letter[data-pile="2"] .pile { box-shadow: -10px 3px 0 -3px rgba(255, 255, 255, 0.85), 10px 3px 0 -3px rgba(255, 255, 255, 0.85); }
.letter[data-pile="3"] .pile { box-shadow: -12px 3px 0 -2px rgba(255, 255, 255, 0.9), 12px 3px 0 -2px rgba(255, 255, 255, 0.9), 0 -5px 0 -1px rgba(255, 255, 255, 0.8); }
.letter .count {
  position: absolute; right: 3px; bottom: 3px; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.92); font-size: 12px; font-weight: 700; color: var(--ink-soft);
  display: grid; place-items: center; box-shadow: 0 1px 3px rgba(40, 60, 110, 0.18); pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.letter.out { background: linear-gradient(180deg, #b9c4d6, #d6dde8); }
.letter.out canvas { opacity: 0.4; filter: grayscale(0.8); }
.letter.out .pile, .letter.out .count { opacity: 0; }
.letter.nudge { animation: nudge 0.3s ease; }
@keyframes nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* Short screens: one row with tabs. */
@media (max-height: 560px) {
  :root { --tray-h: 128px; }
  .tray { padding-top: 6px; gap: 0; }
  .letter { height: 58px; width: 54px; }
  .tray-tabs { display: flex; }
  .group-label { display: none; }
  .tray[data-tab="c"] .tray-group[data-group="v"], .tray[data-tab="v"] .tray-group[data-group="c"] { display: none; }
  .place { padding: 4px 12px; }
  .place-name { font-size: 18px; }
  .place-sky { display: none; }
}
@media (min-width: 900px) and (min-height: 561px) {
  :root { --tray-h: 238px; }
  .letter { width: 62px; height: 68px; }
}

.popover {
  position: absolute; z-index: 8; border-radius: 18px; padding: 12px 14px; min-width: 200px; max-width: 280px;
  font-size: 14px; transform: translate(-50%, calc(-100% - 14px));
}
.popover .msg-text { font-family: var(--display); font-size: 20px; margin-bottom: 4px; word-break: keep-all; }
.popover .meta { color: var(--ink-soft); font-size: 12.5px; margin-bottom: 10px; }
.popover .row { display: flex; gap: 8px; flex-wrap: wrap; }

.drag-ghost { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 20; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 12px rgba(40, 60, 110, 0.3)); }
.drag-ghost canvas { display: block; }

.wipe {
  position: fixed; inset: -10%; pointer-events: none; opacity: 0; z-index: 30;
  background:
    radial-gradient(circle at 20% 30%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 70% 25%, #fff 0 22%, transparent 23%),
    radial-gradient(circle at 45% 60%, #fff 0 30%, transparent 31%),
    radial-gradient(circle at 85% 70%, #fff 0 20%, transparent 21%),
    radial-gradient(circle at 15% 80%, #fff 0 22%, transparent 23%),
    #f4f8ff;
  filter: blur(10px);
  transition: opacity 0.45s ease;
}
.wipe.on { opacity: 1; }

.toast {
  position: fixed; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%); z-index: 40;
  background: rgba(40, 50, 90, 0.88); color: white; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}
.modal { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; background: rgba(20, 30, 70, 0.25); padding: 16px; }
.modal-card { width: min(400px, 100%); border-radius: 26px; padding: 20px; background: var(--glass-strong); }
.modal-card h2 { margin: 0 0 10px; font-family: var(--display); font-weight: normal; font-size: 22px; }
.modal-card p { margin: 6px 0; line-height: 1.5; color: var(--ink-soft); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.share-link { width: 100%; font-size: 13px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--ink); }

.dev {
  position: fixed; left: 10px; bottom: calc(var(--tray-h) + 10px); z-index: 25; width: min(320px, calc(100vw - 20px));
  max-height: calc(100% - var(--tray-h) - 90px); overflow: auto; border-radius: 18px; padding: 12px 14px; font-size: 13px;
  background: rgba(255, 255, 255, 0.9);
}
#app[data-view="globe"] .dev { bottom: 80px; max-height: calc(100% - 160px); }
.dev h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #8a5a00; }
.dev section { border-top: 1px solid var(--line); padding: 8px 0; }
.dev label { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.dev input[type="range"] { flex: 1; }
.dev select, .dev button { font-size: 13px; min-height: 32px; border-radius: 10px; border: 1px solid var(--line); background: white; padding: 0 10px; }
.dev .row { display: flex; gap: 6px; flex-wrap: wrap; }
.dev-toggle { position: fixed; left: 10px; top: 50%; z-index: 26; }

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

:root { --tray-space: 72px; }
#app[data-tray="open"] { --tray-space: var(--tray-h); }

.missing { display: grid; place-items: center; background: linear-gradient(180deg, #4d6c9c, #a9bfdc); padding: 20px; }
.missing-card { max-width: 420px; border-radius: 26px; padding: 24px; text-align: center; background: var(--glass-strong); }
.missing-card h2 { margin: 0 0 8px; font-size: 22px; }
.missing-card p { color: var(--ink-soft); line-height: 1.5; margin: 0 0 18px; }
.modal-card p.quote { font-family: var(--display); font-size: 22px; color: var(--ink); word-break: keep-all; }
/* The header and action rows span the width; only their controls take taps,
   so markers in the gaps stay clickable. */
.globe-top, .globe-actions { pointer-events: none; }
.globe-top > *, .globe-actions > * { pointer-events: auto; }
