
.support-explainer {
  border-color: #385a6d;
}
.support-explainer header span {
  color: #e4c86f;
}
.support-row {
  min-height: 72px;
  transition:
    border-color 0.16s,
    background 0.16s,
    opacity 0.16s;
}
.support-row.support-ready {
  border-color: #347158;
  background: linear-gradient(145deg, #0d211b, #0c1920);
}
.support-row.support-ready .support-state {
  color: #72d69c;
}
.support-row.support-blocked {
  opacity: 0.58;
  cursor: not-allowed;
}
.support-row.support-blocked:hover {
  border-color: #263d4d;
  background: #0d1822;
}
.support-row.support-blocked .support-state {
  color: #df8f96;
}
.fire-rules {
  border-color: #31566a;
  background: linear-gradient(145deg, #0c1d29, #0b161e);
}
.fire-rules header span {
  color: #7fdbf2;
}
.fire-rules p {
  line-height: 1.55;
}
:root {
  --hud-glow: rgba(87, 205, 242, 0.18);
  --hud-gold: rgba(242, 202, 99, 0.16);
  --danger: #f06a72;
}

.battle-screen {
  height: 100dvh;
  min-height: min(620px, 100dvh);
  overflow: hidden;
}
.battle-header {
  gap: 10px;
  background: linear-gradient(
    180deg,
    rgba(9, 17, 25, 0.99),
    rgba(6, 12, 18, 0.98)
  );
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}
.brand.compact {
  min-width: 168px;
}
.battle-metrics {
  gap: 5px;
}
.battle-metrics .metric {
  min-width: 78px;
  padding: 5px 7px;
  background: rgba(13, 25, 35, 0.82);
}
.battle-metrics .base-metric {
  min-width: 136px;
  border-color: #315c4b;
  background: linear-gradient(
    145deg,
    rgba(20, 56, 44, 0.42),
    rgba(9, 17, 24, 0.82)
  );
}
.battle-main {
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(31, 93, 117, 0.08),
      transparent 43%
    ),
    #060e15;
}
.battle-map-column {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 58px;
  gap: 6px;
  padding: 6px;
}

.battlefield-brief {
  display: grid;
  grid-template-columns: 132px minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
}
.battlefield-brief > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #294454;
  border-radius: 9px;
  background: linear-gradient(
    145deg,
    rgba(18, 33, 45, 0.96),
    rgba(7, 15, 22, 0.96)
  );
  padding: 8px 11px;
}
.battlefield-brief span {
  display: block;
  color: #6dcbea;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}
.battlefield-brief b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #f1f9fc;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.battlefield-brief p,
.battlefield-brief small {
  display: block;
  margin: 3px 0 0;
  overflow: hidden;
  color: #8ca1ae;
  font-size: 7px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.battlefield-brief .brief-phase {
  border-color: #43738a;
  background:
    radial-gradient(
      circle at 16% 50%,
      rgba(85, 200, 235, 0.16),
      transparent 62%
    ),
    #0d1d28;
}
.brief-phase > b {
  font-size: 13px;
}
.brief-phase b i {
  color: #f0cf73;
  font-style: normal;
}
.battlefield-brief .rule {
  border-color: #51482c;
  background:
    radial-gradient(
      circle at 12% 50%,
      rgba(224, 185, 83, 0.09),
      transparent 60%
    ),
    #0d1820;
}
.battlefield-brief .rule span {
  color: #e4bf61;
}

.battlefield-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 324px;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}
.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #213846;
  border-radius: 10px;
  background:
    radial-gradient(circle at center, rgba(36, 83, 99, 0.18), transparent 68%),
    #050b10;
}
.canvas-wrap {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, calc(100vh * 1.735));
  height: auto;
  aspect-ratio: 1180/680;
  max-width: none;
  max-height: 100%;
  margin: 0;
  border: 1px solid #345367;
  border-radius: 9px;
  background: #071019;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}
#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
}
.map-orientation {
  position: absolute;
  inset: 8px 10px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.map-orientation span {
  border: 1px solid rgba(86, 125, 145, 0.45);
  border-radius: 5px;
  background: rgba(5, 12, 18, 0.82);
  padding: 4px 6px;
  color: #a4b7c1;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.sector-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #2a4759;
  border-radius: 10px;
  background: linear-gradient(165deg, #0e1b25, #071018);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}
.sector-rail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #243d4c;
  background: rgba(20, 38, 51, 0.55);
}
.sector-rail > header span {
  display: block;
  color: #70d2ef;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.14em;
}
.sector-rail > header b {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.03em;
}
.sector-rail > header small {
  max-width: 100px;
  color: #748e9d;
  font-size: 6px;
  line-height: 1.3;
  text-align: right;
}
.lane-picker {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  padding: 8px;
  overflow: auto;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: #34566a transparent;
}
.deployment-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.mode-control,
.reserve-readout {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 7px;
  align-content: center;
  border: 1px solid #2d495a;
  border-radius: 8px;
  background: #0b1821;
  color: #95abb7;
  padding: 7px;
  text-align: left;
}
.mode-control {
  cursor: pointer;
}
.mode-control:hover {
  border-color: #4f9ebc;
}
.mode-control.active {
  border-color: #70d4f1;
  background: linear-gradient(145deg, #153b4e, #0b202c);
  box-shadow: inset 0 0 0 1px rgba(112, 212, 241, 0.1);
}
.mode-control.reserve-control {
  border-color: #5b502d;
}
.mode-control.reserve-control.active {
  border-color: #e1be62;
  background: linear-gradient(145deg, #3a3016, #181a16);
}
.mode-control span,
.reserve-readout span {
  grid-row: 1/3;
  align-self: center;
  color: #72d3ef;
  font-size: 8px;
  font-weight: 1000;
}
.reserve-control span,
.reserve-readout span {
  color: #e5c76d;
}
.mode-control b,
.reserve-readout b {
  font-size: 7px;
}
.mode-control small,
.reserve-readout small {
  margin-top: 2px;
  color: #6f8998;
  font-size: 6px;
}
.sector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.sector-tab {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  border: 1px solid #293f4e;
  border-radius: 8px;
  background: #0a151e;
  color: #8fa4af;
  padding: 7px;
  text-align: left;
  cursor: pointer;
  transition: 0.14s;
}
.sector-tab:hover,
.sector-tab.inspected {
  border-color: #4e88a2;
  background: #102534;
}
.sector-tab.active {
  border-color: #70d3f1;
  color: #eefbff;
  box-shadow: inset 0 0 0 1px rgba(112, 211, 241, 0.12);
}
.sector-tab.hot:not(.active) {
  border-color: #694348;
}
.sector-tab > span {
  grid-row: 1/3;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  margin-right: 5px;
  border: 1px solid #34566b;
  border-radius: 6px;
  background: #102b3a;
  color: #81dcf5;
  font-size: 11px;
  font-weight: 1000;
}
.sector-tab > b {
  justify-self: end;
  color: #f0d071;
  font-size: 13px;
}
.sector-tab > small {
  grid-column: 2;
  overflow: hidden;
  color: #8199a7;
  font-size: 5px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sector-tab > em {
  grid-column: 1/-1;
  height: 3px;
  margin-top: 6px;
  border-radius: 3px;
  background: #1b2b34;
  overflow: hidden;
}
.sector-tab > em i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d4ad4e, #ef6871);
}
.sector-focus {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  border: 1px solid #2a4353;
  border-radius: 9px;
  background: linear-gradient(
    155deg,
    rgba(17, 31, 42, 0.96),
    rgba(7, 15, 22, 0.96)
  );
  padding: 10px;
}
.sector-focus.high {
  border-color: #684247;
}
.sector-focus header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.sector-focus header span,
.enemy-composition > span,
.tactical-call > span {
  display: block;
  color: #6dccea;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.11em;
}
.sector-focus h3 {
  margin: 4px 0 0;
  font-size: 12px;
}
.sector-focus header strong {
  color: #f0cb68;
  font-size: 8px;
  text-align: right;
}
.sector-focus header strong small {
  display: block;
  margin-top: 4px;
  color: #91a5b0;
  font-size: 6px;
}
.terrain-description {
  margin: 8px 0 0;
  color: #9aadb7;
  font-size: 8px;
  line-height: 1.45;
}
.focus-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 9px;
}
.focus-stats span {
  border: 1px solid #243b49;
  border-radius: 6px;
  background: #0a151d;
  padding: 6px;
  color: #718b9a;
  font-size: 6px;
  text-align: center;
}
.focus-stats b {
  display: block;
  color: #e9f6fa;
  font-size: 10px;
}
.enemy-composition,
.tactical-call {
  margin-top: 8px;
  border-top: 1px solid #213743;
  padding-top: 8px;
}
.enemy-composition p,
.tactical-call p {
  margin: 4px 0 0;
  color: #9db0ba;
  font-size: 7px;
  line-height: 1.4;
}
.tactical-call {
  border: 1px solid #3a4e3b;
  border-left: 3px solid #dfbd61;
  border-radius: 7px;
  background: rgba(46, 39, 18, 0.34);
  padding: 8px;
}
.tactical-call > span {
  color: #e1bd5f;
}
.sector-focus footer {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 5px;
  margin-top: auto;
  padding-top: 9px;
}
.sector-focus footer button {
  border: 1px solid #35566a;
  border-radius: 7px;
  background: #101f2b;
  color: #aec8d4;
  padding: 7px 5px;
  font-size: 6px;
  font-weight: 1000;
  cursor: pointer;
}
.sector-focus footer button:hover {
  border-color: #69cae9;
  color: #fff;
}
.sector-focus footer .primary {
  border-color: #5ac0e2;
  background: linear-gradient(145deg, #194d64, #103347);
  color: #effbff;
}
.field-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
  padding: 7px 9px;
  border-top: 1px solid #213744;
  background: #08131b;
}
.field-legend > b {
  grid-column: 1/-1;
  color: #8da4b1;
  font-size: 6px;
}
.field-legend > span {
  color: #859ba8;
  font-size: 6px;
}
.field-legend > small {
  grid-column: 1/-1;
  color: #657e8c;
  font-size: 6px;
  line-height: 1.3;
}
.field-legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
}
.ally-dot {
  background: #65c8f5;
}
.enemy-dot {
  background: #ef5c66;
}

.battle-status {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(280px, 420px);
  gap: 7px;
  align-items: center;
  padding: 0;
}
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 50%;
  height: 1px;
  background: #294354;
}
.node {
  z-index: 1;
  height: 46px;
  border-radius: 8px;
  background: #0b1720;
}
.node.current {
  border-color: #64c9e9;
  background: linear-gradient(145deg, #16445a, #0d2938);
  box-shadow: 0 0 25px rgba(85, 195, 230, 0.16);
}
.node.current span {
  font-size: 13px;
}
.node:not(.current) {
  transform: scale(0.94);
}
.objective {
  height: 46px;
  background: linear-gradient(145deg, #0e1b25, #09131b);
}

.action-dock {
  background: linear-gradient(
    180deg,
    rgba(7, 13, 20, 0.99),
    rgba(5, 10, 16, 0.99)
  );
  box-shadow: 0 -14px 35px rgba(0, 0, 0, 0.22);
}
.dock-tools button {
  min-width: 60px;
  color: #8da3b0;
}
.dock-tools button:hover {
  background: #142b39;
}
.phase-actions {
  align-items: center;
}
.restart-wave {
  border-color: #694249;
  background: #20151a;
  color: #e5a8ad;
}
.dock-primary {
  min-width: 190px;
  border-color: #78d9f5;
  background: linear-gradient(145deg, #1e607b, #123d52);
  box-shadow: 0 0 30px rgba(78, 190, 228, 0.17);
}

.tutorial-skip-entry {
  position: fixed;
  z-index: 204;
  top: 13px;
  right: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  border: 1px solid #69484c;
  border-radius: 8px;
  background: rgba(29, 17, 21, 0.96);
  color: #dbaeb2;
  padding: 9px 12px;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  transition:
    opacity 0.2s ease,
    transform 0.24s ease,
    visibility 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.tutorial-skip-entry.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.tutorial-skip-entry:hover {
  border-color: #d78088;
  color: #ffd9dc;
}
.tutorial-skip-confirm {
  position: fixed;
  z-index: 245;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(1, 5, 8, 0.78);
  backdrop-filter: blur(6px);
  padding: 18px;
  transition:
    opacity 0.2s ease,
    visibility 0.2s;
}
.tutorial-skip-confirm.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.tutorial-skip-card {
  width: min(560px, calc(100vw - 28px));
  border: 1px solid #805059;
  border-top: 4px solid #e36c78;
  border-radius: 15px;
  background: linear-gradient(155deg, #1b222a, #090f15 72%);
  padding: 31px;
  text-align: center;
  box-shadow:
    0 38px 120px #000,
    0 0 55px rgba(220, 88, 101, 0.12);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tutorial-skip-confirm.open .tutorial-skip-card {
  transform: none;
}
.tutorial-skip-card > span {
  color: #db8089;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 0.16em;
}
.tutorial-skip-card h2 {
  margin: 12px 0 0;
  color: #fff1f2;
  font-size: clamp(25px, 5vw, 42px);
  line-height: 1.08;
}
.tutorial-skip-card p {
  margin: 16px auto 24px;
  max-width: 470px;
  color: #aebbc2;
  font-size: 12px;
  line-height: 1.6;
}
.tutorial-skip-card > div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 9px;
}
.tutorial-skip-card button {
  border: 1px solid #49616d;
  border-radius: 9px;
  background: #101d25;
  color: #c6d5dc;
  padding: 14px 12px;
  font-size: 9px;
  font-weight: 1000;
  cursor: pointer;
}
.tutorial-skip-card #tutorialSkipConfirmBtn {
  border-color: #b75b65;
  background: linear-gradient(145deg, #762f38, #4d2027);
  color: #fff0f1;
}
.tutorial-skip-card button:hover,
.tutorial-skip-card button:focus-visible {
  filter: brightness(1.18);
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}
.tutorial-objective-bar {
  position: fixed;
  z-index: 192;
  top: 10px;
  left: 50%;
  width: min(520px, calc(100vw - 210px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -18px);
  pointer-events: none;
  border: 1px solid #4d849d;
  border-radius: 11px;
  background: linear-gradient(
    135deg,
    rgba(13, 34, 47, 0.98),
    rgba(6, 17, 25, 0.98)
  );
  padding: 9px 10px 9px 14px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.48);
  transition:
    opacity 0.24s ease,
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0.24s;
}
.tutorial-objective-bar.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.tutorial-objective-bar div {
  min-width: 0;
}
.tutorial-objective-bar span,
.tutorial-objective-bar b,
.tutorial-objective-bar small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tutorial-objective-bar span {
  color: #7ddbf5;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}
.tutorial-objective-bar b {
  margin-top: 3px;
  color: #f3fbfd;
  font-size: 11px;
}
.tutorial-objective-bar small {
  margin-top: 2px;
  color: #8faab6;
  font-size: 8px;
}
.tutorial-objective-bar button {
  flex: 0 0 auto;
  border: 1px solid #5daac6;
  border-radius: 7px;
  background: #153d50;
  color: #e9faff;
  padding: 8px 10px;
  font-size: 7px;
  font-weight: 1000;
  cursor: pointer;
}
.guide-spotlight {
  position: fixed;
  z-index: 188;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border: 3px solid #76dcf7;
  border-radius: 12px;
  box-shadow:
    0 0 0 9999px rgba(2, 7, 11, 0.58),
    0 0 0 7px rgba(118, 220, 247, 0.11),
    0 0 42px rgba(96, 210, 243, 0.75);
  transition:
    left 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    top 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.18s ease,
    visibility 0.18s;
  animation: spotlight-pulse 1.15s ease-in-out infinite alternate;
}
.guide-spotlight.open {
  opacity: 1;
  visibility: visible;
}
@keyframes spotlight-pulse {
  to {
    border-color: #d0f6ff;
    box-shadow:
      0 0 0 9999px rgba(2, 7, 11, 0.53),
      0 0 0 10px rgba(118, 220, 247, 0.07),
      0 0 55px rgba(96, 210, 243, 0.86);
  }
}
.guide-arrow-layer {
  position: fixed;
  z-index: 189;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  visibility: hidden;
  overflow: visible;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s;
}
.guide-arrow-layer.open {
  opacity: 1;
  visibility: visible;
}
.guide-arrow-layer path {
  fill: none;
  stroke: #8ae4fb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
  filter: drop-shadow(0 0 7px rgba(88, 211, 244, 0.95));
  animation: guide-dash 0.9s linear infinite;
}
.guide-arrow-layer marker path {
  fill: #8ae4fb;
  stroke: none;
  animation: none;
}
@keyframes guide-dash {
  to {
    stroke-dashoffset: -18;
  }
}
.tutorial-target-live {
  outline: 3px solid #8ae4fb !important;
  outline-offset: 4px;
  filter: drop-shadow(0 0 9px rgba(96, 210, 243, 0.78));
  animation: tutorial-target-pulse 1.15s ease-in-out infinite alternate;
}
@keyframes tutorial-target-pulse {
  to {
    outline-color: #e2faff;
    outline-offset: 7px;
    filter: drop-shadow(0 0 16px rgba(96, 210, 243, 0.96));
  }
}
.training-guide {
  position: fixed;
  z-index: 190;
  left: 16px;
  top: 80px;
  width: min(400px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
  overflow: hidden;
  border: 1px solid #528ba5;
  border-radius: 15px;
  background: linear-gradient(
    155deg,
    rgba(16, 31, 43, 0.995),
    rgba(6, 14, 21, 0.995)
  );
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.72),
    inset 0 1px rgba(255, 255, 255, 0.04);
  transition:
    opacity 0.2s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0.2s;
}
.training-guide.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.training-guide > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid #315064;
  background: linear-gradient(
    90deg,
    rgba(30, 73, 94, 0.62),
    rgba(15, 35, 48, 0.52)
  );
}
.training-guide > header span {
  display: block;
  color: #79ddf7;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 0.15em;
}
.training-guide > header b {
  display: block;
  margin-top: 4px;
  color: #bdd2dc;
  font-size: 9px;
}
.training-guide > header button {
  width: 32px;
  height: 32px;
  border: 1px solid #42677b;
  border-radius: 8px;
  background: #0e1c27;
  color: #c2d8e2;
  cursor: pointer;
}
.guide-progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
  padding: 10px 15px 0;
}
.guide-progress i {
  height: 4px;
  border-radius: 3px;
  background: #263e4d;
}
.guide-progress i.done {
  background: #447f92;
}
.guide-progress i.current {
  background: #82e0f8;
  box-shadow: 0 0 15px rgba(104, 213, 245, 0.55);
}
.training-guide > section {
  padding: 13px 15px 10px;
}
.guide-eyebrow {
  color: #e4c66d;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}
.training-guide h2 {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.025em;
}
.training-guide section p {
  margin: 8px 0 0;
  color: #a1b3bd;
  font-size: 10px;
  line-height: 1.55;
}
.training-guide section b {
  color: #f1fbff;
}
.guide-context {
  margin: 0 15px 11px;
  border: 1px solid #2f586c;
  border-left: 4px solid #6fd5f2;
  border-radius: 7px;
  background: #102736;
  padding: 10px 11px;
  color: #b6d1dc;
  font-size: 9px;
  line-height: 1.45;
}
.training-guide > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 15px;
  border-top: 1px solid #29414f;
  background: #09151e;
}
.training-guide > footer > div {
  display: flex;
  gap: 6px;
}
.training-guide footer button {
  border: 1px solid #42677b;
  border-radius: 7px;
  background: #132b3a;
  color: #d7e9ef;
  padding: 8px 11px;
  font-size: 8px;
  font-weight: 1000;
  cursor: pointer;
}
.training-guide footer button:disabled {
  opacity: 0.3;
}
.training-guide .guide-next {
  border-color: #73d7f3;
  background: #1a526b;
  color: #fff;
}
.training-guide .guide-action {
  border-color: #827039;
  background: #3b3218;
  color: #f7dc84;
}
.training-guide .guide-skip {
  border: 0;
  background: transparent;
  color: #9b6c73;
  padding-left: 0;
}
.training-guide .guide-skip:hover {
  color: #f09aa3;
}
.guide-launch {
  flex: 0 0 auto;
}

@media (max-width: 1366px) {
  .battle-map-column {
    grid-template-rows: 58px minmax(0, 1fr) 54px;
  }
  .battlefield-grid {
    grid-template-columns: minmax(0, 1fr) 306px;
  }
  .battlefield-brief {
    grid-template-columns: 116px 1.12fr 1fr;
  }
  .battlefield-brief > div {
    padding: 6px 8px;
  }
  .battlefield-brief p,
  .battlefield-brief small {
    font-size: 6px;
  }
  .battle-metrics .metric {
    min-width: 69px;
  }
  .brand.compact {
    min-width: 142px;
  }
  .brand.compact .brand-mark {
    width: 32px;
    height: 32px;
  }
  .brand.compact h1 {
    font-size: 12px;
  }
  .field-legend {
    padding: 5px 7px;
  }
  .lane-picker {
    gap: 5px;
    padding: 6px;
  }
  .sector-focus {
    padding: 8px;
  }
  .terrain-description {
    font-size: 7px;
  }
  .enemy-composition p,
  .tactical-call p {
    font-size: 6px;
  }
  .action-dock {
    grid-template-columns: minmax(320px, 1fr) auto minmax(330px, 1fr);
  }
}

@media (max-width: 1050px) {
  .battle-screen {
    min-height: min(560px, 100dvh);
    grid-template-rows: 92px minmax(0, 1fr) 116px;
  }
  .battle-header {
    height: 92px;
  }
  .battle-map-column {
    grid-template-rows: 58px minmax(0, 1fr) 50px;
  }
  .battlefield-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .sector-rail > header small,
  .field-legend {
    display: none;
  }
  .sector-rail {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .focus-stats {
    display: none;
  }
  .sector-focus h3 {
    font-size: 10px;
  }
  .terrain-description {
    margin-top: 5px;
  }
  .enemy-composition,
  .tactical-call {
    margin-top: 5px;
    padding-top: 5px;
  }
  .sector-focus footer {
    padding-top: 5px;
  }
  .context-panel {
    top: 92px;
    bottom: 116px;
  }
}

@media (max-width: 720px) {
  .battle-screen {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
    grid-template-rows: auto auto auto;
  }
  .battle-header {
    position: sticky;
    top: 0;
    height: 112px;
    z-index: 45;
  }
  .battle-main {
    min-height: 690px;
    overflow: visible;
  }
  .battle-map-column {
    min-height: 690px;
    grid-template-rows: 86px 1fr 50px;
    padding: 4px;
  }
  .battlefield-brief {
    grid-template-columns: 82px 1fr 1fr;
    gap: 3px;
  }
  .battlefield-brief > div {
    padding: 6px;
  }
  .battlefield-brief p,
  .battlefield-brief small {
    white-space: normal;
    font-size: 6px;
    line-height: 1.25;
  }
  .battlefield-brief b {
    font-size: 8px;
  }
  .brief-phase > b {
    font-size: 10px;
  }
  .battlefield-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, 1fr) 250px;
    gap: 4px;
  }
  .map-orientation {
    display: none;
  }
  .sector-rail {
    grid-template-rows: auto 1fr;
  }
  .lane-picker {
    display: grid;
    grid-template-columns: 145px 1fr;
    grid-template-rows: auto 1fr;
    gap: 5px;
    overflow: hidden;
  }
  .deployment-mode {
    grid-column: 1;
    grid-row: 1/3;
    grid-template-columns: 1fr;
    align-content: start;
  }
  .sector-tabs {
    grid-column: 2;
    grid-row: 1;
  }
  .sector-focus {
    grid-column: 2;
    grid-row: 2;
    overflow: auto;
  }
  .field-legend {
    display: none;
  }
  .battle-status {
    grid-template-columns: 1fr;
  }
  .objective {
    display: none;
  }
  .action-dock {
    position: sticky;
    bottom: 0;
    height: 122px;
    z-index: 42;
  }
  .tutorial-skip-entry {
    top: 8px;
    right: 7px;
    padding: 7px 8px;
    font-size: 6px;
  }
  .tutorial-objective-bar {
    top: 6px;
    left: 6px;
    right: 139px;
    width: auto;
    padding: 7px 7px 7px 10px;
    transform: translateY(-18px);
  }
  .tutorial-objective-bar.open {
    transform: none;
  }
  .tutorial-objective-bar b {
    font-size: 9px;
  }
  .tutorial-objective-bar small {
    font-size: 7px;
  }
  .tutorial-objective-bar button {
    padding: 7px;
  }
  .tutorial-skip-card {
    padding: 25px 17px;
  }
  .tutorial-skip-card p {
    font-size: 10px;
  }
  .tutorial-skip-card > div {
    grid-template-columns: 1fr;
  }
  .training-guide {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 132px !important;
    width: auto;
    max-height: calc(100dvh - 146px);
    overflow: auto;
  }
  .training-guide h2 {
    font-size: 15px;
  }
  .training-guide section p {
    font-size: 9px;
  }
  .training-guide > footer {
    position: sticky;
    bottom: 0;
  }
  .guide-arrow-layer {
    display: none !important;
  }
  .guide-spotlight {
    box-shadow:
      0 0 0 9999px rgba(2, 7, 11, 0.46),
      0 0 32px rgba(96, 210, 243, 0.8);
  }
}

.operation-forecast {
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid #3d5968;
  border-radius: 9px;
  background: linear-gradient(145deg, #10232f, #09151d);
}
.operation-forecast > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid #294452;
}
.operation-forecast > header span {
  display: block;
  color: #72d2ef;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}
.operation-forecast > header b {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.operation-forecast > header small {
  max-width: 205px;
  color: #8299a5;
  font-size: 6px;
  line-height: 1.35;
  text-align: right;
}
.operation-forecast > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
}
.operation-forecast article {
  min-width: 0;
  border: 1px solid #293f4d;
  border-radius: 7px;
  background: #0a151d;
  padding: 7px;
}
.operation-forecast article.current {
  border-color: #6bd2ee;
  background: #12364a;
  box-shadow: 0 0 20px rgba(88, 204, 238, 0.12);
}
.operation-forecast article.landmark {
  border-color: #745a31;
  background: linear-gradient(145deg, #2b2414, #10171a);
}
.operation-forecast article > span {
  display: block;
  color: #6fcbe8;
  font-size: 6px;
  font-weight: 1000;
}
.operation-forecast article > b {
  display: block;
  margin-top: 4px;
  color: #f2f8fa;
  font-size: 11px;
}
.operation-forecast article > small {
  display: block;
  margin-top: 3px;
  color: #8296a1;
  font-size: 5px;
  line-height: 1.35;
}
.operation-forecast article > em {
  display: block;
  margin-top: 5px;
  color: #efcb6e;
  font-size: 6px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1.3;
}
.operation-forecast article > p {
  margin: 6px 0 0;
  border-top: 1px solid rgba(112, 210, 239, 0.18);
  padding-top: 5px;
  color: #b7d2dc;
  font-size: 6px;
  line-height: 1.45;
}
.redeploy-card {
  border-color: #456171;
  background: linear-gradient(145deg, #102531, #0a171f);
}
.redeploy-card header span {
  color: #f0cf72;
}
.redeploy-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
}
.redeploy-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid #385b6d;
  border-radius: 6px;
  background: #112937;
  color: #e8f8fc;
  padding: 7px;
  cursor: pointer;
}
.redeploy-list button:hover {
  border-color: #70d2ed;
  background: #173849;
}
.redeploy-list b {
  font-size: 8px;
}
.redeploy-list small {
  color: #efcf78;
  font-size: 7px;
  font-weight: 1000;
}
.setting-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 8px;
}
.setting-actions button {
  border: 1px solid #35586b;
  border-radius: 6px;
  background: #102532;
  color: #bed5df;
  padding: 8px 5px;
  font-size: 6px;
  font-weight: 1000;
  cursor: pointer;
}
.setting-actions button:hover {
  border-color: #6fd2ef;
  color: #fff;
}
.gameover-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.gameover-actions .action {
  min-height: 42px;
}
@media (max-width: 720px) {
  .operation-forecast > header {
    display: block;
  }
  .operation-forecast > header small {
    display: block;
    max-width: none;
    margin-top: 5px;
    text-align: left;
  }
  .operation-forecast > div {
    grid-template-columns: 1fr;
  }
  .operation-forecast article {
    display: grid;
    grid-template-columns: 62px 48px 1fr;
    align-items: center;
    gap: 5px;
  }
  .operation-forecast article > b,
  .operation-forecast article > small,
  .operation-forecast article > em {
    margin: 0;
  }
  .operation-forecast article > em {
    grid-column: 3;
  }
  .operation-forecast article > p {
    grid-column: 1/-1;
  }
  .redeploy-list,
  .setting-actions {
    grid-template-columns: 1fr;
  }
  .gameover-actions {
    grid-template-columns: 1fr;
  }
}

.story-layer {
  position: fixed;
  z-index: 170;
  inset: 0;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 28% 46%,
      rgba(53, 126, 154, 0.18),
      transparent 35%
    ),
    linear-gradient(180deg, rgba(3, 8, 12, 0.78), rgba(2, 6, 10, 0.94));
  backdrop-filter: blur(5px);
}
.story-layer.open {
  display: block;
}
.story-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 180px #000;
}
.story-character {
  --character-color: #79d8f4;
  position: absolute;
  left: 7%;
  bottom: 150px;
  width: min(32vw, 430px);
  height: min(63vh, 650px);
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--character-color) 45%, transparent);
  clip-path: polygon(24% 0, 80% 4%, 100% 26%, 92% 100%, 8% 100%, 0 28%);
  background:
    radial-gradient(
      circle at 50% 30%,
      color-mix(in srgb, var(--character-color) 25%, transparent),
      transparent 55%
    ),
    linear-gradient(160deg, #122735, #071018);
}
.story-character span {
  color: var(--character-color);
  font-size: clamp(54px, 9vw, 130px);
  font-weight: 1000;
  text-shadow: 0 0 60px var(--character-color);
}
.story-box {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 4%;
  min-height: 145px;
  border: 1px solid #47758a;
  border-left: 5px solid #79d8f4;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(13, 28, 39, 0.98),
    rgba(5, 13, 20, 0.99)
  );
  padding: 18px 22px 15px;
  box-shadow: 0 28px 90px #000;
}
.story-box header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.story-box header > b {
  color: #80ddf5;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.story-box header button {
  border: 1px solid #345667;
  border-radius: 5px;
  background: #0b1922;
  color: #8da9b6;
  padding: 5px 8px;
  font-size: 7px;
  font-weight: 900;
}
.story-box header button.active {
  border-color: #e0be62;
  color: #f1d47f;
}
.story-box > p {
  max-width: 1050px;
  min-height: 50px;
  margin: 16px 0 8px;
  color: #eef8fb;
  font-size: clamp(14px, 1.25vw, 20px);
  line-height: 1.55;
}
.story-box > small {
  display: block;
  color: #66828f;
  font-size: 7px;
  text-align: right;
  letter-spacing: 0.12em;
}
.story-box > small.waiting {
  color: #e0be62;
  animation: story-wait-pulse 1s ease-in-out infinite;
}
@keyframes story-wait-pulse {
  50% {
    opacity: 0.55;
  }
}
.story-layer.ui-hidden .story-box,
.story-layer.ui-hidden .story-character {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.story-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 9px;
}
.story-choices button {
  border: 1px solid #4d7181;
  border-radius: 8px;
  background: #102431;
  color: #e8f6fa;
  padding: 13px;
  text-align: left;
}
.story-choices button:hover {
  border-color: #e1be62;
  background: #2d2919;
}
.story-choices b,
.story-choices small {
  display: block;
}
.story-choices small {
  margin-top: 6px;
  color: #91a8b2;
  font-size: 9px;
  line-height: 1.4;
}
.story-history {
  position: absolute;
  z-index: 2;
  top: 4%;
  right: 4%;
  bottom: 22%;
  width: min(560px, 92vw);
  display: none;
  border: 1px solid #426677;
  border-radius: 10px;
  background: #07131c;
  padding: 12px;
  overflow: auto;
}
.story-history.open {
  display: block;
}
.story-history header {
  display: flex;
  justify-content: space-between;
}
.story-history p {
  border-bottom: 1px solid #1d3440;
  padding: 9px;
}
.story-history p b,
.story-history p span {
  display: block;
}
.story-history p b {
  color: #67cce9;
  font-size: 8px;
}
.story-history p span {
  margin-top: 4px;
  color: #b5c7cf;
  font-size: 10px;
  line-height: 1.45;
}
.radio-strip {
  position: fixed;
  z-index: 160;
  top: 88px;
  left: 50%;
  width: min(720px, 90vw);
  display: flex;
  gap: 14px;
  transform: translate(-50%, -30px);
  opacity: 0;
  border: 1px solid #436c7e;
  border-left: 4px solid #72d5f2;
  border-radius: 8px;
  background: rgba(6, 17, 25, 0.96);
  padding: 11px 14px;
  pointer-events: none;
  transition: 0.25s;
}
.radio-strip.open {
  transform: translate(-50%, 0);
  opacity: 1;
}
.radio-strip b {
  color: #70d4f1;
  font-size: 8px;
  white-space: nowrap;
}
.radio-strip span {
  color: #dcebf0;
  font-size: 9px;
}
.story-highlight {
  animation: story-pulse 0.7s alternate infinite;
}
@keyframes story-pulse {
  to {
    box-shadow:
      0 0 0 4px rgba(112, 214, 243, 0.23),
      0 0 35px #58c8e8;
  }
}
@media (max-width: 720px) {
  .story-character {
    left: 10%;
    bottom: 220px;
    width: 80vw;
    height: 45vh;
  }
  .story-box {
    left: 3%;
    right: 3%;
    bottom: 2%;
    padding: 13px;
  }
  .story-box > p {
    font-size: 13px;
  }
  .story-choices {
    grid-template-columns: 1fr;
  }
}
.dev-scene-panel {
  position: fixed;
  z-index: 300;
  top: 8px;
  right: 8px;
  width: 280px;
  border: 1px solid #b47e53;
  border-radius: 7px;
  background: #160f0b;
  color: #f0d8bf;
  padding: 9px;
  box-shadow: 0 12px 45px #000;
}
.dev-scene-panel > * {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.dev-scene-panel b {
  margin: 0;
  color: #f0bd75;
  font-size: 9px;
}
.dev-scene-panel select,
.dev-scene-panel button {
  border: 1px solid #785d44;
  background: #281a12;
  color: #f2ddc4;
  padding: 6px;
  font-size: 8px;
}
.dev-scene-panel pre {
  max-height: 110px;
  overflow: auto;
  white-space: pre-wrap;
  color: #bca48d;
  font-size: 7px;
}

.fight-button.training-required {
  border-color: #e2bc55;
  box-shadow:
    0 0 0 10px rgba(226, 188, 85, 0.06),
    0 0 58px rgba(226, 188, 85, 0.18),
    inset 0 0 35px rgba(104, 217, 250, 0.12);
}
.fight-button.training-required span {
  max-width: 170px;
  margin: auto;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0.08em;
}
.test-complete-screen {
  position: fixed;
  z-index: 260;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(55, 157, 190, 0.2),
      transparent 36%
    ),
    linear-gradient(145deg, #07131d, #02070b 70%);
  padding: 28px;
}
.test-complete-screen.open {
  display: flex;
}
.test-complete-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 49.9%,
      rgba(109, 211, 240, 0.08) 50%,
      transparent 50.1%
    ),
    linear-gradient(
      transparent 49.9%,
      rgba(109, 211, 240, 0.05) 50%,
      transparent 50.1%
    );
  background-size: 80px 80px;
}
.test-end-panel {
  position: relative;
  width: min(720px, 94vw);
  border: 1px solid #4c839a;
  border-radius: 18px;
  background: linear-gradient(
    155deg,
    rgba(17, 39, 53, 0.98),
    rgba(5, 14, 21, 0.99)
  );
  padding: 48px;
  text-align: center;
  box-shadow:
    0 40px 120px #000,
    inset 0 1px rgba(255, 255, 255, 0.05);
}
.test-end-panel > span {
  color: #79d9f3;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.18em;
}
.test-end-panel h2 {
  margin: 13px 0 0;
  color: #f1fbff;
  font-size: clamp(30px, 5vw, 58px);
  letter-spacing: 0.025em;
}
.test-end-panel p {
  margin: 18px 0 26px;
  color: #a8bdc7;
  font-size: 14px;
  line-height: 1.65;
}
.test-end-panel button,
.test-survey-submit {
  min-width: 260px;
  border: 1px solid #83dff7;
  border-radius: 10px;
  background: linear-gradient(145deg, #226a87, #124257);
  color: #fff;
  padding: 16px 22px;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(91, 203, 235, 0.18);
}
.test-end-panel button:hover,
.test-survey-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}
.test-end-panel > small {
  display: block;
  margin-top: 17px;
  color: #698692;
  font-size: 8px;
}
.test-survey-panel {
  position: relative;
  width: min(900px, 96vw);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid #355e72;
  border-radius: 15px;
  background: #07131c;
  box-shadow: 0 40px 130px #000;
}
.test-survey-panel > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #315365;
  background: rgba(10, 25, 35, 0.98);
  padding: 18px 24px;
}
.test-survey-panel > header span {
  color: #73d6f1;
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 0.15em;
}
.test-survey-panel > header h2 {
  margin: 5px 0 0;
  font-size: 19px;
}
.test-survey-panel > header > b {
  border: 1px solid #61532e;
  border-radius: 6px;
  background: #211d11;
  color: #e3c466;
  padding: 8px;
  font-size: 8px;
}
#testSurveyForm {
  display: grid;
  gap: 12px;
  padding: 18px 24px 28px;
}
.test-survey-panel fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid #243f4d;
  border-radius: 10px;
  background: linear-gradient(145deg, #0c1c26, #08141c);
  padding: 14px;
}
.test-survey-panel fieldset.invalid {
  border-color: #e8636d;
  box-shadow: 0 0 0 2px rgba(232, 99, 109, 0.12);
}
.test-survey-panel legend {
  padding: 0 8px;
  color: #e7f4f8;
  font-size: 11px;
  font-weight: 900;
}
.test-survey-panel legend i {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  margin-right: 7px;
  border: 1px solid #356276;
  border-radius: 6px;
  background: #102b39;
  color: #74d8f3;
  font-style: normal;
  font-size: 8px;
}
.rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 9px;
}
.rating-row label,
.choice-grid label {
  position: relative;
  cursor: pointer;
}
.rating-row input,
.choice-grid input {
  position: absolute;
  opacity: 0;
}
.rating-row label {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #294654;
  border-radius: 8px;
  background: #091720;
  color: #91a8b2;
}
.rating-row label:has(input:checked),
.choice-grid label:has(input:checked) span {
  border-color: #77d9f3;
  background: linear-gradient(145deg, #1c536a, #10384b);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(119, 217, 243, 0.12);
}
.rating-row b {
  font-size: 17px;
}
.rating-row small {
  font-size: 6px;
  text-align: center;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 9px;
}
.choice-grid.compact {
  grid-template-columns: repeat(4, 1fr);
}
.choice-grid.compact.three {
  grid-template-columns: repeat(3, 1fr);
}
.choice-grid span {
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid #294654;
  border-radius: 8px;
  background: #091720;
  color: #99afba;
  padding: 12px 8px;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}
.comment-question {
  position: relative;
}
.comment-question textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #315264;
  border-radius: 8px;
  background: #061018;
  color: #e5f3f7;
  padding: 12px;
  font:
    10px/1.55 "Segoe UI",
    sans-serif;
  outline: none;
}
.comment-question textarea:focus {
  border-color: #6dcfea;
}
.comment-question > small {
  display: block;
  margin-top: 5px;
  color: #698592;
  font-size: 7px;
  text-align: right;
}
.test-survey-error {
  display: none;
  margin: 0;
  border: 1px solid #774047;
  border-radius: 7px;
  background: #241217;
  color: #ef9aa1;
  padding: 10px;
  font-size: 9px;
}
.test-survey-error.open {
  display: block;
}
.test-survey-submit {
  justify-self: center;
  margin-top: 5px;
}
.hidden {
  display: none !important;
}
@media (max-width: 720px) {
  .test-complete-screen {
    align-items: flex-start;
    padding: 10px;
  }
  .test-end-panel {
    margin: auto;
    padding: 30px 18px;
  }
  .test-end-panel p {
    font-size: 12px;
  }
  .test-end-panel button {
    width: 100%;
    min-width: 0;
  }
  .test-survey-panel {
    width: 100%;
    max-height: none;
    border-radius: 10px;
  }
  .test-survey-panel > header {
    padding: 13px;
  }
  .test-survey-panel > header h2 {
    font-size: 14px;
  }
  #testSurveyForm {
    padding: 12px;
  }
  .test-survey-panel fieldset {
    padding: 10px;
  }
  .rating-row {
    gap: 4px;
  }
  .rating-row label {
    min-height: 50px;
  }
  .rating-row small {
    font-size: 5px;
  }
  .choice-grid,
  .choice-grid.compact {
    grid-template-columns: 1fr 1fr;
  }
  .choice-grid.compact.three {
    grid-template-columns: repeat(3, 1fr);
  }
  .choice-grid span {
    padding: 10px 5px;
    font-size: 8px;
  }
  .test-survey-submit {
    width: 100%;
    min-width: 0;
  }
}

.gacha-banner {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(242, 202, 99, 0.2),
    inset 0 18px 50px rgba(120, 90, 20, 0.14);
}
.gacha-banner::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 225, 140, 0.14) 40deg,
    transparent 95deg,
    transparent 360deg
  );
  animation: gachaSpin 7s linear infinite;
  pointer-events: none;
}
.gacha-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 38%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 238, 190, 0.16) 45%,
    transparent 90%
  );
  animation: gachaShine 3.6s ease-in-out infinite;
  pointer-events: none;
}
.gacha-banner .banner-signal {
  position: relative;
  z-index: 1;
}
.gacha-banner .banner-signal b {
  background: linear-gradient(120deg, #ffe9b0, #ffc85c 45%, #ffe9b0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(255, 205, 110, 0.32);
}
@keyframes gachaSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes gachaShine {
  0% {
    left: -60%;
  }
  55%,
  100% {
    left: 130%;
  }
}
.gacha-summon {
  position: relative;
  overflow: hidden;
  animation: gachaPulse 2.1s ease-in-out infinite;
}
.gacha-summon:disabled {
  animation: none;
}
.gacha-summon::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 32%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 240, 200, 0.5) 50%,
    transparent
  );
  animation: gachaShine 2.1s ease-in-out infinite;
}
.gacha-summon:disabled::after {
  display: none;
}
@keyframes gachaPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(255, 214, 120, 0.3),
      0 8px 20px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(255, 214, 120, 0),
      0 8px 20px rgba(0, 0, 0, 0.3);
  }
}
.promo-box {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  border: 1px solid #3a3221;
  border-radius: 9px;
  background: rgba(10, 14, 10, 0.35);
  padding: 9px 10px;
}
.promo-box label {
  display: block;
  color: #a58f56;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.13em;
  margin-bottom: 6px;
}
.promo-row {
  display: flex;
  gap: 6px;
}
.promo-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid #3a4c58;
  border-radius: 7px;
  background: #0b131a;
  color: #eaf7fb;
  padding: 8px 9px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.promo-row input::placeholder {
  color: #4d5f6c;
  text-transform: none;
}
.promo-row input:focus {
  outline: none;
  border-color: #68d5f5;
}
.promo-row button {
  flex: 0 0 auto;
  border: 1px solid #3d6177;
  border-radius: 7px;
  background: #153348;
  color: #eefaff;
  padding: 8px 11px;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.promo-row button:hover {
  border-color: #68d5f5;
}
@media (max-width: 720px) {
  .promo-row {
    flex-direction: column;
  }
  .promo-row button {
    width: 100%;
  }
}

.wiki-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto;
}
.wiki-col {
  display: grid;
  gap: 8px;
  align-content: start;
}
.wiki-col > header {
  padding: 4px 2px 8px;
  border-bottom: 1px solid #223540;
}
.wiki-col > header span {
  display: block;
  color: #6ec8e8;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.15em;
}
.wiki-col > header b {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.wiki-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(145deg, #101c27, #09121a);
}
.wiki-row.enemy {
  border: 1px solid #6e343b;
}
.wiki-row.ally {
  border: 1px solid #2c5470;
}
.wiki-icon {
  width: 84px;
  height: 84px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
}
.wiki-row.enemy .wiki-icon {
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(232, 110, 120, 0.22),
      transparent 60%
    ),
    linear-gradient(155deg, #3a1a1e, #160c0e);
  border: 1px solid #6e343b;
}
.wiki-row.ally .wiki-icon {
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(104, 213, 245, 0.24),
      transparent 60%
    ),
    linear-gradient(155deg, #122735, #081118);
  border: 1px solid #2c5470;
}
.wiki-icon span {
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 0.03em;
}
.wiki-row.enemy .wiki-icon span {
  color: #ff9aa1;
}
.wiki-row.ally .wiki-icon span {
  color: #89e0f6;
}
.wiki-icon i {
  font-style: normal;
  font-size: 6px;
  font-weight: 1000;
  letter-spacing: 0.1em;
  color: #8299a8;
}
.wiki-copy {
  display: grid;
  align-content: start;
  gap: 4px;
}
.wiki-copy > b {
  font-size: 11px;
}
.wiki-copy > p {
  margin: 0;
  color: #a9bcc7;
  font-size: 9px;
  line-height: 1.42;
}
.wiki-copy > small {
  color: #6d8798;
  font-size: 7px;
  letter-spacing: 0.03em;
}
@media (max-width: 1050px) {
  .wiki-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .wiki-row {
    grid-template-columns: 64px 1fr;
  }
  .wiki-icon {
    width: 64px;
    height: 64px;
  }
  .wiki-icon span {
    font-size: 11px;
  }
}

.run-insight {
  max-width: 560px;
  margin: 10px auto 0;
  border: 1px solid #3d6a4a;
  border-radius: 9px;
  background: linear-gradient(
    145deg,
    rgba(28, 52, 36, 0.55),
    rgba(9, 17, 13, 0.55)
  );
  color: #bfe9cc;
  font-size: 9px;
  line-height: 1.5;
  text-align: left;
  padding: 10px 12px;
}
.run-insight::before {
  content: "ВЫВОД ПО ЗАБЕГУ";
  display: block;
  margin-bottom: 4px;
  color: #7fd99a;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.14em;
}
#testInsight.run-insight {
  text-align: center;
  font-size: 10px;
}
