/* Match and rematch layouts: 8px rhythm, 16px content gaps, 32px sections. */
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-card {
  padding:32px; box-sizing:border-box; max-width:100%;
}
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-heading {
  align-items:flex-start; gap:16px; margin:0 0 32px;
}
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-heading h2 {
  min-width:0; margin:0; font-size:32px!important; line-height:1.25; overflow-wrap:anywhere;
}
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-heading button {
  flex:0 0 48px; width:48px; min-height:48px; margin:0; padding:8px!important; line-height:1;
}
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-content { padding:0; min-width:0; }
.army-chess-wrap[data-active-hub="intro"] .ac-codec {
  grid-template-columns:128px minmax(0,1fr); gap:32px; padding:32px; margin:0 0 32px; align-items:start;
}
.army-chess-wrap[data-active-hub="intro"] .ac-codec>:is(.ac-officer,.ac-shadow-officer) {
  width:128px; height:144px; min-width:0; max-width:100%; margin:0;
}
.army-chess-wrap[data-active-hub="intro"] .ac-codec>div,
.army-chess-wrap .ac-result-officer>div { min-width:0; overflow-wrap:anywhere; }
.army-chess-wrap[data-active-hub="intro"] .ac-codec h2,
.army-chess-wrap .ac-result-officer h2 { font-size:32px!important; line-height:1.25; margin:8px 0 16px; }
.army-chess-wrap[data-active-hub="intro"] .ac-codec p,
.army-chess-wrap .ac-war-card p { font-size:16px; line-height:1.5; margin:0 0 16px; }
.army-chess-wrap[data-active-hub="intro"] .ac-codec .ac-transmission { font-size:16px!important; line-height:1.5!important; }
.army-chess-wrap[data-active-hub="intro"] .ac-codec small,
.army-chess-wrap .ac-war-card small { display:block; font-size:14px; line-height:1.5; }
.army-chess-wrap[data-active-hub="intro"] .ac-eyebrow,
.army-chess-wrap .ac-result-officer .ac-eyebrow { display:block; font-size:12px; line-height:1.5; letter-spacing:1px; overflow-wrap:anywhere; }
.army-chess-wrap .ac-result-officer { display:grid; grid-template-columns:112px minmax(0,1fr); gap:16px; align-items:start; padding:0 0 16px; margin:0 0 32px; }
.army-chess-wrap .ac-result-officer>:is(.ac-officer,.ac-shadow-officer) { width:112px; height:128px; min-width:0; max-width:100%; margin:0; }
.army-chess-wrap .ac-war-card h3 { font-size:32px; line-height:1.25; margin:0 0 16px; }
.army-chess-wrap .ac-war-card details { margin:32px 0; padding:16px; min-width:0; }
.army-chess-wrap .ac-war-card summary { font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
.army-chess-wrap .ac-war-card details[open] summary { margin-bottom:16px; }
.army-chess-wrap .ac-war-card .ac-result-fen { box-sizing:border-box; max-width:100%; padding:8px; }
.army-chess-wrap .ac-war-card .ac-badge-row { gap:8px; margin:16px 0; }
.army-chess-wrap .ac-war-card .ac-service-rank { margin:32px 0 16px; }
.army-chess-wrap .ac-war-card .ac-service-rank small { margin-top:8px; }
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) :is(.ac-inline,.ac-network-tools) { gap:8px; flex-wrap:wrap; }
.army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-content button {
  min-height:48px; padding:8px 16px!important; margin:0; font-size:16px!important; line-height:1.5; white-space:normal; overflow-wrap:anywhere;
}
.army-chess-wrap[data-active-hub="intro"] .ac-loading-tip { grid-template-columns:64px minmax(0,1fr); padding:16px; gap:16px; margin-top:32px; }
.army-chess-wrap[data-active-hub="intro"] .ac-loading-tip .ac-officer { width:64px; height:64px; min-width:0; }
.army-chess-wrap[data-active-hub="intro"] .ac-loading-tip>div { min-width:0; overflow-wrap:anywhere; }
.army-chess-wrap[data-active-hub="network"] :is(.ac-network-setup,.ac-network-wait) { margin:16px 0; padding:16px; min-width:0; overflow-wrap:anywhere; }
.army-chess-wrap[data-active-hub="network"] :is(p,.ac-field) { font-size:16px; line-height:1.5; }
.army-chess-wrap[data-active-hub="network"] :is(input,select) { box-sizing:border-box; min-width:0; max-width:100%; font-size:16px; }
.army-chess-wrap[data-active-hub="network"] .ac-setting-grid { gap:16px; }
@media(max-width:760px) {
  .army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-dialog { padding:8px; }
  .army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-card { padding:16px; max-height:calc(100dvh - 16px); }
  .army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-heading { gap:8px; margin-bottom:16px; }
  .army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"],[data-active-hub="network"]) .ac-hub-heading h2 { font-size:24px!important; }
  /* Stack artwork above prose instead of squeezing a long briefing beside it. */
  .army-chess-wrap[data-active-hub="intro"] .ac-codec { grid-template-columns:minmax(0,1fr); padding:16px; gap:16px; margin-bottom:16px; }
  .army-chess-wrap[data-active-hub="intro"] .ac-codec>:is(.ac-officer,.ac-shadow-officer) { width:96px; height:112px; }
  .army-chess-wrap[data-active-hub="intro"] .ac-codec h2,
  .army-chess-wrap .ac-result-officer h2,
  .army-chess-wrap .ac-war-card h3 { font-size:24px!important; line-height:1.3333; }
  .army-chess-wrap .ac-result-officer { grid-template-columns:minmax(0,1fr); gap:16px; }
  .army-chess-wrap .ac-result-officer>:is(.ac-officer,.ac-shadow-officer) { width:96px; height:112px; }
  .army-chess-wrap:is([data-active-hub="intro"],[data-active-hub="ending"]) .ac-inline { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  .army-chess-wrap[data-active-hub="network"] .ac-network-tools { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  .army-chess-wrap[data-active-hub="network"] .ac-setting-grid { grid-template-columns:minmax(0,1fr); }
}

@media(max-width:760px) {
  .army-chess-wrap[data-active-hub="network"] .ac-network-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0; }
  .army-chess-wrap[data-active-hub="network"] .ac-network-tabs button { min-width:0; overflow-wrap:normal; word-break:normal; }
}
