body[data-ui="embed-compact"] {
  --embed-bg: #071019;
  --embed-panel: rgba(12, 24, 36, 0.92);
  --embed-panel-soft: rgba(15, 28, 42, 0.82);
  --embed-line: rgba(151, 174, 196, 0.14);
  --embed-text: #f4f8ff;
  --embed-muted: #95a6bc;
  background:
    radial-gradient(circle at top, rgba(39, 103, 189, 0.14), transparent 34%),
    linear-gradient(180deg, #06111a 0%, var(--embed-bg) 100%);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .app {
  display: none;
}

.main-menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #071019;
  overflow: hidden;
}

.main-menu[hidden] {
  display: none;
}

.main-menu-media picture,
.main-menu-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.main-menu-media img {
  object-fit: cover;
}

.menu-hotspot {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0);
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.menu-hotspot:hover {
  background: rgba(255, 255, 255, 0.08);
  filter: none;
}

.menu-hotspot:active {
  transform: none;
}

.menu-hotspot:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.92);
  outline-offset: 3px;
}

.menu-hotspot-inner {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.2vw, 18px);
  min-width: 0;
  padding-inline: clamp(10px, 2.2vw, 18px);
  overflow: hidden;
  border-radius: clamp(18px, 3vw, 24px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(44, 27, 5, 0.18);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    0 8px 0 rgba(164, 94, 8, 0.95),
    0 12px 22px rgba(0, 0, 0, 0.18);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.menu-hotspot:hover,
.menu-hotspot:active {
  background: transparent;
}

.menu-hotspot:hover .menu-hotspot-inner {
  filter: brightness(1.03);
}

.menu-hotspot:active .menu-hotspot-inner {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 6px 0 rgba(164, 94, 8, 0.95),
    0 8px 14px rgba(0, 0, 0, 0.16);
}

.menu-hotspot:focus-visible {
  outline-color: rgba(255, 234, 160, 0.98);
  outline-offset: 4px;
}

.menu-hotspot-label {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-start .menu-hotspot-inner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(180deg, #ffd25f 0%, #ffbc3b 58%, #f3a81f 100%);
  color: #5a3107;
  font-size: clamp(24px, 5vw, 34px);
}

.menu-select .menu-hotspot-inner,
.menu-settings .menu-hotspot-inner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #587391 0%, #3f5873 50%, #2f455c 100%);
  color: #f4f7fb;
  text-shadow: 0 2px 0 rgba(18, 28, 38, 0.28);
  gap: clamp(4px, 1.4vw, 12px);
  padding-inline: clamp(6px, 1.8vw, 14px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    0 7px 0 rgba(35, 53, 72, 0.96),
    0 10px 18px rgba(0, 0, 0, 0.16);
  font-size: clamp(13px, 3vw, 25px);
}

.menu-hotspot-icon {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
}

.menu-hotspot-icon-play {
  width: clamp(26px, 5vw, 38px);
  height: clamp(26px, 5vw, 38px);
  filter: drop-shadow(0 2px 2px rgba(74, 47, 9, 0.22));
}

.menu-hotspot-icon-play::before {
  content: "";
  position: absolute;
  left: 18%;
  top: 11%;
  width: 0;
  height: 0;
  border-top: clamp(11px, 2.1vw, 16px) solid transparent;
  border-bottom: clamp(11px, 2.1vw, 16px) solid transparent;
  border-left: clamp(18px, 3.2vw, 24px) solid #fff7eb;
}

.menu-hotspot-icon-grid {
  width: clamp(24px, 4.6vw, 34px);
  height: clamp(24px, 4.6vw, 34px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(3px, 0.8vw, 5px);
}

.menu-hotspot-icon-grid i {
  display: block;
  border-radius: 4px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.menu-hotspot-icon-gear {
  width: clamp(26px, 5vw, 38px);
  height: clamp(26px, 5vw, 38px);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #f8fbff 0 24%, transparent 26%),
    conic-gradient(from 0deg, #f8fbff 0 12.5%, transparent 12.5% 25%, #f8fbff 25% 37.5%, transparent 37.5% 50%, #f8fbff 50% 62.5%, transparent 62.5% 75%, #f8fbff 75% 87.5%, transparent 87.5% 100%);
  filter: drop-shadow(0 2px 2px rgba(18, 28, 38, 0.24));
}

.menu-hotspot-icon-gear::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: #f8fbff;
}

.menu-hotspot-icon-gear::after {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: #4a627b;
}

.menu-message {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  min-width: 180px;
  max-width: min(440px, calc(100vw - 48px));
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(9, 22, 34, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff7df;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.menu-message.show {
  opacity: 1;
}

body[data-ui="embed-compact"] .app {
  width: min(1220px, calc(100vw - 24px));
  margin: 12px auto;
  gap: 10px;
}

@media (max-width: 720px) {
  .menu-message {
    bottom: 2.5%;
    font-size: 13px;
  }

  .menu-select .menu-hotspot-inner,
  .menu-settings .menu-hotspot-inner {
    gap: 4px;
    padding-inline: 4px;
    font-size: 14px;
  }

  .menu-select .menu-hotspot-icon-grid,
  .menu-settings .menu-hotspot-icon-gear {
    width: 18px;
    height: 18px;
  }

  .menu-start {
    left: 24.2%;
    top: 69.0%;
    width: 52.1%;
    height: 8.0%;
  }

  .menu-select {
    left: 24.2%;
    top: 79.3%;
    width: 25.1%;
    height: 6.0%;
  }

  .menu-settings {
    left: 51.2%;
    top: 79.3%;
    width: 25.1%;
    height: 6.0%;
  }

  .menu-hotspot {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    border-radius: 0;
    overflow: visible;
  }

  .menu-select:active .menu-hotspot-inner,
  .menu-settings:active .menu-hotspot-inner {
    box-shadow:
      inset 0 2px 0 rgba(255, 255, 255, 0.1),
      0 5px 0 rgba(35, 53, 72, 0.96),
      0 7px 12px rgba(0, 0, 0, 0.14);
  }
}

@media (orientation: landscape) {
  .menu-start {
    left: 30%;
    top: 65%;
    width: 40%;
    height: 8%;
  }

  .menu-select {
    left: 30%;
    top: 75%;
    width: 19%;
    height: 6%;
  }

  .menu-settings {
    left: 51%;
    top: 75%;
    width: 19%;
    height: 6%;
  }

  .menu-hotspot {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    border-radius: 0;
    overflow: visible;
  }
}

/* ----- Select mode (map grid) ----- */

body[data-mode="select"] {
  overflow: hidden;
}

body[data-mode="select"] .select-app {
  display: grid;
  gap: 14px;
  width: min(1240px, calc(100vw - 24px));
  margin: 10px auto 16px;
}

body[data-mode="select"] .select-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
}

body[data-mode="select"] .back-button {
  width: 72px;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  position: relative;
}

body[data-mode="select"] .back-button:hover {
  filter: brightness(1.05);
}

body[data-mode="select"] .back-button:focus-visible {
  outline: 3px solid rgba(255, 225, 143, 0.9);
  outline-offset: 3px;
}

body[data-mode="select"] .back-button::before {
  content: "\2190";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff1d2;
  font-size: 54px;
  font-weight: 900;
  text-shadow:
    0 2px 0 rgba(22, 35, 48, 0.3),
    0 0 10px rgba(0, 0, 0, 0.16);
}

body[data-mode="select"] .select-title-pill {
  justify-self: center;
  min-width: min(420px, 100%);
  padding: 14px 22px;
  border-radius: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, rgba(32, 53, 76, 0.94), rgba(21, 38, 59, 0.96));
  border: 1px solid rgba(120, 155, 189, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.22);
  text-align: center;
}

body[data-mode="select"] .select-title-pill span {
  display: inline-block;
  color: #f7e7c0;
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(31, 31, 31, 0.28);
}

body[data-mode="select"] .select-header-spacer {
  width: 72px;
}

body[data-mode="select"] .select-stage {
  display: grid;
  gap: 12px;
}

body[data-mode="select"] .select-grid-shell {
  display: grid;
  gap: 10px;
}

body[data-mode="select"] .map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 22px);
}

body[data-mode="select"] .map-card {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  min-width: 0;
  text-align: left;
}

body[data-mode="select"] .map-card:hover:not(:disabled) .map-card-art {
  transform: translateY(-2px);
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.28));
}

body[data-mode="select"] .map-card:focus-visible {
  outline: 3px solid rgba(255, 197, 61, 0.9);
  outline-offset: 4px;
  border-radius: 0;
}

body[data-mode="select"] .map-card[disabled] {
  cursor: default;
}

body[data-mode="select"] .map-card-art {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-radius: 0;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.24));
}

body[data-mode="select"] .map-card.selected .map-card-art {
  transform: scale(1.015);
  filter:
    drop-shadow(0 0 0 rgba(0, 0, 0, 0))
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.24))
    drop-shadow(0 0 18px rgba(255, 197, 61, 0.28));
}

body[data-mode="select"] .map-card.locked .map-card-art {
  filter: grayscale(0.18) brightness(0.82);
}

body[data-mode="select"] .map-card-number {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #f6f0e0;
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(33, 32, 29, 0.32);
  pointer-events: none;
}

body[data-mode="select"] .map-card.locked .map-card-number {
  color: rgba(239, 241, 243, 0.72);
}

body[data-mode="select"] .map-card-stars {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

body[data-mode="select"] .map-card-stars span {
  color: #ffcb45;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1;
  text-shadow: 0 2px 0 rgba(117, 77, 4, 0.25);
}

body[data-mode="select"] .map-card.locked .map-card-stars {
  opacity: 0;
}

@media (max-width: 900px) {
  body[data-mode="select"] .select-app {
    width: min(100vw - 16px, 760px);
  }

  body[data-mode="select"] .select-header {
    grid-template-columns: 58px minmax(0, 1fr) 58px;
  }

  body[data-mode="select"] .back-button,
  body[data-mode="select"] .select-header-spacer {
    width: 58px;
  }

  body[data-mode="select"] .select-title-pill {
    min-width: min(320px, 100%);
    padding: 12px 18px;
  }

  body[data-mode="select"] .select-title-pill span {
    font-size: clamp(24px, 4vw, 40px);
  }

  body[data-mode="select"] .map-grid {
    gap: 12px;
  }
}

@media (max-width: 620px) {
  body[data-mode="select"] .select-app {
    width: min(100vw - 12px, 560px);
    gap: 10px;
    margin: 8px auto 12px;
  }

  body[data-mode="select"] .select-header {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
    gap: 8px;
  }

  body[data-mode="select"] .back-button,
  body[data-mode="select"] .select-header-spacer {
    width: 50px;
  }

  body[data-mode="select"] .back-button::before {
    font-size: 34px;
  }

  body[data-mode="select"] .select-title-pill {
    padding: 10px 14px;
  }

  body[data-mode="select"] .select-title-pill span {
    font-size: clamp(22px, 4.6vw, 32px);
  }

  body[data-mode="select"] .map-grid {
    gap: 10px;
  }
}

@media (max-width: 420px) {
  body[data-mode="select"] .select-header {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
  }

  body[data-mode="select"] .back-button,
  body[data-mode="select"] .select-header-spacer {
    width: 46px;
  }

  body[data-mode="select"] .select-title-pill {
    min-width: 0;
    padding: 9px 12px;
  }

  body[data-mode="select"] .select-title-pill span {
    font-size: clamp(20px, 6vw, 28px);
  }

  body[data-mode="select"] .map-grid {
    gap: 8px;
  }

  body[data-mode="select"] .map-card-number {
    top: 10px;
  }

  body[data-mode="select"] .map-card-stars {
    bottom: 10px;
    gap: 6px;
  }
}

@media (orientation: portrait) and (max-width: 600px) {
  body[data-mode="select"] .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (orientation: portrait) {
  body[data-mode="select"] .map-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ----- Preview-inspired shell overrides ----- */

body[data-ui="embed-compact"] {
  --preview-shell: #ffffff;
  --preview-surface: #ffffff;
  --preview-surface-soft: #c7dcd0;
  --preview-surface-muted: #9babb2;
  --preview-border: #625565;
  --preview-border-soft: #9babb2;
  --preview-text: #2e222f;
  --preview-subtle: #625565;
  --preview-primary: #4d9be6;
  --preview-secondary: #1ebc73;
  --preview-warning: #f9c22b;
  --preview-danger: #ea4f36;
  --preview-shadow: 8px 8px 0 rgba(46, 34, 47, 0.26);
  --preview-shadow-soft: 4px 4px 0 rgba(46, 34, 47, 0.18);
  background: linear-gradient(180deg, #c7dcd0 0%, #b7cbc0 100%);
}

.panel-like {
  background: var(--preview-surface);
  border: 3px solid var(--preview-border);
  border-radius: 10px;
  box-shadow: var(--preview-shadow-soft);
}

.main-menu {
  padding: 16px;
  background: linear-gradient(180deg, #c7dcd0 0%, #b7cbc0 100%);
}

.main-menu::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border: 3px solid var(--preview-border);
  border-radius: 12px;
  background: var(--preview-shell);
  box-shadow: var(--preview-shadow);
  z-index: 0;
}

.main-menu-media,
.main-menu-overlay,
.main-menu-chrome,
.main-menu-copy,
.main-menu-actions,
.menu-hotspot,
.menu-message {
  z-index: 1;
}

.main-menu-media {
  position: absolute;
  top: 30px;
  left: 30px;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  overflow: hidden;
  border: 3px solid var(--preview-border);
  border-radius: 10px;
  box-shadow: var(--preview-shadow-soft);
}

.main-menu-media picture {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.main-menu-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.main-menu-overlay {
  position: absolute;
  top: 30px;
  left: 30px;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(46, 34, 47, 0.08), transparent 34%, rgba(46, 34, 47, 0.34));
}

.main-menu-chrome {
  position: absolute;
  top: 42px;
  left: 44px;
  right: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-menu-badge,
.main-menu-save-chip {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--preview-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--preview-text);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.main-menu-icon-button {
  margin-left: auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(0, 0, 0, 0.34);
  border-radius: 6px;
  background: var(--preview-primary);
  color: #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.24);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.main-menu-icon-button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.24);
}

.main-menu-copy {
  position: absolute;
  left: 50%;
  top: clamp(112px, 18vh, 160px);
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 100px));
  text-align: center;
}

.main-menu-title-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.main-menu-title {
  margin: 0;
  padding: 12px 16px;
  background: rgba(46, 34, 47, 0.88);
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.74);
  border-radius: 6px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.28);
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.06;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.32);
}

.main-menu-subtitle {
  padding: 8px 12px;
  background: rgba(234, 173, 237, 0.88);
  color: var(--preview-text);
  border: 2px solid rgba(98, 85, 101, 0.75);
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.main-menu-actions {
  position: absolute;
  left: 50%;
  bottom: clamp(170px, 24vh, 224px);
  transform: translateX(-50%);
}

.menu-hotspot {
  background: transparent;
  border-radius: 6px;
}

.menu-hotspot-inner {
  border: 2px solid rgba(0, 0, 0, 0.34);
  border-radius: 6px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.26);
  text-shadow: none;
}

.menu-start .menu-hotspot-inner {
  background: var(--preview-warning);
  color: var(--preview-text);
  font-size: clamp(22px, 4vw, 30px);
}

.menu-select .menu-hotspot-inner,
.menu-settings .menu-hotspot-inner {
  background: var(--preview-primary);
  color: #fff;
  font-size: clamp(16px, 3vw, 21px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.24);
}

.menu-select .menu-hotspot-inner {
  background: var(--preview-secondary);
}

.menu-hotspot:active .menu-hotspot-inner {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.22);
}

.menu-hotspot-icon-play::before {
  border-left-color: #fff;
}

.menu-message {
  bottom: 40px;
  background: rgba(46, 34, 47, 0.86);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

body[data-mode="select"] .select-app {
  width: min(1000px, calc(100vw - 24px));
  margin: 18px auto 24px;
  padding: 14px;
  background: var(--preview-shell);
  border: 3px solid var(--preview-border);
  border-radius: 12px;
  box-shadow: var(--preview-shadow);
}

body[data-mode="select"] .select-header {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

body[data-mode="select"] .back-button,
body[data-mode="select"] .select-header-spacer {
  width: 44px;
}

body[data-mode="select"] .back-button {
  height: 34px;
  aspect-ratio: auto;
  border: 2px solid rgba(0, 0, 0, 0.34);
  border-radius: 6px;
  background: var(--preview-surface-soft);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.24);
}

body[data-mode="select"] .back-button::before {
  color: var(--preview-text);
  font-size: 24px;
  text-shadow: none;
}

body[data-mode="select"] .select-title-pill {
  min-width: min(360px, 100%);
  padding: 8px 14px;
  background: var(--preview-surface-soft);
  border: 2px solid var(--preview-border-soft);
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.16);
}

body[data-mode="select"] .select-title-pill span {
  color: var(--preview-text);
  font-size: clamp(22px, 3vw, 28px);
  text-shadow: none;
}

body[data-mode="select"] .select-stage {
  gap: 12px;
}

.select-progress {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.select-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  color: var(--preview-subtle);
}

.select-progress-row strong {
  color: var(--preview-text);
  font-size: 15px;
}

.select-progress-row-small {
  font-size: 12px;
}

.select-progress-bar {
  height: 18px;
  overflow: hidden;
  border: 2px solid var(--preview-border);
  border-radius: 6px;
  background: var(--preview-surface-soft);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.select-progress-fill {
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, var(--preview-secondary), #91db69);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
}

body[data-mode="select"] .map-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-mode="select"] .map-card {
  aspect-ratio: auto;
  min-height: 126px;
  padding: 8px 6px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  border: 2px solid rgba(0, 0, 0, 0.24);
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.24);
  background: var(--preview-surface);
  color: var(--preview-text);
  text-align: center;
}

body[data-mode="select"] .map-card-art {
  position: static;
  min-height: 58px;
  border: 2px solid var(--preview-border);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent),
    linear-gradient(135deg, #547e64, #374e4a);
  box-shadow: none;
  filter: none;
}

body[data-mode="select"] .map-card.unlocked .map-card-art,
body[data-mode="select"] .map-card.selected .map-card-art,
body[data-mode="select"] .map-card.locked .map-card-art {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent),
    linear-gradient(135deg, #547e64, #374e4a);
}

body[data-mode="select"] .map-card.locked {
  opacity: 0.58;
  background: var(--preview-surface-muted);
  filter: grayscale(0.35);
}

body[data-mode="select"] .map-card.selected {
  background: var(--preview-surface-soft);
  outline: 3px solid var(--preview-warning);
  outline-offset: 2px;
}

body[data-mode="select"] .map-card-number {
  position: static;
  transform: none;
  color: var(--preview-text);
  font-size: 22px;
  text-shadow: none;
}

body[data-mode="select"] .map-card-stars {
  position: static;
  transform: none;
  justify-content: center;
  gap: 4px;
}

body[data-mode="select"] .map-card-stars span {
  color: #f79617;
  font-size: 15px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.24);
}

body[data-mode="select"] .map-card:hover:not(:disabled) {
  transform: translate(-2px, -2px);
}

body[data-mode="select"] .map-card:hover:not(:disabled) .map-card-art {
  transform: none;
  filter: none;
}

@media (max-width: 720px) {
  .main-menu::before {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
  }

  .main-menu-media,
  .main-menu-overlay {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
  }

  .main-menu-chrome {
    top: 22px;
    left: 24px;
    right: 24px;
  }

  .main-menu-copy {
    width: min(360px, calc(100vw - 54px));
    top: 92px;
  }

  .main-menu-actions {
    bottom: 150px;
  }

  body[data-mode="select"] .select-app {
    width: min(100vw - 12px, 560px);
    padding: 10px;
  }

  body[data-mode="select"] .map-grid {
    gap: 10px;
  }
}
