:root {
  --ink: #10272b;
  --muted: #5f7376;
  --line: rgba(16, 39, 43, 0.13);
  --paper: #ffffff;
  --mist: #f5f8f8;
  --teal: #0d747d;
  --teal-dark: #0b3d42;
  --gold: #c99c52;
  --gold-soft: #efd39a;
  --coral: #d8624c;
  --night: #101419;
  --night-2: #171a21;
  --night-3: #20232b;
  --cream: #fff5dc;
  --shadow: 0 18px 48px rgba(13, 50, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.orientation-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: 10px clamp(16px, 4vw, 48px);
  backdrop-filter: blur(18px);
}

.logo-lockup img {
  display: block;
  width: 168px;
  max-width: 45vw;
  height: auto;
}

.orientation-topbar nav,
.section-actions,
.media-links,
.editor-actions,
.place-actions,
.album-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orientation-topbar nav a,
.orientation-topbar nav button,
.section-actions a,
.section-actions button,
.media-links a,
.media-links button,
.orientation-footer a,
.manager-pin-form button,
.settings-form button,
.place-actions a,
.place-actions button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
}

.orientation-topbar nav button,
.section-actions button,
.media-links button,
.place-actions button,
.manager-pin-form button,
.settings-form button {
  appearance: none;
}

.map-topbar {
  min-height: 58px;
  justify-content: center;
  padding: 8px clamp(10px, 3vw, 28px);
}

.map-topbar nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  width: min(520px, 100%);
}

.map-topbar nav a,
.map-topbar nav button {
  min-height: 40px;
  padding-inline: 10px;
}

.map-page-shell {
  width: 100%;
  margin: 0;
}

.orientation-topbar nav a:hover,
.orientation-topbar nav button:hover,
.section-actions a:hover,
.section-actions button:hover,
.orientation-footer a:hover {
  border-color: rgba(13, 116, 125, 0.42);
  color: var(--teal);
}

.orientation-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px) 0 34px;
}

.orientation-section,
.map-section,
.manager-panel {
  margin-bottom: 30px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.section-heading-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.section-heading p,
.manager-group-head p {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  line-height: 1;
  letter-spacing: 0;
}

.album-player {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  border: 1px solid rgba(201, 156, 82, 0.62);
  border-radius: 8px;
  padding: clamp(12px, 2vw, 18px);
  background:
    linear-gradient(150deg, rgba(13, 116, 125, 0.28), rgba(201, 156, 82, 0.12) 42%, rgba(255, 255, 255, 0)),
    var(--night);
  color: var(--cream);
  box-shadow:
    0 26px 62px rgba(4, 12, 15, 0.28),
    inset 0 1px 0 rgba(255, 245, 220, 0.1);
}

.album-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(239, 211, 154, 0.56);
  border-radius: 8px;
  background: #020a0c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.album-video,
.album-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #020a0c;
}

.album-video[hidden],
.album-image[hidden] {
  display: none !important;
}

.album-video {
  cursor: pointer;
  z-index: 1;
}

.album-image {
  z-index: 0;
}

.album-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.04) 28%, rgba(0, 0, 0, 0.66)),
    radial-gradient(circle at 50% 46%, rgba(201, 156, 82, 0.18), transparent 52%);
}

.album-top-controls {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
}

.album-top-controls button,
.stage-nav {
  min-height: 46px;
  border: 1px solid rgba(239, 211, 154, 0.55);
  border-radius: 8px;
  background: rgba(13, 13, 15, 0.78);
  color: var(--gold-soft);
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.album-top-controls button {
  min-width: 70px;
  padding: 0 16px;
}

.album-top-controls #infoToggle {
  min-width: 46px;
  padding: 0;
}

.stage-caption {
  position: absolute;
  top: 18px;
  left: 108px;
  right: 18px;
  z-index: 3;
  margin: 0;
  color: rgba(255, 245, 220, 0.82);
  font-size: clamp(0.74rem, 1.2vw, 0.9rem);
  font-weight: 850;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0;
}

.stage-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  padding: 0;
  transform: translateY(-50%);
  color: #fff7db;
  font-size: 2rem;
}

.stage-nav-prev {
  left: 14px;
}

.stage-nav-next {
  right: 14px;
}

.lyrics-panel {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  max-height: 32%;
  overflow: auto;
  border: 1px solid rgba(239, 211, 154, 0.38);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(7, 12, 14, 0.82);
  color: rgba(255, 245, 220, 0.9);
  backdrop-filter: blur(14px);
}

.lyrics-panel p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.48;
}

.album-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: clamp(4px, 1.2vw, 10px);
}

.album-lockup {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.album-lockup img {
  width: 104px;
  height: 104px;
  border: 1px solid rgba(239, 211, 154, 0.38);
  border-radius: 8px;
  object-fit: cover;
  background: #080f11;
}

.album-lockup p,
.selected-track p {
  margin: 0 0 5px;
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.album-lockup h2,
.selected-track h3 {
  margin: 0;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.album-lockup h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
}

.album-lockup span,
.selected-track span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 245, 220, 0.78);
  font-size: clamp(1rem, 1.8vw, 1.24rem);
  line-height: 1.45;
}

.selected-track {
  border: 1px solid rgba(201, 156, 82, 0.34);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.selected-track h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

.audio-shell {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(239, 211, 154, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 211, 154, 0.18), rgba(13, 116, 125, 0.16)),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 220, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.audio-shell audio {
  display: block;
  width: 100%;
  min-height: 42px;
  accent-color: var(--gold);
}

.custom-player {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 14px;
  min-height: 52px;
}

.custom-player button {
  min-height: 44px;
  border: 1px solid rgba(239, 211, 154, 0.78);
  border-radius: 8px;
  background: linear-gradient(135deg, #d5a44f, #ffe2a2);
  color: #17110a;
  box-shadow: 0 12px 26px rgba(201, 156, 82, 0.24);
  font-weight: 950;
}

.custom-player input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--gold);
}

.custom-player input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 245, 220, 0.18);
}

.custom-player input[type="range"]::-webkit-slider-thumb {
  margin-top: -5px;
}

.custom-player span {
  min-width: 88px;
  color: rgba(255, 245, 220, 0.86);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: right;
}

#audioStatus,
.map-status,
.status-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.35;
}

#audioStatus {
  color: rgba(255, 245, 220, 0.72);
}

.map-status {
  display: none;
}

#audioStatus[data-tone="notice"],
.map-status[data-tone="notice"],
.status-message[data-tone="notice"] {
  color: var(--gold);
}

#audioStatus[data-tone="error"],
.map-status[data-tone="error"],
.status-message[data-tone="error"] {
  color: var(--coral);
}

.media-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-links a,
.media-links button {
  border-color: rgba(201, 156, 82, 0.62);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
}

.media-links button:nth-child(2) {
  background: linear-gradient(135deg, #d5a44f, #ffe2a2);
  color: #1b160d;
}

.media-links a[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.track-list {
  display: grid;
  gap: 10px;
}

.track-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  border: 1px solid rgba(201, 156, 82, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  text-align: left;
}

.track-row.active {
  border-color: rgba(201, 156, 82, 0.8);
  background: rgba(201, 156, 82, 0.13);
}

.track-row span {
  color: var(--gold-soft);
  font-weight: 900;
}

.track-row strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
}

.track-row em {
  grid-column: 2 / 3;
  color: rgba(255, 245, 220, 0.75);
  font-style: normal;
  line-height: 1.24;
}

.track-row small {
  grid-column: 3 / 4;
  grid-row: 1 / span 2;
  color: var(--gold-soft);
  font-size: 0.88rem;
  font-weight: 900;
}

.map-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  scroll-margin-top: 94px;
}

.map-section-fullscreen {
  width: 100%;
  margin-left: 0;
  scroll-margin-top: 58px;
}

.guest-map-shell {
  position: relative;
  min-height: min(76vh, 720px);
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.35);
  background: #0d2425;
}

.map-page .guest-map-shell {
  height: calc(100svh - 58px);
  min-height: 520px;
  border: 0;
}

.boater-map {
  position: absolute;
  inset: 0;
  min-height: 100%;
  overflow: hidden;
  background: #0d2425;
}

.map-empty {
  position: relative;
  display: grid;
  min-height: min(76vh, 720px);
  place-items: center;
  padding: 24px;
  color: #fff;
  font-weight: 850;
  text-align: center;
}

.map-fallback-panel {
  background:
    linear-gradient(180deg, rgba(4, 22, 24, 0.4), rgba(4, 22, 24, 0.74)),
    radial-gradient(circle at 50% 30%, rgba(201, 156, 82, 0.18), transparent 44%),
    #102f34;
}

.map-fallback-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d2425;
}

.map-fallback-panel > div {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: start;
  display: grid;
  width: min(460px, calc(100vw - 28px));
  max-height: min(46vh, 360px);
  overflow: auto;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  color: var(--ink);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.map-fallback-panel strong {
  font-size: 1.1rem;
}

.map-fallback-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.map-fallback-list {
  display: grid;
  gap: 8px;
}

.map-fallback-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
}

.map-fallback-list b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
}

.guest-map-top {
  position: absolute;
  bottom: clamp(10px, 2vw, 18px);
  left: clamp(10px, 3vw, 28px);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  pointer-events: none;
}

.map-manager-button,
.map-nav-panel {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  background: rgba(244, 244, 238, 0.9);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(1.12);
}

.map-manager-button {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.42);
  padding: 0 16px;
  background: rgba(13, 39, 43, 0.94);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0;
  pointer-events: auto;
}

.map-nav-panel {
  position: absolute;
  top: clamp(10px, 2vw, 18px);
  left: clamp(10px, 3vw, 28px);
  right: clamp(10px, 3vw, 28px);
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 7px;
  background: rgba(248, 250, 247, 0.86);
  box-shadow:
    0 18px 40px rgba(5, 22, 28, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.map-nav-panel.collapsed {
  right: clamp(10px, 3vw, 28px);
  width: auto;
}

.map-nav-panel.collapsed .place-list,
.map-nav-panel.collapsed .map-status {
  display: none;
}

.map-control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 106px;
}

.map-control-row button,
.map-category-row button,
.place-chip {
  min-height: 34px;
  border: 1px solid rgba(16, 39, 43, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow:
    0 6px 14px rgba(5, 22, 28, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.map-category-row,
.place-list {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.map-category-row::-webkit-scrollbar,
.place-list::-webkit-scrollbar {
  display: none;
}

.map-category-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 11px;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.map-category-row button.active {
  background: linear-gradient(135deg, #0b6d75, #10878c);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow:
    0 10px 20px rgba(13, 116, 125, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.map-category-row span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 39, 43, 0.08);
  color: inherit;
  font-size: 0.72rem;
}

.map-category-row button.active span {
  background: rgba(255, 255, 255, 0.22);
}

.place-list {
  grid-column: 1 / -1;
  padding-bottom: 2px;
}

.place-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  flex: 0 0 clamp(150px, 17vw, 218px);
  padding: 0 6px 0 10px;
  text-align: left;
}

.place-chip.active {
  border-color: rgba(13, 116, 125, 0.5);
  background: #0d747d;
  color: #fff;
}

.place-chip b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(13, 116, 125, 0.12);
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 950;
}

.place-chip.active b {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.place-chip span {
  overflow: visible;
  font-size: clamp(0.86rem, 1.4vw, 0.98rem);
  line-height: 1.05;
  white-space: normal;
}

.place-chip em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 8px;
  padding: 3px 8px;
  background: rgba(16, 39, 43, 0.08);
  color: rgba(16, 39, 43, 0.7);
  font-style: normal;
  font-size: 0.74rem;
}

.place-chip.active em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.map-status {
  grid-column: 1 / -1;
  color: rgba(16, 39, 43, 0.76);
}

.map-place-detail {
  position: absolute;
  right: clamp(14px, 4vw, 52px);
  bottom: clamp(14px, 4vw, 40px);
  z-index: 5;
  width: min(360px, calc(100% - 28px));
  max-height: calc(100% - 190px);
  overflow: auto;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.map-info {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.map-info img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(42vh, 360px);
  border-radius: 8px;
  object-fit: contain;
  background: var(--mist);
}

.map-thumb-marker {
  --marker-accent: #2f6287;
  --marker-lift-y: 0px;
  --marker-shift-x: 0px;
  --marker-stem-angle: 0deg;
  --marker-stem-height: 20px;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 80px;
  justify-content: center;
  overflow: visible;
  padding: 0;
  position: relative;
  touch-action: none;
  user-select: none;
  width: 58px;
}

.map-thumb-marker::before,
.map-thumb-marker::after {
  content: none;
}

.map-thumb-marker .marker-stem {
  position: absolute;
  bottom: 7px;
  left: 50%;
  z-index: 0;
  width: 3px;
  height: var(--marker-stem-height);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 9px rgba(5, 22, 28, 0.24);
  transform: translateX(-50%) rotate(var(--marker-stem-angle));
  transform-origin: 50% 100%;
}

.map-thumb-marker .marker-point {
  position: absolute;
  bottom: 1px;
  left: 50%;
  z-index: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.45),
    0 5px 10px rgba(5, 22, 28, 0.24);
  transform: translateX(-50%);
}

.map-thumb-marker .marker-thumb {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 3px solid #fff;
  border-radius: 999px;
  background:
    linear-gradient(rgba(47, 98, 135, 0.95), rgba(47, 98, 135, 0.95)),
    var(--marker-accent);
  box-shadow:
    0 8px 22px rgba(5, 22, 28, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transform: translate(calc(-50% + var(--marker-shift-x)), var(--marker-lift-y));
  transition: box-shadow 160ms ease;
}

.map-thumb-marker.has-image .marker-thumb {
  background: var(--marker-image) center / cover;
}

.map-thumb-marker .marker-label {
  align-items: center;
  background: rgba(238, 248, 248, 0.98);
  border: 2px solid #fff;
  border-radius: 9px;
  box-shadow: 0 6px 14px rgba(5, 22, 28, 0.22);
  color: var(--teal);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 950;
  height: 24px;
  justify-content: center;
  line-height: 1;
  width: 24px;
  position: absolute;
  bottom: 58px;
  left: 50%;
  z-index: 3;
  transform: translate(calc(-50% + var(--marker-shift-x)), var(--marker-lift-y));
  transition: background 160ms ease;
}

.map-thumb-marker.move-armed .marker-label {
  background: var(--gold);
  border-color: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.map-thumb-marker.move-armed .marker-thumb {
  box-shadow:
    0 0 0 5px rgba(193, 154, 82, 0.32),
    0 12px 26px rgba(5, 22, 28, 0.36);
}

.map-thumb-marker.dragging {
  --marker-lift-y: 0px;
  --marker-shift-x: 0px;
  --marker-stem-angle: 0deg;
  --marker-stem-height: 20px;
  cursor: grabbing;
}

.map-thumb-marker.dragging .marker-label {
  background: #fff7dd;
  color: #6f5422;
}

.map-thumb-marker.dragging .marker-thumb {
  box-shadow:
    0 0 0 6px rgba(13, 116, 125, 0.28),
    0 16px 30px rgba(5, 22, 28, 0.4);
}

.map-thumb-marker.overlap-offset .marker-stem {
  width: 3px;
  opacity: 0.98;
}

.map-thumb-marker.map-overlay-marker {
  position: absolute;
  transform: translate(-50%, -100%);
}

.map-detail-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(16, 39, 43, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.map-info-body {
  display: grid;
  gap: 8px;
}

.map-info p,
.map-info span,
.map-info em {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.map-info p {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

.map-info strong {
  display: block;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.1;
}

.map-info em {
  font-style: normal;
  font-weight: 850;
}

.map-info-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.map-info-actions a,
.map-info-actions button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(13, 116, 125, 0.28);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.map-info-actions button {
  background: var(--teal);
  color: #fff;
}

.manager-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--mist);
}

.manager-pin-form,
.settings-form {
  display: grid;
  gap: 14px;
}

.manager-pin-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.manager-pin-form label,
.settings-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.manager-pin-form input,
.settings-form input,
.settings-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.settings-form textarea {
  resize: vertical;
}

.manager-pin-form button,
.settings-form button {
  border-color: rgba(13, 116, 125, 0.45);
  background: var(--teal);
  color: #fff;
}

.manager-group {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.manager-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manager-button-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.manager-group-head h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.1;
}

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

.category-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--mist);
}

.category-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.category-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.category-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.map-manager-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.manager-place-list button {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--mist);
  color: var(--ink);
  text-align: left;
}

.manager-place-list button.active {
  border-color: rgba(13, 116, 125, 0.45);
  background: rgba(13, 116, 125, 0.08);
}

.manager-place-list strong {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.manager-place-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.place-image-upload span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
}

.place-image-upload input[type="file"] {
  background: #edf7fa;
  border: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  min-height: 48px;
}

.place-image-preview {
  align-self: end;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.place-image-preview img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.place-image-preview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0 10px 10px;
}

.gps-code-field output {
  display: flex;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf9;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0 12px;
  overflow-wrap: anywhere;
}

.place-editor {
  display: grid;
  gap: 12px;
}

.manager-place-list {
  display: grid;
  gap: 10px;
}

.inline-field {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.inline-field input {
  width: auto;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-actions button {
  min-height: 42px;
  flex: 1 1 142px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

#removePlaceButton {
  flex-basis: 100%;
  border-color: rgba(216, 98, 76, 0.4);
  background: #fff;
  color: var(--coral);
}

#useMapCenterButton,
#refreshPlaceMapLinkButton,
#measurePlaceButton,
#copyPlaceGpsButton {
  border-color: rgba(201, 156, 82, 0.55);
  background: #fff;
  color: #7c5b22;
}

.status-message {
  grid-column: 1 / -1;
  color: var(--coral);
}

.orientation-footer {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding: 24px 18px 40px;
}

.orientation-footer a {
  border-color: rgba(216, 98, 76, 0.38);
}

@media (max-width: 980px) {
  .album-player,
  .map-manager-grid {
    grid-template-columns: 1fr;
  }

  .album-stage {
    min-height: min(68vh, 620px);
  }
}

@media (max-width: 740px) {
  .orientation-topbar {
    align-items: center;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 8px 12px 10px;
  }

  .logo-lockup img {
    width: 142px;
    max-width: 60vw;
  }

  .orientation-topbar nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .orientation-topbar nav a,
  .orientation-topbar nav button {
    width: 100%;
    padding-inline: 8px;
  }

  .map-topbar {
    flex-direction: row;
    min-height: 56px;
    padding: 8px;
  }

  .map-topbar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-page .guest-map-shell {
    height: calc(100svh - 56px);
    min-height: 500px;
  }

  .orientation-shell {
    width: min(100% - 24px, 1220px);
  }

  .album-player {
    padding: 10px;
  }

  .album-stage {
    height: min(64vh, 560px);
    min-height: 420px;
    aspect-ratio: auto;
  }

  .stage-caption {
    left: 14px;
    top: 70px;
    right: 14px;
  }

  .lyrics-panel {
    max-height: 36%;
  }

  .album-lockup {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .album-lockup img {
    width: 84px;
    height: 84px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .media-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .track-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .track-row small {
    grid-column: 2;
    grid-row: auto;
  }

  .guest-map-shell,
  .map-empty {
    min-height: min(66vh, 560px);
  }

  .guest-map-top {
    top: auto;
    bottom: 8px;
    left: 8px;
    right: auto;
  }

  .map-manager-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .map-nav-panel {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 6px;
  }

  .map-control-row button,
  .map-category-row button,
  .place-chip {
    min-height: 34px;
  }

  .place-chip {
    flex-basis: min(64vw, 230px);
  }

  .map-place-detail {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(96px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(56dvh, 500px);
    overflow: auto;
    overscroll-behavior: contain;
    z-index: 50;
  }

  .map-info {
    gap: 7px;
    padding: 10px;
  }

  .map-info img {
    max-height: min(21dvh, 160px);
  }

  .map-detail-close {
    position: sticky;
    top: 0;
    right: auto;
    justify-self: end;
    margin-bottom: -42px;
    width: 38px;
    height: 38px;
  }

  .map-info-body {
    gap: 6px;
  }

  .map-info strong {
    font-size: 1.04rem;
  }

  .map-info span,
  .map-info em {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .map-info-actions {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 2px;
    background: transparent;
  }

  .map-info-actions a,
  .map-info-actions button {
    min-height: 40px;
    padding: 7px 6px;
  }

  .manager-pin-form,
  .manager-group-head {
    grid-template-columns: 1fr;
  }

  .manager-pin-form,
  .manager-group-head,
  .editor-actions {
    display: grid;
  }
}

@media (max-width: 430px) {
  .orientation-shell {
    width: min(100% - 18px, 1220px);
  }

  .album-stage {
    min-height: 380px;
  }

  .stage-nav {
    width: 46px;
    height: 46px;
  }

  .album-top-controls button {
    min-width: 60px;
  }

  .custom-player {
    grid-template-columns: 1fr;
  }

  .custom-player span {
    min-width: 0;
    text-align: left;
  }

  .guest-map-top {
    right: auto;
  }

  .map-nav-panel {
    left: 8px;
    right: 8px;
    grid-template-columns: 1fr;
    padding: 6px;
  }

  .map-info-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-page .map-category-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0;
    scroll-padding-inline: 6px;
  }

  .map-page .map-category-row button {
    justify-content: center;
    min-height: 34px;
    gap: 4px;
    padding: 0 9px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .map-page .map-category-row span {
    min-width: 18px;
    height: 18px;
    font-size: 0.68rem;
  }
}
