.train-copy > strong {
  margin: 2px 0 5px;
}

.train-copy > strong span {
  font-size: clamp(14px, 3.8vw, 20px);
}

.demand-mix {
  display: flex;
  gap: 6px;
}

.demand-mix > span {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--destination) 52%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--destination) 10%, #071725);
}

.demand-mix i {
  font-style: normal;
  font-size: 14px;
}

.demand-mix b {
  color: var(--destination);
  font-size: 15px;
}

.demand-mix small {
  color: var(--muted);
  font-size: 8px;
}

.demand-mix em {
  margin-left: 2px;
  padding: 1px 4px;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.urgent-demand {
  box-shadow: 0 0 12px color-mix(in srgb, var(--destination) 30%, transparent);
}

.briefing {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 7px;
  margin: 8px 0;
}

.briefing .event {
  display: grid;
  place-items: center;
  min-height: 43px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 11px;
  line-height: 1.25;
}

.order {
  display: grid;
  grid-template-columns: auto minmax(50px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 6px 9px;
  border: 1px solid #ac7cff66;
  border-radius: 11px;
  background: linear-gradient(100deg, #24183d, #0a1b29);
}

.order span small,
.order span b {
  display: block;
}

.order span small {
  color: #c2afd8;
  font-size: 7px;
  letter-spacing: .08em;
}

.order span b {
  font-size: 11px;
  white-space: nowrap;
}

.order > i {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: #33264a;
}

.order > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--amber));
  transition: width .3s;
}

.order > em {
  color: var(--amber);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.forecast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 7px 3px 0;
  padding: 5px 9px;
  border: 1px dashed #35536a;
  border-radius: 9px;
  background: #071725a8;
  color: var(--muted);
  font-size: 9px;
}

.forecast > b {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 9px;
  letter-spacing: .08em;
}

.forecast-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-mix {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.forecast-mix > span {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.forecast-mix i {
  font-style: normal;
}

.forecast-mix b {
  color: #dbeaf2;
}

.forecast .urgent-demand em {
  padding: 0 2px;
  background: var(--red);
  color: #fff;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.route-value {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 9px;
}

.route-value b {
  color: var(--line);
  font-size: 11px;
}

.route-value span {
  color: var(--muted);
}

.route-value em {
  padding: 1px 5px;
  border-radius: 8px;
  background: #51360c;
  color: var(--amber);
  font-style: normal;
  font-weight: 900;
}

.route-value em.slow {
  background: #4a1720;
  color: var(--red);
}

.line {
  min-height: 96px;
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 0;
}

.choice b {
  font-size: 15px;
}

.choice em {
  margin-top: 3px;
  color: #d9e9f2;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.choice > span {
  margin-top: 2px;
  color: #91a9bb;
  font-size: 8px;
  font-weight: 800;
}

.choice .order-hit {
  color: var(--amber);
}

.choice .deadline-ok {
  color: var(--cyan);
}

.choice .deadline-miss,
.choice .signal-risk {
  color: var(--red);
}

.danger-text {
  color: var(--red) !important;
  font-weight: 900;
}

.feedback.warn b {
  color: var(--amber);
}

.mission b {
  color: var(--amber);
}

.mission .notice-good {
  color: var(--cyan);
}

.mission .notice-bad {
  color: var(--red);
}

@media (max-width: 520px) {
  .incoming {
    min-height: 91px;
  }

  .train-visual {
    height: 55px;
  }

  .demand-mix {
    gap: 3px;
  }

  .demand-mix > span {
    padding: 3px 4px;
  }

  .demand-mix i {
    font-size: 12px;
  }

  .demand-mix b {
    font-size: 13px;
  }

  .forecast {
    gap: 5px;
    padding-inline: 6px;
  }

  .forecast-name {
    display: none;
  }

  .briefing {
    grid-template-columns: 1.2fr .8fr;
    gap: 5px;
    margin: 6px 0;
  }

  .order {
    grid-template-columns: auto minmax(32px, 1fr);
    gap: 5px;
    padding-inline: 6px;
  }

  .order > em {
    grid-column: 1 / -1;
    margin-top: -3px;
    text-align: right;
  }

  .route-value {
    gap: 5px;
  }

  .line {
    min-height: 91px;
  }

  .capacity {
    margin-top: 5px;
  }

  .choice b {
    font-size: 12px;
  }

  .choice em {
    font-size: 8px;
  }

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

  .actions button {
    min-height: 54px;
    padding: 8px 8px;
  }

  .actions button span {
    max-width: 90px;
  }

  .actions small {
    position: static;
    display: inline-block;
    margin-top: 4px;
    transform: none;
  }
}

@media (max-width: 350px) {
  .train-visual {
    display: none;
  }

  .incoming {
    grid-template-columns: minmax(0, 1fr) 45px;
  }

  .line {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .route-value span {
    display: none;
  }

  .briefing .event {
    min-height: 36px;
    font-size: 8px;
  }

  .order span b {
    font-size: 9px;
  }

  .order {
    min-height: 36px;
  }

  .order > i {
    display: none;
  }

  .order > em {
    font-size: 7px;
  }

  .line-meta {
    font-size: 8px;
  }

  .choice b {
    font-size: 11px;
  }

  .choice small,
  .choice em,
  .choice > span {
    font-size: 7px;
  }

  .line {
    min-height: 83px;
  }

  .route-value {
    margin-top: 0;
  }

  .capacity {
    margin-top: 3px;
    margin-bottom: 2px;
  }

  .mission {
    margin-top: 6px;
    margin-bottom: 5px;
  }
}

@media (max-width: 350px) and (max-height: 760px) {
  .playing .game-header {
    display: none;
  }

  .playing .panel {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (min-width: 900px) and (max-height: 720px) {
  .playing .game {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .playing .briefing {
    margin: 5px 0;
  }

  .playing .incoming {
    min-height: 78px;
  }

  .playing .forecast {
    min-height: 26px;
    margin-top: 5px;
    padding-block: 3px;
  }

  .playing .line {
    min-height: 79px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .playing .route-value {
    margin-top: 1px;
  }

  .playing .capacity {
    margin-top: 4px;
  }

  .playing .actions {
    margin-top: 7px;
  }
}
