:root {
  --bg-deep: #0b1826;
  --card-bg: rgba(13, 27, 42, 0.84);
  --card-border: rgba(232, 198, 142, 0.28);
  --sand-warm: #f3e3c3;
  --sand-gold: #e7b563;
  --lapa-jade: #3ef0d0;
  --coral-terracotta: #d46542;
  --text-main: #f7efe0;
  --text-muted: #b9c8d6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button,
a,
[role='button'],
input,
select,
textarea,
.island-hub-shell,
#sailing-hud,
#sky-vigil-ui,
#walkable-island-ui,
.modal-backdrop,
.mist-overlay,
.landfall-overlay {
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

#webgl-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  touch-action: none;
}

#webgl-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#webgl-container canvas:active {
  cursor: grabbing;
}

/* Mode-Gated Sky Star Labels */
#sky-labels-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sky-star-label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: rgba(244, 234, 212, 0.88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(8, 16, 28, 0.36);
}

.sky-star-label.active-target-star {
  color: #ffe299;
  border: 1px solid rgba(255, 220, 138, 0.65);
  background: rgba(28, 22, 10, 0.62);
  font-weight: 600;
}

/* =========================================================================
   SAILING HUD (STRICTLY ZERO COMPASS / ZERO DEGREES)
   ========================================================================= */
#sailing-hud {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(22px, env(safe-area-inset-right, 0px))
    max(16px, calc(env(safe-area-inset-bottom, 0px) + 10px))
    max(22px, env(safe-area-inset-left, 0px));
}

@media (max-width: 1120px), (max-height: 700px) {
  #sailing-hud {
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(14px, env(safe-area-inset-right, 0px))
      max(12px, calc(env(safe-area-inset-bottom, 0px) + 8px))
      max(14px, env(safe-area-inset-left, 0px));
  }

  .hud-icon-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .hud-chant-banner {
    padding: 9px 16px;
    margin-top: 6px;
  }
}

@media (max-width: 960px) {
  .hud-icon-btn .btn-text {
    display: none;
  }
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.hud-voyage-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(9, 20, 34, 0.68);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  padding: 8px 14px;
  border-radius: 999px;
}

.hud-song-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--sand-warm);
}

.hud-corner-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hud-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 20, 34, 0.72);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
}

.hud-icon-btn:hover {
  background: rgba(24, 45, 68, 0.88);
  border-color: var(--sand-gold);
}

.hud-icon-btn.active {
  background: rgba(231, 181, 99, 0.26);
  border-color: var(--sand-gold);
  color: #ffe7b3;
}

.hud-eye-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hud-chant-banner {
  align-self: center;
  max-width: 760px;
  text-align: center;
  background: rgba(8, 18, 30, 0.62);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 198, 142, 0.24);
  border-radius: 16px;
  padding: 12px 22px;
  margin-top: 8px;
  pointer-events: auto;
}

.chant-verse-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sand-gold);
  margin-bottom: 4px;
}

.chant-lyrics {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.45;
  color: #fff6e5;
}

.chant-easy-hint {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: var(--lapa-jade);
}

.hud-trim-bar {
  margin-top: auto;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  background: rgba(8, 18, 30, 0.56);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 198, 142, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
}

.trim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(232, 198, 142, 0.28);
  color: var(--sand-warm);
  border-radius: 999px;
  padding: 0 12px;
  cursor: pointer;
  touch-action: none;
  transition: background 0.14s, border-color 0.14s, transform 0.1s;
}

.trim-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--sand-gold);
}

.trim-btn:active {
  background: rgba(231, 181, 99, 0.32);
  border-color: var(--sand-gold);
  transform: scale(0.96);
}

.wind-boost-btn.active {
  background: rgba(231, 181, 99, 0.26);
  border-color: var(--sand-gold);
  color: #ffe7b3;
}

.hud-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(14, 32, 48, 0.92);
  border: 1px solid var(--sand-gold);
  color: var(--sand-warm);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.hud-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hud-top-bar,
.hud-chant-banner,
.hud-trim-bar {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#sailing-hud.landfall-cinematic-active .hud-top-bar,
#sailing-hud.landfall-cinematic-active .hud-chant-banner,
#sailing-hud.landfall-cinematic-active .hud-trim-bar {
  opacity: 0;
  pointer-events: none;
}

/* Modals, Sand Recall, Mist & Landfall Overlays */
.modal-backdrop,
.mist-overlay,
.landfall-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 13, 22, 0.72);
  backdrop-filter: blur(8px);
}

.landfall-overlay {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px 28px;
  background: linear-gradient(
    180deg,
    rgba(6, 13, 22, 0.02) 0%,
    rgba(6, 13, 22, 0.14) 60%,
    rgba(6, 13, 22, 0.45) 100%
  );
  backdrop-filter: none;
  animation: landfallBackdropFadeIn 0.42s ease-out both;
}

.landfall-overlay .landfall-card {
  max-width: 430px;
  background: rgba(12, 25, 40, 0.88);
  backdrop-filter: blur(10px);
  animation: landfallCardRiseIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 760px) {
  .landfall-overlay {
    justify-content: center;
    padding: 18px;
  }
}

@keyframes landfallBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes landfallCardRiseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mist-overlay {
  background: radial-gradient(circle, rgba(176, 192, 204, 0.78), rgba(45, 62, 78, 0.92));
}

.sand-recall-card,
.dialog-card,
.mist-card,
.landfall-card {
  background: rgba(14, 28, 43, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px 28px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.mist-card,
.landfall-card {
  text-align: center;
}

.mist-eyebrow,
.recall-eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sand-gold);
  margin-bottom: 6px;
}

.mist-reflection,
#landfallBody {
  margin: 14px 0 22px;
  line-height: 1.55;
  color: var(--sand-warm);
  font-size: 15.5px;
}

.recall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#recallSandCanvas,
#shoreSandCanvas {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 2px solid rgba(231, 181, 99, 0.38);
  display: block;
}

.recall-narration,
.sand-narration-box {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sand-warm);
}

.mode-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 20px;
}

.mode-option-btn {
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-option-btn span {
  font-size: 12px;
  color: var(--text-muted);
}

.mode-option-btn.selected {
  border-color: var(--sand-gold);
  background: rgba(231, 181, 99, 0.18);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================================
   UNIFIED 3D SHORE DIORAMA & DOCKED 3-STATION ISLAND HUB UI
   ========================================================================= */
#island-hub {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(6, 14, 24, 0.0) 0%,
    rgba(6, 14, 24, 0.08) 58%,
    rgba(6, 14, 24, 0.36) 100%
  );
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(16px, calc(env(safe-area-inset-bottom, 0px) + 8px))
    max(20px, env(safe-area-inset-left, 0px));
}

.shore-stage-layout {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  pointer-events: none;
}

.shore-viewport-overlay {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  padding: 2px 0 4px;
}

.shore-viewport-overlay > * {
  pointer-events: auto;
}

.shore-orbit-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 96px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(8, 19, 32, 0.68);
  border: 1px solid rgba(232, 198, 142, 0.22);
  backdrop-filter: blur(8px);
}

.shore-orbit-hint {
  font-size: 12px;
  color: rgba(236, 224, 200, 0.84);
}

.shore-reset-orbit-btn {
  border-color: rgba(62, 240, 208, 0.55);
  color: var(--lapa-jade);
  font-weight: 600;
}

.shore-obj-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s;
}

.shore-obj-btn:hover {
  background: rgba(231, 181, 99, 0.12);
}

.shore-top-controls {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.shore-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0 !important;
  justify-content: center;
  border-radius: 12px;
  font-size: 18px !important;
  line-height: 1;
}

.shore-icon-btn .island-settings-gear {
  font-size: 19px;
}

.shore-icon-btn.active {
  background: rgba(62, 240, 208, 0.22);
  border-color: var(--lapa-jade);
  box-shadow: 0 0 16px rgba(62, 240, 208, 0.28);
}

.shore-canoe-fab {
  position: fixed;
  left: 20px;
  bottom: 112px;
  z-index: 15;
  width: 80px;
  height: 80px;
  padding: 4px !important;
  justify-content: center;
  border-radius: 20px;
  overflow: visible;
}

.shore-canoe-fab img,
.shore-walk-fab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

.shore-canoe-fab.active,
.shore-walk-fab.active {
  background: rgba(62, 240, 208, 0.22);
  border-color: var(--lapa-jade);
  box-shadow: 0 0 20px rgba(62, 240, 208, 0.32);
}

.shore-walk-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 15;
  width: 80px;
  height: 80px;
  padding: 4px !important;
  justify-content: center;
  border-radius: 20px;
  overflow: visible;
}

/* Phone-only Top-Left Objectives Button & Modal (hidden on desktop / iPad) */
.island-settings-btn.shore-objectives-fab {
  display: none;
  position: fixed;
  z-index: 15;
  overflow: visible;
}

.shore-objectives-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--sand-gold);
  color: #0b1826;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.shore-objectives-modal-card {
  width: min(460px, 92vw);
  max-height: min(78dvh, 540px);
  display: flex;
  flex-direction: column;
  background: rgba(10, 22, 36, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(231, 181, 99, 0.48);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.65);
}

.shore-objectives-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shore-objectives-modal-header h3 {
  font-size: 16.5px;
  color: var(--sand-warm);
  margin-top: 2px;
}

.shore-objectives-modal-list {
  max-height: none;
  flex: 1;
  min-height: 0;
  padding: 10px 2px 2px;
}

.shore-objectives-empty {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 8px 4px;
}

.shore-canoe-fab[data-tooltip]:focus-visible::after,
.shore-walk-fab[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 650;
  width: max-content;
  max-width: 240px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(9, 19, 29, 0.96);
  border: 1px solid rgba(244, 211, 94, 0.65);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  color: #f4efe6;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .shore-canoe-fab[data-tooltip]:hover::after,
  .shore-walk-fab[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 650;
    width: max-content;
    max-width: 240px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(9, 19, 29, 0.96);
    border: 1px solid rgba(244, 211, 94, 0.65);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    color: #f4efe6;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    pointer-events: none;
  }
}

.island-hub-shell {
  pointer-events: auto;
  width: min(468px, 41vw);
  min-width: 380px;
  margin-top: 50px;
  align-self: flex-start;
  height: auto;
  max-height: calc(100% - 50px);
  display: flex;
  flex-direction: column;
  background: rgba(9, 21, 35, 0.86);
  border: 1px solid rgba(232, 198, 142, 0.30);
  border-radius: 22px;
  padding: 15px 17px 17px;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.56);
  overflow: hidden;
}

.hub-header {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(232, 198, 142, 0.18);
  flex-shrink: 0;
}

.hub-act-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--lapa-jade);
}

.hub-walk-opt-btn {
  border-color: rgba(62, 240, 208, 0.38) !important;
}

.hub-walk-opt-btn:hover {
  border-color: var(--lapa-jade) !important;
  background: rgba(62, 240, 208, 0.14) !important;
}

.hub-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hub-island-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px;
  line-height: 1.15;
  color: var(--sand-warm);
}

.hub-island-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.hub-poi-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0;
  flex-shrink: 0;
}

.poi-tab-btn {
  background: rgba(14, 29, 46, 0.78);
  color: var(--text-muted);
  border: 1px solid rgba(232, 198, 142, 0.20);
  border-radius: 13px;
  padding: 8px 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.12s;
}

.poi-tab-btn:hover {
  border-color: rgba(231, 181, 99, 0.48);
  color: var(--sand-warm);
}

.poi-tab-btn.active {
  background: linear-gradient(180deg, rgba(231, 181, 99, 0.26), rgba(231, 181, 99, 0.12));
  border-color: var(--sand-gold);
  color: var(--sand-warm);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.station-tab-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.station-tab-glyph {
  font-size: 14px;
}

.station-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1.5px 7px;
  border-radius: 999px;
  line-height: 1.3;
}

.station-badge.badge-action {
  background: rgba(231, 181, 99, 0.28);
  color: #ffe3a8;
  border: 1px solid rgba(231, 181, 99, 0.65);
}

.station-badge.badge-teach {
  background: rgba(62, 240, 208, 0.22);
  color: #84fff0;
  border: 1px solid rgba(62, 240, 208, 0.6);
}

.station-badge.badge-warn {
  background: rgba(255, 162, 102, 0.22);
  color: #ffc599;
  border: 1px solid rgba(255, 162, 102, 0.55);
}

.station-badge.badge-ready,
.station-badge.badge-done {
  background: rgba(62, 240, 208, 0.16);
  color: var(--lapa-jade);
  border: 1px solid rgba(62, 240, 208, 0.42);
}

.station-badge.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hub-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.hub-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-card {
  background: rgba(13, 27, 43, 0.78);
  border: 1px solid rgba(232, 198, 142, 0.22);
  border-radius: 16px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.hub-card h3 {
  color: var(--sand-warm);
  font-size: 16.5px;
}

.hub-card h4 {
  color: var(--sand-warm);
  font-size: 14.5px;
}

@media (max-width: 900px) {
  #island-hub {
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      max(10px, calc(env(safe-area-inset-bottom, 0px) + 6px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .shore-stage-layout {
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
  }

  .shore-top-controls {
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    gap: 6px;
  }

  .shore-orbit-hint {
    display: none;
  }

  .island-hub-shell {
    align-self: stretch;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    height: auto;
    max-height: min(58dvh, 58%);
    padding: 12px 14px 14px;
  }
}

.vaka-tier-line {
  font-size: 13px;
  color: var(--sand-gold);
}

.condition-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cond-chip {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cond-chip span {
  font-size: 11px;
  color: var(--text-muted);
}

.cond-chip strong {
  font-size: 12.5px;
  color: #e8f5e9;
}

.cargo-section,
.crew-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.cargo-section:first-child {
  padding-top: 0;
  border-top: none;
}

.cargo-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.crew-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.cargo-item-card {
  position: relative;
  background: rgba(231, 181, 99, 0.11);
  border: 1px solid rgba(231, 181, 99, 0.28);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.cargo-item-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.crew-card {
  position: relative;
  background: rgba(231, 181, 99, 0.11);
  border: 1px solid rgba(231, 181, 99, 0.28);
  border-radius: 10px;
  padding: 9px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  color: inherit;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.crew-card-btn {
  cursor: pointer;
}

.cargo-item-card:hover,
.cargo-item-card:focus-visible,
.crew-card:hover,
.crew-card:focus-visible {
  border-color: rgba(244, 211, 94, 0.72);
  background: rgba(231, 181, 99, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.cargo-item-art,
.crew-card-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(9, 20, 30, 0.55);
  border: 1px solid rgba(244, 211, 94, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cargo-item-art svg,
.crew-card-art svg {
  width: 38px;
  height: 38px;
  display: block;
}

.crew-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cargo-item-name,
.crew-card-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: #f4efe6;
}

.crew-card-role {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(244, 239, 230, 0.74);
}

.hub-card-tooltip {
  position: fixed;
  z-index: 650;
  width: max-content;
  max-width: 240px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(9, 19, 29, 0.96);
  border: 1px solid rgba(244, 211, 94, 0.65);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  color: #f4efe6;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

.cargo-header,
.ration-controls,
.dep-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}

.ration-step-btns {
  display: flex;
  gap: 6px;
}

.cargo-pill,
.crew-pill {
  background: rgba(231, 181, 99, 0.11);
  border: 1px solid rgba(231, 181, 99, 0.25);
  border-radius: 10px;
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cargo-pill strong,
.crew-pill strong {
  font-size: 13px;
  color: var(--sand-warm);
}

.cargo-pill span,
.crew-pill span,
.empty-note,
.panel-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.careen-feedback {
  font-size: 12.5px;
  color: var(--lapa-jade);
  min-height: 16px;
}

.route-list,
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-choice-btn,
.lesson-choice-btn {
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-choice-btn.selected,
.lesson-choice-btn.selected {
  background: rgba(231, 181, 99, 0.2);
  border-color: var(--sand-gold);
}

.route-choice-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.route-target-tag {
  color: var(--lapa-jade);
  font-weight: 600;
}

.route-choice-meta,
.lesson-choice-btn span {
  font-size: 12px;
  color: var(--text-muted);
}

.dep-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.dep-btn {
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
}

.dep-btn.recommended {
  border-color: rgba(62, 240, 208, 0.55);
}

.dep-btn.selected {
  background: rgba(231, 181, 99, 0.28);
  border-color: var(--sand-gold);
  font-weight: 600;
}

.song-preview-box {
  background: rgba(6, 14, 24, 0.55);
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--sand-gold);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.preview-verse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.preview-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sand-gold);
}

.preview-verse-count {
  font-size: 11px;
  font-weight: 600;
  color: rgba(244, 239, 230, 0.72);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.preview-verse-body {
  min-height: 58px;
}

.song-preview-box blockquote {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.45;
  color: #fff6e5;
}

.preview-easy-cue {
  margin-top: 6px;
  font-size: 12px;
  color: var(--lapa-jade);
}

.preview-verse-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.verse-nav-btn {
  width: 32px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(231, 181, 99, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sand-gold);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.verse-nav-btn:hover:not(:disabled) {
  background: rgba(231, 181, 99, 0.2);
  border-color: var(--sand-gold);
}

.verse-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.verse-step-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.verse-step-dot {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(244, 239, 230, 0.28);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.verse-step-dot::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.verse-step-dot:hover {
  background: rgba(244, 211, 94, 0.65);
}

.verse-step-dot.active {
  background: var(--sand-gold);
  transform: scale(1.25);
}

.dep-warning {
  margin-top: 6px;
  font-size: 12px;
  color: #ffab82;
}

.primary-btn {
  background: linear-gradient(135deg, #e7b563 0%, #c98636 100%);
  color: #161006;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14.5px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sand-warm);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.small-btn {
  padding: 5px 11px;
  font-size: 12.5px;
}

.full-width-btn,
.launch-voyage-btn {
  width: 100%;
}

.sand-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sand-mentor-tag,
.sanctuary-eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sand-gold);
}

.sanctuary-card {
  width: 100%;
}

.sanctuary-encounter-layout {
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 16px;
  align-items: start;
}

.sanctuary-encounter-layout.no-mentor {
  grid-template-columns: 1fr;
}

@media (max-width: 520px) {
  .sanctuary-encounter-layout {
    grid-template-columns: 1fr;
  }
}

.mentor-portrait-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.mentor-portrait-frame {
  width: 100%;
  padding: 5px;
  background: radial-gradient(circle at 50% 35%, rgba(231, 181, 99, 0.16), rgba(6, 14, 24, 0.85));
  border: 1.5px solid rgba(231, 181, 99, 0.45);
  border-radius: 14px;
  cursor: zoom-in;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  transition: border-color 0.18s, transform 0.18s;
}

.mentor-portrait-frame:hover {
  border-color: var(--sand-gold);
  transform: translateY(-2px);
}

.mentor-fullbody-img {
  width: 100%;
  max-height: 220px;
  height: auto;
  object-fit: contain;
  border-radius: 9px;
  display: block;
}

.mentor-portrait-caption {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mentor-portrait-caption strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  color: var(--sand-warm);
}

.mentor-portrait-caption span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.sanctuary-dialogue-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.sanctuary-dialogue-col h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  line-height: 1.25;
  color: var(--sand-warm);
}

.sanctuary-speech {
  font-size: 14.5px !important;
  line-height: 1.55 !important;
}

.sanctuary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.sanctuary-actions > button {
  flex: 1 1 170px;
}

.lesson-choice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sand-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.sand-mentor-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 4px;
  border-radius: 999px;
  background: rgba(11, 24, 38, 0.85);
  border: 1px solid rgba(231, 181, 99, 0.36);
  color: var(--sand-warm);
  font-size: 12px;
  cursor: zoom-in;
}

.sand-mentor-mini-btn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.vigil-station-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.vigil-station-portrait-btn {
  padding: 4px;
  border-radius: 12px;
  background: rgba(8, 18, 30, 0.85);
  border: 1px solid rgba(231, 181, 99, 0.42);
  cursor: zoom-in;
  flex-shrink: 0;
}

.vigil-launch-portrait {
  width: 82px;
  height: 112px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.vigil-launch-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.vigil-launch-copy p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
}

.vigil-progress-box {
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(6, 14, 24, 0.56);
  border: 1px solid rgba(62, 240, 208, 0.22);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vigil-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--sand-warm);
}

.vigil-progress-head span {
  font-weight: 700;
  color: var(--lapa-jade);
}

.vigil-progress-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.vigil-learned-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vigil-learned-chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(62, 240, 208, 0.13);
  border: 1px solid rgba(62, 240, 208, 0.36);
  color: var(--sand-warm);
}

.station-step-footer {
  padding-top: 4px;
}

.empty-route-callout {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(231, 181, 99, 0.10);
  border: 1px solid rgba(231, 181, 99, 0.32);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.empty-route-callout p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sand-warm);
}

/* Full-Body Character Lightbox Modal */
.mentor-lightbox-card {
  background: rgba(12, 24, 38, 0.96);
  border: 1px solid rgba(231, 181, 99, 0.42);
  border-radius: 20px;
  padding: 20px 24px 24px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mentor-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mentor-lightbox-header h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  color: var(--sand-warm);
}

.mentor-lightbox-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.mentor-lightbox-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(231, 181, 99, 0.12), rgba(5, 11, 19, 0.85));
  border-radius: 14px;
  padding: 10px;
  border: 1px solid rgba(231, 181, 99, 0.28);
}

.mentor-lightbox-img {
  max-height: 74dvh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.sanctuary-speech {
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  color: #fff6e5;
}

.sanctuary-rewards {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--lapa-jade);
  font-size: 14px;
}

/* Voyaging Crewmate Full-Body Encounter & Deck Crew Pills */
.sanctuary-crew-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(62, 240, 208, 0.07);
  border: 1px solid rgba(231, 181, 99, 0.34);
}

.sanctuary-crew-thumb-btn,
.crew-pill-thumb-btn {
  padding: 4px;
  border-radius: 10px;
  background: rgba(8, 18, 30, 0.86);
  border: 1px solid rgba(231, 181, 99, 0.42);
  cursor: zoom-in;
  flex-shrink: 0;
  transition: border-color 0.16s, transform 0.14s;
}

.sanctuary-crew-thumb-btn:hover,
.crew-pill-thumb-btn:hover {
  border-color: var(--sand-gold);
  transform: scale(1.03);
}

.sanctuary-crew-img {
  width: 96px;
  height: 130px;
  object-fit: contain;
  border-radius: 7px;
  display: block;
}

.sanctuary-crew-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sanctuary-crew-meta strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  color: var(--sand-warm);
}

.sanctuary-crew-meta span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.crew-pill.crew-pill-with-portrait {
  flex-direction: row;
  align-items: center;
  gap: 11px;
}

.crew-pill-thumb {
  width: 50px;
  height: 68px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.crew-pill-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}


/* =========================================================================
   NAVIGATOR'S SHORE: STAR-STONE VIGIL LAUNCH CARD
   ========================================================================= */
.vigil-launch-card {
  margin-bottom: 18px;
  background: linear-gradient(
    135deg,
    rgba(18, 34, 56, 0.92) 0%,
    rgba(11, 22, 37, 0.94) 65%,
    rgba(42, 31, 18, 0.88) 100%
  );
  border: 1.5px solid rgba(231, 181, 99, 0.52);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
}

.vigil-launch-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.vigil-launch-portrait {
  width: 78px;
  height: 106px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(6, 14, 24, 0.78);
  border: 1px solid rgba(231, 181, 99, 0.45);
  padding: 3px;
}

.vigil-launch-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vigil-launch-copy h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  color: #fff3d6;
}

.vigil-launch-copy p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 620px;
}

.vigil-launch-cta-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 268px;
}

.vigil-primary-launch-btn {
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(231, 181, 99, 0.25);
}

.vigil-quick-masters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vigil-quick-masters .secondary-btn {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .vigil-launch-top {
    grid-template-columns: 1fr;
  }
  .vigil-launch-portrait {
    display: none;
  }
  .vigil-launch-cta-col {
    min-width: 0;
  }
}

/* =========================================================================
   THE STAR-STONE VIGIL (AHU FETI'A) — GROUNDED 3D SKY OBSERVATORY HUD
   ========================================================================= */
.vigil-stone-label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(236, 219, 188, 0.84);
  background: rgba(14, 18, 24, 0.68);
  border: 1px solid rgba(231, 181, 99, 0.32);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.vigil-stone-label.active-target-stone {
  color: #ffe7ad;
  background: rgba(44, 31, 12, 0.86);
  border-color: var(--sand-gold);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(231, 181, 99, 0.38);
}

#sky-vigil-ui {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding:
    max(14px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(18px, calc(env(safe-area-inset-bottom, 0px) + 10px))
    max(20px, env(safe-area-inset-left, 0px));
}

/* Subtle Centered Wayfinder Sighting Ring */
.vigil-sight-reticle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vigil-reticle-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px dashed rgba(243, 227, 195, 0.34);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.vigil-reticle-ring.aligned {
  border-style: solid;
  border-color: var(--lapa-jade);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(62, 240, 208, 0.38);
}

.vigil-reticle-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 232, 179, 0.65);
}

/* Top Bar */
.vigil-top-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(8, 17, 28, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 9px 14px;
}

.vigil-title-cluster {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vigil-ring-eyebrow,
.vigil-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--lapa-jade);
}

.vigil-ring-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  color: var(--sand-warm);
}

.vigil-switcher-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vigil-master-pills,
.vigil-mode-tabs {
  display: inline-flex;
  background: rgba(4, 10, 18, 0.65);
  border: 1px solid rgba(232, 198, 142, 0.22);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}

.vigil-pill-btn,
.vigil-mode-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.vigil-pill-btn:hover,
.vigil-mode-btn:hover {
  color: var(--sand-warm);
}

.vigil-pill-btn.active,
.vigil-mode-btn.active {
  background: rgba(231, 181, 99, 0.26);
  color: #ffe9ba;
}

.vigil-island-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sand-gold);
}

.vigil-island-picker select {
  background: rgba(10, 22, 36, 0.94);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  max-width: 210px;
}

/* Bottom Deck */
.vigil-bottom-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.95fr);
  gap: 14px;
  align-items: end;
}

.vigil-main-card,
.vigil-controls-card {
  pointer-events: auto;
  background: rgba(9, 19, 31, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.vigil-drawer-handle {
  display: none;
}

.vigil-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vigil-mentor-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vigil-mentor-thumb-btn {
  padding: 3px;
  border-radius: 10px;
  background: rgba(6, 14, 24, 0.85);
  border: 1px solid rgba(231, 181, 99, 0.45);
  cursor: zoom-in;
  flex-shrink: 0;
}

.vigil-mentor-thumb {
  width: 54px;
  height: 74px;
  object-fit: contain;
  border-radius: 7px;
  display: block;
}

.vigil-mentor-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.vigil-chapter-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vigil-step-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(232, 198, 142, 0.5);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.vigil-step-dot:hover {
  border-color: var(--sand-gold);
  transform: scale(1.15);
}

.vigil-step-dot.filled {
  background: var(--sand-gold);
  border-color: var(--sand-gold);
}

.vigil-step-dot.active {
  box-shadow: 0 0 0 3px rgba(231, 181, 99, 0.28);
}

.vigil-card-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  color: var(--sand-warm);
}

.vigil-mentor-byline {
  font-size: 12px;
  color: var(--sand-gold);
}

.vigil-speech {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: #fff6e5;
}

.vigil-hint-line {
  font-size: 12px;
  color: var(--text-muted);
}

.vigil-hint-line.sighted-ok {
  color: var(--lapa-jade);
  font-weight: 600;
}

.vigil-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.vigil-action-btns {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.vigil-sight-status {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.vigil-sight-status.near {
  color: var(--sand-gold);
  border-color: rgba(231, 181, 99, 0.48);
}

.vigil-sight-status.sighted {
  color: var(--lapa-jade);
  border-color: rgba(62, 240, 208, 0.62);
  background: rgba(62, 240, 208, 0.1);
  font-weight: 600;
}

/* Constellation Atlas */
.vigil-atlas-header,
.vigil-quiz-top,
.vigil-time-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vigil-status-pill,
.vigil-quiz-tally {
  font-size: 11.5px;
  color: #ffe6b0;
  background: rgba(231, 181, 99, 0.16);
  border: 1px solid rgba(231, 181, 99, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
}

.vigil-constellation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.vigil-const-chip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.vigil-const-chip.active {
  background: rgba(231, 181, 99, 0.28);
  border-color: var(--sand-gold);
  color: #fff2cf;
  font-weight: 600;
}

.vigil-star-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vigil-star-pill {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sand-warm);
}

.vigil-star-pill em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--lapa-jade);
  margin-left: 3px;
}

.vigil-star-pill.below-sea {
  opacity: 0.68;
}

.vigil-star-pill.below-sea em {
  color: #ffab82;
}

.vigil-drag-tip {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Optional Eye Trial Meter */
.vigil-quiz-meter-wrap {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.vigil-quiz-meter-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--sand-gold), var(--lapa-jade));
  transition: width 0.08s linear;
}

.active-peek,
.active-spin {
  border-color: var(--lapa-jade) !important;
  color: var(--lapa-jade) !important;
}

/* Right Controls Card: Nocturnal Time Scrubber & Layer Toggles */
.vigil-controls-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vigil-controls-collapse-btn {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--sand-gold);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 0;
  cursor: pointer;
}

.vigil-controls-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vigil-watch-label {
  display: block;
  font-size: 14.5px;
  color: var(--sand-warm);
  margin-top: 1px;
}

.vigil-time-slider {
  width: 100%;
  accent-color: var(--sand-gold);
  cursor: pointer;
}

.vigil-slider-ends {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -4px;
}

.vigil-layer-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.vigil-toggle-chip {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 11.5px;
  cursor: pointer;
  text-align: center;
}

.vigil-toggle-chip.active {
  background: rgba(231, 181, 99, 0.2);
  border-color: rgba(231, 181, 99, 0.55);
  color: var(--sand-warm);
}

.vigil-toggle-chip-wide {
  grid-column: 1 / -1;
}

@media (max-width: 960px) {
  .vigil-bottom-deck {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   3D WALKABLE ISLAND UI & PROXIMITY POI POPUPS (RA'IATEA)
   ========================================================================= */
#walkable-island-ui {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.walkable-shore-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(22px, env(safe-area-inset-right, 0px))
    max(20px, calc(env(safe-area-inset-bottom, 0px) + 10px))
    max(22px, env(safe-area-inset-left, 0px));
}

.walkable-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.walkable-top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 620px;
}

.walkable-island-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-family: inherit;
  background: rgba(9, 21, 35, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(231, 181, 99, 0.45);
  border-radius: 14px;
  padding: 9px 15px;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}

.walkable-island-btn:hover {
  background: rgba(15, 33, 52, 0.9);
  border-color: var(--sand-gold);
  transform: translateY(-1px);
}

.walkable-island-btn-icon {
  font-size: 23px;
  line-height: 1;
}

.walkable-island-btn-copy {
  display: flex;
  flex-direction: column;
}

.walkable-island-btn-cta {
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(231, 181, 99, 0.18);
  border: 1px solid rgba(231, 181, 99, 0.42);
  color: var(--sand-gold);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.walkable-act-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--sand-gold);
}

.walkable-island-title-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 2px;
}

.walkable-island-title-row strong {
  font-size: 18px;
  color: var(--sand-warm);
}

.walkable-island-title-row span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.walkable-controls-hint {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(9, 21, 35, 0.62);
  font-size: 11.5px;
  color: var(--lapa-jade);
}

.walkable-mode-wrap {
  pointer-events: auto;
  background: rgba(9, 21, 35, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 7px 12px;
}

/* Projected 3D POI World Labels */
.shore-poi-world-tag {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 21, 34, 0.74);
  border: 1px solid rgba(232, 198, 142, 0.36);
  color: var(--sand-warm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: border-color 0.16s, background 0.16s;
}

.shore-poi-world-tag.active-poi {
  background: rgba(16, 44, 52, 0.9);
  border-color: var(--lapa-jade);
  color: #ffffff;
}

.walkable-reopen-pill {
  pointer-events: auto;
  align-self: center;
  margin-top: auto;
  background: rgba(12, 29, 46, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--lapa-jade);
  color: var(--sand-warm);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Contextual On-Screen POI Popup Card */
.walkable-poi-popup {
  pointer-events: auto;
  align-self: center;
  margin-top: auto;
  width: min(690px, 95vw);
  max-height: min(64dvh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(10, 23, 37, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(231, 181, 99, 0.48);
  border-radius: 18px;
  padding: 15px 18px 16px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.56);
  animation: walkPoiSlideUp 0.2s ease-out;
}

@keyframes walkPoiSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.walkable-poi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.walkable-poi-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.walkable-poi-glyph {
  font-size: 28px;
  line-height: 1;
}

.walkable-poi-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--lapa-jade);
}

.walkable-poi-heading h3 {
  font-size: 17px;
  color: var(--sand-warm);
  margin-top: 1px;
}

.walkable-poi-heading p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.walkable-close-btn {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.walkable-close-btn:hover {
  color: var(--sand-warm);
  border-color: var(--sand-gold);
}

.walkable-poi-body {
  padding-top: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.walkable-cond-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.walkable-ration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 198, 142, 0.18);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.walkable-slot-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 6px;
}

.walkable-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.walkable-feedback-note {
  font-size: 12.5px;
  color: var(--lapa-jade);
  background: rgba(62, 240, 208, 0.09);
  border: 1px solid rgba(62, 240, 208, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
}

.walkable-craftsman-drawer {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.walkable-craftsman-quote {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sand-warm);
  font-style: italic;
}

.walkable-manifest-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.walkable-mini-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sand-gold);
  margin-bottom: 5px;
}

.walkable-elder-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.walkable-elder-thumb-btn {
  flex-shrink: 0;
  width: 86px;
  height: 116px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(231, 181, 99, 0.45);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.walkable-elder-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.walkable-monolith-emblem {
  flex-shrink: 0;
  width: 78px;
  height: 98px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  border-radius: 12px;
  border: 1px solid rgba(231, 181, 99, 0.42);
  background: rgba(255, 255, 255, 0.05);
}

.walkable-elder-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.walkable-elder-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--sand-warm);
}

.walkable-elder-role {
  font-size: 12px;
  color: var(--sand-gold);
  margin-top: -3px;
}

.walkable-elder-speech {
  font-size: 13.5px;
  line-height: 1.46;
  color: var(--text-main);
}

.walkable-rewards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--lapa-jade);
}

.walkable-circle-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-main);
}

.walkable-lesson-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.walkable-poi-popup.canoe-poi-active {
  max-height: min(74dvh, 620px);
}

.walkable-poi-popup.canoe-poi-active .canoe-island-cards-row {
  max-width: none;
}

.walkable-canoe-modal-body {
  gap: 10px;
  overflow: visible;
  padding-right: 0;
}

.walkable-canoe-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.walkable-canoe-summary strong {
  color: var(--sand-warm);
}

.walkable-route-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.walkable-dep-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.walkable-dep-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.walkable-dep-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.walkable-verse-preview {
  padding: 9px 12px;
}

.walkable-sand-modal-card {
  pointer-events: auto;
  width: min(860px, 95vw);
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(11, 24, 38, 0.96);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px 20px;
}

.walkable-sand-modal-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  margin-top: 12px;
}

.walkable-sand-canvas-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.walkable-sand-canvas-col canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(232, 198, 142, 0.28);
}

@media (max-width: 780px) {
  .walkable-cond-strip,
  .walkable-manifest-cols,
  .walkable-sand-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   ASHORE ISLAND SETTINGS BUTTON, MODAL & START-OVER CONFIRMATION
   ========================================================================= */
.island-settings-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  background: rgba(9, 21, 35, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(231, 181, 99, 0.42);
  border-radius: 12px;
  padding: 9px 14px;
  color: var(--sand-warm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}

.island-settings-btn:hover {
  background: rgba(15, 33, 52, 0.92);
  border-color: var(--sand-gold);
  transform: translateY(-1px);
}

.island-settings-gear {
  font-size: 15px;
  color: var(--sand-gold);
}

.island-settings-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(231, 181, 99, 0.16);
  border: 1px solid rgba(231, 181, 99, 0.34);
  color: var(--sand-gold);
  font-size: 11.5px;
  font-weight: 600;
}

#island-settings-ui {
  position: fixed;
  inset: 0;
  z-index: 25;
}

.island-settings-backdrop {
  position: fixed;
  inset: 0;
}

.island-settings-card {
  width: min(560px, 94vw);
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.island-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-section-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sand-gold);
  font-weight: 600;
}

.settings-sound-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-sound-btn {
  font-family: inherit;
  padding: 10px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(232, 198, 142, 0.24);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.settings-sound-btn:hover {
  border-color: rgba(231, 181, 99, 0.55);
  color: var(--sand-warm);
}

.settings-sound-btn.active {
  background: rgba(62, 240, 208, 0.14);
  border-color: var(--lapa-jade);
  color: #ffffff;
}

.settings-reset-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(212, 101, 66, 0.09);
  border: 1px solid rgba(212, 101, 66, 0.34);
}

.settings-reset-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-reset-copy strong {
  font-size: 14px;
  color: var(--sand-warm);
}

.settings-reset-copy span {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-reset-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(212, 101, 66, 0.08);
  border: 1px solid rgba(212, 101, 66, 0.28);
  color: var(--sand-warm);
  font-size: 13px;
  cursor: pointer;
}

.settings-reset-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #e45d42;
  cursor: pointer;
}

.danger-outline-btn {
  font-family: inherit;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(212, 101, 66, 0.14);
  border: 1px solid rgba(212, 101, 66, 0.6);
  color: #ffb8a2;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.danger-outline-btn:hover {
  background: rgba(212, 101, 66, 0.28);
  border-color: #ff8e6b;
  color: #ffffff;
}

.danger-solid-btn {
  font-family: inherit;
  padding: 10px 18px;
  border-radius: 11px;
  background: #c9472c;
  border: 1px solid #ef7a5c;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.danger-solid-btn:hover {
  background: #df5437;
}

.sail-dye-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sail-dye-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sail-dye-swatch-btn {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(232, 198, 142, 0.25);
  color: #f4efe6;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.sail-dye-swatch-btn:hover {
  border-color: rgba(244, 211, 94, 0.65);
  background: rgba(231, 181, 99, 0.14);
  transform: translateY(-1px);
}

.sail-dye-swatch-btn.selected {
  border-color: var(--lapa-jade);
  background: rgba(62, 240, 208, 0.16);
  box-shadow: 0 0 0 1px rgba(62, 240, 208, 0.35);
}

.sail-dye-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.sail-dye-custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sail-dye-custom-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.sail-dye-custom-label strong {
  color: #f4efe6;
}

.sail-dye-custom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sail-dye-color-input {
  width: 38px;
  height: 28px;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid rgba(232, 198, 142, 0.38);
  background: rgba(9, 19, 29, 0.9);
  cursor: pointer;
}

/* Dedicated Canoe / Set Sail Modal */
.canoe-modal-card {
  width: fit-content;
  min-width: 300px;
  max-width: 94vw;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.canoe-modal-header {
  gap: 18px;
}

.canoe-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
}

.canoe-modal-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.canoe-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.canoe-section-head h4,
.canoe-section-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sand-gold);
  letter-spacing: 0.02em;
}

.canoe-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.canoe-filter-pill {
  appearance: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(235, 244, 252, 0.78);
  background: rgba(9, 21, 35, 0.65);
  border: 1px solid rgba(232, 198, 142, 0.22);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.canoe-filter-pill:hover,
.canoe-filter-pill:focus-visible {
  color: var(--ink-bright);
  border-color: rgba(232, 198, 142, 0.55);
  background: rgba(20, 42, 66, 0.85);
  outline: none;
}

.canoe-filter-pill.active {
  color: #0b1826;
  background: linear-gradient(180deg, #f4d38c 0%, #dca858 100%);
  border-color: #f4d38c;
  box-shadow: 0 2px 10px rgba(244, 211, 140, 0.25);
}

.canoe-island-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 432px;
  align-items: stretch;
}

.canoe-island-cards-row.anthology-mode {
  max-width: 652px;
}

.canoe-island-card {
  appearance: none;
  flex: 0 0 102px;
  width: 102px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(9, 21, 35, 0.78);
  border: 1px solid rgba(232, 198, 142, 0.24);
  color: var(--ink-bright);
  cursor: pointer;
  text-align: center;
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.canoe-island-card:hover,
.canoe-island-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--sand-gold);
  background: rgba(20, 42, 66, 0.88);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
  outline: none;
}

.canoe-island-card-art {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  background: #091523;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canoe-island-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.canoe-island-card-mystery {
  font-size: 24px;
  font-weight: 800;
  color: rgba(244, 211, 140, 0.72);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  line-height: 1;
}

.canoe-island-card-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-bright);
  letter-spacing: 0.01em;
}

.canoe-island-card-sub {
  font-size: 10px;
  font-weight: 600;
  color: rgba(244, 211, 140, 0.78);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-top: -2px;
}

.canoe-confirm-card {
  width: min(500px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.canoe-confirm-song-box {
  margin: 0;
}

.canoe-confirm-departure {
  margin: 0;
}

.canoe-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.canoe-confirm-sail-btn {
  padding: 10px 18px;
}

.canoe-roster-cargo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.canoe-roster-col,
.canoe-cargo-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.canoe-roster-col .crew-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.canoe-roster-col .crew-card {
  flex: 0 0 102px;
  width: 102px;
}

.canoe-cargo-col .cargo-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.canoe-cargo-col .cargo-item-card {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  padding: 6px;
}

.settings-footer-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.settings-footer-split {
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.settings-diff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.settings-diff-card {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 198, 142, 0.24);
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.settings-diff-card:hover {
  border-color: rgba(231, 181, 99, 0.6);
  background: rgba(231, 181, 99, 0.12);
  transform: translateY(-1px);
}

.settings-diff-card.selected {
  border-color: var(--lapa-jade);
  background: rgba(62, 240, 208, 0.13);
  box-shadow: 0 0 0 1px rgba(62, 240, 208, 0.35);
}

.settings-diff-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(244, 211, 94, 0.25);
  background: rgba(9, 20, 30, 0.55);
}

.settings-diff-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.settings-diff-card strong {
  font-size: 12.5px;
  color: #f4efe6;
  line-height: 1.2;
}

.settings-diff-card span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.15;
}

.settings-diff-summary {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hud-pause-dialog-card {
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hud-pause-diff-section {
  margin: 12px 0 18px;
}

.settings-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 11, 20, 0.76);
}

.settings-confirm-card {
  width: min(440px, 92vw);
  border-color: rgba(212, 101, 66, 0.65);
}

.settings-danger-eyebrow {
  color: #ff9c7d;
}

.settings-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-credits-card {
  width: min(460px, 92vw);
}

.settings-credits-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.settings-credits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-credits-dev-card {
  padding: 12px 10px;
  gap: 8px;
}

.crew-card-art.settings-credits-art {
  width: 116px;
  height: 152px;
  padding: 4px;
  border-radius: 12px;
}

.crew-card-art.settings-credits-art img {
  object-fit: contain;
  object-position: center center;
}

.settings-credits-link-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 6px 0 2px;
}

.settings-credits-prompt {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-muted);
}

.settings-credits-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lapa-jade);
  text-decoration: none;
  background: rgba(62, 240, 208, 0.1);
  border: 1px solid rgba(62, 240, 208, 0.34);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.settings-credits-link:hover,
.settings-credits-link:focus-visible {
  background: rgba(62, 240, 208, 0.18);
  border-color: rgba(62, 240, 208, 0.68);
  transform: translateY(-1px);
  outline: none;
}

/* =========================================================================
   GUIDED CONSTELLATION VIGIL CALLOUTS & PRE-DEPARTURE ELDER TEACHING POPUP
   ========================================================================= */
.vigil-elder-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(62, 240, 208, 0.1);
  border: 1px solid rgba(62, 240, 208, 0.35);
  font-size: 12.5px;
  color: #e6fffb;
}

.vigil-const-chip.locked-chip {
  opacity: 0.54;
  border-style: dashed;
}

.elder-vigil-cta-btn {
  border-color: rgba(62, 240, 208, 0.65) !important;
  box-shadow: 0 0 14px rgba(62, 240, 208, 0.18);
}

#elder-vigil-prompt-ui {
  position: fixed;
  inset: 0;
  z-index: 64;
}

.elder-vigil-prompt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 20, 0.76);
  backdrop-filter: blur(5px);
}

.elder-vigil-prompt-card {
  width: min(520px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.elder-vigil-prompt-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(231, 181, 99, 0.24);
}

.elder-vigil-prompt-portrait {
  width: 68px;
  height: 86px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  border: 1px solid rgba(231, 181, 99, 0.45);
  flex-shrink: 0;
}

.elder-vigil-prompt-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.elder-vigil-prompt-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--sand-gold);
}

.elder-vigil-prompt-text {
  font-size: 13.5px;
  line-height: 1.48;
  color: #f6efe0;
  margin: 0;
}

.elder-vigil-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 2px;
}


/* =========================================================================
   ASHORE OBJECTIVES TRACKER & SURPRISE ACHIEVEMENTS GALLERY / TOASTS
   ========================================================================= */

.walkable-top-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.island-achievements-btn {
  border-color: rgba(231, 181, 99, 0.42);
}

.island-achievements-btn:hover {
  border-color: var(--sand-gold);
  box-shadow: 0 0 16px rgba(231, 181, 99, 0.22);
}

/* Walkable Island Compact Objectives Card (top-left under island button) */
.shore-objectives-card {
  margin-top: 8px;
  width: min(410px, 88vw);
  background: rgba(8, 19, 32, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(231, 181, 99, 0.34);
  border-radius: 14px;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.shore-objectives-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: rgba(231, 181, 99, 0.1);
  border: none;
  border-bottom: 1px solid rgba(231, 181, 99, 0.16);
  color: var(--sand-gold);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.shore-objectives-header:hover {
  background: rgba(231, 181, 99, 0.18);
}

.shore-objectives-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  max-height: 210px;
  overflow-y: auto;
}

.shore-objectives-list,
.hub-content,
.canoe-modal-body,
.walkable-poi-body,
.walkable-poi-popup {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 181, 99, 0.45) rgba(7, 17, 29, 0.55);
}

.shore-objectives-list::-webkit-scrollbar,
.hub-content::-webkit-scrollbar,
.canoe-modal-body::-webkit-scrollbar,
.walkable-poi-body::-webkit-scrollbar,
.walkable-poi-popup::-webkit-scrollbar {
  width: 7px;
}

.shore-objectives-list::-webkit-scrollbar-track,
.hub-content::-webkit-scrollbar-track,
.canoe-modal-body::-webkit-scrollbar-track,
.walkable-poi-body::-webkit-scrollbar-track,
.walkable-poi-popup::-webkit-scrollbar-track {
  background: rgba(7, 17, 29, 0.55);
  border-radius: 999px;
  margin: 4px 0;
}

.shore-objectives-list::-webkit-scrollbar-thumb,
.hub-content::-webkit-scrollbar-thumb,
.canoe-modal-body::-webkit-scrollbar-thumb,
.walkable-poi-body::-webkit-scrollbar-thumb,
.walkable-poi-popup::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(231, 181, 99, 0.52), rgba(201, 134, 54, 0.44));
  border-radius: 999px;
  border: 1.5px solid rgba(7, 17, 29, 0.65);
}

.shore-objectives-list::-webkit-scrollbar-thumb:hover,
.hub-content::-webkit-scrollbar-thumb:hover,
.canoe-modal-body::-webkit-scrollbar-thumb:hover,
.walkable-poi-body::-webkit-scrollbar-thumb:hover,
.walkable-poi-popup::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(244, 200, 120, 0.78), rgba(217, 152, 68, 0.68));
}

/* Classic Island Hub Objectives Strip */
.hub-objectives-strip {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 9px 18px;
  background: rgba(7, 17, 29, 0.72);
  border-bottom: 1px solid rgba(231, 181, 99, 0.24);
  flex-wrap: wrap;
}

.hub-objectives-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand-gold);
  white-space: nowrap;
}

.hub-objectives-items {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.shore-obj-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(14, 30, 48, 0.74);
  border: 1px solid rgba(232, 198, 142, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.shore-obj-item.is-local {
  border-color: rgba(231, 181, 99, 0.55);
  background: rgba(34, 29, 16, 0.56);
}

.shore-obj-item.cargo-ready {
  border-color: rgba(62, 240, 208, 0.58);
}

.shore-obj-bullet {
  font-size: 15px;
  line-height: 1.25;
  flex-shrink: 0;
}

.shore-obj-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shore-obj-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.shore-obj-copy strong {
  font-size: 12.8px;
  color: var(--sand-warm);
  line-height: 1.3;
}

.shore-obj-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(231, 181, 99, 0.18);
  color: #ffe29e;
  white-space: nowrap;
}

.shore-obj-item.cargo-ready .shore-obj-badge {
  background: rgba(62, 240, 208, 0.18);
  color: var(--lapa-jade);
}

.shore-obj-detail {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

@keyframes objSwipeDownIn {
  0% {
    opacity: 0;
    transform: translate3d(0, -18px, 0) scaleY(0.86);
    clip-path: inset(0 0 100% 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scaleY(1);
    clip-path: inset(0 0 0 0);
  }
}

.shore-objectives-card.swipe-in-top,
.shore-obj-item.swipe-in-top {
  transform-origin: top center;
  animation: objSwipeDownIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Cleared Objective Check-Off Flash */
.shore-obj-item.cleared-flash {
  background: linear-gradient(90deg, rgba(24, 68, 58, 0.85), rgba(38, 52, 28, 0.82));
  border-color: var(--lapa-jade);
  animation: objClearedPulse 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.shore-obj-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lapa-jade);
  color: #06221c;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shore-obj-item.cleared-flash strong {
  text-decoration: line-through;
  color: #d7fff4;
}

.shore-obj-cleared-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lapa-jade);
}

@keyframes objClearedPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.4;
  }
  60% {
    transform: scale(1.02);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Global Celebration Banners & Achievements Modal Container */
#achievements-ui {
  position: fixed;
  inset: 0;
  z-index: 72;
  pointer-events: none;
}

.celebration-toast-stack {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 75;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.celebration-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  border-radius: 15px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.62);
  opacity: 0;
  transform: translate3d(-16px, -6px, 0) scale(0.96);
  transition:
    opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.celebration-banner.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.objective-added-banner {
  background: linear-gradient(135deg, rgba(31, 24, 14, 0.95), rgba(12, 26, 42, 0.95));
  border: 1.5px solid rgba(231, 181, 99, 0.8);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.65),
    0 0 22px rgba(231, 181, 99, 0.22);
}

.objective-added-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 224, 152, 0.34), rgba(32, 21, 9, 0.9));
  border: 1px solid rgba(244, 198, 114, 0.72);
  color: #ffe29e;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.objective-added-eyebrow {
  color: #ffd685;
}

.objective-cleared-banner {
  background: linear-gradient(135deg, rgba(11, 38, 36, 0.94), rgba(14, 29, 44, 0.94));
  border: 1.5px solid rgba(62, 240, 208, 0.72);
}

.achievement-unlocked-banner {
  background: linear-gradient(135deg, rgba(36, 25, 11, 0.96), rgba(14, 26, 42, 0.96));
  border: 1.5px solid rgba(244, 201, 118, 0.85);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.68),
    0 0 26px rgba(231, 181, 99, 0.28);
}

.celebration-check-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #5efbe0, #23b99e);
  color: #05201a;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(62, 240, 208, 0.45);
}

.achievement-toast-emblem {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 226, 156, 0.35), rgba(24, 16, 6, 0.88));
  border: 1px solid rgba(245, 204, 124, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.celebration-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.celebration-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.objective-eyebrow {
  color: var(--lapa-jade);
}

.achievement-eyebrow {
  color: #ffd884;
}

.celebration-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff7e6;
  line-height: 1.28;
}

.celebration-desc {
  font-size: 12px;
  color: #dbe6f0;
  line-height: 1.35;
}

.celebration-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--sand-gold);
}

/* Ashore Achievements Gallery Modal */
.achievements-modal-backdrop {
  pointer-events: auto;
}

.achievements-modal-card {
  width: min(860px, 94vw);
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.achievements-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.achievements-modal-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-muted);
}

.achievements-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievements-tally-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ach-tally-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(232, 198, 142, 0.34);
}

.ach-tally-pill.unlocked {
  background: rgba(231, 181, 99, 0.18);
  color: #ffe3a3;
}

.ach-tally-pill.mystery {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.ach-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(232, 198, 142, 0.24);
  background: rgba(8, 19, 31, 0.78);
}

.ach-card.unlocked {
  background: linear-gradient(145deg, rgba(30, 24, 14, 0.72), rgba(11, 24, 38, 0.88));
  border-color: rgba(231, 181, 99, 0.52);
}

.ach-card.mystery {
  opacity: 0.64;
  border-style: dashed;
  background: rgba(7, 15, 25, 0.58);
}

.ach-card-emblem {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(231, 181, 99, 0.14);
  border: 1px solid rgba(231, 181, 99, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  flex-shrink: 0;
}

.ach-card-emblem.mystery-emblem {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(185, 200, 214, 0.24);
  color: var(--text-muted);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ach-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ach-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ach-card-top h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15.5px;
  color: var(--sand-warm);
}

.ach-date-tag {
  font-size: 11.5px;
  color: #ffd98e;
  white-space: nowrap;
}

.ach-card-desc {
  font-size: 12.8px;
  line-height: 1.42;
  color: #d7e3ee;
}

.ach-card-meta {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ach-meta-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(232, 198, 142, 0.22);
  color: var(--sand-warm);
}

/* ============================================================
   Island Hub Pinned Critical-Path CTA Bar
   ============================================================ */

.hub-critical-cta-bar {
  flex-shrink: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(232, 198, 142, 0.22);
}

.hub-critical-cta-btn {
  box-shadow: 0 8px 22px rgba(231, 181, 99, 0.26);
}

/* ============================================================
   Crew Recruitment Splash Popup
   ============================================================ */

.crew-splash-card {
  width: min(440px, 92vw);
  background: radial-gradient(circle at top, rgba(24, 52, 78, 0.96), rgba(9, 20, 33, 0.98));
  border: 1px solid rgba(232, 198, 142, 0.48);
  border-radius: 22px;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.72);
  animation: crewSplashPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes crewSplashPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.crew-splash-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--lapa-jade);
}

.crew-splash-title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  line-height: 1.25;
  color: var(--sand-warm);
}

.crew-splash-role {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffd98e;
}

.crew-splash-portrait-wrap {
  margin: 4px 0;
  width: 196px;
  height: 236px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(232, 198, 142, 0.35);
  background: rgba(6, 15, 25, 0.75);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.crew-splash-portrait-wrap.wide {
  width: min(350px, 82vw);
  height: 220px;
}

.crew-splash-portrait-wrap.wide .crew-splash-portrait {
  object-position: center center;
}

.crew-splash-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.crew-splash-trait {
  margin: 2px 0 6px;
  font-size: 14px;
  line-height: 1.48;
  color: #e4edf5;
  max-width: 36ch;
}

.crew-splash-actions {
  width: 100%;
  margin-top: 2px;
}

/* -------------------------------------------------------------------------- */
/* First-Time Shore Onboarding Tour (Lightweight Coachmark Overlay)           */
/* -------------------------------------------------------------------------- */

.onboarding-tour-layer {
  position: fixed;
  inset: 0;
  z-index: 640;
  overflow: hidden;
  pointer-events: auto;
}

.onboarding-tour-layer.onboarding-interactive {
  pointer-events: none;
}

.onboarding-tour-layer.onboarding-no-backdrop .onboarding-spotlight {
  box-shadow:
    0 0 0 2px #f4d35e,
    0 0 24px rgba(244, 211, 94, 0.55);
}

.onboarding-tour-layer.onboarding-no-backdrop .onboarding-spotlight.no-target {
  box-shadow: none;
}

.onboarding-spotlight {
  position: fixed;
  z-index: 641;
  border-radius: 10px;
  pointer-events: none;
  box-shadow:
    0 0 0 9999px rgba(4, 9, 16, 0.64),
    0 0 0 2px #f4d35e,
    0 0 20px rgba(244, 211, 94, 0.35);
  transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.onboarding-spotlight.no-target {
  box-shadow: 0 0 0 9999px rgba(4, 9, 16, 0.64);
}

.onboarding-card {
  position: fixed;
  z-index: 642;
  width: min(390px, calc(100vw - 28px));
  padding: 17px 20px;
  border-radius: 13px;
  background: rgba(11, 23, 34, 0.94);
  border: 1.5px solid rgba(244, 211, 94, 0.65);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  color: #f4efe6;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.onboarding-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.onboarding-card-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #f4d35e;
}

.onboarding-skip-btn {
  background: transparent;
  border: none;
  color: rgba(244, 239, 230, 0.68);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 7px;
}

.onboarding-skip-btn:hover {
  color: #f4efe6;
  background: rgba(255, 255, 255, 0.08);
}

.onboarding-card-body {
  margin: 0 0 15px;
  font-size: 20px;
  line-height: 1.42;
  color: #e4edf5;
}

.onboarding-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.onboarding-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.onboarding-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(244, 239, 230, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.onboarding-dot.done {
  background: rgba(244, 211, 94, 0.55);
}

.onboarding-dot.active {
  background: #f4d35e;
  transform: scale(1.25);
}

.onboarding-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-actions .small-btn {
  font-size: 19px;
  padding: 7px 14px;
}

.onboarding-highlight {
  outline: 2px solid #f4d35e !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(244, 211, 94, 0.24), 0 0 18px rgba(244, 211, 94, 0.35) !important;
}

.onboarding-highlight-pulse {
  animation: onboardingSteerPulse 1.15s ease-in-out infinite;
}

@keyframes onboardingSteerPulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(244, 211, 94, 0.32), 0 0 18px rgba(244, 211, 94, 0.45);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(244, 211, 94, 0.55), 0 0 28px rgba(244, 211, 94, 0.85);
  }
}

.lost-map-wrap {
  margin: 12px 0 14px;
  display: flex;
  justify-content: center;
}

.lost-route-canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(232, 198, 142, 0.32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  display: block;
}

.lost-mist-actions {
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Walk Shore Virtual Analog Thumbstick (Bottom-Right on Touch)
   ============================================================ */

.walkable-hint-touch,
.shore-hint-touch,
.vigil-hint-touch {
  display: none;
}

.walkable-thumbstick-pad {
  display: none;
  position: fixed;
  right: max(22px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 14px));
  width: 120px;
  height: 120px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 16;
}

.walkable-thumbstick-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(9, 21, 35, 0.42) 0%, rgba(9, 21, 35, 0.72) 100%);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(231, 181, 99, 0.38);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.44),
    inset 0 0 18px rgba(231, 181, 99, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.walkable-thumbstick-pad.active .walkable-thumbstick-ring {
  border-color: rgba(231, 181, 99, 0.78);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.54),
    0 0 18px rgba(231, 181, 99, 0.22),
    inset 0 0 20px rgba(231, 181, 99, 0.14);
}

.walkable-thumbstick-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #f4cf86 0%, #c98636 100%);
  border: 1.5px solid rgba(255, 241, 208, 0.75);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transform: translate3d(0, 0, 0);
  will-change: transform;
  pointer-events: none;
}

@media (pointer: coarse), (hover: none) {
  .walkable-thumbstick-pad {
    display: flex;
  }
  .walkable-hint-desktop,
  .shore-hint-desktop,
  .vigil-hint-desktop {
    display: none;
  }
  .walkable-hint-touch,
  .shore-hint-touch,
  .vigil-hint-touch {
    display: inline;
  }
}

#walkable-island-ui.touch-detected .walkable-thumbstick-pad {
  display: flex;
}

#walkable-island-ui.touch-detected .walkable-hint-desktop,
#island-hub.touch-detected .shore-hint-desktop,
#sky-vigil-ui.touch-detected .vigil-hint-desktop {
  display: none;
}

#walkable-island-ui.touch-detected .walkable-hint-touch,
#island-hub.touch-detected .shore-hint-touch,
#sky-vigil-ui.touch-detected .vigil-hint-touch {
  display: inline;
}

/* =========================================================================
   RESPONSIVE PHONE ADAPTATIONS (PORTRAIT <= 540px & SHORT LANDSCAPE <= 500px)
   Desktop & iPad (> 540px wide AND > 500px tall) keep original layout/FABs.
   ========================================================================= */

@media (max-width: 600px), (max-height: 500px) {
  .settings-diff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vigil-controls-collapse-btn {
    display: flex;
  }

  .vigil-controls-card.collapsed {
    padding: 9px 13px;
  }

  .vigil-controls-card.collapsed .vigil-controls-body {
    display: none;
  }

  .vigil-controls-card .vigil-time-header .vigil-eyebrow {
    display: none;
  }

  .walkable-reopen-pill {
    align-self: flex-start;
    max-width: calc(100vw - 134px);
    font-size: 12.5px;
    padding: 8px 14px;
    text-align: left;
  }

  .hud-trim-bar {
    gap: 12px;
    padding: 7px 12px;
  }

  .trim-btn {
    min-width: 56px;
    height: 42px;
    padding: 0 16px;
  }

  .trim-btn svg {
    width: 21px;
    height: 21px;
  }

  .onboarding-card {
    width: min(310px, calc(100vw - 20px));
    padding: 12px 14px;
    border-radius: 12px;
  }

  .onboarding-card-head {
    margin-bottom: 5px;
  }

  .onboarding-card-title {
    font-size: 16px;
  }

  .onboarding-skip-btn {
    font-size: 13px;
    padding: 2px 6px;
  }

  .onboarding-card-body {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.38;
  }

  .onboarding-actions .small-btn {
    font-size: 13.5px;
    padding: 5px 11px;
  }
}

@media (max-width: 540px), (max-height: 500px) and (orientation: landscape) {
  /* Phone-only Top-Left 40x40 Dock: Vaka, Walk, Objectives */
  .shore-canoe-fab {
    top: max(10px, env(safe-area-inset-top, 0px));
    bottom: auto;
    left: max(10px, env(safe-area-inset-left, 0px));
    width: 40px;
    height: 40px;
    padding: 2px !important;
    border-radius: 12px;
  }

  .shore-canoe-fab img,
  .shore-walk-fab img {
    border-radius: 9px;
  }

  .shore-walk-fab {
    top: max(10px, env(safe-area-inset-top, 0px));
    bottom: auto;
    left: calc(max(10px, env(safe-area-inset-left, 0px)) + 46px);
    width: 40px;
    height: 40px;
    padding: 2px !important;
    border-radius: 12px;
  }

  .island-settings-btn.shore-objectives-fab:not(.hidden) {
    display: inline-flex;
    top: max(10px, env(safe-area-inset-top, 0px));
    bottom: auto;
    left: calc(max(10px, env(safe-area-inset-left, 0px)) + 92px);
  }

  .shore-walk-fab.hidden + .island-settings-btn.shore-objectives-fab:not(.hidden) {
    left: calc(max(10px, env(safe-area-inset-left, 0px)) + 46px);
  }

  /* Hide inline Objectives & Diorama Reset View button on phone */
  #hubObjectivesCard,
  #walkObjectivesCard,
  .shore-reset-orbit-btn {
    display: none !important;
  }

  /* Phone-only collapsible Island Hub drawer (slid from header down to CTA bar) */
  .island-hub-shell.drawer-animating {
    transition:
      height 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      max-height 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .hub-header {
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  .hub-header::before {
    content: '';
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(232, 198, 142, 0.48);
    align-self: center;
    margin-bottom: 4px;
    flex-shrink: 0;
  }

  .island-hub-shell.hub-drawer-collapsed .hub-poi-tabs,
  .island-hub-shell.hub-drawer-collapsed .hub-content {
    display: none !important;
  }

  .island-hub-shell.hub-drawer-collapsed .hub-critical-cta-bar {
    margin-top: 8px;
    padding-top: 8px;
  }

  /* Walk Shore phone framing & compact analog thumbstick */
  .walkable-shore-shell {
    padding:
      calc(max(10px, env(safe-area-inset-top, 0px)) + 48px)
      max(12px, env(safe-area-inset-right, 0px))
      max(12px, calc(env(safe-area-inset-bottom, 0px) + 8px))
      max(12px, env(safe-area-inset-left, 0px));
  }

  .walkable-thumbstick-pad {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 6px));
    width: 98px;
    height: 98px;
  }

  .walkable-thumbstick-ring {
    width: 92px;
    height: 92px;
  }

  .walkable-thumbstick-knob {
    width: 38px;
    height: 38px;
  }

  #walkable-island-ui.poi-popup-open .walkable-thumbstick-pad {
    display: none !important;
  }

  .walkable-poi-popup {
    width: min(520px, calc(100vw - 20px));
    max-height: min(62dvh, 430px);
    padding: 12px 14px;
    border-radius: 15px;
  }

  /* Phone-only: single cycling eye camera button in Sailing HUD on one row */
  #btnFreeLook,
  #btnLookZenith {
    display: none !important;
  }

  .hud-top-bar {
    align-items: center;
    gap: 8px;
  }

  .hud-voyage-badge {
    min-width: 0;
    flex: 0 1 auto;
    padding: 6px 10px;
    gap: 7px;
  }

  .hud-song-title {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hud-corner-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    flex-shrink: 0;
  }

  .hud-corner-controls .hud-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }

  /* Compact Sailing HUD */
  .hud-chant-banner {
    padding: 7px 12px;
    margin-top: 5px;
    border-radius: 12px;
  }

  .chant-lyrics {
    font-size: 14px;
    line-height: 1.35;
  }

  .chant-easy-hint {
    font-size: 11.5px;
    margin-top: 5px;
    padding-top: 5px;
  }

  /* Phone-only Sky Vigil: remove controls card, aggressive Guided bar, collapsible Atlas drawer */
  #vigilControlsCard {
    display: none !important;
  }

  #sky-vigil-ui {
    padding:
      max(8px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      max(10px, calc(env(safe-area-inset-bottom, 0px) + 4px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .vigil-top-bar {
    padding: 6px 10px;
    gap: 6px 8px;
    border-radius: 12px;
  }

  .vigil-ring-eyebrow {
    display: none;
  }

  .vigil-ring-title {
    font-size: 13.5px;
  }

  .vigil-mode-tabs {
    padding: 2px;
    gap: 2px;
  }

  .vigil-mode-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .vigil-exit-btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  .vigil-bottom-deck {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .vigil-main-card {
    padding: 10px 13px;
    max-height: min(56dvh, 420px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .vigil-main-card.vigil-drawer-animating {
    transition:
      height 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      max-height 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .vigil-main-card:not(.vigil-mode-guided) .vigil-drawer-handle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
  }

  .vigil-drawer-grip {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(232, 198, 142, 0.48);
    align-self: center;
  }

  .vigil-drawer-handle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .vigil-drawer-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sand-warm);
  }

  .vigil-drawer-chev {
    font-size: 13px;
    color: var(--sand-gold);
  }

  .vigil-main-card.vigil-drawer-collapsed {
    padding: 7px 14px 9px;
  }

  .vigil-main-card.vigil-drawer-collapsed .vigil-pane {
    display: none !important;
  }

  .vigil-main-card:not(.vigil-mode-guided) .vigil-pane {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid rgba(232, 198, 142, 0.16);
    gap: 8px;
  }

  /* Guided Sky Vigil on phone: ONLY step-dots and gold Next button */
  .vigil-main-card.vigil-mode-guided {
    width: fit-content;
    max-width: 100%;
    justify-self: center;
    padding: 7px 14px;
    border-radius: 999px;
  }

  #vigilPaneGuided {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
  }

  #btnVigilEnlargeGuidedMentor,
  #vigilGuidedTitle,
  #vigilGuidedByline,
  #vigilGuidedSpeech,
  #vigilGuidedHint,
  #vigilGuidedStatusBadge,
  #btnVigilGuidedReframe,
  #btnVigilGuidedPrev {
    display: none !important;
  }

  #vigilPaneGuided .vigil-action-bar {
    border-top: none;
    padding-top: 0;
  }

  /* Free Observation (Atlas) on phone: omit explanatory text paragraph */
  #vigilAtlasNote,
  #vigilPaneAtlas .vigil-drag-tip {
    display: none !important;
  }

  #vigilPaneAtlas .vigil-atlas-header {
    display: none;
  }
}

@media (max-width: 520px) {
  .mentor-portrait-panel {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .mentor-portrait-frame {
    width: 92px;
    flex-shrink: 0;
  }

  .mentor-fullbody-img {
    max-height: 118px;
  }

  .mentor-portrait-caption {
    text-align: left;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  /* Side-by-side compact Hub drawer on landscape phones */
  .shore-stage-layout {
    flex-direction: row;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 10px;
  }

  .island-hub-shell {
    align-self: flex-end;
    width: min(46vw, 410px);
    min-width: 260px;
    margin-top: 48px;
    height: auto;
    max-height: calc(100% - 48px);
    padding: 10px 12px 12px;
  }

  .vigil-main-card {
    padding: 9px 13px;
    max-height: min(68dvh, 270px);
  }

  .walkable-poi-popup {
    max-height: min(74dvh, 330px);
  }
}
