.command-view {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.resource-strip em {
  display: block;
  margin-top: 5px;
  color: #8ee0a0;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-grid {
  grid-template-columns: repeat(3, 1fr);
}

.status-grid em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.status-action {
  cursor: pointer;
}

.status-action:focus-visible,
.status-action:hover {
  border-color: rgba(229, 195, 95, .72);
}

.skill-detail-card.skill-flash {
  border-color: rgba(229, 195, 95, .9);
  animation: skillFlash 1.2s ease-out both;
}

.world-panel,
.kingdom-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 22, 23, .92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.world-map {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  background: #10191c;
}

.world-map::after,
.kingdom-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.world-map.own-under-attack::after,
.kingdom-strip.under-attack::after {
  opacity: 1;
  background: url("../assets/world/effects/world-invasion_glow.png?v=20260619a") center / cover no-repeat;
  box-shadow: none;
  animation: invasionGlow 1s ease-in-out infinite;
}

.world-map.own-fighting::after {
  z-index: 13;
  opacity: 1;
  background: url("../assets/world/effects/world-dispatch_sweep.png?v=20260619a") 0 center / 600% 100% no-repeat;
  filter: drop-shadow(0 0 12px rgba(255, 196, 57, .5));
  mix-blend-mode: screen;
  animation: dispatchSweepFrames .9s steps(5, end) infinite, dispatchSweepPulse 1.8s ease-in-out infinite;
}

.kingdom-strip.reborn::after {
  opacity: 1;
  background: url("../assets/world/effects/world-rebirth_glow.png?v=20260619a") center / cover no-repeat;
  animation: rebirthPulse 1.4s ease-in-out infinite;
}

.world-fog {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.fog-tile {
  position: absolute;
  margin-left: -7.5%;
  margin-top: -7.5%;
  background:
    linear-gradient(rgba(1, 5, 7, .9), rgba(1, 5, 7, .94)),
    url("../assets/world/effects/world-fog_tile.png?v=20260619a") center / 100% 100% repeat;
  background-blend-mode: multiply, normal;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .62);
}

.world-map .world-lines {
  position: absolute;
  z-index: 12;
  pointer-events: auto;
}

.world-map .troop-flow {
  pointer-events: none;
}

.world-art,
.strip-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.target-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  background: rgba(21, 32, 30, .94);
}

.target-card.active {
  border-color: rgba(229, 195, 95, .72);
  background: rgba(33, 42, 34, .98);
  box-shadow: inset 0 0 0 1px rgba(229, 195, 95, .16), 0 0 18px rgba(229, 195, 95, .12);
}

.target-card button {
  width: auto;
  min-width: 70px;
  margin-top: 0;
}

.kingdom-strip {
  position: relative;
  aspect-ratio: 16 / 4.2;
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
}

.kingdom-strip .building-node {
  min-width: 48px;
  min-height: 34px;
  background: rgba(20, 29, 26, .8);
}

.kingdom-strip .shrine { left: 51%; top: 35%; }
.kingdom-strip .field { left: 12%; top: 58%; }
.kingdom-strip .mine { left: 25%; top: 42%; }
.kingdom-strip .lodge { left: 40%; top: 50%; }
.kingdom-strip .barracks { left: 65%; top: 48%; }
.kingdom-strip .wall { left: 84%; top: 42%; }

.kingdom-strip .monster {
  right: 5%;
  top: 46%;
}

.kingdom-strip .raid-slash {
  left: 74%;
  top: 39%;
}

.kingdom-strip .work-burst {
  left: 43%;
  top: 24%;
}

.tabbar {
  grid-template-columns: repeat(4, 1fr);
}

.map-panel,
.map-stage,
.map-art,
.fog-ring {
  display: none;
}

.realm-node::before {
  content: none;
  display: none;
}

.realm-node.under-attack .realm-art {
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .48)) drop-shadow(0 0 14px rgba(255, 52, 42, .78));
}

.realm-node.attacking .realm-art {
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .48)) drop-shadow(0 0 12px rgba(229, 195, 95, .62));
}

.realm-node.protected .realm-art {
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .48)) drop-shadow(0 0 10px rgba(116, 199, 220, .62));
}

.realm-node small {
  display: block;
  position: absolute;
  left: 50%;
  top: 66px;
  max-width: 76px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(13, 19, 19, .62);
  color: var(--muted);
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realm-node.under-attack {
  box-shadow: none;
  animation: nodeDanger 1s ease-in-out infinite;
}

.realm-node.attacking {
  box-shadow: none;
}

.realm-node.attacking::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 30px;
  height: 30px;
  --move-frame-shift: -120px;
  background: url("../assets/world/effects/world-march_status.png?v=20260619a") left center / 400% 100% no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .52));
  transform: translateX(-50%);
  animation: moveIconFrames .42s steps(4) infinite, dispatchDot 1s ease-in-out infinite;
}

.realm-node.moving::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -30px;
  width: 34px;
  height: 34px;
  --move-frame-shift: -120px;
  background: url("../assets/world/effects/world-march_status.png?v=20260619a") left center / 400% 100% no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55));
  animation: moveIconFrames .4s steps(4) infinite, moveStatusFloat .72s ease-in-out infinite;
}

.realm-node.being-absorbed {
  border-color: rgba(198, 120, 255, .95);
}

.realm-node.being-absorbed::after,
.realm-node.absorbing::after {
  content: "";
  position: absolute;
  inset: -18px;
  background: url("../assets/world/effects/world-absorb_vortex.png?v=20260619a") center / contain no-repeat;
  pointer-events: none;
  animation: spinAbsorb 2.4s linear infinite;
}

.realm-node.reborn {
  filter: drop-shadow(0 0 10px rgba(142, 224, 160, .45));
}

.realm-node.protected {
  box-shadow: none;
}

.march-line.incoming::before {
  --route-color: #4bd8ff;
  --route-glow: rgba(75, 216, 255, .64);
}

.march-line.outgoing::before {
  --route-color: #ff5d4f;
  --route-glow: rgba(255, 84, 59, .62);
}

.march-line.support::before {
  --route-color: #79f0a1;
  --route-glow: rgba(99, 236, 142, .58);
}

.march-line.fighting::before {
  --route-color: #ff6357;
  --route-glow: rgba(255, 59, 52, .68);
}

.march-line.fighting {
  animation: invasionGlow .85s ease-in-out infinite;
}

.stat-line {
  color: var(--gold);
  font-weight: 900;
}

.move-marker {
  position: absolute;
  z-index: 8;
  display: none;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -48px;
  --move-frame-shift: -216px;
  background: url("../assets/world/effects/world-move_marker.png?v=20260619a") left center / 400% 100% no-repeat;
  pointer-events: none;
}

.move-marker.active {
  display: block;
  animation: moveIconFrames .58s steps(4) infinite, moveTargetDrop 1.1s ease-out infinite;
}

.absorb-mark {
  position: absolute;
  z-index: 7;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  pointer-events: none;
}

.absorb-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/world/effects/world-absorb_vortex.png?v=20260619a") center / contain no-repeat;
  animation: spinAbsorb 2.6s linear infinite;
}

.absorb-mark::after {
  content: attr(data-timer) " · " attr(data-rate);
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(16, 20, 24, .86);
  color: #f6efd7;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.choice-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 7, 8, .72);
}

.choice-modal.hidden {
  display: none;
}

.choice-card {
  width: min(100%, 380px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 32, 30, .98);
  padding: 16px;
  box-shadow: var(--shadow);
}

.choice-card p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.choice-card button {
  width: 100%;
  margin-top: 8px;
}

@keyframes invasionGlow {
  50% { opacity: .55; }
}

@keyframes dispatchSweepFrames {
  from { background-position: 0 center; }
  to { background-position: 100% center; }
}

@keyframes dispatchSweepPulse {
  50% { opacity: .72; filter: drop-shadow(0 0 18px rgba(255, 196, 57, .72)); }
}

@keyframes rebirthPulse {
  50% { opacity: .45; }
}

@keyframes nodeDanger {
  50% { transform: translateY(-1px) scale(1.04); }
}

@keyframes dispatchDot {
  50% { transform: translate(-50%, -7px); opacity: .45; }
}

@keyframes spinAbsorb {
  to { transform: rotate(360deg); }
}

@keyframes moveIconFrames {
  to { background-position-x: var(--move-frame-shift); }
}

@keyframes moveStatusFloat {
  0% {
    transform: translate(-50%, 0) scale(1) rotate(-4deg);
  }
  25% {
    transform: translate(-60%, -2px) scale(1.04) rotate(3deg);
  }
  50% {
    transform: translate(-50%, -6px) scale(1.08) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(70, 230, 255, .65));
  }
  75% {
    transform: translate(-40%, -2px) scale(1.04) rotate(-3deg);
  }
  100% {
    transform: translate(-50%, 0) scale(1) rotate(-4deg);
  }
}

@keyframes moveTargetDrop {
  0% {
    transform: translateY(-8px) scale(.92);
    opacity: .2;
  }
  35% {
    transform: translateY(0) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translateY(4px) scale(1);
    opacity: .76;
  }
}

@keyframes skillFlash {
  45% { box-shadow: 0 0 0 3px rgba(229, 195, 95, .28); }
}

@media (max-width: 360px) {
  .target-card {
    grid-template-columns: 1fr;
  }

  .target-card button {
    width: 100%;
    margin-top: 8px;
  }

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