.arena-page {
  --map-ui-dark-950: #151513;
  --map-ui-dark-900: #1d1d1b;
  --map-ui-dark-800: #2a2925;
  --map-ui-light-100: #f4f3ee;
  --map-ui-light-200: #d9d6cc;
  --map-ui-mid: #a8a59d;
  --map-ui-orange-500: #d97855;
  --map-ui-orange-400: #e39372;
  --map-ui-blue-500: #6d9dca;
  --map-ui-green-500: #7d9162;
  --map-ui-red-500: #c83d35;
  --map-ui-line: rgba(244, 243, 238, 0.14);
  --map-ui-line-strong: rgba(217, 120, 85, 0.52);
  --map-ui-panel: rgba(21, 21, 19, 0.84);
  --map-ui-panel-solid: #20201d;
  --map-ui-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

body.arena-page {
  overflow-x: hidden;
}

.arena-page .app-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100dvh;
}

.arena-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: stretch;
  min-height: 0;
}

.arena-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.arena-frame {
  position: relative;
  height: clamp(520px, calc(100dvh - 190px), 720px);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, rgba(217, 120, 85, 0.14), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(109, 157, 202, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(244, 243, 238, 0.06), transparent),
    var(--map-ui-dark-950);
  background-size: auto;
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.34),
    var(--map-ui-shadow);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
}

.mobile-controls {
  display: none;
}

.control-panel {
  border-color: var(--map-ui-line);
  background:
    linear-gradient(180deg, rgba(246, 240, 232, 0.055), rgba(246, 240, 232, 0.018)),
    var(--map-ui-panel);
  box-shadow: var(--map-ui-shadow);
  backdrop-filter: blur(12px);
  max-height: clamp(560px, calc(100dvh - 190px), 720px);
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.control-panel,
.inventory-panel,
.world-actions {
  scrollbar-color: rgba(217, 120, 85, 0.58) rgba(246, 240, 232, 0.08);
  scrollbar-width: thin;
}

.control-panel::-webkit-scrollbar,
.inventory-panel::-webkit-scrollbar,
.world-actions::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.control-panel::-webkit-scrollbar-track,
.inventory-panel::-webkit-scrollbar-track,
.world-actions::-webkit-scrollbar-track {
  background: rgba(246, 240, 232, 0.07);
  border-radius: 999px;
}

.control-panel::-webkit-scrollbar-thumb,
.inventory-panel::-webkit-scrollbar-thumb,
.world-actions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(217, 120, 85, 0.58);
}

.control-panel h2,
.control-panel h3 {
  color: var(--map-ui-light-100);
}

.stat-line {
  border-top-color: var(--map-ui-line);
  background: rgba(246, 240, 232, 0.035);
}

.stat-line span {
  color: var(--map-ui-light-200);
}

.stat-line strong {
  color: var(--map-ui-light-100);
}

.message {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--map-ui-panel);
  color: var(--map-ui-orange-400);
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  box-shadow: var(--map-ui-shadow);
  backdrop-filter: blur(12px);
}

.message.show {
  opacity: 1;
}

.interaction-prompt {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 2px;
  align-items: center;
  width: min(360px, calc(100% - 28px));
  transform: translateX(-50%);
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.18), rgba(125, 145, 98, 0.09)),
    rgba(16, 16, 14, 0.9);
  color: var(--map-ui-light-100);
  pointer-events: none;
  box-shadow: var(--map-ui-shadow);
  backdrop-filter: blur(12px);
}

.interaction-prompt[hidden] {
  display: none;
}

.interaction-prompt small {
  grid-row: 1 / span 2;
  min-width: 58px;
  border: 1px solid rgba(217, 120, 85, 0.58);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--map-ui-orange-400);
  font-size: 0.68rem;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
  background: rgba(217, 120, 85, 0.12);
}

.interaction-prompt strong,
.interaction-prompt span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interaction-prompt strong {
  font-size: 0.86rem;
  line-height: 1.05;
}

.interaction-prompt span {
  color: var(--map-ui-light-200);
  font-size: 0.72rem;
  font-weight: 820;
}

.interaction-prompt[data-tone="battle"] small,
.interaction-prompt[data-tone="capture"] small {
  border-color: rgba(200, 61, 53, 0.65);
  color: #ffb199;
  background: rgba(200, 61, 53, 0.16);
}

.interaction-prompt[data-tone="facility"] small,
.interaction-prompt[data-tone="portal"] small {
  border-color: rgba(109, 157, 202, 0.65);
  color: #9dc6ee;
  background: rgba(109, 157, 202, 0.15);
}

.interaction-prompt[data-tone="discover"] small,
.interaction-prompt[data-tone="pickup"] small {
  border-color: rgba(125, 145, 98, 0.7);
  color: #b9cf94;
  background: rgba(125, 145, 98, 0.15);
}

.field-directive {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  display: grid;
  gap: 3px;
  width: min(340px, calc(100% - 24px));
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 8px;
  padding: 9px 11px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(125, 145, 98, 0.1)),
    var(--map-ui-panel);
  color: var(--map-ui-light-100);
  pointer-events: none;
  box-shadow: var(--map-ui-shadow);
  backdrop-filter: blur(12px);
}

.field-directive small,
.field-directive strong,
.field-directive span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-directive small {
  color: var(--map-ui-mid);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.field-directive strong {
  color: var(--map-ui-orange-400);
  font-size: 0.98rem;
  line-height: 1.15;
}

.field-directive span {
  color: var(--map-ui-light-200);
  font-size: 0.78rem;
  font-weight: 850;
}

.field-directive[data-tone="rare"],
.field-directive[data-tone="hot"] {
  border-color: rgba(200, 61, 53, 0.72);
  background:
    linear-gradient(135deg, rgba(200, 61, 53, 0.24), rgba(217, 120, 85, 0.13)),
    var(--map-ui-panel);
}

.field-directive[data-tone="battle"] {
  border-color: rgba(109, 157, 202, 0.72);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.22), rgba(217, 120, 85, 0.12)),
    var(--map-ui-panel);
}

.field-directive[data-tone="discover"] {
  border-color: rgba(125, 145, 98, 0.74);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.24), rgba(109, 157, 202, 0.12)),
    var(--map-ui-panel);
}

.field-directive[data-tone="outbreak"] {
  border-color: rgba(248, 214, 109, 0.74);
  background:
    linear-gradient(135deg, rgba(248, 214, 109, 0.2), rgba(217, 120, 85, 0.12)),
    var(--map-ui-panel);
}

.facility-celebration {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.facility-celebration.is-showing {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.facility-celebration-card {
  position: relative;
  z-index: 2;
  width: min(420px, 92vw);
  border: 1px solid rgba(217, 120, 85, 0.64);
  border-radius: 8px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(125, 145, 98, 0.14)),
    rgba(21, 21, 19, 0.94);
  color: var(--map-ui-light-100);
  text-align: center;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
  animation: facilityCelebrationPop 0.42s cubic-bezier(0.2, 1.2, 0.22, 1) both;
}

.facility-celebration-card small {
  display: block;
  color: var(--map-ui-orange-400);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.facility-celebration-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.45rem, 5vw, 2.4rem);
  line-height: 1.05;
}

.facility-celebration-card p {
  margin: 8px 0 0;
  color: var(--map-ui-light-200);
  font-weight: 800;
  line-height: 1.35;
}

.facility-celebration.is-green .facility-celebration-card {
  border-color: rgba(125, 145, 98, 0.76);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.24), rgba(217, 120, 85, 0.12)),
    rgba(21, 21, 19, 0.94);
}

.facility-celebration.is-blue .facility-celebration-card {
  border-color: rgba(109, 157, 202, 0.78);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.22), rgba(217, 120, 85, 0.12)),
    rgba(21, 21, 19, 0.94);
}

.facility-celebration-burst {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 1px;
  z-index: 1;
}

.facility-celebration-burst span {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--map-ui-orange-400);
  box-shadow: 0 0 20px rgba(217, 120, 85, 0.6);
  animation: facilityCelebrationBurst 0.86s ease-out both;
}

.facility-celebration-burst span:nth-child(1) { --dx: -172px; --dy: -96px; background: var(--map-ui-orange-400); }
.facility-celebration-burst span:nth-child(2) { --dx: 160px; --dy: -88px; background: var(--map-ui-green-500); animation-delay: 0.04s; }
.facility-celebration-burst span:nth-child(3) { --dx: -124px; --dy: 112px; background: var(--map-ui-blue-500); animation-delay: 0.08s; }
.facility-celebration-burst span:nth-child(4) { --dx: 136px; --dy: 104px; background: var(--map-ui-orange-500); animation-delay: 0.12s; }
.facility-celebration-burst span:nth-child(5) { --dx: 0px; --dy: -150px; background: var(--map-ui-light-100); animation-delay: 0.16s; }
.facility-celebration-burst span:nth-child(6) { --dx: 0px; --dy: 142px; background: var(--map-ui-green-500); animation-delay: 0.2s; }

.mobile-field-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  pointer-events: none;
}

.mobile-field-hud span {
  min-width: 0;
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--map-ui-panel);
  color: var(--map-ui-light-200);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.mobile-field-hud strong {
  color: var(--map-ui-orange-400);
}

.mobile-field-hud .mobile-objective {
  grid-column: 1 / -1;
}

.combo-card,
.route-focus-card,
.route-contract-card,
.field-mission-card,
.region-expedition-card {
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.12), rgba(109, 157, 202, 0.07)),
    rgba(20, 17, 15, 0.7);
  box-shadow: inset 0 0 0 1px rgba(246, 240, 232, 0.03);
}

.combo-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px;
}

.combo-card small,
.field-mission-head small {
  display: block;
  color: var(--map-ui-light-200);
  font-size: 0.72rem;
  font-weight: 900;
}

.combo-card .combo-next {
  margin-top: 3px;
  max-width: 210px;
  color: var(--map-ui-green-500);
  line-height: 1.22;
  text-transform: none;
}

.combo-card strong,
.field-mission-head strong {
  color: var(--map-ui-light-100);
}

.combo-card span {
  border: 1px solid rgba(217, 120, 85, 0.34);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--map-ui-orange-400);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.18;
  text-align: right;
  white-space: normal;
}

.combo-card.is-hot {
  border-color: rgba(217, 120, 85, 0.62);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(125, 145, 98, 0.12)),
    rgba(20, 17, 15, 0.78);
}

.route-focus-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-color: rgba(125, 145, 98, 0.48);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.16), rgba(217, 120, 85, 0.09)),
    rgba(20, 17, 15, 0.7);
}

.route-focus-card small {
  display: block;
  color: var(--map-ui-light-200);
  font-size: 0.72rem;
  font-weight: 900;
}

.route-focus-card strong {
  color: var(--map-ui-green-500);
  font-size: 1rem;
}

.route-focus-card span {
  min-width: 0;
  color: var(--map-ui-light-200);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.28;
}

.route-focus-card.is-hot {
  border-color: rgba(217, 120, 85, 0.62);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.18), rgba(125, 145, 98, 0.16)),
    rgba(20, 17, 15, 0.76);
}

.partner-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-color: rgba(109, 157, 202, 0.42);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.14), rgba(125, 145, 98, 0.1)),
    rgba(20, 17, 15, 0.7);
}

.partner-card small {
  display: block;
  color: var(--map-ui-light-200);
  font-size: 0.68rem;
  font-weight: 900;
}

.partner-card strong {
  color: var(--map-ui-blue-500);
  font-size: 0.92rem;
  line-height: 1.12;
}

.partner-card span {
  min-width: 0;
  overflow: hidden;
  color: var(--map-ui-light-200);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.partner-card.is-active {
  border-color: rgba(109, 157, 202, 0.68);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.18), rgba(248, 214, 109, 0.1)),
    rgba(20, 17, 15, 0.76);
}

.partner-progress-bar {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 240, 232, 0.1);
}

.partner-progress-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--map-ui-blue-500), var(--map-ui-green-500));
  transition: width 0.18s ease;
}

.outbreak-card {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border-color: rgba(248, 214, 109, 0.5);
  background:
    linear-gradient(135deg, rgba(248, 214, 109, 0.15), rgba(125, 145, 98, 0.12)),
    rgba(20, 17, 15, 0.72);
}

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

.outbreak-card small {
  display: block;
  color: var(--map-ui-light-200);
  font-size: 0.68rem;
  font-weight: 900;
}

.outbreak-card strong {
  display: block;
  overflow: hidden;
  color: #f8d66d;
  font-size: 0.9rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outbreak-card-head span {
  flex: 0 0 auto;
  border: 1px solid rgba(248, 214, 109, 0.44);
  border-radius: 999px;
  padding: 4px 8px;
  color: #f8d66d;
  font-size: 0.7rem;
  font-weight: 950;
  white-space: nowrap;
}

.outbreak-card p {
  margin: 0;
  overflow: hidden;
  color: var(--map-ui-light-200);
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outbreak-progress-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 240, 232, 0.11);
}

.outbreak-progress-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f8d66d, var(--map-ui-orange-400));
}

.outbreak-card.is-complete {
  border-color: rgba(125, 145, 98, 0.62);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.2), rgba(248, 214, 109, 0.1)),
    rgba(20, 17, 15, 0.76);
}

.route-contract-card {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border-color: rgba(109, 157, 202, 0.42);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.14), rgba(217, 120, 85, 0.1)),
    rgba(20, 17, 15, 0.72);
}

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

.route-contract-head small,
.route-contract-card > small {
  display: block;
  color: var(--map-ui-light-200);
  font-size: 0.68rem;
  font-weight: 900;
}

.route-contract-head strong {
  color: var(--map-ui-light-100);
  font-size: 0.9rem;
}

.route-contract-head span {
  flex: 0 0 auto;
  border: 1px solid rgba(109, 157, 202, 0.48);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--map-ui-blue-500);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.route-contract-card p {
  margin: 0;
  overflow: hidden;
  color: var(--map-ui-light-200);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-contract-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.route-contract-steps span {
  min-width: 0;
  border: 1px solid rgba(246, 240, 232, 0.1);
  border-radius: 6px;
  padding: 5px 6px;
  overflow: hidden;
  background: rgba(12, 12, 11, 0.46);
  color: var(--map-ui-light-200);
  font-size: 0.62rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-contract-steps span.is-active {
  border-color: rgba(217, 120, 85, 0.72);
  color: var(--map-ui-orange-400);
  background: rgba(217, 120, 85, 0.14);
}

.route-contract-steps span.is-complete,
.route-contract-card.is-complete {
  border-color: rgba(125, 145, 98, 0.55);
  background: rgba(125, 145, 98, 0.16);
}

.field-mission-card,
.region-expedition-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
}

.region-expedition-card {
  border-color: rgba(109, 157, 202, 0.36);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.13), rgba(125, 145, 98, 0.12)),
    rgba(20, 17, 15, 0.7);
}

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

.field-mission-list,
.region-expedition-list {
  display: grid;
  gap: 6px;
}

.field-mission-item,
.region-expedition-item {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(246, 240, 232, 0.09);
  border-radius: 7px;
  padding: 7px;
  background: rgba(12, 12, 11, 0.5);
}

.field-mission-item.is-complete,
.region-expedition-item.is-complete {
  border-color: rgba(125, 145, 98, 0.55);
  background: rgba(125, 145, 98, 0.16);
}

.field-mission-item strong,
.field-mission-item span,
.region-expedition-item strong,
.region-expedition-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-mission-item strong,
.region-expedition-item strong {
  color: var(--map-ui-light-100);
  font-size: 0.8rem;
}

.field-mission-item span,
.region-expedition-item span {
  color: var(--map-ui-light-200);
  font-size: 0.7rem;
  font-weight: 800;
}

.field-mission-bar,
.region-expedition-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 240, 232, 0.11);
}

.field-mission-bar i,
.region-expedition-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--map-ui-orange-400), var(--map-ui-green-500));
}

.region-expedition-bar i {
  background: linear-gradient(90deg, var(--map-ui-blue-500), var(--map-ui-green-500));
}

.level-action-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 8px 0 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.level-buy-button {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  margin: 0;
  min-height: 42px;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.1;
}

.arena-battle-button {
  width: 100%;
  margin-top: 8px;
}

.airuia-wallet {
  margin: 0 0 10px;
  border-color: var(--map-ui-line-strong);
  background:
    linear-gradient(135deg, rgba(217, 119, 69, 0.18), rgba(111, 159, 115, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.airuia-wallet span {
  color: var(--map-ui-light-200);
}

.airuia-wallet strong {
  color: var(--map-ui-orange-400);
  font-size: 1.12rem;
}

.objective-card,
.rookie-guide-card,
.rank-route-card,
.field-scanner-card,
.event-feed,
.region-mastery-card,
.league-badge-card,
.panel-section {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.14), rgba(125, 145, 98, 0.1)),
    rgba(246, 240, 232, 0.045);
}

.region-mastery-card,
.rookie-guide-card,
.rank-route-card,
.field-scanner-card,
.league-badge-card {
  grid-template-columns: minmax(0, 1fr);
  border-color: rgba(125, 145, 98, 0.58);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.18), rgba(109, 157, 202, 0.09)),
    rgba(246, 240, 232, 0.045);
}

.rookie-guide-card {
  border-color: rgba(217, 120, 85, 0.62);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.18), rgba(109, 157, 202, 0.1)),
    rgba(246, 240, 232, 0.045);
}

.rookie-guide-card.is-complete {
  border-color: rgba(125, 145, 98, 0.78);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.22), rgba(217, 120, 85, 0.1)),
    rgba(246, 240, 232, 0.045);
}

.rank-route-card {
  border-color: rgba(109, 157, 202, 0.62);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.17), rgba(125, 145, 98, 0.1)),
    rgba(246, 240, 232, 0.045);
}

.rank-route-card.is-complete {
  border-color: rgba(217, 120, 85, 0.78);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(125, 145, 98, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.rank-route-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.rank-route-step {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 6px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.rank-route-step strong,
.rank-route-step span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-route-step strong {
  color: var(--map-ui-light);
  font-size: 0.72rem;
}

.rank-route-step span {
  color: var(--map-ui-mid);
  font-size: 0.68rem;
  font-weight: 900;
}

.rank-route-step.is-done {
  border-color: rgba(125, 145, 98, 0.78);
  background: rgba(125, 145, 98, 0.18);
}

.rank-route-step.is-done strong,
.rank-route-step.is-done span {
  color: var(--map-ui-green-500);
}

.rookie-guide-bar {
  height: 8px;
  border: 1px solid rgba(246, 240, 232, 0.16);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.rookie-guide-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--map-ui-orange-400), var(--map-ui-blue-500), var(--map-ui-green-500));
}

.field-scanner-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-color: rgba(109, 157, 202, 0.56);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.16), rgba(125, 145, 98, 0.08)),
    rgba(246, 240, 232, 0.04);
}

.field-scanner-card.is-ready {
  border-color: rgba(109, 157, 202, 0.84);
}

.field-scanner-card.is-active {
  border-color: rgba(217, 120, 85, 0.84);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(109, 157, 202, 0.12)),
    rgba(246, 240, 232, 0.05);
}

.field-scanner-card button {
  min-width: 66px;
  padding: 8px 10px;
  font-size: 0.76rem;
}

.field-scanner-card span {
  grid-column: 1 / -1;
}

.region-mastery-card.is-complete {
  border-color: rgba(217, 120, 85, 0.72);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(125, 145, 98, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.league-badge-card.is-complete {
  border-color: rgba(217, 120, 85, 0.78);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.22), rgba(109, 157, 202, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.objective-card[data-tone="hot"],
.objective-card[data-tone="rare"] {
  border-color: rgba(200, 61, 53, 0.72);
  background:
    linear-gradient(135deg, rgba(200, 61, 53, 0.2), rgba(217, 120, 85, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.objective-card[data-tone="discover"] {
  border-color: rgba(125, 145, 98, 0.72);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.22), rgba(109, 157, 202, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.objective-card[data-tone="battle"] {
  border-color: rgba(109, 157, 202, 0.72);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.18), rgba(217, 120, 85, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.objective-card[data-tone="rookie"] {
  border-color: rgba(217, 120, 85, 0.72);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.2), rgba(109, 157, 202, 0.12)),
    rgba(246, 240, 232, 0.045);
}

.objective-card small,
.rookie-guide-card small,
.rank-route-card small,
.field-scanner-card small,
.event-feed small,
.region-mastery-card small,
.league-badge-card small {
  color: var(--map-ui-mid);
  font-size: 0.72rem;
  font-weight: 900;
}

.objective-card strong,
.rookie-guide-card strong,
.rank-route-card strong,
.field-scanner-card strong,
.region-mastery-card strong,
.league-badge-card strong {
  color: var(--map-ui-orange-400);
  line-height: 1.15;
}

.objective-card span,
.rookie-guide-card span,
.rank-route-card span,
.field-scanner-card span,
.event-feed-item,
.region-mastery-card span,
.league-badge-card span {
  color: var(--map-ui-light-200);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.objective-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.objective-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--map-ui-light-100);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
}

.objective-meta small {
  color: var(--map-ui-orange-400);
  font-size: 0.66rem;
  font-weight: 900;
}

.session-plan {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 1px;
  scrollbar-width: none;
}

.session-plan::-webkit-scrollbar {
  display: none;
}

.session-plan button {
  appearance: none;
  display: grid;
  flex: 0 0 min(100%, 118px);
  min-width: 0;
  gap: 2px;
  border: 1px solid rgba(246, 240, 232, 0.13);
  border-radius: 7px;
  padding: 6px 7px;
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.session-plan button.is-next {
  border-color: rgba(217, 120, 85, 0.58);
  background: rgba(217, 120, 85, 0.12);
}

.session-plan button:hover,
.session-plan button:focus-visible {
  border-color: rgba(248, 214, 109, 0.7);
  background: rgba(248, 214, 109, 0.1);
  outline: none;
}

.session-plan button:active {
  transform: translateY(1px);
}

.session-plan strong,
.session-plan em,
.session-plan small {
  overflow: hidden;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-plan strong {
  color: var(--map-ui-light);
  font-size: 0.68rem;
  font-weight: 950;
}

.session-plan em {
  color: var(--map-ui-light-200);
  font-size: 0.62rem;
  font-weight: 850;
  font-style: normal;
}

.session-plan small {
  color: rgba(248, 214, 109, 0.88);
  font-size: 0.56rem;
  font-weight: 950;
}

.league-badge-list {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
}

.league-badge-chip {
  display: grid;
  place-items: center;
  min-height: 24px;
  border: 1px solid rgba(246, 240, 232, 0.16);
  border-radius: 6px;
  background: rgba(12, 12, 10, 0.36);
  color: var(--map-ui-mid);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
}

.league-badge-chip.is-owned {
  border-color: rgba(217, 120, 85, 0.74);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.32), rgba(125, 145, 98, 0.24)),
    rgba(246, 240, 232, 0.06);
  color: var(--map-ui-light-100);
}

.league-badge-chip.is-current {
  box-shadow: 0 0 0 2px rgba(109, 157, 202, 0.24);
}

.panel-section {
  padding: 0;
  background: rgba(246, 240, 232, 0.026);
}

.panel-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--map-ui-light-100);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  list-style: none;
  user-select: none;
}

.panel-section summary::-webkit-details-marker {
  display: none;
}

.panel-section summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(217, 120, 85, 0.46);
  border-radius: 6px;
  color: var(--map-ui-orange-400);
  font-size: 0.85rem;
  line-height: 1;
}

.panel-section[open] summary::after {
  content: "-";
}

.panel-section-body {
  display: grid;
  gap: 0;
  padding: 0 10px 10px;
}

.arena-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.arena-quick-actions button {
  min-height: 42px;
  margin: 0;
  white-space: nowrap;
}

.objective-action-button {
  border-color: rgba(248, 214, 109, 0.82);
  box-shadow: 0 0 0 1px rgba(248, 214, 109, 0.18), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.control-help {
  color: var(--map-ui-light-200);
  font-size: 0.82rem;
  line-height: 1.45;
}

.event-feed-list {
  display: grid;
  gap: 4px;
}

.event-feed-item {
  border-left: 2px solid rgba(217, 120, 85, 0.64);
  padding-left: 7px;
}

.event-feed-item.is-win,
.event-feed-item.is-reward {
  border-left-color: rgba(125, 145, 98, 0.84);
}

.event-feed-item.is-rare,
.event-feed-item.is-unlock {
  border-left-color: rgba(217, 120, 85, 0.9);
  color: var(--map-ui-orange-400);
}

.special-event-modal {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3, 3, 2, 0.74);
  backdrop-filter: blur(5px);
}

.special-event-modal.is-open {
  display: grid;
}

.special-event-card {
  width: min(560px, 100%);
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 8px;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 10%, rgba(217, 120, 85, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(244, 243, 238, 0.08), rgba(125, 145, 98, 0.08)),
    var(--map-ui-panel-solid);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
}

.special-event-card p {
  color: var(--map-ui-light-200);
  line-height: 1.5;
}

.special-event-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.special-event-choices button {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  text-align: left;
}

.special-event-choices button:hover {
  border-color: var(--map-ui-line-strong);
  background: rgba(217, 120, 85, 0.13);
}

.special-event-choices button:disabled {
  opacity: 0.45;
  cursor: default;
}

.special-event-choices strong {
  color: var(--map-ui-orange-400);
}

.special-event-choices span {
  color: var(--map-ui-light-200);
  font-size: 0.9rem;
  line-height: 1.35;
}

.world-actions {
  display: grid;
  grid-template-columns: repeat(8, minmax(86px, 1fr));
  gap: 8px;
  align-items: stretch;
  margin: 0 0 16px;
}

.world-actions button {
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(217, 119, 69, 0.16), rgba(111, 159, 115, 0.1)),
    var(--map-ui-panel);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--map-ui-shadow);
  backdrop-filter: blur(12px);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.world-actions button:hover {
  transform: translateY(-2px);
  border-color: var(--map-ui-line-strong);
  background:
    linear-gradient(135deg, rgba(217, 119, 69, 0.18), rgba(246, 240, 232, 0.045)),
    var(--map-ui-panel);
}

.world-portal {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
}

.world-portal span {
  color: var(--map-ui-orange-400);
  font-size: 0.98rem;
}

.world-portal small {
  color: var(--map-ui-light-200);
  font-size: 0.78rem;
}

.portal-dex {
  background:
    linear-gradient(135deg, rgba(111, 159, 115, 0.26), rgba(217, 119, 69, 0.1)),
    var(--map-ui-panel);
}

.portal-achievement {
  background:
    linear-gradient(135deg, rgba(217, 119, 69, 0.22), rgba(111, 159, 115, 0.1)),
    var(--map-ui-panel);
}

.portal-hall {
  background:
    linear-gradient(135deg, rgba(232, 152, 99, 0.18), rgba(246, 240, 232, 0.08)),
    var(--map-ui-panel);
}

.portal-whip {
  border-color: var(--map-ui-line-strong);
  background:
    linear-gradient(135deg, rgba(232, 152, 99, 0.26), rgba(111, 159, 115, 0.12)),
    var(--map-ui-panel);
}

.portal-mini {
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.18), rgba(217, 120, 85, 0.1)),
    var(--map-ui-panel);
}

.portal-cave {
  background:
    linear-gradient(135deg, rgba(58, 49, 42, 0.62), rgba(109, 157, 202, 0.1)),
    var(--map-ui-panel);
}

.portal-mine {
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.16), rgba(90, 72, 55, 0.34)),
    var(--map-ui-panel);
}

.portal-gym {
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.18), rgba(125, 145, 98, 0.14)),
    var(--map-ui-panel);
}

.world-modal,
.achievement-modal,
.journal-modal,
.hall-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  padding: 18px;
  background: rgba(3, 3, 2, 0.76);
  backdrop-filter: blur(5px);
}

.world-modal.is-open,
.achievement-modal.is-open,
.journal-modal.is-open,
.hall-modal.is-open {
  display: grid;
  place-items: center;
}

.world-modal-card,
.journal-card,
.achievement-card {
  width: min(1040px, 100%);
  height: min(680px, 92vh);
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.14), rgba(109, 157, 202, 0.08)),
    var(--map-ui-panel-solid);
  box-shadow: var(--map-ui-shadow);
}

.achievement-card {
  overflow: auto;
}

.journal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.world-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#world-frame {
  width: 100%;
  height: calc(100% - 82px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
}

.world-interior {
  min-height: calc(100% - 82px);
}

.world-interior.is-hidden,
#world-frame.is-hidden {
  display: none;
}

.facility-scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1.12fr) minmax(280px, 0.88fr);
  align-items: stretch;
  gap: 20px;
  min-height: 460px;
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 120, 85, 0.18), transparent 34%),
    radial-gradient(circle at 88% 80%, rgba(125, 145, 98, 0.14), transparent 34%),
    #1d1d1b;
  background-size: auto;
}

.facility-vector {
  position: relative;
  min-height: 300px;
  border: 1px solid rgba(244, 243, 238, 0.18);
  clip-path: polygon(50% 0, 100% 24%, 82% 100%, 18% 100%, 0 24%);
  background:
    linear-gradient(160deg, rgba(109, 157, 202, 0.18), rgba(217, 120, 85, 0.08)),
    rgba(21, 21, 19, 0.82);
  box-shadow: inset 0 0 42px rgba(109, 157, 202, 0.12);
}

.facility-vector span {
  position: absolute;
  border: 1px solid currentColor;
  color: var(--map-ui-blue-500);
  transform: rotate(45deg);
}

.facility-vector span:nth-child(1) {
  left: 34%;
  top: 18%;
  width: 68px;
  height: 68px;
  color: var(--map-ui-orange-500);
}

.facility-vector span:nth-child(2) {
  left: 18%;
  bottom: 18%;
  width: 42px;
  height: 42px;
  color: var(--map-ui-red-500);
}

.facility-vector span:nth-child(3) {
  right: 18%;
  bottom: 28%;
  width: 52px;
  height: 52px;
  color: var(--map-ui-green-500);
}

.facility-vector span:nth-child(4) {
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  border-style: dashed;
  color: rgba(109, 157, 202, 0.5);
  transform: translate(-50%, -50%) rotate(45deg);
}

.facility-floor {
  position: relative;
  min-height: 390px;
  border: 1px solid rgba(244, 243, 238, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(246, 240, 232, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(246, 240, 232, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 24% 22%, rgba(217, 120, 85, 0.2), transparent 28%),
    rgba(21, 21, 19, 0.88);
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.facility-floor::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(246, 240, 232, 0.16);
  border-radius: 8px;
  pointer-events: none;
}

.facility-floor-grid {
  position: absolute;
  inset: 18px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(246, 240, 232, 0.05) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(246, 240, 232, 0.05) 50%, transparent 51%);
  background-size: 25% 25%;
  opacity: 0.75;
  z-index: 0;
}

.facility-zone {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(246, 240, 232, 0.18);
  border-radius: 8px;
  padding: 6px;
  background:
    linear-gradient(135deg, rgba(246, 240, 232, 0.1), rgba(109, 157, 202, 0.08)),
    rgba(5, 5, 5, 0.22);
  color: var(--map-ui-light-100);
  font: inherit;
  font-weight: 850;
  text-align: center;
  line-height: 1.15;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.facility-zone.is-action {
  cursor: pointer;
  border-color: rgba(217, 120, 85, 0.56);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.24), rgba(125, 145, 98, 0.13)),
    rgba(5, 5, 5, 0.2);
}

.facility-zone.is-action:hover,
.facility-zone.is-action:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(232, 152, 99, 0.9);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.24),
    inset 0 0 24px rgba(217, 120, 85, 0.16);
}

.facility-zone.is-bonus {
  border-color: rgba(125, 145, 98, 0.72);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.26), rgba(217, 120, 85, 0.12)),
    rgba(5, 5, 5, 0.25);
}

.facility-zone span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.facility-zone small {
  display: block;
  max-width: 100%;
  color: var(--map-ui-light-200);
  font-size: clamp(0.58rem, 1.2vw, 0.68rem);
  font-weight: 800;
  line-height: 1.1;
  opacity: 0.86;
  overflow-wrap: anywhere;
}

.facility-prop {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  min-width: 34px;
  border: 1px solid rgba(246, 240, 232, 0.2);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(5, 5, 5, 0.55);
  color: var(--map-ui-orange-400);
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  opacity: 0.68;
}

.facility-door,
.facility-player-marker {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(217, 120, 85, 0.55);
  border-radius: 8px 8px 0 0;
  padding: 4px 14px;
  background: rgba(217, 120, 85, 0.18);
  color: var(--map-ui-light-100);
  font-size: 0.75rem;
  font-weight: 900;
}

.facility-player-marker {
  left: 50%;
  bottom: 38px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.28));
}

.facility-red-avatar {
  position: relative;
  display: block;
  width: 30px;
  height: 42px;
  image-rendering: pixelated;
  background:
    linear-gradient(#ef3d35 0 0) 7px 0 / 16px 5px no-repeat,
    linear-gradient(#f4f3ee 0 0) 9px 5px / 12px 4px no-repeat,
    linear-gradient(#ef3d35 0 0) 4px 8px / 22px 4px no-repeat,
    linear-gradient(#2b211c 0 0) 8px 12px / 14px 4px no-repeat,
    linear-gradient(#f0c59c 0 0) 7px 15px / 16px 8px no-repeat,
    linear-gradient(#15191c 0 0) 7px 24px / 16px 11px no-repeat,
    linear-gradient(#ef3d35 0 0) 7px 24px / 6px 11px no-repeat,
    linear-gradient(#ef3d35 0 0) 17px 24px / 6px 11px no-repeat,
    linear-gradient(#262321 0 0) 8px 35px / 5px 6px no-repeat,
    linear-gradient(#262321 0 0) 17px 35px / 5px 6px no-repeat;
}

.facility-red-avatar::before,
.facility-red-avatar::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 5px;
  height: 10px;
  background: #f0c59c;
}

.facility-red-avatar::before {
  left: 2px;
}

.facility-red-avatar::after {
  right: 2px;
}

.facility-floor-pokedex {
  background-color: #1b221d;
}

.facility-floor-board {
  background-color: #241e1a;
}

.facility-floor-escape {
  background-color: #171715;
}

.facility-floor-minesweeper {
  background-color: #231d17;
}

.facility-floor-achievements,
.facility-floor-hall {
  background-color: #22231f;
}

.facility-floor-whip {
  background-color: #211b1b;
}

.facility-floor-gym {
  background:
    linear-gradient(90deg, transparent 49%, rgba(246, 240, 232, 0.07) 50%, transparent 51%),
    radial-gradient(circle at 50% 38%, rgba(109, 157, 202, 0.24), transparent 32%),
    #1b211d;
}

.facility-floor-center {
  background-color: #1f211d;
}

.facility-floor-shop {
  background-color: #222019;
}

.facility-floor-harbor {
  background:
    linear-gradient(0deg, rgba(109, 157, 202, 0.18), transparent 46%),
    #182127;
}

.facility-floor-safari {
  background-color: #1b2419;
}

.facility-floor-tower {
  background:
    radial-gradient(circle at 50% 18%, rgba(109, 157, 202, 0.22), transparent 34%),
    #20211f;
}

.facility-floor-nursery {
  background-color: #242019;
}

.facility-copy {
  align-self: center;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.facility-copy strong {
  color: var(--map-ui-light-100);
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
}

.facility-copy p {
  max-width: 48ch;
  color: var(--map-ui-light-200);
  line-height: 1.55;
}

.facility-status {
  display: grid;
  gap: 6px;
  max-width: 54ch;
}

.facility-status span {
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--map-ui-light-100);
  font-size: 0.88rem;
}

.facility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rank-summary,
.hall-form {
  border: 1px solid rgba(217, 120, 85, 0.34);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--map-ui-light-100);
}

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

.hall-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.achievement-next {
  border: 1px solid rgba(246, 240, 232, 0.16);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.16), rgba(109, 157, 202, 0.08)),
    rgba(10, 10, 9, 0.42);
}

.achievement-next-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.achievement-next-head div {
  display: grid;
  gap: 3px;
}

.achievement-next-head small,
.achievement-next-item em {
  color: var(--map-ui-orange-500);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.achievement-next-head strong {
  color: var(--map-ui-light-100);
  font-size: 1.05rem;
}

.achievement-next-head span {
  border: 1px solid rgba(246, 240, 232, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--map-ui-light-100);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

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

.achievement-next-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.achievement-next-item strong {
  color: var(--map-ui-light-100);
  line-height: 1.2;
}

.achievement-next-item span {
  color: var(--map-ui-light-200);
  font-size: 0.88rem;
  line-height: 1.35;
}

.achievement-next-item.is-complete {
  border-color: rgba(125, 145, 98, 0.75);
  background: rgba(125, 145, 98, 0.16);
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.achievement-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.achievement-item.is-cleared {
  border-color: rgba(125, 145, 98, 0.75);
  background: rgba(125, 145, 98, 0.18);
}

.achievement-item strong {
  display: block;
  color: var(--map-ui-light-100);
  margin-bottom: 4px;
}

.achievement-item.is-cleared strong {
  color: var(--map-ui-green-500);
}

.journal-summary,
.journal-next,
.journal-section {
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.journal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journal-summary span,
.journal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(217, 120, 85, 0.32);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--map-ui-light-100);
  font-size: 0.86rem;
  font-weight: 850;
}

.journal-next {
  display: grid;
  gap: 6px;
  border-color: rgba(217, 120, 85, 0.42);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.18), rgba(125, 145, 98, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.journal-next strong,
.journal-section h3 {
  color: var(--map-ui-light-100);
}

.journal-next span,
.journal-task span,
.journal-card small {
  color: var(--map-ui-light-200);
}

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

.journal-passport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 8px;
}

.journal-passport {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(246, 240, 232, 0.13);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(246, 240, 232, 0.06), transparent),
    rgba(5, 8, 6, 0.3);
}

.journal-passport.is-current {
  border-color: rgba(217, 120, 85, 0.7);
  box-shadow: inset 0 0 0 1px rgba(217, 120, 85, 0.18);
}

.journal-passport.is-complete {
  border-color: rgba(125, 145, 98, 0.7);
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.18), rgba(246, 240, 232, 0.04)),
    rgba(5, 8, 6, 0.3);
}

.journal-passport strong {
  color: var(--map-ui-light-100);
  font-size: 0.94rem;
}

.journal-passport span {
  color: var(--map-ui-light-200);
  font-size: 0.78rem;
  line-height: 1.35;
}

.journal-passport-reward {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(217, 120, 85, 0.42);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--map-ui-orange-400);
  background: rgba(217, 120, 85, 0.1);
  font-weight: 900;
}

.journal-passport.is-rewarded .journal-passport-reward {
  border-color: rgba(125, 145, 98, 0.62);
  color: var(--map-ui-green-500);
  background: rgba(125, 145, 98, 0.14);
}

.journal-passport-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.journal-passport-flag {
  border: 1px solid rgba(246, 240, 232, 0.15);
  border-radius: 999px;
  padding: 3px 6px;
  color: var(--map-ui-light-300);
  font-size: 0.68rem;
  font-weight: 850;
}

.journal-passport-flag.is-done {
  border-color: rgba(125, 145, 98, 0.7);
  color: var(--map-ui-green-500);
  background: rgba(125, 145, 98, 0.12);
}

.journal-passport-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.journal-passport-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--map-ui-blue-500), var(--map-ui-green-500));
}

.journal-progress {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(5, 8, 6, 0.32);
}

.journal-progress strong {
  color: var(--map-ui-light-100);
  font-size: 0.95rem;
}

.journal-progress span {
  color: var(--map-ui-light-200);
  font-size: 0.82rem;
}

.journal-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.journal-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--map-ui-orange-400), var(--map-ui-green-500));
}

.journal-progress.is-done {
  border-color: rgba(125, 145, 98, 0.68);
}

.journal-task-list {
  display: grid;
  gap: 8px;
}

.journal-system-checklist {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.journal-task {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(246, 240, 232, 0.12);
  border-radius: 8px;
  padding: 9px;
  background: rgba(5, 8, 6, 0.26);
}

.journal-task strong {
  color: var(--map-ui-light-100);
}

.journal-system-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.journal-system-action {
  flex: 0 0 auto;
  border: 1px solid rgba(217, 120, 85, 0.62);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(217, 120, 85, 0.14);
  color: var(--map-ui-light-100);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.journal-task.is-done {
  border-color: rgba(125, 145, 98, 0.72);
  background: rgba(125, 145, 98, 0.16);
}

.journal-task.is-next {
  border-color: rgba(217, 120, 85, 0.7);
}

.journal-system-item.is-next {
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.16), rgba(109, 157, 202, 0.08)),
    rgba(5, 8, 6, 0.3);
}

.hall-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 720px) {
  .special-event-choices,
  .hall-form {
    grid-template-columns: 1fr;
  }

  .achievement-next-list {
    grid-template-columns: 1fr;
  }

  .achievement-next-head {
    align-items: flex-start;
  }

  .journal-card {
    height: min(720px, 94dvh);
    padding: 12px;
  }

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

  .journal-passport-grid {
    grid-template-columns: 1fr;
  }

  .journal-system-checklist {
    grid-template-columns: 1fr;
  }

  .journal-system-item-head {
    align-items: flex-start;
  }

  .world-portal {
    padding: 8px 9px;
  }

  .arena-frame {
    height: min(560px, 68dvh);
    min-height: 420px;
  }
}

.prologue-modal {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(3, 3, 2, 0.76);
  backdrop-filter: blur(6px);
}

.prologue-modal.is-open {
  display: grid;
}

.prologue-card {
  display: flex;
  width: min(920px, 100%);
  max-height: min(800px, calc(100dvh - 44px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(248, 214, 109, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(125, 145, 98, 0.22), rgba(217, 120, 85, 0.1)),
    var(--map-ui-panel-solid);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.6);
}

.prologue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--map-ui-line);
  padding: 18px 18px 14px;
}

.prologue-head h2 {
  margin: 0;
  color: var(--map-ui-light);
}

.prologue-head span {
  display: block;
  max-width: 560px;
  margin-top: 6px;
  color: var(--map-ui-light-200);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.prologue-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(244, 243, 238, 0.1);
  padding: 10px 18px;
  color: var(--map-ui-light-200);
  font-size: 0.78rem;
  font-weight: 950;
}

.prologue-dots {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 5px;
}

.prologue-dot {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(248, 214, 109, 0.48);
  border-radius: 999px;
  background: rgba(246, 240, 232, 0.12);
}

.prologue-dot.is-active {
  background: var(--map-ui-orange);
  box-shadow: 0 0 0 3px rgba(217, 120, 85, 0.18);
}

.ghost-button {
  flex: 0 0 auto;
  border: 1px solid rgba(246, 240, 232, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--map-ui-light);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(248, 214, 109, 0.7);
  outline: none;
}

.prologue-scroll {
  display: block;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
  scrollbar-color: rgba(217, 120, 85, 0.65) rgba(255, 255, 255, 0.08);
}

.prologue-step {
  display: none;
  grid-template-columns: minmax(118px, 0.42fr) minmax(0, 0.58fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(244, 243, 238, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(5, 8, 6, 0.38);
}

.prologue-step.is-active {
  display: grid;
}

.prologue-step strong {
  display: block;
  color: var(--map-ui-light);
  font-size: 0.9rem;
  line-height: 1.32;
}

.prologue-step p {
  margin: 6px 0 0;
  color: var(--map-ui-light-200);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.46;
}

.prologue-photo {
  position: relative;
  min-height: 132px;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(248, 214, 109, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(125, 145, 98, 0.72), rgba(109, 157, 202, 0.4));
  background-size: 14px 14px, 14px 14px, auto;
  box-shadow: inset 0 -22px 34px rgba(0, 0, 0, 0.2);
}

.prologue-photo span {
  position: absolute;
  display: block;
}

.photo-label {
  right: 7px;
  bottom: 6px;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 3px 5px;
  background: rgba(0, 0, 0, 0.52);
  color: var(--map-ui-light);
  font-size: 0.58rem;
  font-weight: 950;
}

.photo-player,
.photo-pokemon,
.photo-ball,
.photo-battler,
.photo-badge {
  border: 2px solid rgba(4, 4, 3, 0.74);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.22);
}

.photo-player {
  left: 46%;
  top: 54%;
  width: 20px;
  height: 26px;
  border-radius: 7px 7px 5px 5px;
  background: linear-gradient(#d83b32 0 36%, #f6f0e8 36% 56%, #1f3d4c 56%);
}

.photo-pokemon {
  width: 24px;
  height: 20px;
  border-radius: 50% 48% 52% 44%;
  background: #d97855;
}

.photo-pokemon.one {
  left: 16%;
  top: 23%;
}

.photo-pokemon.two {
  right: 14%;
  top: 38%;
  background: #6d9dca;
}

.photo-pokemon.big {
  left: 17%;
  top: 28%;
  width: 46px;
  height: 38px;
  background: #7d9162;
}

.photo-ball {
  left: 28%;
  bottom: 18%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(#d83b32 0 48%, #111 48% 56%, #f6f0e8 56%);
}

.photo-key {
  width: 28px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  background: rgba(246, 240, 232, 0.92);
  color: #111;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 24px;
  text-align: center;
}

.key-w { left: 41%; top: 18%; }
.key-a { left: 26%; top: 43%; }
.key-s { left: 41%; top: 43%; }
.key-d { left: 56%; top: 43%; }

.photo-hand {
  left: 20%;
  bottom: 13%;
  width: 50px;
  height: 18px;
  border-radius: 999px;
  background: rgba(217, 120, 85, 0.86);
}

.photo-throw {
  left: 47%;
  top: 45%;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(248, 214, 109, 0.9);
  transform: rotate(-18deg);
}

.photo-ring {
  right: 18%;
  top: 28%;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(248, 214, 109, 0.9);
  border-radius: 50%;
}

.photo-slot {
  top: 32%;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(246, 240, 232, 0.32);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
}

.photo-slot:nth-child(1) { left: 16%; }
.photo-slot:nth-child(2) { left: 39%; }
.photo-slot:nth-child(3) { left: 62%; }
.photo-slot.active { background: rgba(109, 157, 202, 0.72); }
.photo-slot.evolve { border-color: rgba(216, 59, 50, 0.75); background: rgba(216, 59, 50, 0.18); }

.photo-arrow {
  left: 48%;
  bottom: 20%;
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: #f8d66d;
}

.photo-chip {
  left: 12%;
  width: 76px;
  height: 22px;
  border: 1px solid rgba(246, 240, 232, 0.26);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.46);
  color: var(--map-ui-light);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 22px;
  text-align: center;
}

.photo-chip.main { top: 18%; background: rgba(217, 120, 85, 0.7); }
.photo-chip:not(.main):nth-child(2) { top: 43%; }
.photo-chip:not(.main):nth-child(3) { top: 68%; }
.photo-line {
  right: 18%;
  top: 28%;
  width: 46px;
  height: 60px;
  border-right: 3px solid rgba(248, 214, 109, 0.84);
  border-bottom: 3px solid rgba(248, 214, 109, 0.84);
}

.photo-map {
  left: 15%;
  top: 16%;
  width: 70%;
  height: 70%;
  border: 2px solid rgba(0, 0, 0, 0.45);
  border-radius: 7px;
  background:
    radial-gradient(circle at 25% 30%, #7d9162 0 12%, transparent 13%),
    radial-gradient(circle at 74% 62%, #d7ad67 0 12%, transparent 13%),
    linear-gradient(135deg, #6d9dca, #7d9162);
}

.photo-portal {
  width: 22px;
  height: 34px;
  border: 3px solid rgba(248, 214, 109, 0.88);
  border-radius: 50%;
}

.photo-portal.a { left: 23%; top: 25%; }
.photo-portal.b { right: 22%; bottom: 24%; }
.photo-weather {
  right: 14%;
  top: 15%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f8d66d;
  box-shadow: 0 0 18px rgba(248, 214, 109, 0.66);
}

.photo-building {
  bottom: 22%;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(0, 0, 0, 0.55);
  border-radius: 5px;
  background: #6d9dca;
}

.photo-building::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: -13px;
  height: 17px;
  border: 2px solid rgba(0, 0, 0, 0.55);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #d97855;
}

.photo-building.lab { left: 14%; }
.photo-building.gym { left: 42%; background: #7d9162; }
.photo-building.cave { right: 13%; background: #a7a39a; }

.photo-battler {
  top: 33%;
  width: 36px;
  height: 38px;
  border-radius: 50% 50% 44% 44%;
  background: #d97855;
}

.photo-battler.left { left: 17%; }
.photo-battler.right { right: 17%; background: #6d9dca; }
.photo-gauge {
  left: 25%;
  right: 25%;
  bottom: 22%;
  height: 10px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  background: linear-gradient(90deg, #7d9162 0 62%, rgba(246, 240, 232, 0.18) 62%);
}

.photo-hit {
  left: 48%;
  top: 28%;
  width: 24px;
  height: 24px;
  background: #f8d66d;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
}

.photo-badge {
  top: 35%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #a7a39a;
}

.photo-badge.done { left: 18%; background: #7d9162; }
.photo-badge:nth-child(2) { left: 43%; }
.photo-badge.master { right: 18%; background: #f8d66d; }

.photo-save-card {
  left: 15%;
  top: 24%;
  width: 70px;
  height: 58px;
  border: 2px solid rgba(0, 0, 0, 0.48);
  border-radius: 8px;
  background: rgba(246, 240, 232, 0.9);
}

.photo-note {
  right: 23%;
  top: 22%;
  width: 18px;
  height: 48px;
  border-radius: 8px 8px 4px 4px;
  background: #6d9dca;
}

.photo-link {
  right: 18%;
  bottom: 24%;
  width: 46px;
  height: 14px;
  border-radius: 999px;
  background: #7d9162;
}

.prologue-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--map-ui-line);
  padding: 12px 18px 16px;
}

.prologue-actions button {
  white-space: nowrap;
}

.prologue-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

@media (max-width: 720px) {
  .prologue-modal {
    padding: 10px;
    align-items: stretch;
  }

  .prologue-card {
    max-height: calc(100dvh - 20px);
  }

  .prologue-head {
    display: block;
    padding: 14px;
  }

  .prologue-head .ghost-button {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .prologue-head span {
    padding-right: 42px;
  }

  .prologue-progress {
    padding: 9px 14px;
  }

  .prologue-scroll {
    padding: 10px;
  }

  .prologue-step {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
  }

  .prologue-photo {
    min-height: 118px;
  }

  .prologue-step strong {
    font-size: 0.82rem;
  }

  .prologue-step p {
    font-size: 0.72rem;
  }

  .prologue-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px 14px 14px;
  }
}

.tutorial-modal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3, 3, 2, 0.72);
  backdrop-filter: blur(5px);
}

.tutorial-modal.is-open {
  display: grid;
}

.tutorial-card {
  width: min(760px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.14), rgba(125, 145, 98, 0.1)),
    var(--map-ui-panel-solid);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.tutorial-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--map-ui-line);
  padding-bottom: 12px;
}

.tutorial-head h2 {
  margin: 0;
}

.tutorial-head span {
  max-width: 250px;
  color: var(--map-ui-light-300);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: right;
}

.tutorial-scroll {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 2px 0;
  scrollbar-color: rgba(217, 120, 85, 0.65) rgba(255, 255, 255, 0.08);
}

.tutorial-section {
  border: 1px solid rgba(244, 243, 238, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(5, 8, 6, 0.35);
}

.tutorial-section h3 {
  margin: 0 0 8px;
  color: var(--map-ui-light-100);
  font-size: 0.98rem;
}

.tutorial-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--map-ui-light-200);
  line-height: 1.52;
  font-size: 0.93rem;
}

.tutorial-card .primary {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .tutorial-modal {
    padding: 10px;
    align-items: stretch;
  }

  .tutorial-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }

  .tutorial-head {
    display: block;
  }

  .tutorial-head span {
    display: block;
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }

  .tutorial-section {
    padding: 11px 12px;
  }

  .tutorial-card ul {
    font-size: 0.9rem;
  }
}

.rocket-battle-card {
  width: min(420px, 100%);
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.14), rgba(244, 243, 238, 0.05)),
    var(--map-ui-panel-solid);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
}

.rocket-battle {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: rgba(3, 3, 2, 0.72);
  backdrop-filter: blur(5px);
  z-index: 6;
}

.rocket-battle::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(217, 120, 85, 0.22), transparent 24%),
    radial-gradient(circle at 50% 8%, rgba(200, 61, 53, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(244, 243, 238, 0.08), transparent 48%);
  animation: rocketBackdropFlash 1.4s ease-out both;
}

.rocket-battle.is-open {
  display: grid;
}

.rocket-battle[data-phase="arrival"] {
  cursor: pointer;
}

.rocket-battle[data-phase="arrival"] .rocket-battle-card {
  display: none;
}

.rocket-battle[data-phase="battle"] .rocket-arrival,
.rocket-battle[data-phase="charging"] .rocket-arrival,
.rocket-battle[data-phase="result"] .rocket-arrival {
  opacity: 0;
  transform: translateY(-36px) scale(0.7);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.rocket-arrival {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: auto;
  overflow: hidden;
  z-index: 3;
}

.rocket-spotlight {
  position: absolute;
  width: 58%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(217, 120, 85, 0.2), rgba(217, 120, 85, 0.05) 42%, transparent 68%);
  transform: rotate(-9deg);
  animation: rocketSpotlight 1.6s ease-out both;
}

.rocket-balloon {
  position: absolute;
  top: 3%;
  width: 240px;
  height: 310px;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: rocketBalloonDrop 1.45s cubic-bezier(0.16, 0.9, 0.24, 1.12) both, rocketFloat 2.6s ease-in-out 1.45s infinite;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.48));
}

.rocket-balloon:hover,
.rocket-balloon:focus-visible {
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.48)) drop-shadow(0 0 18px rgba(217, 120, 85, 0.58));
}

.rocket-balloon::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 204px;
  height: 204px;
  border: 5px solid rgba(244, 243, 238, 0.86);
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.92), transparent 18%),
    linear-gradient(145deg, #c83d35, #68221d 72%);
  box-shadow:
    inset -18px -20px 34px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(217, 120, 85, 0.24);
}

.rocket-balloon-mark {
  position: absolute;
  left: 50%;
  top: 74px;
  transform: translateX(-50%);
  z-index: 2;
  width: 98px;
  height: 98px;
  border: 5px solid #0a0905;
  border-radius: 50%;
  background: #f4f3ee;
  color: #0a0905;
  display: grid;
  place-items: center;
  font-size: 4.2rem;
  font-weight: 850;
  line-height: 1;
}

.rocket-balloon-shine {
  position: absolute;
  left: 54px;
  top: 24px;
  z-index: 3;
  width: 44px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  transform: rotate(32deg);
  filter: blur(1px);
}

.rocket-rope {
  position: absolute;
  top: 188px;
  width: 4px;
  height: 70px;
  background: linear-gradient(#d97855, #5b4538);
  z-index: 1;
}

.rocket-rope.left {
  left: 78px;
  transform: rotate(8deg);
}

.rocket-rope.right {
  right: 78px;
  transform: rotate(-8deg);
}

.rocket-basket {
  position: absolute;
  left: 60px;
  top: 252px;
  z-index: 2;
  width: 120px;
  height: 42px;
  border: 2px solid rgba(217, 120, 85, 0.68);
  border-radius: 8px;
  background: linear-gradient(180deg, #21170d, #050403);
  color: var(--map-ui-orange-400);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.rocket-sparks span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97855;
  box-shadow: 0 0 16px rgba(217, 120, 85, 0.46);
  animation: rocketSpark 1.4s ease-out both;
}

.rocket-sparks span:nth-child(1) { left: 24%; top: 28%; animation-delay: 0.15s; }
.rocket-sparks span:nth-child(2) { left: 74%; top: 30%; animation-delay: 0.24s; }
.rocket-sparks span:nth-child(3) { left: 34%; top: 64%; animation-delay: 0.38s; }
.rocket-sparks span:nth-child(4) { left: 67%; top: 66%; animation-delay: 0.48s; }
.rocket-sparks span:nth-child(5) { left: 50%; top: 18%; animation-delay: 0.58s; }

.rocket-arrival-copy {
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 8vh, 72px);
  transform: translateX(-50%);
  width: min(560px, calc(100% - 40px));
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(5, 5, 4, 0.84);
  color: var(--map-ui-light-200);
  text-align: center;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.rocket-battle-card {
  width: min(620px, 100%);
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100% - 24px));
  overflow: hidden;
  position: relative;
  z-index: 2;
  align-self: end;
  margin-bottom: 22px;
  animation: rocketCardReveal 0.38s ease-out 1.42s both;
}

.rocket-battle[data-phase="battle"] .rocket-battle-card,
.rocket-battle[data-phase="charging"] .rocket-battle-card,
.rocket-battle[data-phase="result"] .rocket-battle-card {
  align-self: center;
  margin-bottom: 0;
  animation-delay: 0s;
}

.rocket-duel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 14px;
}

.rocket-fighter,
.rocket-versus,
.rocket-charge-panel {
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  background: rgba(244, 243, 238, 0.055);
}

.rocket-fighter {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.rocket-fighter img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.rocket-fighter span,
.rocket-charge-panel span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.rocket-versus {
  display: grid;
  place-items: center;
  min-width: 48px;
  color: var(--map-ui-orange-400);
  font-weight: 850;
}

.rocket-charge-panel {
  grid-column: 1 / -1;
  padding: 12px;
}

.rocket-gauge {
  height: 15px;
  border: 1px solid var(--map-ui-line-strong);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
  background: rgba(0, 0, 0, 0.36);
}

.rocket-gauge-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--map-ui-green-500), var(--map-ui-orange-500));
  transition: width 0.12s linear;
}

.rocket-odds {
  display: grid;
  gap: 4px;
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 9px 10px;
  margin: 10px 0;
  background: rgba(246, 240, 232, 0.05);
  color: var(--map-ui-light-200);
}

.rocket-odds strong {
  color: var(--map-ui-orange-400);
}

.rocket-odds.is-favorable {
  border-color: rgba(111, 159, 115, 0.65);
  background: rgba(111, 159, 115, 0.14);
}

.rocket-odds.is-danger {
  border-color: rgba(201, 84, 84, 0.62);
  background: rgba(201, 84, 84, 0.13);
}

.battle-tactic-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.battle-tactic {
  min-height: 58px;
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 7px 6px;
  background: rgba(246, 240, 232, 0.055);
  color: var(--map-ui-light-100);
  text-align: center;
}

.battle-tactic strong,
.battle-tactic small {
  display: block;
}

.battle-tactic strong {
  font-size: 0.82rem;
}

.battle-tactic small {
  margin-top: 3px;
  color: var(--map-ui-light-200);
  font-size: 0.62rem;
  line-height: 1.15;
}

.battle-tactic.is-selected {
  border-color: rgba(217, 120, 85, 0.9);
  background: rgba(217, 120, 85, 0.18);
  box-shadow: inset 0 0 18px rgba(217, 120, 85, 0.12);
}

.battle-tactic.is-recommended {
  border-color: rgba(248, 214, 109, 0.72);
}

.battle-tactic-summary {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(248, 214, 109, 0.42);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0 6px;
  background: rgba(248, 214, 109, 0.09);
}

.battle-tactic-summary strong {
  color: var(--map-ui-light-100);
  font-size: 0.82rem;
}

.battle-tactic-summary span {
  color: var(--map-ui-light-200);
  font-size: 0.72rem;
  line-height: 1.25;
}

.battle-tactic-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
}

.battle-tactic-preview span {
  min-width: 0;
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 6px 5px;
  background: rgba(246, 240, 232, 0.045);
  color: var(--map-ui-light-200);
  text-align: center;
}

.battle-tactic-preview span.is-selected {
  border-color: rgba(217, 120, 85, 0.9);
  background: rgba(217, 120, 85, 0.16);
}

.battle-tactic-preview span.is-recommended {
  border-color: rgba(248, 214, 109, 0.72);
}

.battle-tactic-preview strong,
.battle-tactic-preview em,
.battle-tactic-preview small {
  display: block;
  line-height: 1.15;
}

.battle-tactic-preview strong {
  overflow: hidden;
  color: var(--map-ui-light-100);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-tactic-preview em {
  color: var(--map-ui-light-100);
  font-style: normal;
  font-weight: 850;
}

.battle-tactic-preview small {
  color: var(--map-ui-light-200);
  font-size: 0.62rem;
}

.battle-insight,
.battle-result-breakdown {
  color: var(--map-ui-light-100) !important;
  font-weight: 850;
}

.battle-result-breakdown {
  color: var(--map-ui-light-200) !important;
  font-size: 0.8rem;
}

.battle-result-scorecard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  text-align: left;
}

.battle-result-scorecard span {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid rgba(246, 240, 232, 0.14);
  border-radius: 8px;
  padding: 8px;
  background: rgba(12, 13, 12, 0.42);
}

.battle-result-scorecard small,
.battle-result-scorecard em {
  overflow: hidden;
  color: var(--map-ui-light-200);
  font-style: normal;
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-result-scorecard strong {
  overflow: hidden;
  color: var(--map-ui-light-100);
  font-size: 0.96rem;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-result-scorecard span[data-tone="good"] {
  border-color: rgba(111, 159, 115, 0.52);
  background: rgba(111, 159, 115, 0.14);
}

.battle-result-scorecard span[data-tone="bad"] {
  border-color: rgba(200, 61, 53, 0.5);
  background: rgba(200, 61, 53, 0.13);
}

.battle-result-scorecard span[data-tone="even"] {
  border-color: rgba(217, 120, 85, 0.36);
  background: rgba(217, 120, 85, 0.09);
}

.battle-result-advice {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(111, 159, 115, 0.54);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(111, 159, 115, 0.13);
  color: var(--map-ui-light-100);
  text-align: left;
  line-height: 1.45;
}

.rocket-result .battle-result-advice strong {
  color: var(--map-ui-green-500);
  font-size: 0.78rem;
}

.rocket-result .battle-result-advice em {
  overflow-wrap: anywhere;
  color: var(--map-ui-light-100);
  font-style: normal;
  font-size: 0.84rem;
}

.rocket-use-move {
  width: 100%;
}

.rocket-use-move:disabled {
  opacity: 0.45;
  cursor: default;
}

.rocket-result {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  margin-top: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.065);
}

.rocket-result.is-win {
  background:
    radial-gradient(circle at 50% 10%, rgba(217, 120, 85, 0.16), transparent 42%),
    rgba(125, 145, 98, 0.16);
}

.rocket-result.is-loss {
  background:
    radial-gradient(circle at 50% 0%, rgba(200, 61, 53, 0.2), transparent 42%),
    rgba(45, 20, 18, 0.62);
}

.rocket-result strong {
  color: var(--map-ui-orange-400);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.rocket-result-quote {
  border: 1px solid rgba(200, 61, 53, 0.5);
  border-radius: 8px;
  padding: 12px;
  background: rgba(200, 61, 53, 0.12);
  color: #f1d2cf;
  font-size: 1.1rem;
  font-weight: 850;
}

.rocket-choice-list {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  max-height: min(430px, 52vh);
  overflow: auto;
  overscroll-behavior: contain;
  margin-top: 16px;
  padding-right: 4px;
}

.rocket-choice {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
}

.rocket-choice:hover {
  border-color: rgba(217, 120, 85, 0.68);
  background: rgba(217, 120, 85, 0.13);
}

.rocket-choice.is-recommended {
  border-color: rgba(217, 120, 85, 0.82);
  background:
    linear-gradient(135deg, rgba(217, 120, 85, 0.16), rgba(109, 157, 202, 0.06)),
    rgba(255, 255, 255, 0.07);
}

.rocket-choice img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.rocket-choice span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.rocket-choice-main strong {
  display: block;
  margin-bottom: 4px;
}

.battle-recommend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  color: var(--map-ui-light-200);
  font-size: 0.74rem;
}

.battle-recommend {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid rgba(217, 120, 85, 0.72);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--map-ui-orange-400);
  font-size: 0.72rem;
  font-weight: 900;
}

.battle-choice-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.battle-choice-stats span {
  width: max-content;
  border: 1px solid rgba(246, 240, 232, 0.12);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--map-ui-light-200);
  font-size: 0.68rem;
  font-weight: 800;
}

.rocket-choice.is-recommended .battle-choice-stats span:first-child {
  border-color: rgba(217, 120, 85, 0.52);
  color: var(--map-ui-orange-400);
}

.rocket-choice em {
  color: var(--map-ui-orange-400);
  font-style: normal;
  font-weight: 800;
}

@keyframes rocketBalloonDrop {
  0% {
    opacity: 0;
    transform: translateY(-460px) scale(0.48) rotate(-14deg);
  }
  72% {
    opacity: 1;
    transform: translateY(22px) scale(1.05) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes rocketFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes rocketBackdropFlash {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0.8; }
}

@keyframes rocketArrivalSettle {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.76; transform: translateY(-18px) scale(0.78); }
}

@keyframes rocketSpotlight {
  0% { opacity: 0; transform: translateY(-20px) rotate(-16deg) scale(0.7); }
  100% { opacity: 1; transform: translateY(0) rotate(-9deg) scale(1); }
}

@keyframes rocketSpark {
  0% { opacity: 0; transform: scale(0.2); }
  30% { opacity: 1; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(0.4) translateY(26px); }
}

@keyframes rocketCardReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes facilityCelebrationPop {
  0% { opacity: 0; transform: translateY(18px) scale(0.88); }
  70% { opacity: 1; transform: translateY(-2px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes facilityCelebrationBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(210deg);
  }
}

@media (max-width: 720px) {
  .rocket-battle {
    padding: 10px;
  }

  .battle-result-scorecard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-result-scorecard span {
    padding: 7px;
  }

  .rocket-battle-card {
    max-height: calc(100% - 12px);
    padding: 14px;
  }

  .rocket-battle-card h2 {
    margin: 0 0 6px;
    font-size: clamp(1.15rem, 5vw, 1.7rem);
    line-height: 1.1;
  }

  .rocket-battle-card #rocket-copy {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .rocket-duel {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
  }

  .rocket-battle[data-phase="charging"] .rocket-duel,
  .rocket-battle[data-phase="result"] .rocket-duel {
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  }

  .rocket-versus {
    min-height: 26px;
    min-width: 32px;
  }

  .rocket-fighter {
    grid-template-columns: 42px 1fr;
    gap: 8px;
    padding: 7px;
  }

  .rocket-fighter img {
    width: 40px;
    height: 40px;
  }

  .rocket-battle[data-phase="charging"] .rocket-fighter,
  .rocket-battle[data-phase="result"] .rocket-fighter {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
  }

  .rocket-battle[data-phase="charging"] .rocket-fighter img,
  .rocket-battle[data-phase="result"] .rocket-fighter img {
    width: 32px;
    height: 32px;
  }

  .rocket-battle[data-phase="charging"] .rocket-fighter strong,
  .rocket-battle[data-phase="result"] .rocket-fighter strong {
    display: block;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rocket-battle[data-phase="charging"] .rocket-fighter span,
  .rocket-battle[data-phase="result"] .rocket-fighter span {
    overflow: hidden;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rocket-charge-panel {
    padding: 9px;
  }

  .rocket-gauge {
    height: 12px;
    margin: 6px 0;
  }

  .rocket-odds {
    margin: 7px 0;
    padding: 7px 8px;
  }

  .rocket-balloon {
    top: 2%;
    width: 184px;
    height: 238px;
  }

  .rocket-balloon::before {
    left: 14px;
    width: 156px;
    height: 156px;
  }

  .rocket-balloon-mark {
    top: 56px;
    width: 74px;
    height: 74px;
    font-size: 3rem;
  }

  .rocket-rope {
    top: 144px;
    height: 52px;
  }

  .rocket-rope.left {
    left: 60px;
  }

  .rocket-rope.right {
    right: 60px;
  }

  .rocket-basket {
    left: 45px;
    top: 194px;
    width: 94px;
  }

  .rocket-battle-card {
    margin-bottom: 14px;
  }

  .battle-tactic-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 7px 0;
  }

  .battle-tactic {
    min-height: 50px;
    padding: 5px;
  }

  .battle-tactic-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 6px 0 7px;
  }

  .rocket-choice-list {
    margin-top: 10px;
  }
}

.inventory-panel {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  margin-top: 10px;
  padding-right: 4px;
}

.inventory-panel.is-closed {
  display: none;
}

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

.ball-entry,
.tool-entry,
.caught-entry {
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(246, 240, 232, 0.06), rgba(246, 240, 232, 0.02)),
    rgba(20, 17, 15, 0.72);
}

.ball-entry,
.tool-entry {
  min-height: 58px;
  padding: 9px;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.tool-entry {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 9px;
  align-items: center;
}

.tool-entry img {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
}

.tool-entry strong {
  line-height: 1;
}

.ball-entry.is-selected {
  border-color: var(--map-ui-line-strong);
  background:
    linear-gradient(135deg, rgba(217, 119, 69, 0.2), rgba(246, 240, 232, 0.05)),
    rgba(20, 17, 15, 0.78);
  box-shadow: 0 0 0 3px rgba(217, 119, 69, 0.18);
}

.tool-entry:disabled {
  cursor: default;
  opacity: 0.55;
}

.ball-entry span,
.tool-entry span,
.caught-entry span {
  display: block;
  color: var(--map-ui-light-200);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.discovery-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--map-ui-line);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(111, 159, 115, 0.15), rgba(217, 119, 69, 0.08)),
    rgba(20, 17, 15, 0.68);
}

.discovery-panel-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-weight: 900;
}

.discovery-panel-head span {
  color: var(--map-ui-orange-400);
  font-size: 0.82rem;
}

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

.discovery-item {
  min-width: 0;
  border: 1px solid rgba(246, 240, 232, 0.1);
  border-radius: 7px;
  padding: 7px;
  background: rgba(12, 12, 11, 0.54);
  color: var(--map-ui-light-200);
}

.discovery-item.is-found {
  border-color: rgba(111, 159, 115, 0.5);
  background: rgba(111, 159, 115, 0.16);
  color: var(--ink);
}

.discovery-item strong,
.discovery-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-item strong {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.discovery-item span {
  margin-top: 2px;
  color: var(--map-ui-light-200);
  font-size: 0.7rem;
  font-weight: 800;
}

.caught-entry {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.caught-entry.is-shiny {
  border-color: rgba(232, 152, 99, 0.58);
  background: linear-gradient(135deg, rgba(232, 152, 99, 0.22), rgba(246, 240, 232, 0.055) 52%, rgba(0, 0, 0, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.caught-entry.has-evolution {
  border-color: rgba(255, 75, 75, 0.72);
  background: linear-gradient(135deg, rgba(255, 75, 75, 0.18), rgba(255, 255, 255, 0.055));
  box-shadow: 0 0 0 2px rgba(255, 75, 75, 0.14);
}

.caught-entry.is-partner {
  border-color: rgba(109, 157, 202, 0.72);
  background:
    linear-gradient(135deg, rgba(109, 157, 202, 0.22), rgba(248, 214, 109, 0.08)),
    rgba(20, 17, 15, 0.62);
  box-shadow: 0 0 0 2px rgba(109, 157, 202, 0.14);
}

.caught-entry img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.24));
}

.caught-entry strong {
  display: block;
  font-size: 0.9rem;
}

.evolution-status {
  display: inline-flex;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.evolution-status.is-loading {
  color: var(--map-ui-orange-400);
}

.evolution-status.is-locked {
  color: #d4c768;
}

.evolution-ready {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  border: 1px solid rgba(255, 75, 75, 0.56);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 75, 75, 0.16);
  color: #ff4b4b;
  font-size: 0.74rem;
  font-weight: 800;
}

.evolution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.evolve-action {
  border: 1px solid rgba(255, 75, 75, 0.46);
  border-radius: 7px;
  background: rgba(255, 75, 75, 0.14);
  color: #ffd9d9;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 7px;
}

@media (max-width: 900px) {
  body {
    overscroll-behavior-y: auto;
  }

  .app-shell {
    width: 100%;
    padding: max(10px, env(safe-area-inset-top)) 10px max(104px, calc(14px + env(safe-area-inset-bottom)));
    grid-template-rows: auto auto auto;
  }

  .topbar {
    margin-bottom: 10px;
    padding-bottom: 12px;
  }

  .topbar h1 {
    margin-bottom: 6px;
    font-size: clamp(1.7rem, 9vw, 2.8rem);
  }

  .topbar p:not(.eyebrow) {
    display: none;
  }

  .arena-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .control-panel {
    max-height: min(560px, 58dvh);
    order: 2;
    overflow: auto;
  }

  .panel-section:not([open]) {
    background:
      linear-gradient(135deg, rgba(246, 240, 232, 0.035), rgba(125, 145, 98, 0.045)),
      rgba(21, 21, 19, 0.72);
  }

  .panel-section summary {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(21, 21, 19, 0.88);
    backdrop-filter: blur(10px);
  }

  .arena-quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .world-actions {
    display: flex;
    gap: 8px;
    margin-inline: -2px;
    padding: 2px 16px 8px 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px 16px;
    scrollbar-gutter: stable;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%);
  }

  .world-actions button {
    flex: 0 0 min(148px, 36vw);
    scroll-snap-align: start;
  }

  .field-mission-card,
  .region-expedition-card,
  .route-focus-card {
    padding: 8px;
  }

  .field-mission-list,
  .region-expedition-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(148px, 42vw);
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .field-mission-list::-webkit-scrollbar,
  .region-expedition-list::-webkit-scrollbar {
    display: none;
  }

  .field-mission-item,
  .region-expedition-item {
    min-width: 0;
    padding: 6px;
  }

  .field-mission-item strong,
  .region-expedition-item strong {
    font-size: 0.74rem;
  }

  .field-mission-item span,
  .region-expedition-item span {
    font-size: 0.66rem;
  }

  .event-feed {
    max-height: 108px;
    overflow: auto;
  }

  .mobile-controls {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 12;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid var(--map-ui-line);
    border-radius: 8px;
    padding: 8px;
    background:
      linear-gradient(135deg, rgba(111, 159, 115, 0.14), rgba(217, 119, 69, 0.08)),
      var(--map-ui-panel);
    box-shadow: var(--map-ui-shadow);
    backdrop-filter: blur(12px);
  }

  body.arena-page .bgm-toggle {
    top: max(10px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    bottom: auto;
    z-index: 16;
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.76rem;
  }

  body.arena-page .bgm-import {
    display: none;
  }

  .field-directive {
    left: 10px;
    top: 10px;
    width: min(255px, calc(100% - 20px));
    padding: 7px 9px;
  }

  .field-directive strong {
    font-size: 0.86rem;
  }

  .field-directive span {
    font-size: 0.7rem;
  }

  .message {
    top: 92px;
    max-width: calc(100% - 28px);
  }

  .interaction-prompt {
    left: 10px;
    right: 132px;
    top: 84px;
    bottom: auto;
    width: auto;
    transform: none;
    padding: 7px 8px;
  }

  .interaction-prompt small {
    min-width: 50px;
    padding: 4px 7px;
    font-size: 0.62rem;
  }

  .interaction-prompt strong {
    font-size: 0.78rem;
  }

  .interaction-prompt span {
    font-size: 0.66rem;
  }

  .mobile-field-hud {
    display: grid;
  }

  .mobile-stick {
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    touch-action: none;
    user-select: none;
  }

  .mobile-stick-base {
    position: relative;
    width: 96px;
    height: 96px;
    border: 1px solid var(--map-ui-line-strong);
    border-radius: 50%;
    background:
      radial-gradient(circle at 50% 50%, rgba(217, 119, 69, 0.22), transparent 34%),
      rgba(246, 240, 232, 0.08);
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.28);
  }

  .mobile-stick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(232, 152, 99, 0.85);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--map-ui-green-500), var(--map-ui-orange-400));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
    transform: translate(-50%, -50%);
    transition: transform 0.08s linear;
  }

  .mobile-actions button {
    min-height: 30px;
    padding-inline: 5px;
    font-size: 0.66rem;
    touch-action: manipulation;
    user-select: none;
    white-space: nowrap;
  }

  .mobile-stick:active .mobile-stick-base,
  .mobile-actions button:active {
    transform: translateY(1px);
    border-color: var(--map-ui-line-strong);
  }

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

  .arena-frame {
    height: min(620px, calc(100dvh - 250px));
    min-height: 390px;
  }

  .inventory-panel {
    max-height: min(620px, 62dvh);
    overscroll-behavior: contain;
  }
}

@media (max-width: 720px) {
  .mobile-controls {
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .mobile-stick {
    justify-content: center;
    width: 100px;
    height: 100px;
  }

  .mobile-stick-base {
    width: 88px;
    height: 88px;
  }

  .mobile-stick-knob {
    width: 38px;
    height: 38px;
  }

  .world-actions {
    gap: 6px;
  }

  .world-portal span {
    font-size: 0.86rem;
  }

  .world-portal small {
    font-size: 0.7rem;
  }

  .arena-frame {
    height: min(520px, calc(100dvh - 230px));
    min-height: 360px;
  }

  .facility-scene {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
    gap: 14px;
  }

  .facility-floor {
    min-height: 270px;
  }

  .facility-zone {
    padding: 4px;
    font-size: 0.72rem;
  }

  .facility-zone small {
    display: none;
  }

  .facility-prop {
    font-size: 0.58rem;
    min-width: 26px;
    padding: 3px 5px;
  }

  .ball-list,
  .tool-list,
  .discovery-list {
    grid-template-columns: 1fr;
  }

  .mobile-field-hud {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .mobile-controls {
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 6px;
  }

  .mobile-stick {
    width: 82px;
    height: 82px;
  }

  .mobile-stick-base {
    width: 74px;
    height: 74px;
  }

  .mobile-actions button {
    min-height: 30px;
    padding-inline: 5px;
    font-size: 0.64rem;
  }

  .battle-tactic small {
    font-size: 0.56rem;
  }

  .battle-tactic-preview {
    gap: 4px;
  }

  .battle-tactic-preview span {
    padding: 4px;
  }

  .arena-frame {
    min-height: 330px;
  }

  .interaction-prompt {
    right: 124px;
    top: 82px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .interaction-prompt small {
    min-width: 46px;
  }
}
