:root {
  --bg: #07080d;
  --bg-deep: #030409;
  --panel: rgba(15, 18, 28, 0.92);
  --panel-soft: rgba(23, 28, 42, 0.82);
  --line: rgba(170, 255, 93, 0.16);
  --line-strong: rgba(255, 213, 74, 0.3);
  --text: #f5f8fb;
  --muted: #a8b3c7;
  --player: #ffd54a;
  --player-soft: rgba(255, 213, 74, 0.2);
  --rival: #ff4f8b;
  --rival-soft: rgba(255, 79, 139, 0.18);
  --neutral: #36d9ff;
  --ally: #aaff5d;
  --teal: #22ffc8;
  --shadow: 0 26px 54px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(170, 255, 93, 0.08) 0 18%, transparent 18% 100%),
    linear-gradient(225deg, rgba(255, 79, 139, 0.09) 0 16%, transparent 16% 100%),
    linear-gradient(180deg, #141726 0%, #07080d 46%, #030409 100%);
  color: var(--text);
  font-family: "Rajdhani", system-ui, sans-serif;
}

body {
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden,
.hidden-view,
.hidden-input {
  display: none !important;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding:
    calc(14px + var(--safe-top))
    14px
    calc(102px + var(--safe-bottom));
}

.portal-app-shell {
  padding-bottom: calc(24px + var(--safe-bottom));
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(transparent 0 95%, rgba(255, 255, 255, 0.03) 95% 100%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 58%);
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
}

.setup-locked .hud-bar,
.setup-locked .screen-stack,
.setup-locked .bottom-nav {
  display: none;
}

.setup-gate {
  position: relative;
  z-index: 7;
  display: grid;
  gap: 20px;
  min-height: calc(100vh - 130px);
  align-content: center;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(170, 255, 93, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(255, 79, 139, 0.14), transparent 34%),
    var(--panel);
}

.setup-gate::after {
  content: "";
  position: absolute;
  inset: auto -20% -20% -20%;
  height: 42%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 213, 74, 0.16) 0 12px,
      transparent 12px 24px
    );
  opacity: 0.22;
  transform: rotate(-7deg);
  pointer-events: none;
}

.setup-copy,
.setup-form {
  position: relative;
  z-index: 1;
}

.setup-copy h1 {
  margin: 0 0 8px;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(2.35rem, 16vw, 4.4rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.setup-form {
  display: grid;
  gap: 10px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hud-bar {
  position: sticky;
  top: calc(8px + var(--safe-top));
  z-index: 6;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(40, 86, 108, 0.24), rgba(8, 18, 26, 0.94)),
    var(--panel);
}

.hud-copy {
  min-width: 0;
}

.hud-eyebrow,
.section-kicker {
  margin: 0 0 3px;
  color: #8ed2ad;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-family: "Chakra Petch", sans-serif;
}

.hud-copy h1,
h2,
h3,
h4,
strong,
.status-pill,
.primary-cta,
.secondary-btn,
.compact-btn,
.nav-btn {
  font-family: "Chakra Petch", sans-serif;
}

.hud-copy h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.hud-copy h1 {
  font-size: 1.22rem;
  line-height: 1;
  text-transform: uppercase;
}

.support-copy {
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.97rem;
}

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

.hud-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-icon {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 12px;
}

.menu-icon span {
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.gps-icon {
  display: grid;
  place-items: center;
}

.gps-ring,
.gps-core {
  position: absolute;
  border-radius: 50%;
}

.gps-ring {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(119, 213, 127, 0.8);
}

.gps-core {
  width: 8px;
  height: 8px;
  background: #8ed2ad;
  box-shadow: 0 0 18px rgba(142, 210, 173, 0.7);
}

.install-icon {
  display: grid;
  place-items: center;
}

.install-icon span,
.install-icon span::before,
.install-icon span::after {
  position: absolute;
  content: "";
  background: var(--player);
}

.install-icon span {
  width: 3px;
  height: 15px;
  border-radius: 999px;
}

.install-icon span::before {
  width: 11px;
  height: 3px;
  left: -4px;
  bottom: -2px;
  border-radius: 999px;
}

.install-icon span::after {
  width: 9px;
  height: 9px;
  left: -3px;
  bottom: -4px;
  clip-path: polygon(50% 100%, 0 40%, 30% 40%, 30% 0, 70% 0, 70% 40%, 100% 40%);
}

.screen-stack,
.screen,
.stats-grid,
.micro-stats {
  display: grid;
  gap: 14px;
}

.screen.active-screen {
  display: grid;
}

.screen {
  align-content: start;
}

.status-panel,
.geo-panel,
.tactical-panel,
.mission-panel,
.proof-panel,
.profile-banner,
.profile-form-panel,
.dossier-panel,
.history-panel,
.battle-header-card,
.battle-map-card,
.score-strip,
.battle-mission-card,
.squad-summary,
.squad-panel,
.team-name-panel,
.location-panel,
.briefing-panel,
.portal-header,
.portal-panel {
  padding: 16px;
}

.status-panel {
  display: grid;
  gap: 12px;
}

.status-panel h2,
.profile-banner h2,
.squad-summary h2 {
  font-size: 1.5rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.team-name-tag,
.member-xp {
  display: inline-flex;
  width: fit-content;
  margin: 6px 0;
  color: var(--ally);
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.status-pill,
.timer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accent-player {
  color: var(--player);
  border-color: rgba(255, 181, 79, 0.28);
  background: rgba(255, 181, 79, 0.09);
}

.accent-rival {
  color: #ff909d;
  border-color: rgba(240, 95, 117, 0.24);
  background: rgba(240, 95, 117, 0.08);
}

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

.micro-card,
.stat-card {
  padding: 14px;
  text-align: center;
}

.micro-card span,
.stat-card span,
.score-box span,
.reward-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.micro-card strong {
  font-size: 1.32rem;
}

.panel-heading,
.battle-headline,
.objective-bar,
.reward-strip,
.range-control,
.action-row,
.legend-row,
.inline-form,
.control-bar {
  display: flex;
  gap: 12px;
}

.panel-heading,
.battle-headline {
  justify-content: space-between;
  align-items: flex-start;
}

.panel-heading h3,
.mission-card h4,
.battle-mission-card h3 {
  font-size: 1.12rem;
  text-transform: uppercase;
}

.geo-panel .support-copy {
  margin-top: 10px;
}

.geo-status-text {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.map-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 230px;
  margin-top: 14px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 181, 79, 0.14), transparent 20%),
    radial-gradient(circle at center, rgba(62, 124, 153, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(14, 33, 46, 0.95), rgba(7, 16, 24, 0.99));
  border: 1px solid rgba(131, 184, 206, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 18px 28px rgba(91, 158, 190, 0.08);
}

.map-frame-battle {
  min-height: 270px;
}

.real-map,
.leaflet-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: var(--text);
  background:
    linear-gradient(0deg, rgba(8, 19, 28, 0.38), rgba(8, 19, 28, 0.38)),
    radial-gradient(circle at center, rgba(62, 124, 153, 0.2), transparent 60%);
}

.map-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(0deg, rgba(10, 27, 37, 0.1), rgba(10, 27, 37, 0.1)),
    linear-gradient(180deg, transparent 0 70%, rgba(10, 32, 49, 0.36) 70% 100%);
  pointer-events: none;
}

.map-fallback strong {
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-fallback small {
  max-width: 240px;
  color: var(--muted);
  line-height: 1.35;
}

.map-frame.has-map .map-fallback {
  display: none;
}

.map-frame.map-off {
  min-height: 148px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035) 0 10px,
      transparent 10px 20px
    ),
    rgba(9, 11, 17, 0.96);
}

.map-frame.map-off .real-map {
  opacity: 0;
  pointer-events: none;
}

.leaflet-container {
  font-family: "Rajdhani", system-ui, sans-serif;
  background: #102532;
}

.leaflet-tile-pane {
  filter: saturate(0.86) brightness(0.72) contrast(1.08) hue-rotate(178deg);
}

.leaflet-control-zoom {
  display: none;
}

.leaflet-control-attribution {
  background: rgba(6, 13, 19, 0.78) !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.82) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(9, 20, 29, 0.96);
  color: var(--text);
  border: 1px solid rgba(255, 181, 79, 0.16);
}

.leaflet-popup-content {
  margin: 10px 12px;
  line-height: 1.35;
}

.leaflet-popup-content strong {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.leaflet-marker-shell {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.3);
}

.leaflet-marker-shell.player {
  background: var(--player);
}

.leaflet-marker-shell.objective {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, #ffeeb1 0 38%, #ffb54f 39% 68%, #ffb54f 69% 100%);
  box-shadow: 0 0 18px rgba(255, 181, 79, 0.72);
}

.leaflet-marker-shell.rival {
  background: var(--rival);
}

.leaflet-marker-shell.neutral {
  background: var(--neutral);
}

.leaflet-player-radius {
  stroke: rgba(255, 181, 79, 0.9);
  fill: rgba(255, 181, 79, 0.14);
}

.leaflet-battle-zone {
  stroke: rgba(142, 200, 255, 0.95);
  fill: rgba(142, 200, 255, 0.1);
}

.leaflet-route-line {
  stroke: rgba(255, 181, 79, 0.84);
  stroke-width: 3;
  stroke-dasharray: 8 8;
}

.map-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-marker.objective {
  width: 30px;
  height: 30px;
}

.map-marker.objective::before {
  background: radial-gradient(circle, rgba(255, 236, 164, 0.95) 0 34%, rgba(255, 181, 79, 0.92) 35% 60%, rgba(255, 181, 79, 0.15) 61% 100%);
}

.map-marker.objective::after {
  animation: ping 1.9s ease-out infinite;
  background: rgba(255, 181, 79, 0.18);
}

.map-marker.player::before {
  background: var(--player);
  box-shadow: 0 0 18px rgba(255, 181, 79, 0.7);
}

.map-marker.player::after {
  inset: 6px;
  background: rgba(255, 255, 255, 0.35);
}

.map-marker.rival::before {
  background: var(--rival);
  box-shadow: 0 0 18px rgba(240, 95, 117, 0.68);
}

.map-marker.rival::after {
  inset: 5px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  transform: rotate(45deg);
}

.map-marker.neutral::before {
  background: rgba(142, 200, 255, 0.95);
  box-shadow: 0 0 18px rgba(142, 200, 255, 0.54);
}

.map-marker.neutral::after {
  inset: 5px;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.legend-row {
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.legend-dot.objective {
  background: var(--player);
  box-shadow: 0 0 12px rgba(255, 181, 79, 0.6);
}

.legend-dot.rival {
  background: var(--rival);
}

.legend-dot.neutral {
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.mission-card {
  position: relative;
  padding: 18px;
  margin-top: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 181, 79, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 181, 79, 0.08), transparent 36%),
    rgba(9, 22, 31, 0.92);
  min-height: 206px;
  overflow: hidden;
}

.mission-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 0 92%, rgba(255, 255, 255, 0.03) 92% 100%);
  background-size: 100% 7px;
  opacity: 0.14;
  pointer-events: none;
}

.mission-kicker {
  margin-bottom: 8px;
  color: #8ed2ad;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-family: "Chakra Petch", sans-serif;
}

.mission-card h4 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.mission-card p {
  color: var(--muted);
  line-height: 1.35;
}

.mission-meta,
.bonus-list,
.dossier-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.mission-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-pill,
.bonus-item,
.dossier-item {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.meta-pill {
  font-size: 0.84rem;
}

.mission-callout {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.mission-callout strong {
  color: var(--ally);
  font-size: 0.88rem;
  text-transform: uppercase;
}

.mission-callout span {
  color: var(--muted);
  line-height: 1.32;
}

.material-callout {
  border-color: rgba(255, 213, 74, 0.24);
  background: rgba(255, 213, 74, 0.07);
}

.material-callout.ready {
  border-color: rgba(170, 255, 93, 0.22);
  background: rgba(170, 255, 93, 0.06);
}

.material-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mission-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mission-footer strong {
  color: var(--player);
  font-size: 1.7rem;
}

.mission-empty {
  display: grid;
  align-content: center;
}

.control-bar,
.action-row {
  flex-wrap: wrap;
  margin-top: 14px;
}

.range-control {
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

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

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

textarea {
  min-height: 94px;
  padding: 14px 16px;
  resize: vertical;
}

select {
  appearance: none;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #7e93a1;
}

.primary-cta,
.secondary-btn,
.proof-upload {
  min-height: 54px;
  border-radius: 18px;
  padding: 0 18px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.primary-cta {
  color: #161616;
  background: linear-gradient(135deg, #ffd77f, #ffb54f 55%, #ff9f34);
  box-shadow: 0 14px 24px rgba(255, 181, 79, 0.18);
}

.subtle-cta {
  flex: 1 1 180px;
}

.secondary-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-btn {
  min-height: 40px;
  padding: 0 14px;
}

.primary-cta:active,
.secondary-btn:active,
.proof-upload:active,
.nav-btn:active,
.hud-icon:active {
  transform: scale(0.98);
}

.proof-upload {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 18px;
  margin-top: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.proof-upload strong {
  font-size: 1.04rem;
}

.proof-upload small,
.panel-subhead small {
  color: var(--muted);
}

.proof-preview {
  margin-top: 14px;
  min-height: 210px;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(35, 70, 89, 0.2), transparent 24%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.proof-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-banner {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
}

.avatar-shell,
.avatar-orbit {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 204, 120, 0.2), transparent 62%),
    rgba(255, 181, 79, 0.08);
  border: 1px solid rgba(255, 181, 79, 0.24);
  box-shadow: inset 0 0 28px rgba(255, 181, 79, 0.12);
}

.avatar-orbit {
  width: 124px;
  height: 124px;
  margin: 0 auto 10px;
}

.avatar-image {
  display: block;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 181, 79, 0.18);
  object-fit: cover;
}

.battle-avatar {
  width: 98px;
  height: 98px;
}

.profile-form-panel {
  display: grid;
  gap: 12px;
}

.field-label {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.inline-form {
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1 1 180px;
}

.inline-form button {
  flex: 0 0 auto;
}

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

.stat-card strong {
  font-size: 1.24rem;
  text-transform: uppercase;
}

.dossier-item,
.bonus-item,
.history-item {
  display: grid;
  gap: 3px;
}

.dossier-item strong,
.bonus-item strong,
.history-item strong {
  font-size: 0.96rem;
}

.history-feed {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.history-item {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.history-item small {
  color: var(--muted);
}

.battle-header-card,
.battle-mission-card {
  background:
    linear-gradient(180deg, rgba(45, 96, 122, 0.2), transparent 28%),
    var(--panel);
}

.versus-grid {
  display: grid;
  grid-template-columns: 1fr 54px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.fighter-card {
  text-align: center;
}

.fighter-card strong {
  display: block;
  text-transform: uppercase;
  font-size: 1rem;
}

.fighter-card small {
  color: var(--muted);
}

.fighter-player strong,
.fighter-player small {
  color: #f8d5a0;
}

.versus-mark,
.score-versus {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: 0.12em;
}

.crest-rival {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(111, 185, 255, 0.2), transparent 64%),
    rgba(111, 185, 255, 0.06);
}

.crest-core {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 199, 113, 0.92) 0 42%, rgba(255, 199, 113, 0.25) 43% 100%);
}

.crest-sword {
  position: absolute;
  top: 18px;
  left: 52px;
  width: 8px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c6d0db, #5f6d78);
}

.sword-a {
  transform: rotate(44deg);
}

.sword-b {
  transform: rotate(-44deg);
}

.objective-bar {
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.objective-signal {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--player);
  box-shadow: 0 0 14px rgba(255, 181, 79, 0.62);
}

.score-strip {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  gap: 12px;
}

.score-box {
  padding: 14px;
  border-radius: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.score-box strong {
  font-size: 1.55rem;
}

.player-box strong {
  color: var(--player);
}

.rival-box strong {
  color: #ff919d;
}

.timer-pill {
  color: var(--player);
  border-color: rgba(255, 181, 79, 0.24);
  background: rgba(255, 181, 79, 0.08);
}

.reward-strip {
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reward-strip strong {
  color: var(--ally);
  font-size: 1.52rem;
}

.roster-grid,
.biome-options {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.roster-card,
.biome-tile {
  position: relative;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 181, 79, 0.06), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.roster-card {
  display: grid;
  gap: 7px;
}

.roster-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 213, 74, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.roster-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.roster-card strong,
.biome-tile strong {
  display: block;
  font-size: 0.98rem;
  text-transform: uppercase;
}

.roster-card small,
.biome-tile small {
  color: var(--muted);
}

.member-xp {
  margin: 8px 0 0;
  color: var(--player);
  font-size: 0.78rem;
}

.avatar-btn {
  width: 100%;
  margin-top: 4px;
}

.roster-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(240, 95, 117, 0.16);
  color: #ffd3d9;
  border: 1px solid rgba(240, 95, 117, 0.18);
}

.manual-biomes {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-subhead {
  display: grid;
  gap: 2px;
}

.biome-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.biome-tile {
  text-align: left;
  color: var(--text);
}

.biome-icon {
  font-size: 1.55rem;
}

.bonus-list {
  margin-top: 14px;
}

.bonus-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.portal-header {
  display: grid;
  gap: 16px;
}

.portal-topbar {
  grid-template-columns: 1fr auto;
}

.portal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.portal-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.portal-tab {
  min-height: 46px;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-family: "Chakra Petch", sans-serif;
  text-transform: uppercase;
}

.portal-tab.active {
  color: #121417;
  background: linear-gradient(135deg, #d8ff68, #ffd54a);
}

.mission-editor-form,
.form-grid,
.mission-review-list {
  display: grid;
  gap: 12px;
}

.portal-actions button {
  flex: 1 1 160px;
}

.review-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.mission-review-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.mission-review-card strong,
.mission-source {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  text-transform: uppercase;
}

.mission-review-card small {
  color: var(--muted);
}

.mission-source {
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ally);
  font-size: 0.68rem;
  background: rgba(170, 255, 93, 0.1);
}

.mission-source.base {
  color: var(--neutral);
  background: rgba(54, 217, 255, 0.1);
}

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

.danger-btn {
  color: #ffdce5;
  border-color: rgba(255, 79, 139, 0.26);
  background: rgba(255, 79, 139, 0.1);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  width: calc(100% - 28px);
  max-width: 532px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  transform: translateX(-50%);
  z-index: 6;
}

.nav-btn {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 60px;
  padding: 8px 4px;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-btn.active {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 181, 79, 0.14), rgba(255, 181, 79, 0.06)),
    rgba(255, 255, 255, 0.03);
}

.nav-icon {
  position: relative;
  width: 24px;
  height: 24px;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
}

.nav-icon-map::before {
  inset: 3px 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: skew(-12deg);
}

.nav-icon-map::after {
  left: 11px;
  top: 2px;
  width: 2px;
  height: 20px;
  background: currentColor;
}

.nav-icon-profile::before {
  left: 6px;
  top: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon-profile::after {
  left: 4px;
  bottom: 2px;
  width: 16px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.nav-icon-battle::before,
.nav-icon-battle::after {
  left: 11px;
  top: 1px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
}

.nav-icon-battle::before {
  transform: rotate(42deg);
}

.nav-icon-battle::after {
  transform: rotate(-42deg);
}

.nav-icon-team::before {
  left: 3px;
  top: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon-team::after {
  right: 3px;
  top: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: -7px 10px 0 -2px currentColor;
}

.nav-icon-portal::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon-portal::after {
  left: 7px;
  top: 8px;
  width: 10px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.nav-badge {
  position: absolute;
  top: 5px;
  right: 14px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rival);
  color: #fff5f6;
  font-style: normal;
  font-size: 0.72rem;
  line-height: 18px;
}

.completion-flash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 8, 12, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 9;
}

.completion-flash.show {
  opacity: 1;
}

.flash-core {
  width: min(320px, calc(100% - 40px));
  padding: 24px 20px;
  text-align: center;
  border-radius: 28px;
  border: 1px solid rgba(255, 181, 79, 0.25);
  background:
    radial-gradient(circle at top, rgba(255, 181, 79, 0.24), transparent 56%),
    rgba(7, 18, 26, 0.97);
}

.flash-core p {
  margin-bottom: 8px;
  color: #ffd48c;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: "Chakra Petch", sans-serif;
}

.flash-core strong {
  font-size: 2rem;
}

@keyframes ping {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
