:root {
  --bg: #15110f;
  --bg-panel: rgba(64, 45, 34, 0.94);
  --bg-panel-alt: rgba(77, 56, 42, 0.96);
  --bg-log: rgba(92, 62, 43, 0.98);
  --line: #8e6c4f;
  --line-soft: rgba(201, 170, 135, 0.28);
  --text: #f0ddc3;
  --text-dim: #b89d82;
  --accent: #b98d4e;
  --accent-strong: #d8af67;
  --danger: #a44a41;
  --ok: #7ca35d;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(214, 172, 104, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(18, 14, 12, 0.95), rgba(10, 8, 7, 0.98)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.025)' stroke-width='1'%3E%3Cpath d='M0 50h200M0 100h200M0 150h200'/%3E%3Cpath d='M50 0v200M100 0v200M150 0v200'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

button,
input,
select,
.game-link-button {
  font: inherit;
}

.page-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 16px auto;
}

.topbar {
  margin-bottom: 16px;
}

.topbar-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(121, 93, 67, 0.78), rgba(56, 41, 31, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-tabs-left {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-tabs-right {
  margin-left: auto;
  justify-content: flex-end;
}

.tab-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.game-link-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid #9b5f1d;
  color: #1d1209;
  background: linear-gradient(180deg, #f9a32a, #d47816);
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 221, 156, 0.45);
}

.game-link-button:hover,
.game-link-button:focus-visible {
  background: linear-gradient(180deg, #ffb13c, #e4861e);
  color: #160d06;
}

.game-link-logo {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff8a00;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.tab-profile-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #415f8f, #233756);
  color: #f3f6ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.tab-button,
.action-button,
.ok-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: linear-gradient(180deg, #8a684d, #5a4130);
  padding: 10px 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tab-button.active,
.action-button.primary,
.ok-button {
  background: linear-gradient(180deg, #c89c57, #8e6336);
  color: #1a120d;
  font-weight: 700;
}

.tab-button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.panel {
  background: linear-gradient(180deg, var(--bg-panel-alt), var(--bg-panel));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 16px;
}

.brand-subtitle,
.panel-note,
.hero-meta,
.status-box,
.error-box {
  color: var(--text-dim);
}

.sidebar-time-wrap {
  margin-bottom: 14px;
}

.sidebar-account-control {
  margin-bottom: 14px;
}

.account-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.account-selector {
  width: 100%;
}

.account-bot-toggle {
  width: 100%;
}

.system-time-block + .system-time-block {
  margin-top: 8px;
}

.system-time-caption {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.system-time-label {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  padding: 2px 0 6px;
}

.api-label,
.section-title,
.panel-title {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-title-row > .panel-title {
  margin-bottom: 0;
}

.panel-title-icon-button {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}

.text-input,
.text-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(28, 20, 16, 0.92);
  color: var(--text);
}

.sidebar-section + .sidebar-section,
.ok-button,
.api-label,
.players-list {
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.ok-login-button {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 14px;
  letter-spacing: 0;
  text-transform: none;
}

.ok-logout-button {
  width: 100%;
  margin-top: 0;
}

.profile-actions-chip {
  display: flex;
  align-items: center;
}

.profile-survey-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ok-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ee8208;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0;
}

.ok-login-text {
  line-height: 1.1;
  font-weight: 700;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-card {
  border: 1px solid var(--line-soft);
  padding: 12px;
  background: rgba(21, 15, 12, 0.6);
  cursor: pointer;
}

.player-card.active {
  border-color: var(--accent-strong);
  background: rgba(84, 57, 35, 0.5);
}

.player-card-meta {
  color: var(--text-dim);
  font-size: 13px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-box {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #415f8f, #233756);
  font-weight: 900;
  font-size: 26px;
}

.hero-name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  min-width: 240px;
}

.stat-chip {
  padding: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(25, 18, 14, 0.72);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.stat-value {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
}

.stat-value-small {
  font-size: 16px;
  line-height: 1.35;
}

.subscription-buy-button {
  width: 100%;
  margin-top: 10px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

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

.panel > .panel-title {
  padding: 16px 16px 0;
}

.panel > .panel-title-row {
  padding: 16px 16px 0;
}

.panel-content {
  padding: 16px;
}

.about-panel-text {
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 860px;
}

.tunnel-map-panel {
  margin-top: 16px;
}

.tunnel-map-layout {
  padding: 16px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.tunnel-map-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.tunnel-guard-panel {
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(24, 17, 13, 0.55);
}

.tunnel-guard-title {
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tunnel-guard-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.tunnel-legend {
  margin: 8px 0 14px;
  padding: 10px 10px 8px;
  border: 1px solid var(--line-soft);
  background: rgba(32, 23, 18, 0.45);
}

.tunnel-legend-title {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.tunnel-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 6px;
}

.tunnel-legend-chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  flex: 0 0 auto;
}

.tunnel-legend-chip.neighbor {
  background: #c5923f;
}

.tunnel-legend-chip.default {
  background: #7a766f;
}

.tunnel-legend-person {
  width: 12px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, #b73e26, #8f2a1d);
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.tunnel-legend-person::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9d2f20;
}

.tunnel-map-right {
  overflow: auto;
}

.tunnel-map-viewport {
  position: relative;
  width: min(100%, 680px);
  min-width: 520px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-soft);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(201, 170, 135, 0.18);
  overflow: hidden;
  cursor: grab;
}

.tunnel-map-viewport::before,
.tunnel-map-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
}

.tunnel-map-viewport::before {
  box-shadow:
    inset 0 0 48px 12px rgba(3, 5, 4, 0.82),
    inset 0 0 0 1px rgba(195, 215, 174, 0.12);
  transition: opacity 240ms ease;
}

.tunnel-map-viewport::after {
  background: repeating-linear-gradient(
    180deg,
    rgba(208, 224, 190, 0.025) 0,
    rgba(208, 224, 190, 0.025) 1px,
    transparent 1px,
    transparent 5px
  );
}

.tunnel-map-viewport.is-transitioning::before {
  opacity: 0.72;
}

.tunnel-map-viewport.is-transitioning::after {
  opacity: 1;
  animation: tunnelMapScan 4.8s linear infinite;
}

.tunnel-map-viewport.is-battle::before {
  opacity: 0.92;
  box-shadow:
    inset 0 0 58px 18px rgba(39, 7, 5, 0.78),
    inset 0 0 0 2px rgba(164, 55, 37, 0.3);
  animation: tunnelBattleWarning 1.4s steps(2, end) infinite;
}

.tunnel-map-viewport.is-guard::before {
  opacity: 0.88;
  box-shadow:
    inset 0 0 54px 16px rgba(38, 29, 7, 0.76),
    inset 0 0 0 2px rgba(194, 157, 61, 0.28);
}

.tunnel-map-viewport.is-dragging {
  cursor: grabbing;
}

.tunnel-map-viewport.is-editing {
  cursor: crosshair;
}

.tunnel-map-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 800px;
  height: 1080px;
  transform: translate(0px, 0px);
  will-change: transform;
  transition: transform 820ms cubic-bezier(0.22, 0.68, 0.28, 1);
}

.tunnel-map-viewport.is-dragging .tunnel-map-layer {
  transition: none;
}

.tunnel-map-image {
  display: block;
  width: 800px;
  height: 1080px;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.tunnel-map-points {
  position: absolute;
  inset: 0;
}

.tunnel-map-route {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.tunnel-route-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  position: absolute;
  inset: 0;
  z-index: 2;
}

.tunnel-route-track,
.tunnel-route-flow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tunnel-route-track {
  stroke: rgba(44, 29, 20, 0.82);
  stroke-width: 12;
}

.tunnel-route-flow {
  stroke: #e9c76e;
  stroke-width: 6;
  stroke-dasharray: 8 14;
  animation: tunnelRouteFlow var(--route-flow-duration, 3.2s) linear infinite;
}

.tunnel-route-live-track,
.tunnel-route-live-signal {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tunnel-route-live-track {
  stroke: rgba(205, 221, 174, 0.3);
  stroke-width: 14;
}

.tunnel-route-live-signal {
  stroke: #dce9b7;
  stroke-width: 4;
  stroke-dasharray: 2 16;
  filter: drop-shadow(0 0 4px rgba(205, 231, 164, 0.72));
  animation: tunnelLiveSignal 900ms linear infinite;
}

.tunnel-route-runner-shape {
  fill: #f5d77c;
  stroke: rgba(70, 40, 12, 0.85);
  stroke-width: 1.5;
  animation: tunnelArrowPulse 1.15s ease-in-out infinite;
}

@keyframes tunnelRouteFlow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -78;
  }
}

@keyframes tunnelArrowPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes tunnelLiveSignal {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes tunnelMapScan {
  from {
    transform: translateY(-10px);
  }
  to {
    transform: translateY(10px);
  }
}

@keyframes tunnelBattleWarning {
  0%, 100% {
    filter: brightness(0.88);
  }
  50% {
    filter: brightness(1.14);
  }
}

.tunnel-current-person {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 9px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, #c6492d, #8e2a1d);
  border: 1px solid rgba(61, 19, 12, 0.68);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
  pointer-events: none;
  z-index: 3;
}

.tunnel-current-person::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #9f3021;
}

.tunnel-map-traveler {
  position: absolute;
  width: 18px;
  height: 29px;
  transform: translate(-50%, -72%);
  pointer-events: none;
  z-index: 7;
  transition:
    left 900ms linear,
    top 900ms linear;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.72));
}

.tunnel-map-traveler::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 11px;
  height: 3px;
  border-radius: 50%;
  background: rgba(3, 5, 4, 0.72);
  filter: blur(1px);
}

.tunnel-map-traveler-head {
  position: absolute;
  left: 5px;
  top: 0;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(45, 20, 16, 0.95);
  border-radius: 50%;
  background: #713126;
  box-shadow: inset 1px 0 rgba(190, 92, 67, 0.16);
}

.tunnel-map-traveler-body {
  position: absolute;
  left: 4px;
  top: 8px;
  width: 10px;
  height: 14px;
  border: 1px solid rgba(68, 19, 12, 0.92);
  border-radius: 3px 3px 2px 2px;
  background: #a83b28;
  box-shadow: inset 2px 0 rgba(221, 112, 74, 0.25);
  transform-origin: 50% 100%;
  animation: tunnelTravelerStride 720ms ease-in-out infinite;
}

.tunnel-map-traveler-body::before,
.tunnel-map-traveler-body::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 3px;
  height: 8px;
  border-radius: 0 0 2px 2px;
  background: #6f291e;
  transform-origin: 50% 0;
}

.tunnel-map-traveler-body::before {
  left: 1px;
  animation: tunnelTravelerLegLeft 720ms ease-in-out infinite;
}

.tunnel-map-traveler-body::after {
  right: 1px;
  animation: tunnelTravelerLegRight 720ms ease-in-out infinite;
}

.tunnel-map-traveler-pack {
  position: absolute;
  left: -4px;
  top: -1px;
  width: 5px;
  height: 9px;
  border: 1px solid rgba(24, 18, 14, 0.88);
  border-radius: 2px;
  background: #454039;
  z-index: -1;
}

.tunnel-map-traveler-weapon {
  position: absolute;
  left: -4px;
  top: 10px;
  width: 27px;
  height: 12px;
  transform: scale(0.8);
  transform-origin: 50% 50%;
  z-index: 3;
}

.tunnel-map-traveler-weapon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: #050706;
  stroke: #000;
  stroke-width: 0.45;
  stroke-linejoin: round;
  filter: drop-shadow(0 0.7px 0 rgba(255, 255, 255, 0.14));
}

@keyframes tunnelTravelerStride {
  0%, 100% {
    transform: rotate(-0.7deg) translateY(0);
  }
  50% {
    transform: rotate(0.7deg) translateY(-0.7px);
  }
}

@keyframes tunnelTravelerLegLeft {
  0%, 100% {
    transform: rotate(12deg);
  }
  50% {
    transform: rotate(-12deg);
  }
}

@keyframes tunnelTravelerLegRight {
  0%, 100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg);
  }
}

.tunnel-station-button {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 241, 214, 0.4);
  background: rgba(35, 27, 20, 0.4);
  color: transparent;
  font-size: 0;
  line-height: 0;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.6;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.16),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  z-index: 2;
}

.tunnel-station-gift {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(calc(-100% - 7px), calc(-100% - 7px));
  color: #ff2a1a;
  pointer-events: none;
  z-index: 5;
  filter:
    drop-shadow(0 1px 1px rgba(43, 7, 10, 0.9))
    drop-shadow(0 0 4px rgba(255, 42, 26, 0.72));
}

.tunnel-station-gift svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  stroke: #7d101b;
  stroke-width: 0.65;
  stroke-linejoin: round;
}

.tunnel-station-button.editable,
.tunnel-station-label.editable {
  cursor: move;
}

.tunnel-station-button:hover {
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 1;
}

.tunnel-station-label:hover + .tunnel-station-button {
  opacity: 1;
}

.tunnel-station-button.neighbor {
  border-color: rgba(255, 221, 166, 0.95);
  background: rgba(187, 141, 86, 0.4);
}

.tunnel-station-button.current {
  background: rgba(63, 103, 146, 0.4);
  border-color: rgba(191, 226, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 0 4px rgba(133, 175, 220, 0.24);
}

.tunnel-station-button.active {
  background: rgba(35, 27, 20, 0.4);
  border-color: rgba(255, 241, 214, 0.42);
  animation: tunnelDestinationPulse 1.7s ease-in-out infinite;
}

@keyframes tunnelDestinationPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(216, 233, 181, 0.12);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(216, 233, 181, 0.28);
  }
}

.tunnel-station-button.selected {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(243, 221, 172, 0.46);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tunnel-station-label {
  position: absolute;
  transform: translate(7px, calc(-100% - 7px));
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 241, 214, 0.74);
  background: rgba(121, 118, 110, 0.9);
  color: #f0efea;
  font-size: 11px;
  line-height: 1;
  padding: 3px 9px;
  font-weight: 700;
  text-transform: none;
  white-space: nowrap;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.42);
  z-index: 4;
}

.tunnel-station-label:hover {
  background: rgba(138, 134, 125, 0.95);
  border-color: rgba(229, 224, 209, 0.95);
}

.tunnel-station-label.neighbor {
  background: rgba(199, 146, 64, 0.94);
  border-color: rgba(255, 221, 166, 0.98);
  color: #fff4de;
}

.tunnel-station-label.current {
  background: rgba(61, 110, 166, 0.95);
  color: #e9f5ff;
  border-color: rgba(191, 226, 255, 0.95);
}

.tunnel-station-label.active {
  background: rgba(121, 118, 110, 0.9);
  border-color: rgba(235, 229, 216, 0.9);
}

.tunnel-station-button.current.active {
  background: rgba(63, 103, 146, 0.38);
  border-color: rgba(191, 226, 255, 0.95);
}

.tunnel-station-button.neighbor.active {
  border-color: rgba(255, 221, 166, 0.95);
  background: rgba(187, 141, 86, 0.24);
}

.tunnel-station-label.current.active {
  background: rgba(61, 110, 166, 0.95);
  color: #e9f5ff;
  border-color: rgba(191, 226, 255, 0.95);
}

.tunnel-station-label.neighbor.active {
  background: rgba(199, 146, 64, 0.94);
  border-color: rgba(255, 221, 166, 0.98);
  color: #fff4de;
}

.tunnel-station-label.selected {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(243, 221, 172, 0.42);
}

.tunnel-map-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-dim);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.automation-groups,
.manual-actions,
.journal-toolbar,
.journal-table-wrap,
.panel-actions,
.button-stack {
  padding: 16px;
}

.automation-group + .automation-group {
  margin-top: 14px;
}

.automation-group-title {
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

.automation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 6px 12px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.automation-item:last-child {
  border-bottom: 0;
}

.automation-item > :first-child {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.automation-item > .enabled-toggle {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}

.automation-item > .interval-wrap,
.automation-item > .automation-static {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  margin-top: 2px;
}

.automation-item.automation-item-static {
  grid-template-columns: 1fr;
}

.automation-title {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.15;
}

.automation-description {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.2;
}

.interval-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.automation-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.automation-checkbox input {
  margin: 0;
}

.tent-enemy-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.tent-enemy-category-item {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  background: rgba(32, 23, 18, 0.38);
}

.job-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.job-controls-inline {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.job-controls .panel-note {
  margin: 0;
}

.job-controls-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.job-controls-status {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.35;
}

.job-controls .action-button,
.job-controls-row .text-input {
  width: 100%;
}

.arena-fraction-toggle-row {
  display: inline-grid;
  grid-template-columns: repeat(5, 38px);
  gap: 6px;
  width: fit-content;
  padding: 6px;
  border: 1px solid rgba(200, 156, 87, 0.28);
  background: rgba(18, 12, 9, 0.45);
}

.arena-fraction-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(28, 20, 16, 0.92);
  color: var(--text-dim);
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  background-image: url("https://ok-sel.metrogame.net/metro/st/static/tex/ui.e101da7b9481fd17270a.png");
  background-repeat: no-repeat;
  background-size: 2048px 1024px;
  background-color: rgba(28, 20, 16, 0.92);
  background-origin: content-box;
  box-sizing: border-box;
}

.arena-fraction-toggle.is-active {
  border-color: #f0d39a;
  box-shadow:
    inset 0 0 0 2px rgba(243, 221, 172, 0.72),
    0 0 0 2px rgba(200, 156, 87, 0.55),
    0 0 12px rgba(200, 156, 87, 0.22);
  transform: translateY(-1px);
}

.arena-fraction-toggle-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.arena-fraction-icon-0 {
  background-image: none;
}

.arena-fraction-icon-1 {
  background-position: -1452px -154px;
}

.arena-fraction-icon-2 {
  background-position: -1210px -95px;
}

.arena-fraction-icon-3 {
  background-position: -1253px -107px;
}

.arena-fraction-icon-4 {
  background-position: -1853px -672px;
}

.clan-donate-wrap {
  gap: 10px;
}

.combat-support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.combat-support-block {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(200, 156, 87, 0.22);
  background: rgba(22, 13, 10, 0.64);
}

.combat-support-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.combat-support-inline-single {
  grid-template-columns: minmax(0, 1fr);
}

.combat-support-inline-wrap {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.combat-support-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.combat-support-field-wide {
  grid-column: span 1;
}

.combat-support-field > input[type="checkbox"] {
  margin: 0;
  justify-self: start;
}

.clan-donate-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(200, 156, 87, 0.22);
  background: rgba(22, 13, 10, 0.64);
}

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

.clan-donate-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.clan-donate-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-size: 12px;
}

.clan-donate-select {
  width: 100%;
}

.clan-currency-icon {
  width: 27px;
  height: 25px;
  flex: 0 0 27px;
  display: inline-block;
  background-size: 1400px 700px;
  background-repeat: no-repeat;
}

.clan-currency-bullets {
  background-image: url("https://ok-sel.metrogame.net/metro/st/static/tex/ui.e101da7b9481fd17270a.png");
  background-position: -1325px -675px;
}

.clan-currency-gems {
  background-image: url("https://ok-sel.metrogame.net/metro/st/static/tex/ui.e101da7b9481fd17270a.png");
  background-position: -1209px -345px;
}

@media (max-width: 980px) {
  .clan-donate-grid {
    grid-template-columns: 1fr;
  }

  .combat-support-grid,
  .combat-support-inline,
  .combat-support-inline-wrap {
    grid-template-columns: 1fr;
  }
}

.interval-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.enabled-toggle {
  border: 1px solid rgba(0, 0, 0, 0.25);
  color: #15110f;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
}

.enabled-toggle.is-enabled {
  background: linear-gradient(180deg, #90c86e, #5f9b3f);
}

.enabled-toggle.is-disabled {
  background: linear-gradient(180deg, #d57d71, #a64d44);
  color: #fff1ed;
}

.enabled-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: saturate(0.65);
}

.interval-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(28, 20, 16, 0.92);
  color: var(--text);
  font-family: "Consolas", "Menlo", monospace;
}

.automation-static {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(28, 20, 16, 0.92);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.automation-static.is-disabled {
  color: var(--text-dim);
  opacity: 0.75;
}

@media (max-width: 1180px) {
  .automation-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .automation-item > :first-child,
  .automation-item > .enabled-toggle,
  .automation-item > .interval-wrap,
  .automation-item > .automation-static {
    grid-column: 1;
    grid-row: auto;
  }
}

.hint-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hint-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--accent-strong);
  cursor: help;
}

.hint-content {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 260px;
  max-width: 340px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(23, 16, 13, 0.98);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: var(--shadow);
  display: none;
  z-index: 10;
}

.hint-tooltip:hover .hint-content,
.hint-tooltip:focus-within .hint-content {
  display: block;
}

.manual-actions,
.button-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manual-panel {
  display: flex;
  flex-direction: column;
}

.manual-actions .action-button {
  padding: 12px 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.action-result,
.status-box,
.error-box {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  min-height: 72px;
  white-space: pre-wrap;
}

.action-log-wrap {
  margin: 0 16px 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(109, 77, 53, 0.95), var(--bg-log));
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.action-log-title {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.action-log-feed {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
  padding: 8px 12px 12px;
}

.action-log-empty {
  color: var(--text-dim);
  font-size: 13px;
  padding: 8px 0;
}

.action-log-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(201, 170, 135, 0.18);
}

.action-log-item:last-child {
  border-bottom: 0;
}

.action-log-time {
  color: var(--accent-strong);
  font-size: 11px;
  margin-bottom: 3px;
}

.action-log-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.action-log-text.error {
  color: #ffd4cc;
}

.journal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.journal-toolbar .text-select {
  width: auto;
  min-width: 110px;
}

.journal-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.journal-pagination .text-input {
  width: 76px;
  min-width: 0;
  text-align: center;
}

.collection-exchange-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.collection-exchange-list-header,
.collection-exchange-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collection-exchange-list-header {
  justify-content: space-between;
  margin-bottom: 6px;
}

.collection-exchange-sort-wrap {
  color: var(--text-dim);
  font-size: 12px;
}

.collection-exchange-sort-select.text-input {
  width: auto;
  min-width: 108px;
  padding: 5px 8px;
}

.collection-exchange-item {
  align-items: flex-start;
  margin: 0;
}

.journal-table-wrap {
  overflow: auto;
  max-height: 620px;
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
}

.journal-table th,
.journal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  text-align: left;
}

.journal-table th {
  color: var(--accent-strong);
  font-size: 13px;
  text-transform: uppercase;
}

.status-success {
  color: #a7d68a;
}

.status-error {
  color: #e69a8f;
}

.status-info {
  color: var(--text-dim);
}

.clan-log-transient {
  opacity: 1;
}

.clan-log-transient.is-fading {
  animation: clan-log-fade-out 1000ms linear forwards;
}

@keyframes clan-log-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.battle-outcome-victory {
  color: #8fd574;
  font-weight: 700;
}

.battle-outcome-defeat {
  color: #e46f63;
  font-weight: 700;
}

.battle-enemy-label {
  color: #8f2638;
  font-weight: 700;
}

.transition-log-error {
  color: #ef4444;
  font-style: italic;
}

.battle-key-boss {
  color: #79b9ff;
  font-weight: 700;
}

.battle-key-grenade {
  color: #f3eadc;
  font-weight: 700;
}

.battle-reward-text {
  color: #e0b457;
  font-weight: 700;
  text-transform: none;
}

.battle-sender-name {
  color: #e6a259;
  font-weight: 400;
  text-transform: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  padding: 20px;
}

.subscription-feedback-modal-card {
  width: min(560px, 100%);
}

.subscription-feedback-question {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.subscription-feedback-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.subscription-feedback-button {
  min-height: 56px;
  text-transform: none;
  letter-spacing: 0.01em;
}

.subscription-feedback-status,
.subscription-feedback-error {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  min-height: 0;
}

.subscription-feedback-status {
  color: #a7d68a;
}

.subscription-feedback-footer {
  padding-top: 16px;
}

.subscription-feedback-link {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.subscription-feedback-link:hover {
  color: var(--text);
}

.inventory-panel {
  padding: 16px;
}

.inventory-layout {
  display: grid;
  grid-template-columns: 150px minmax(360px, 1fr) minmax(250px, 340px);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.inventory-loadouts,
.inventory-storage,
.inventory-equipment {
  border: 1px solid var(--line-soft);
  background: rgba(28, 21, 17, 0.38);
  padding: 10px;
}

.inventory-section-title {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inventory-loadouts {
  align-self: start;
  box-sizing: border-box;
  width: 100%;
  max-width: 166px;
  min-width: 0;
  overflow: hidden;
}

.inventory-loadout-buttons {
  display: grid;
  gap: 8px;
}

.inventory-loadout-item {
  position: relative;
  min-width: 0;
}

.inventory-loadout-button,
.inventory-storage-tab {
  border: 1px solid var(--line);
  color: var(--text);
  background: linear-gradient(180deg, #765943, #493427);
  padding: 9px 8px;
  cursor: pointer;
}

.inventory-loadout-button {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding-right: 24px;
  cursor: pointer;
}

.inventory-loadout-button.active {
  border-color: #f6cc7b;
  background: linear-gradient(180deg, #d8ad67, #95693a);
  color: #1a120d;
  box-shadow: inset 0 0 0 2px rgba(255, 235, 187, 0.34), 0 0 12px rgba(246, 204, 123, 0.24);
  font-weight: 800;
}

.inventory-loadout-edit {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(216, 175, 103, 0.35);
  background: rgba(24, 17, 13, 0.72);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.inventory-loadout-edit:hover {
  border-color: var(--accent-strong);
  color: var(--text);
}

.inventory-loadout-situation {
  width: 100%;
  min-height: 34px;
  margin-top: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(201, 170, 135, 0.42);
  background: rgba(24, 17, 13, 0.86);
  color: var(--text);
  font-size: 12px;
}

.inventory-storage-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.inventory-storage-tab.active {
  background: linear-gradient(180deg, #c89c57, #8e6336);
  color: #1a120d;
  font-weight: 700;
}

.inventory-storage-tab.is-drag-hover {
  border-color: #f6cc7b;
  box-shadow: inset 0 0 0 2px rgba(246, 204, 123, 0.34), 0 0 14px rgba(246, 204, 123, 0.34);
}

.inventory-grid {
  display: grid;
  gap: 8px;
}

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

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

.inventory-slot {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid rgba(202, 165, 124, 0.46);
  background:
    linear-gradient(135deg, transparent 8px, rgba(41, 31, 26, 0.96) 0) top left,
    linear-gradient(225deg, transparent 8px, rgba(41, 31, 26, 0.96) 0) top right,
    linear-gradient(315deg, transparent 8px, rgba(41, 31, 26, 0.96) 0) bottom right,
    linear-gradient(45deg, transparent 8px, rgba(41, 31, 26, 0.96) 0) bottom left;
  background-size: 52% 52%;
  background-repeat: no-repeat;
  color: var(--text);
  cursor: pointer;
  padding: 8px 7px 15px;
}

.inventory-slot:hover,
.inventory-slot.is-selected {
  border-color: var(--accent-strong);
  box-shadow: inset 0 0 0 2px rgba(216, 175, 103, 0.28), 0 0 14px rgba(216, 175, 103, 0.22);
}

.inventory-slot.is-empty {
  opacity: 0.7;
}

.inventory-slot.is-occupied {
  touch-action: none;
}

.inventory-slot.is-drag-source {
  opacity: 0.36;
}

.inventory-slot.is-drop-target {
  border-color: #f6cc7b;
  box-shadow: inset 0 0 0 3px rgba(246, 204, 123, 0.38), 0 0 20px rgba(246, 204, 123, 0.48);
}

.inventory-slot.is-invalid-target {
  border-color: #d96b5f;
  box-shadow: inset 0 0 0 3px rgba(217, 107, 95, 0.34), 0 0 18px rgba(217, 107, 95, 0.34);
}

.inventory-invalid-move-ghost {
  position: fixed;
  z-index: 1001;
  margin: 0;
  pointer-events: none;
  opacity: 0.88;
  animation: inventory-invalid-return 480ms ease-in-out both;
}

@keyframes inventory-invalid-return {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  44%,
  56% {
    transform: translate(var(--inventory-invalid-x), var(--inventory-invalid-y)) scale(0.92);
  }
}

.inventory-drag-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
  animation: inventory-drag-float 3.6s ease-in-out infinite;
  transform-origin: center;
}

.is-inventory-dragging,
.is-inventory-dragging * {
  cursor: grabbing;
  user-select: none;
}

@keyframes inventory-drag-float {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.5) rotate(-1.5deg);
  }

  50% {
    transform: translate(-50%, calc(-50% - 8px)) scale(0.5) rotate(1.5deg);
  }
}

.inventory-slot-media {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.inventory-item-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.inventory-item-sprite {
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
}

.inventory-item-fallback {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 175, 103, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 142, 78, 0.45), rgba(70, 48, 33, 0.7));
  color: #f3dfbc;
  font-size: 14px;
  font-weight: 700;
}

.inventory-slot-label {
  min-height: 28px;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.inventory-slot-count {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: #fff0cf;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 2px 2px #000;
}

.inventory-slot-id {
  position: absolute;
  left: 6px;
  bottom: 5px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  color: rgba(201, 170, 135, 0.58);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .layout,
  .panel-grid,
  .clan-grid {
    grid-template-columns: 1fr;
  }

  .tunnel-map-layout {
    grid-template-columns: 1fr;
  }

  .inventory-layout {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .inventory-equipment {
    grid-column: 1 / -1;
  }

  .hero {
    flex-direction: column;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 16px, 1440px);
    margin: 8px auto;
  }

  .topbar-tabs {
    flex-wrap: wrap;
  }

  .topbar-line {
    flex-direction: column;
  }

  .topbar-tabs-right {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .automation-item {
    grid-template-columns: 1fr;
  }

  .journal-toolbar {
    flex-wrap: wrap;
  }

  .tunnel-map-viewport {
    width: 100%;
    min-width: 0;
  }

  .subscription-feedback-actions {
    grid-template-columns: 1fr;
  }

  .inventory-layout {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  .tunnel-map-layer,
  .tunnel-map-traveler {
    transition: none;
  }

  .tunnel-route-flow,
  .tunnel-route-live-signal,
  .tunnel-route-runner-shape,
  .tunnel-map-viewport::before,
  .tunnel-map-viewport::after,
  .tunnel-map-traveler-body,
  .tunnel-map-traveler-body::before,
  .tunnel-map-traveler-body::after,
  .tunnel-station-button.active {
    animation: none;
  }
}
