:root {
  color-scheme: dark;
  --background: #081710;
  --panel: #14271d;
  --brass: #796d48;
  --gold: #d5bb84;
  --parchment: #eee5cb;
  --muted: #b4c6b9;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--parchment);
  background: var(--background);
}
#unit-commands[hidden], #watch-controls[hidden], #watch-confirmation[hidden], #command-reference[hidden] { display: none; }
#watch-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#watch-status { color: var(--muted); font: 12px/1.5 Arial, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 38% 32%, #29433180, transparent 75%), var(--background); min-height: 100vh; }
a { color: var(--gold); }
.masthead { min-height: 70px; padding: 14px 3.5%; border-bottom: 1px solid #796d4855; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #05110ccc; }
.wordmark { display: flex; align-items: center; gap: 13px; text-decoration: none; font-size: 18px; letter-spacing: 2px; }
.wordmark small { display: block; margin-top: 5px; font: 9px Arial, sans-serif; letter-spacing: 2px; }
.brand-mark { display: grid; place-items: center; height: 36px; width: 33px; border: 1px solid var(--brass); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); font-size: 32px; }
.edition { color: var(--muted); font: 12px/1.5 Arial, sans-serif; }
.start-layout { max-width: 1440px; margin: auto; min-height: calc(100vh - 70px); padding: 42px 5%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); align-items: center; gap: clamp(40px, 7vw, 120px); }
.introduction { max-width: 620px; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font: bold 11px/1.5 Arial, sans-serif; letter-spacing: 2px; }
h1 { font-size: clamp(64px, 6.7vw, 104px); font-weight: normal; line-height: .96; margin: 0; letter-spacing: -2px; }
.ornament { display: flex; align-items: center; gap: 16px; max-width: 220px; margin: 24px 0; color: var(--brass); }
.ornament::before, .ornament::after { content: ""; height: 1px; background: var(--brass); flex: 1; }
.lead { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.2; margin: 0 0 16px; }
.description { max-width: 490px; font: 16px/1.6 Arial, sans-serif; color: var(--muted); margin: 0; }
.prototype-note { font: 13px/1.6 Arial, sans-serif; color: var(--muted); max-width: 440px; margin: 24px 0 12px; }
.prototype-link { display: inline-flex; align-items: center; gap: 32px; font: bold 15px/1.5 Arial, sans-serif; text-underline-offset: 5px; padding: 5px 0; }
.link-hint { font: 11px/1.5 Arial, sans-serif; color: var(--muted); margin: 7px 0 0; }
.entry-card { padding: 28px 30px; border: 1px solid var(--brass); border-radius: 7px; background: linear-gradient(145deg, #203629aa, #112218dd); box-shadow: 0 18px 45px #0003; }
.entry-card h2 { font-size: 26px; font-weight: normal; margin: 0 0 23px; }
form, input, select, button { font-family: Arial, sans-serif; }
.field { margin-bottom: 16px; }
label, legend { font-size: 12px; color: var(--muted); }
.field > label { display: block; margin-bottom: 7px; }
input[type="text"], select { display: block; width: 100%; min-height: 43px; background: #091b13; border: 1px solid var(--brass); border-radius: 3px; color: var(--parchment); padding: 10px 12px; font-size: 14px; }
input::placeholder { color: #94a79a; opacity: 1; }
.hint { color: var(--muted); font: 11px/1.5 Arial, sans-serif; margin: 6px 0 0; }
.error { color: #ffc3a9; font: 12px/1.5 Arial, sans-serif; margin: 5px 0 0; }
.error:empty { display: none; }
[aria-invalid="true"] { border-color: #ffc3a9 !important; }
fieldset { padding: 0; border: 0; min-width: 0; margin: 0 0 16px; }
legend { margin-bottom: 7px; padding: 0; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 6px; }
.mode-options label { position: relative; display: flex; }
.mode-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-options span { width: 100%; display: grid; place-items: center; text-align: center; border: 1px solid var(--brass); border-radius: 3px; padding: 10px 5px; min-height: 42px; color: var(--parchment); font-size: 11px; cursor: pointer; }
.mode-options input:checked + span { background: #b69a4b24; border-color: var(--gold); color: #ffe0a1; }
:focus-visible, .mode-options input:focus-visible + span { outline: 3px solid #e7cb83; outline-offset: 4px; }
.availability { border-top: 1px solid #796d4870; padding-top: 13px; font: 12px/1.5 Arial, sans-serif; }
.availability strong { color: var(--gold); font-size: 12px; letter-spacing: .5px; }
.availability p { color: var(--muted); margin: 5px 0 0; }
.primary-action { width: 100%; min-height: 44px; margin-top: 18px; border: 1px solid #dbc589; border-radius: 4px; background: linear-gradient(#e1ce98, #b89752); color: #172014; font-size: 13px; font-weight: bold; cursor: pointer; }
.primary-action:disabled { opacity: .65; cursor: wait; }
#lobby { margin-top: 20px; border-top: 1px solid var(--brass); padding-top: 20px; font: 14px/1.6 Arial, sans-serif; }
#lobby-code { letter-spacing: 3px; color: var(--gold); }
.feedback:empty { display: none; }
[hidden] { display: none !important; }
@media (min-width: 851px) and (max-height: 740px) {
  .start-layout { padding-top: 22px; padding-bottom: 22px; }
  .entry-card { padding: 22px 26px; }
  .entry-card h2 { margin-bottom: 16px; }
  .field, fieldset { margin-bottom: 12px; }
  .ornament { margin: 18px 0; }
  .prototype-note { margin-top: 18px; }
}
@media (max-width: 850px) {
  .start-layout { grid-template-columns: minmax(0, 1fr); max-width: 620px; gap: 32px; padding: 32px 22px; }
  .edition { display: none; }
  h1 { font-size: clamp(60px, 12vw, 88px); }
}
@media (max-width: 420px) {
  .entry-card { padding: 23px 18px; }
  .start-layout { padding: 28px 14px; }
  .wordmark { font-size: 15px; }
}

[hidden] { display: none !important; }
body.room-battle .start-layout { display: none; }
body.room-battle { overflow: auto; }
body.room-battle .console-layout { width: min(1880px, calc(100% - 48px)); }
body.room-battle .command-area { min-width: 0; }


body.room-battle #log-content { white-space: pre-wrap; }


body.room-battle .console-layout h1 { font-size: 17px; line-height: normal; letter-spacing: 2px; }
body.room-battle .masthead { height: 64px; min-height: 64px; padding: 0 26px; }
body.room-battle .wordmark small { display: none; }
body.room-battle .edition { display: block; }
body.room-battle .console-layout .ornament { max-width: none; }

