@font-face {
  font-family: "RTS Pixel";
  src: url("/ranks/rts-pixel.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  /* Windows client's battle_ui.gd button bevel and decision_panel.gd header. */
  --paper: #0c1a13;
  --ground: #101d16;
  --base: #17271c;
  --soft: #203326;
  --tint: #32452b;
  --edge: #657456;
  --shadow: #080f0a;
  --rule: #354737;
  --ink: #e2e4d4;
  --muted: #a6b5a4;
  --accent: #b5c589;
  --accent-ink: #e0dda3;
  --focus: #e8e9ad;
  --display: "RTS Pixel","Microsoft YaHei","PingFang SC",sans-serif;
  --ui: "Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif;
  font: 15px/1.55 var(--ui);
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column }
[hidden] { display: none !important }
h1,h2,p { margin: 0 }
h1,h2,.brand,.top-nav,.play-link,.board-tabs,.section-tabs,.play-modes button {
  font-family: var(--display); font-weight: 400; font-synthesis: none;
}
h1 { font-size: 40px; line-height: 1.2; color: var(--accent-ink) }
h2 { font-size: 22px; line-height: 1.4; color: var(--accent-ink) }
a { color: inherit; text-decoration: none }
button,input,select,output { font: inherit }
button,select { cursor: pointer }
button,select,input:not([type=checkbox]) {
  color: var(--ink); background: var(--base); border: 1px solid;
  border-color: var(--edge) var(--shadow) var(--shadow) var(--edge);
  border-radius: 0; padding: 6px 12px;
}
button:hover:enabled,select:hover { background: #2e412a; color: #fff0bf }
button:active:enabled { border-color: var(--shadow) var(--edge) var(--edge) var(--shadow); background: var(--tint) }
button:disabled { cursor: default; color: #8f9b8e; background: #0f1c14 }
a:hover { color: #fff0bf }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px }
input::placeholder { color: var(--muted); opacity: 1 }
::selection { color: #0c1a13; background: #c5cf91 }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.skip { position: absolute; left: 12px; top: -60px; z-index: 9; background: var(--paper); padding: 8px 16px }
.skip:focus { top: 6px }
.wrap { width: min(1320px,calc(100% - 80px)); margin-inline: auto }
.mast { background: var(--paper); border-bottom: 1px solid var(--edge) }
.mast-line,.top-nav,.title-line,.foot,.dialog-top { display: flex; align-items: center }
.mast-line { min-height: 66px; gap: 28px }
.brand { display: grid; align-content: center; gap: 4px; color: var(--accent-ink); white-space: nowrap; line-height: 1; }
.brand-name { font-size: 24px }
.brand-series { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; letter-spacing: .04em }
.brand-series::after { content: ""; width: 22px; height: 1px; background: var(--edge) }
.top-nav { align-self: stretch; align-items: stretch; gap: 22px; border-left: 1px solid var(--rule); padding-left: 26px }
.top-nav a,.play-link { display: inline-flex; align-items: center; font-size: 16px; white-space: nowrap }
.top-nav a { position: relative; color: var(--muted) }
.top-nav a[aria-current=page] { color: var(--accent-ink) }
.top-nav a[aria-current=page]::after { content: ""; position: absolute; bottom: -1px; inset-inline: 0; height: 3px; background: var(--accent) }
.play-link { margin-left: auto; color: var(--accent-ink); gap: 5px }
.play-link[aria-current=page] { text-decoration: underline; text-underline-offset: 5px }
main.wrap { padding-top: clamp(22px,3vw,44px); padding-bottom: 48px; min-width: 0 }
.title-line,.dialog-top,.foot { justify-content: space-between; gap: 16px }
.title-line { padding-block: 6px 18px }
#content > .title-line {
  min-height: 120px; padding: 18px 24px;
  border: 1px solid; border-color: var(--edge) var(--shadow) var(--shadow) var(--edge);
  background-color: var(--base);
  background-image: linear-gradient(90deg,#17271c 0%,#17271c 33%,rgba(23,39,28,.9) 42%,rgba(23,39,28,.04) 65%,rgba(12,26,19,.45)),url("/demo/battlefield.webp");
  background-size: 100% 100%,min(65%,800px) auto;
  background-position: center,right 36%;
  background-repeat: no-repeat;
}
.text-link { border: 0; background: transparent; padding: 4px 0; color: var(--accent-ink); font-size: 14px; text-underline-offset: 4px }
.text-link:hover:enabled,.foot a:hover { background: transparent; text-decoration: underline }
#rules-button { padding: 6px 12px; background: var(--paper); border: 1px solid var(--edge) }
.foot { margin-top: auto; min-height: 52px; padding-block: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px }
.foot a { color: var(--accent-ink) }
.board-tabs,.section-tabs { display: flex; gap: 24px; padding-inline: 20px; background: var(--paper); border: 1px solid var(--rule); border-top: 0 }
.board-tabs a,.section-tabs a { position: relative; padding: 12px 0; white-space: nowrap; font-size: 18px; line-height: 1.35; color: var(--muted) }
.board-tabs [aria-current=page],.section-tabs [aria-current=page] { color: var(--accent-ink) }
.board-tabs [aria-current=page]::after,.section-tabs [aria-current=page]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent) }
select,input:not([type=checkbox]) { min-height: 38px; padding: 6px 10px }
select { padding-right: 5px }
dialog { border: 1px solid; border-color: var(--edge) var(--shadow) var(--shadow) var(--edge); color: var(--ink); width: min(520px,calc(100% - 32px)); max-height: 82vh; padding: 20px; background: var(--paper); box-shadow: 0 6px 24px #050d09a6 }
dialog::backdrop { background: #050d09ad }
.dialog-top { align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--rule); margin-bottom: 18px }
.dialog-top h2 { overflow-wrap: anywhere }
.close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: none; font-size: 22px; line-height: 1 }
.facts { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 14px 20px; margin: 0 }
.facts dt { color: var(--accent-ink) }
.facts dd { margin: 0 }
#play .play-content { display: grid; grid-template-columns: minmax(320px,1.15fr) minmax(280px,.85fr); gap: clamp(20px,3vw,42px); align-items: start }
.battle-image { display: block; width: 100%; height: auto; border: 1px solid var(--edge); image-rendering: pixelated }
.guide-section { border-top: 1px solid var(--rule); padding: 16px 0 }
.guide-section h2 { font-size: 20px; margin-bottom: 12px }
.guide-section p,.download-list small { color: var(--muted) }
.play-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px }
.play-modes button { font-size: 16px }
.play-modes button[aria-pressed=true] { border-color: var(--accent); background: var(--tint); color: var(--accent-ink) }
.download-list { margin: 0 }
.download-list > div { display: grid; grid-template-columns: max-content minmax(0,1fr); align-items: baseline; gap: 12px; border-bottom: 1px solid var(--rule); padding: 10px 0 }
.download-list dd { margin: 0; max-width: 100%; text-align: right }
.download-list small { display: block; margin-top: 3px }
.download-list a,.guide-section a { color: var(--accent-ink) }
.install-extras { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 13px }
.install-extras code { word-break: break-all }
.access-grid { max-width: 860px }
.access-grid code,pre { font: 13px/1.55 "Cascadia Mono",Consolas,monospace }
.access-grid pre { overflow: auto; max-height: 330px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); padding: 12px }
.access-grid label { display: inline-grid; gap: 5px; color: var(--muted); font-size: 13px }
.access-grid summary,.guide-section summary { cursor: pointer; color: var(--accent-ink) }
.form-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: 12px 0 }
.form-row input { width: 132px }
.form-row button { min-height: 38px }
@media(max-width:760px) {
  .wrap { width: calc(100% - 36px) }
  .mast-line { min-height: 58px; gap: 18px }
  .top-nav { padding-left: 16px; gap: 15px }
  main.wrap { padding-top: 18px; padding-bottom: 36px }
  #content > .title-line { min-height: 90px; padding: 14px 16px }
  h1 { font-size: 32px }
  #play .play-content { grid-template-columns: 1fr }
  .facts { grid-template-columns: minmax(0,1fr); gap: 4px }
  .facts dd + dt { margin-top: 7px }
}
@media(max-width:470px) {
  .wrap { width: calc(100% - 24px) }
  .mast-line { gap: 12px }
  .brand-name { font-size: 18px }
  .brand-series { font-size: 12px }
  .top-nav { gap: 10px; padding-left: 12px }
  .top-nav a,.play-link { font-size: 14px }
  .play-link { gap: 1px }
  h1 { font-size: 26px }
  #content > .title-line { min-height: 76px; padding-inline: 12px }
  #rules-button { padding: 5px 7px; font-size: 13px }
  .board-tabs { gap: 18px; padding-inline: 12px }
  .board-tabs a { font-size: 16px }
}
@media(prefers-reduced-motion:no-preference) {
  button,a,select { transition: background-color .1s,color .1s,border-color .1s }
}
@media(max-width:600px) {
  .mast-line { display:grid; grid-template-columns:1fr auto; gap:0; padding-top:10px }
  .top-nav { grid-column:1/-1; grid-row:2; gap:24px; padding:0; margin-top:4px; border:0 }
  .top-nav a { min-height:39px }
  .play-link { grid-column:2; grid-row:1 }
}
