/* Hot sun and gasoline: the same field headquarters as the desktop program. */
:root {
    --ink: #2a2014; --faded: #6b5836; --sand: #f1e3bc; --sun: #f2b84b; --ember: #d9661f; --fuel: #8f2a18;
    --brass: #c59b45; --soot: #17140e; --axis: #5a5f66; --crown: #2f6b3a;
    --stencil: "Stencil Std", Stencil, Impact, "Arial Narrow", sans-serif;
    --dial: Bahnschrift, "Roboto Condensed", "Franklin Gothic Medium", "Segoe UI", sans-serif;
    --typed: "Courier New", Courier, monospace;
    --grain: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .05 0 0 0 .5 0'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='.45'/></svg>");
}

* { box-sizing: border-box; }
html, body, #app, .game { height: 100%; margin: 0; }
body { background: var(--soot); color: var(--ink); font-family: var(--dial); font-size: 14px; }
.game { display: flex; flex-direction: column; height: 100dvh; }

.steel { background: var(--grain), linear-gradient(#4a462f, #302d1f); color: #f6e9c6; }
.paper { background: var(--grain), radial-gradient(circle at 30% 20%, #f8edcb, #e9d6a8); color: var(--ink); border: 1px solid #7a5f32; box-shadow: 0 2px 8px #0006; }
.canvas { background: var(--grain), repeating-linear-gradient(90deg, #0000 0 2px, #0000000a 2px 4px), #b9985e; }

h1, h2, .title, .caption, .stamp { font-family: var(--stencil); font-weight: normal; letter-spacing: .02em; }
h1 { color: var(--fuel); font-size: 28px; margin: 0 0 6px; text-transform: uppercase; }
h2 { color: var(--fuel); font-size: 16px; margin: 4px 0; text-transform: uppercase; }

/* Stamped steel buttons that sink when pressed. */
button { font: 600 14px var(--dial); color: #f6e9c6; cursor: pointer; padding: 7px 12px; border: 1px solid #16130c; border-bottom-width: 3px; border-radius: 3px; background: linear-gradient(#7c774c, #55512f 50%, #38351f); box-shadow: inset 0 1px #fff2cc55; }
button:hover:enabled { filter: brightness(1.15); }
button:active:enabled { border-bottom-width: 1px; transform: translateY(1px); }
button:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
button:disabled { opacity: .45; cursor: default; }
button.red { color: #fff4d6; border-color: #3a0e06; background: linear-gradient(#e8832a, #c04a1a 45%, #842412); }
button.wide { display: block; width: 100%; margin: 6px 0 0; }

/* The instrument plate. */
.plate { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 14px; border-bottom: 4px solid; border-image: linear-gradient(90deg, #8f2a18, #d9661f 35%, #f2b84b 62%, #d9661f 82%, #5a1a10) 1; }
.calendar { width: 96px; text-align: center; border-radius: 2px; }
.calendar .year { background: var(--fuel); color: #fff1d0; font-family: var(--stencil); font-size: 12px; }
.calendar .month { font: bold 18px var(--typed); }
.calendar .week { font-size: 11px; color: var(--faded); padding-bottom: 2px; }
.lamps { display: flex; gap: 7px; }
.lamp { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--brass); display: grid; place-items: center; background: #2b2416; font-size: 12px; }
.lamp.past { background: #7a3a14; }
.lamp.lit { background: #ffb52e; color: var(--ink); box-shadow: 0 0 14px 4px #ffb03099; }
.heading { flex: 1; min-width: 220px; }
.flag { display: inline-block; color: #fff; font-weight: bold; font-size: 12px; padding: 1px 8px; margin-right: 10px; border: 1px solid #f2d48a; border-radius: 2px; vertical-align: 3px; }
.flag.Axis, svg.counter.Axis { background: var(--axis); }
.flag.Commonwealth, svg.counter.Commonwealth { background: var(--crown); }
.title { color: #ffd879; font-size: 22px; text-transform: uppercase; }
.status { font-size: 13.5px; }
nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav .big { font-size: 15px; padding: 9px 16px; }

main { flex: 1; display: flex; min-height: 0; }
.table { flex: 1; position: relative; min-width: 0; background: #86c0e2; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, #0000 45%, #ffa52622 75%, #a63c0866 105%); }
.hover { position: absolute; left: 12px; top: 12px; margin: 0; padding: 8px 10px; max-width: 320px; white-space: pre-wrap; font: bold 12.5px var(--typed); pointer-events: none; }
.tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; width: 80px; }
.tools button { padding: 3px; }
.compass { width: 70px; margin: 0 auto 6px; }
.compass text { font: bold 11px var(--dial); }
.theatre { position: absolute; right: 12px; bottom: 12px; padding: 4px; border: 2px solid var(--brass); border-radius: 3px; }
.theatre .caption { color: #ffd879; font-size: 11px; margin: 0 0 3px 2px; }
#minimap { display: block; width: 280px; cursor: crosshair; touch-action: none; }

/* The dispatch table. */
aside { width: 390px; overflow-y: auto; padding: 10px; border-left: 3px solid #4a3818; display: flex; flex-direction: column; gap: 8px; }
.card { padding: 8px 10px; }
.notice { color: #9a2412; font: bold 13px var(--typed); margin: 6px 0 0; }
.typed { font: 12.5px var(--typed); white-space: pre-line; margin: 6px 0; }
.faded { color: var(--faded); }
.roster { max-height: 190px; overflow-y: auto; }
.group { color: var(--fuel); font-weight: bold; margin: 5px 0 1px; }
.row { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: none; color: var(--ink); border: 0; box-shadow: none; font-weight: normal; padding: 3px; white-space: pre; }
.row span { overflow: hidden; text-overflow: ellipsis; }
.row:active:enabled { transform: none; }
.row.selected { background: var(--sun); }
.file { display: flex; gap: 10px; }
svg.counter { width: 92px; height: 82px; flex: none; fill: #fff; border-radius: 4px; border: 1px solid #101010; background: #b08a3c; }
.name { color: var(--ink); font-size: 17px; margin: 0; }
.stamp { display: inline-block; margin-top: 6px; padding: 1px 7px; border: 2px solid var(--fuel); color: var(--fuel); border-radius: 2px; transform: rotate(-3deg); font-size: 13px; }
.stamp.holding { color: var(--faded); border-color: var(--faded); }
.check { display: flex; gap: 8px; align-items: center; margin-top: 8px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--fuel); width: 16px; height: 16px; }
.gauges { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.dial { width: 132px; flex: none; }
.dial text { font: bold 13px var(--dial); fill: var(--ink); }
.dial text.small { font-size: 9px; fill: #6e5322; }
.facts { display: flex; flex: 1; gap: 6px; }
.facts div { flex: 1; text-align: center; border-bottom: 1px solid var(--faded); }
.facts b { display: block; font-size: 19px; }
.facts span { font-size: 10.5px; color: var(--faded); }
.ratings { margin-top: 8px; }
.meter { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.meter > span { width: 40px; font-weight: bold; font-size: 12px; }
.meter > div { display: flex; gap: 5px; flex: 1; }
.meter i { width: 18px; height: 22px; border: 1px solid #6e5322; border-radius: 3px 6px 2px 2px; background: linear-gradient(to top, #a8301a var(--part), #0000 var(--part)); }
.meter i.shell { width: 12px; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, #c59b45 var(--part), #0000 var(--part)); }
.assault { border: 0; border-top: 1px solid #8a6b38; margin: 8px 0 0; padding: 6px 0 0; }
.assault legend { font-weight: bold; padding: 0; }
.assault input { width: 54px; font: bold 14px var(--typed); margin-right: 10px; }
.assault select { width: 100%; margin-top: 4px; font-family: var(--dial); }
.assault:disabled { opacity: .55; }
.log { flex: 1 0 180px; display: flex; flex-direction: column; }
.log ol { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 0; min-height: 130px; }
.log li { font: 12px var(--typed); padding: 3px 0; border-bottom: 1px solid #60481840; }

.veil { position: fixed; inset: 0; background: #17140e66; display: grid; place-items: center; padding: 14px; z-index: 5; }
.veil.dark { background: #17140ecc; }
.dialog { width: min(560px, 100%); max-height: 100%; overflow-y: auto; padding: 18px 22px; }
.dialog > button:last-child:not(.wide) { margin-top: 10px; }
.chapters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.chapters button { font-size: 12px; padding: 4px 8px; }
.lesson { white-space: pre-line; line-height: 1.45; margin: 2px 0 10px; }
.goal { margin: 4px 0; font-family: var(--typed); }
.goal b { display: block; }
.goal span { display: block; font-size: 12px; color: var(--faded); margin-left: 20px; }
.goal.met b { color: var(--fuel); }
.pair { display: flex; gap: 8px; }
.pair button { flex: 1; text-align: left; opacity: .75; }
.pair button.chosen { opacity: 1; outline: 3px solid var(--ember); }
.pair b { display: block; font-size: 16px; }
.pair span { font-weight: normal; font-size: 12.5px; }
.busy { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 8px 18px; font: bold 14px var(--typed); z-index: 6; }
.loading { display: grid; place-items: center; height: 100%; }
.loading .paper { padding: 20px 30px; font-family: var(--typed); }
.waiting aside { display: none; }

#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px; background: #f2b84b; text-align: center; }

/* Phones and narrow windows: the map on top, the paperwork below. */
@media (max-width: 860px) {
    main { flex-direction: column; }
    .table { flex: 0 0 56%; }
    aside { width: auto; flex: 1; border-left: 0; border-top: 3px solid #4a3818; }
    .plate { padding: 5px 8px; gap: 5px 10px; }
    .calendar, .lamps { display: none; }
    .title { font-size: 17px; }
    .status { font-size: 12px; }
    nav button, nav .big { padding: 5px 9px; font-size: 12.5px; }
    .theatre, .compass { display: none; }
    .tools { width: 62px; }
}
