:root {
  --ink: #05080c;
  --ink-2: #101820;
  --fog: #8b9aa6;
  --paper: #e8eef2;
  --amber: #e8a04a;
  --amber-deep: #c4782a;
  --mint: #6ec8b0;
  --danger: #e07070;
  --ok: #5dce8f;
  --font-brand: Palatino, "Palatino Linotype", "Iowan Old Style", "Times New Roman", serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
.hidden { display: none !important; }

#world {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #0b1014;
}
#world-clip {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #0b1014;
}
#world-clip #world {
  position: absolute;
  inset: auto;
}
#world .leaflet-container,
#world.leaflet-container {
  background: #0b1014;
}
#world .leaflet-tile-pane {
  filter: none;
}
#world .leaflet-tile {
  image-rendering: auto;
}
#world.nav-cam .tt-target em {
  transform: rotate(calc(-1 * var(--cam, 0deg)));
  transform-origin: left center;
}
#ui {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
#ui .hit,
#ui button,
#ui a,
#ui input,
#ui textarea {
  pointer-events: auto;
}
#toast {
  position: fixed;
  left: 50%;
  top: calc(92px + var(--safe-t));
  bottom: auto;
  transform: translateX(-50%) translateY(-140%);
  z-index: 40;
  max-width: 22rem;
  padding: 12px 16px;
  border-radius: 14px;
  background: #1a1208;
  border: 1px solid rgba(232, 160, 74, 0.45);
  color: var(--paper);
  font-size: 0.92rem;
  pointer-events: none;
  opacity: 0;
  transition: 0.25s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hud-top {
  position: absolute;
  top: calc(10px + var(--safe-t));
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hud-brand {
  background: rgba(5, 8, 12, 0.82);
  border: 1px solid rgba(232, 160, 74, 0.28);
  padding: 10px 12px 8px;
  min-width: 148px;
}
.hud-brand b {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hud-brand span {
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stat {
  background: rgba(5, 8, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  text-align: right;
}
.stat strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.05rem;
  color: var(--amber);
}
.stat em {
  font-style: normal;
  color: var(--fog);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pips {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 140px;
}
.pips i {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.12);
  display: block;
}
.pips i.on {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(232, 160, 74, 0.8);
}

.missions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 14px calc(16px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42dvh;
  overflow: auto;
  background: linear-gradient(180deg, rgba(5, 8, 12, 0), rgba(5, 8, 12, 0.88) 18%);
}
.mission {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(232, 160, 74, 0.28);
  background: linear-gradient(90deg, rgba(232, 160, 74, 0.16), rgba(8, 12, 16, 0.92) 14px);
  color: inherit;
  padding: 14px 14px 12px 22px;
}
.mission:active { transform: scale(0.99); }
.mission.done {
  border-color: rgba(110, 200, 176, 0.35);
  background: linear-gradient(90deg, rgba(110, 200, 176, 0.2), rgba(8, 12, 16, 0.92) 14px);
}
.mission .meta {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.mission.done .meta { color: var(--mint); }
.mission h2 {
  font-family: var(--font-brand);
  font-size: 1.28rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.mission p {
  margin: 0;
  color: var(--fog);
  font-size: 0.88rem;
}

.panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-b));
  background: rgba(8, 12, 16, 0.94);
  border: 1px solid rgba(232, 160, 74, 0.3);
  padding: 16px;
  max-height: 62dvh;
  overflow: auto;
  pointer-events: auto;
}
.panel h1 {
  font-family: var(--font-brand);
  font-size: 1.7rem;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.lead {
  color: var(--fog);
  line-height: 1.45;
  margin: 0 0 16px;
}
.hello .lead {
  margin: 0 0 10px;
  font-size: 0.92rem;
}
.hello .btn-row { margin-top: 8px; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 14px 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--amber);
  color: var(--ink);
  width: 100%;
}
.btn:active { filter: brightness(1.08); transform: translateY(1px); }
.btn:disabled { opacity: 0.55; }
.btn.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn.danger {
  background: transparent;
  color: var(--fog);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.85rem;
}
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.linkish {
  background: none;
  border: 0;
  color: var(--mint);
  padding: 8px 0;
}

.dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-b));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  background: rgba(8, 12, 16, 0.94);
  border: 1px solid rgba(232, 160, 74, 0.3);
  z-index: 6;
}
.dock-place {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--fog);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dock-place span {
  display: block;
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock .btn { width: auto; flex: 0 0 auto; padding: 12px 16px; }

.dock-nav { align-items: center; }
.dock-nav .dock-place span {
  color: var(--amber);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dock-nav .dock-place b {
  display: block;
  color: var(--paper);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  margin: 2px 0 0;
}
.dock-nav .dock-place em {
  display: block;
  font-style: normal;
  color: var(--fog);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.dock-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}
.dock-actions .btn {
  width: auto;
  min-height: 0;
  padding: 8px 10px;
  font-size: 0.68rem;
}
.dock-actions a.btn {
  display: grid;
  place-items: center;
  text-decoration: none;
}
.nav-compass {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 160, 74, 0.4);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  overflow: hidden;
}
.nav-compass span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: rotate(var(--brg, 0deg));
}
.nav-compass i {
  width: 0;
  height: 0;
  margin-bottom: 4px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 16px solid var(--amber);
}
.skip-quiet {
  display: inline-block;
  margin-top: 18px;
  color: var(--fog);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  pointer-events: auto !important;
  background: none;
  border: 0;
  padding: 0;
  width: auto;
  font-weight: 500;
  text-transform: none;
}
.task-scroll .skip-quiet { pointer-events: auto; }
.me-wrap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: visible;
}
.me-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3aa0ff;
  border: 3px solid #fff;
  box-shadow: 0 0 0 10px rgba(58, 160, 255, 0.32);
  position: relative;
  transform: rotate(var(--hdg, 0deg));
  transform-origin: 50% 50%;
}
.me-dot i {
  position: absolute;
  left: 50%;
  top: -14px;
  width: 0;
  height: 0;
  margin-left: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 14px solid #fff;
  opacity: 1;
}
.me-dot.aimed i {
  opacity: 1;
}
.tt-target { position: relative; width: 18px; height: 18px; }
.tt-target em {
  position: absolute;
  left: 22px;
  top: -4px;
  white-space: nowrap;
  background: rgba(8, 12, 16, 0.92);
  color: var(--amber);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid rgba(232, 160, 74, 0.35);
}

#ui.sheet-on {
  pointer-events: auto;
}
.task-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: rgba(5, 8, 12, 0.96);
  pointer-events: auto;
}
.task-bar { padding: calc(10px + var(--safe-t)) 16px 8px; }
.task-bar .btn { width: auto; }
.task-scroll {
  flex: 1;
  overflow: auto;
  padding: 8px 20px calc(28px + var(--safe-b));
  max-width: 32rem;
  width: 100%;
  margin: 0 auto;
}
.proof { margin: 12px 0 16px; }
.proof-hit {
  display: block;
  width: 100%;
  margin: 12px 0 16px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
  touch-action: manipulation;
}
.proof-hit .proof { margin: 0; }
.proof-zoom-hint {
  color: #8b97a3;
  font-size: 0.75rem;
  margin-top: 6px;
}
.proof img {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #243038;
  display: block;
  background: #0b1014;
  pointer-events: none;
}
.proof figcaption { color: #8b97a3; font-size: 0.8rem; margin-top: 8px; }
.proof-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(4, 8, 12, 0.96);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.proof-lightbox.hidden { display: none !important; }
.proof-lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(36, 48, 56, 0.92);
  color: #eef2f5;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.proof-lightbox-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 52px 8px 8px;
}
.proof-lightbox-scroll img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  border-radius: 8px;
  background: #0b1014;
  transform-origin: center top;
  transition: transform 0.15s ease-out;
}
.proof-lightbox-scroll img.zoomed {
  max-width: none;
  width: 220%;
}
.proof-lightbox-cap {
  flex-shrink: 0;
  color: #b8c4ce;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 8px 16px 0;
  margin: 0;
}
.proof-lightbox-hint {
  flex-shrink: 0;
  color: #6b7780;
  font-size: 0.72rem;
  text-align: center;
  padding: 6px 16px 12px;
  margin: 0;
}
body.proof-open { overflow: hidden; }
#skip-bar {
  display: none !important;
}
.go-next {
  pointer-events: auto !important;
  min-height: 56px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--amber) !important;
  color: var(--ink) !important;
  border: 0 !important;
  text-decoration: none;
  display: grid;
  place-items: center;
}
button.go-next.hit,
a.go-next.hit {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(88px + var(--safe-b));
  z-index: 30;
}
.task-screen > .go-next {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 8px 12px calc(12px + var(--safe-b));
  width: calc(100% - 24px);
  z-index: 21;
}
.task {
  margin: 0 0 12px;
  line-height: 1.5;
  font-size: 1.02rem;
  color: #dbe3ea;
}
.safety { color: var(--fog); font-size: 0.8rem; margin: 0 0 12px; }
.progress {
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

#answer, #name, #pw, #author-key, textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border-radius: 0;
  padding: 12px 14px;
  margin: 8px 0 10px;
}
.choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.choices button {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 14px 16px;
  font-size: 1.02rem;
  line-height: 1.3;
}
.choice-n {
  flex: 0 0 auto;
  min-width: 1.4em;
  color: var(--amber);
  font-weight: 800;
}
.choice-t { flex: 1; }
.choices button.on { border-color: var(--amber); background: rgba(232, 160, 74, 0.12); }
.feedback { min-height: 1.2em; margin: 0 0 8px; font-size: 0.9rem; }
.feedback.bad { color: var(--danger); }
.hint-box {
  margin: 10px 0;
  padding: 10px 12px;
  background: rgba(110, 200, 176, 0.1);
  color: var(--mint);
  font-size: 0.88rem;
}
.reveal-card {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 22%;
  background: rgba(8, 12, 16, 0.96);
  border: 1px solid rgba(232, 160, 74, 0.4);
  padding: 22px 18px;
  pointer-events: auto;
}
.reveal-card h1 { font-family: var(--font-brand); margin: 0 0 10px; }
.finish-box {
  margin: 12px 0;
  padding: 14px;
  border: 1px dashed rgba(232, 160, 74, 0.45);
  line-height: 1.4;
}
.finish-box code,
.panel.finish-dock .stamp {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--amber);
  font-weight: 700;
}
.panel.finish-dock {
  max-height: 38dvh;
  padding: 12px 14px;
}
.panel.finish-dock h1 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}
.panel.finish-dock .lead {
  margin: 0 0 8px;
  font-size: 0.88rem;
}
.win-screen {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: auto;
  overflow: hidden;
}
.win-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}
.win-card {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(16px + var(--safe-b));
  background: rgba(8, 12, 16, 0.9);
  border: 1px solid rgba(232, 160, 74, 0.5);
  padding: 18px 16px 16px;
}
.win-pct {
  font-family: var(--font-brand);
  font-size: 3.1rem;
  color: var(--amber);
  margin: 0 0 8px;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.wrap {
  padding: calc(22px + var(--safe-t)) 20px calc(28px + var(--safe-b));
  max-width: 28rem;
  margin: 0 auto;
  pointer-events: auto;
  position: relative;
  z-index: 6;
  background: var(--ink);
  min-height: 100dvh;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-mark {
  width: 36px; height: 36px;
  background: var(--amber); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-brand); font-weight: 800;
}
.brand strong { display: block; font-family: var(--font-brand); font-size: 1.15rem; }
.brand span { color: var(--fog); font-size: 0.82rem; }
.card {
  display: block; width: 100%; text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: inherit; padding: 16px; margin-bottom: 12px;
}
.ask label { display: block; margin: 14px 0 6px; color: var(--fog); font-size: 0.88rem; }
.ask .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.ask .opts button {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: inherit; padding: 8px 12px;
}
.ask .opts button.on { background: var(--amber); color: var(--ink); border-color: transparent; }

.tt-marker {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 16px 6px rgba(232, 160, 74, 0.45);
  border: 2px solid #fff6e8;
}
.tt-marker.ghost {
  background: transparent;
  border: 2px solid var(--amber);
  box-shadow: 0 0 18px 4px rgba(232, 160, 74, 0.35);
  animation: pulse 1.8s ease-out infinite;
}
.tt-marker.lit {
  background: var(--mint);
  border-color: #e8fff6;
  box-shadow: 0 0 14px 4px rgba(110, 200, 176, 0.4);
  width: 22px;
  height: 22px;
}
.tt-marker.route {
  width: 18px; height: 18px;
  background: var(--amber);
  border-color: #fff6e8;
  box-shadow: 0 0 16px 6px rgba(232, 160, 74, 0.45);
  animation: none;
}
.tt-marker.down {
  background: #6a737a;
  border-color: #9aa4ab;
  animation: none;
  box-shadow: none;
}
.author-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 12px;
  margin: 6px 0;
  border-radius: 10px;
}
.author-choice.on {
  border-color: var(--mint);
  color: var(--mint);
}
.author-choice.on .choice-n { color: inherit; }
.bag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 8px;
}
.bag-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 8px;
}
.bag-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
}
.bag-kind-mark {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.72;
  filter: drop-shadow(0 0 6px rgba(232, 160, 74, 0.18));
}
.bag-row-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bag-cell {
  min-height: 72px;
  border: 1px dashed rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.28);
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
}
.bag-cell.on {
  border: 1px solid rgba(232, 160, 74, 0.45);
  background: rgba(232, 160, 74, 0.1);
}
.bag-icon {
  width: 52px;
  height: 52px;
  display: block;
}
.trophy-find {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}
.trophy-find-icon {
  width: 72px;
  height: 72px;
}
.win-trophies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}
.win-trophy-icon {
  width: 44px;
  height: 44px;
}
.bag-cell.stand {
  border-color: rgba(110, 200, 176, 0.75);
  box-shadow: inset 0 0 0 1px rgba(110, 200, 176, 0.55);
}
.bag-detail {
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bag-pick-name {
  margin: 0;
  color: var(--amber);
  font-family: var(--font-brand);
  letter-spacing: 0.04em;
}
.bag-stand-btn {
  min-width: 44px;
  padding: 8px 12px;
  font-size: 1.1rem;
  line-height: 1;
}
.bag-peer-stand {
  display: flex;
  justify-content: center;
  margin: 12px 0 8px;
}
.missions.hub .btn,
.missions.hub .skip-quiet {
  width: 100%;
}
.bag-cell.pick {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
}
.bag-cell.busy { opacity: 0.35; }
.bag-grid.peer { margin-top: 16px; }
.bag-grid.peer .bag-cell.on { border-color: rgba(110, 200, 176, 0.55); }
.tt-marker.peer {
  width: 14px;
  height: 14px;
  background: var(--mint);
  border: 2px solid #e8fff6;
  box-shadow: 0 0 10px 3px rgba(110, 200, 176, 0.45);
  animation: pulse 2.2s ease-out infinite;
}
.tt-marker.snag {
  width: 12px;
  height: 12px;
  background: transparent;
  border: 2px solid #e8c07a;
  box-shadow: 0 0 10px 3px rgba(232, 192, 122, 0.35);
  animation: pulse 2.2s ease-out infinite;
}
.tt-marker.snag.hint {
  width: 8px;
  height: 8px;
  opacity: 0.9;
  border-width: 1px;
  background: rgba(232, 192, 122, 0.4);
  box-shadow: 0 0 6px 1px rgba(232, 192, 122, 0.35);
  animation: none;
}
.tt-marker.snag.lit {
  background: var(--mint);
  border-color: #e8fff6;
  animation: none;
}
@keyframes pulse {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0.15; }
}
.leaflet-control-attribution { display: none; }
.error { color: var(--danger); font-size: 0.9rem; }
.chip {
  background: rgba(5, 8, 12, 0.82);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 12px;
  font-size: 0.82rem;
}
button.chip {
  appearance: none;
  width: auto;
  color: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  background: rgba(5, 8, 12, 0.82);
}
.chip.ok { color: var(--ok); }
.chip.warn { color: var(--amber); }

.link-dot {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  flex-shrink: 0;
  user-select: none;
}
.link-dot.live {
  color: #6ee7a8;
  border-color: rgba(110, 231, 168, 0.35);
  box-shadow: 0 0 10px rgba(110, 231, 168, 0.22);
}
.link-dot.local {
  color: var(--amber);
  border-color: rgba(232, 160, 74, 0.35);
}
.link-dot.sync {
  color: var(--amber);
  border-color: rgba(232, 160, 74, 0.45);
  animation: link-spin 1.4s linear infinite;
}
.link-dot.none {
  color: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.08);
}
@keyframes link-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pack-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 10040;
  max-width: 26rem;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 16, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.pack-bar.hidden { display: none !important; }
body.play-ui .pack-bar {
  bottom: calc(92px + env(safe-area-inset-bottom));
}
body.sheet-on .pack-bar {
  bottom: max(14px, env(safe-area-inset-bottom));
}
.pack-bar-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #e8eef2;
}
.pack-bar-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: #8b97a3;
  line-height: 1.3;
}
.pack-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.pack-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6b4226 0%, #c68642 45%, #e8b86d 100%);
  transition: width 0.2s ease-out;
  box-shadow: 0 0 8px rgba(232, 184, 109, 0.35);
}
.pack-bar--ready {
  border-color: rgba(120, 200, 140, 0.35);
  background: rgba(10, 24, 16, 0.94);
}
.pack-bar-done {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #b8e6c4;
}
.pack-bar--warn {
  border-color: rgba(255, 180, 80, 0.35);
}
.pack-bar-retry {
  margin-top: 8px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #eef2f5;
  font-size: 0.78rem;
  cursor: pointer;
}
