/* Lightless: a dead station, hazard amber and cold cyan on black. Terminal type, stencilled headings. */
:root {
  --void: #050607;
  --panel: rgba(8, 11, 13, 0.9);
  --line: #2c3438;
  --text: #d8dcd4;
  --dim: #7f8a88;
  --amber: #e0a030;
  --amber-hi: #ffd070;
  --cyan: #5ad0e0;
  --red: #e04030;
  --green: #70e090;
  --head: "Chakra Petch", "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--void); color: var(--text); font-family: var(--mono); }
[hidden] { display: none !important; }
canvas#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; image-rendering: pixelated; cursor: crosshair; }
a { color: var(--amber-hi); }
.kicker { margin: 0 0 6px; color: var(--amber); letter-spacing: 0.24em; text-transform: uppercase; font-size: 11px; }
.fine { color: var(--dim); font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.lede { line-height: 1.6; color: #c4cac2; max-width: 36em; font-size: 14px; }
h1, h2 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: 0.06em; text-transform: uppercase; }
h1 { font-size: clamp(46px, 10vw, 96px); line-height: 0.92; color: #f0f2ea; text-shadow: 0 0 30px rgba(224, 160, 48, 0.25); }
h2 { font-size: 28px; }
button {
  background: linear-gradient(#1c2226, #0e1214); border: 1px solid #3a4448; border-radius: 2px; padding: 9px 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--amber); color: var(--amber-hi); }
button:disabled { opacity: 0.38; cursor: default; }
button.primary { background: repeating-linear-gradient(135deg, #e0a030 0 12px, #c88a20 12px 24px); border-color: #ffd070; color: #140e04; font-weight: 600; }
input, select { font-family: var(--mono); font-size: 14px; color: var(--text); background: #0a0d0f; border: 1px solid #3a4448; padding: 9px 11px; border-radius: 2px; outline: none; }
input:focus { border-color: var(--amber); }
label { display: block; margin: 16px 0 6px; color: var(--dim); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
label input { display: block; width: 100%; margin-top: 6px; }
label.check { display: flex; align-items: center; gap: 8px; margin: 0; }
label.check input[type="checkbox"] { display: inline-block; width: auto; margin: 0; flex: none; }
select { max-width: 100%; }
label.gfx { margin-top: 14px; }
.thumbs { display: none; }
body.touch .thumbs { display: block; }
body.touch .keys:not(.ctl-help) { display: none; }
.row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.row.join input { width: 120px; text-transform: uppercase; text-align: center; letter-spacing: 0.3em; }
/* Centred with auto margins, not align-items, so a card taller than the screen scrolls from its top. */
.screen { position: fixed; inset: 0; display: flex; align-items: flex-start; padding: 24px 6vw; overflow-y: auto; z-index: 5; }
.screen > * { margin-top: auto; margin-bottom: auto; }
#title { background: radial-gradient(ellipse at 78% 55%, rgba(255, 210, 120, 0.1), transparent 55%), linear-gradient(90deg, rgba(4, 5, 6, 0.97) 0%, rgba(4, 5, 6, 0.82) 50%, rgba(4, 5, 6, 0.35) 100%); }
.card { max-width: 540px; width: 100%; }
.card.wide { max-width: 760px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--amber); padding: 22px 24px; }
#lobby { justify-content: center; background: rgba(4, 5, 6, 0.72); }
.lobby-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 14px; }
.code { font-size: 34px; letter-spacing: 0.3em; color: var(--amber-hi); margin: 0; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.swatch { width: 38px; height: 38px; border-radius: 3px; border: 2px solid rgba(0, 0, 0, 0.6); cursor: pointer; padding: 0; }
.swatch.mine { outline: 2px solid var(--amber-hi); outline-offset: 2px; }
.swatch.taken { opacity: 0.22; cursor: default; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 14px; }
.roles button { text-align: left; padding: 6px 9px; display: flex; flex-direction: column; gap: 2px; }
.roles button b { font-size: 13px; }
.roles button small { color: var(--dim); font-size: 11px; line-height: 1.3; }
.roles button.mine { border-color: var(--amber-hi); color: var(--amber-hi); background: rgba(224, 160, 48, 0.12); }
.roles button em { font-style: normal; color: var(--dim); font-size: 10px; }
.settings { justify-content: center; background: rgba(3, 4, 5, 0.8); z-index: 8; }
.settings .card { margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--amber); padding: 18px 22px; max-width: 480px; }
.settings h2 { margin: 0 0 10px; }
.settings .kicker { margin: 14px 0 4px; }
.settings label.check { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.settings input[type="range"] { flex: 1 1 auto; min-width: 0; }
.settings select { flex: 1 1 auto; min-width: 0; }
.roster { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.roster li { display: flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, 0.03); padding: 6px 8px; font-size: 13px; }
.dot { width: 14px; height: 14px; border-radius: 2px; display: inline-block; flex: none; }
.rules { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 6px 0; align-items: center; }
.rules select { padding: 4px 6px; }
.chat { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.chat ul { list-style: none; padding: 0; margin: 0 0 8px; max-height: 18vh; overflow-y: auto; font-size: 13px; }
.chat input { width: 100%; }
li.sys { color: var(--dim); font-style: italic; }
li.rline { color: #a8e8c0; }
li.rline b { color: #70e090; margin-right: 4px; }
.command { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; padding: 8px 10px; background: rgba(224, 192, 96, 0.06); border: 1px solid #3a3422; }
.cmd-who { margin: 0; font-size: 14px; color: #e8c060; }
#smart-row small { color: var(--dim); text-transform: none; letter-spacing: 0; }

/* the radio and the commander */
.radio { position: absolute; left: 50%; bottom: 222px; transform: translateX(-50%); max-width: min(620px, 86vw); background: rgba(4, 12, 8, 0.86); border: 1px solid #2a5a3a; border-left: 3px solid var(--green); padding: 7px 12px; font-size: 14px; color: #c8f0d4; }
.radio b { color: var(--green); margin-right: 8px; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.radio.station { border-left-color: var(--cyan); color: #c8e8f0; }
.radio.station b { color: var(--cyan); }
.obj .order { margin-top: 6px; padding-top: 5px; border-top: 1px dashed #4a4024; color: #e8c060; }
.obj .order small { color: var(--dim); }
.cmdbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: auto; }
.cmdbar .tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.cmdbar button { min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.cmdbar button small { color: var(--dim); font-size: 10px; }
.cmdbar button.on { border-color: #e8c060; color: #ffe090; box-shadow: 0 0 10px rgba(232, 192, 96, 0.35); }
.cmdbar button.wait { opacity: 0.45; }
.cmdbar .orbit { align-items: center; }
.cmdbar .orbit button { border-color: rgba(232, 192, 96, 0.45); }
.cmdbar .cp { font-size: 12px; color: var(--dim); padding: 0 6px; }
.cmdbar .cp span { color: #ffe090; font-weight: 600; }
.cmd-help { margin: 0; font-size: 11px; color: var(--dim); text-shadow: 0 1px 2px #000; text-align: center; }
.threat { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; }
.threat i { width: 160px; height: 6px; background: #12181a; border: 1px solid #2c3438; position: relative; }
.threat b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #70e090, #e0a030, #e04030); }
body.cmd .vitals, body.cmd .arms, body.cmd .acts, body.cmd .prompt, body.cmd .downed { display: none !important; }
body.cmd canvas#view { cursor: cell; }
body.cmd .radio { bottom: 128px; }
body.cmd .note { bottom: 168px; }

/* the HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#hud button, #hud input, .acts { pointer-events: auto; }
.obj { position: absolute; left: 14px; top: 12px; background: rgba(6, 9, 10, 0.78); border-left: 3px solid var(--amber); padding: 8px 12px; font-size: 13px; min-width: 240px; max-width: 60vw; }
.obj b { display: block; font-family: var(--head); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; color: var(--amber-hi); }
.obj .gen { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.obj .gen span { flex: 1; height: 6px; background: #12181a; border: 1px solid #2c3438; position: relative; }
.obj .gen span i { position: absolute; inset: 0 auto 0 0; background: var(--cyan); }
.obj .gen.on { color: var(--cyan); }
.obj .gen.on span i { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.squad { position: absolute; right: 14px; top: 12px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.squad li { display: grid; grid-template-columns: 10px 90px 80px; align-items: center; gap: 6px; background: rgba(6, 9, 10, 0.75); padding: 4px 8px; font-size: 12px; }
.squad li span { height: 5px; background: #12181a; position: relative; }
.squad li span i { position: absolute; inset: 0 auto 0 0; background: var(--green); }
.squad li.down { color: var(--red); }
.squad li.down span i { background: var(--red); }
.squad li.dead { opacity: 0.4; text-decoration: line-through; }
.banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-family: var(--head); font-size: clamp(22px, 4vw, 40px); letter-spacing: 0.18em; text-transform: uppercase; color: #ffb0a0; text-shadow: 0 0 20px rgba(224, 64, 48, 0.7); animation: pulse 0.6s infinite alternate; text-align: center; white-space: nowrap; }
.banner.good { color: #b0f0ff; text-shadow: 0 0 20px rgba(90, 208, 224, 0.7); animation: none; }
@keyframes pulse { from { opacity: 0.65; } to { opacity: 1; } }
.prompt { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--amber); padding: 8px 14px; min-width: 260px; text-align: center; }
.prompt b { display: block; font-family: var(--head); font-size: 16px; letter-spacing: 0.06em; margin-bottom: 6px; }
.prompt span { display: block; height: 7px; background: #0a0d0f; border: 1px solid #3a4448; }
.prompt i { display: block; height: 100%; width: 0; background: var(--amber-hi); }
.note { position: absolute; left: 50%; bottom: 180px; transform: translateX(-50%); margin: 0; background: var(--panel); padding: 6px 12px; font-size: 13px; border: 1px solid #3a4448; }
.vitals { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: flex-end; gap: 12px; }
.hp { width: 200px; height: 22px; background: rgba(6, 9, 10, 0.85); border: 1px solid #3a4448; position: relative; }
.hp span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#70e090, #3a9a5a); width: 100%; }
.hp.low span { background: linear-gradient(#f06050, #a02a20); }
.hp b { position: relative; padding-left: 8px; line-height: 22px; font-size: 12px; text-shadow: 0 1px 0 #000; }
#tracker { width: 168px; height: 168px; border-radius: 50%; background: rgba(4, 12, 10, 0.72); border: 1px solid #2a4a40; }
.arms { position: absolute; right: 14px; bottom: 86px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.arm { background: rgba(6, 9, 10, 0.8); border: 1px solid #2c3438; padding: 6px 10px; width: 220px; opacity: 0.55; }
.arm.on { opacity: 1; border-color: var(--amber); }
.arm b { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.arm .bar { display: block; height: 6px; background: #12181a; position: relative; }
.arm .bar i { position: absolute; inset: 0 auto 0 0; background: var(--amber); }
.arm.hot .bar i { background: var(--red); }
.arm small { color: var(--dim); font-size: 11px; }
.flares { background: rgba(6, 9, 10, 0.8); border: 1px solid #2c3438; padding: 4px 10px; font-size: 12px; }
.flares span { color: #ff8060; font-weight: 600; }
.downed { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, transparent 30%, rgba(120, 0, 0, 0.55) 100%); text-align: center; }
.downed h2 { color: #ffb0a0; font-size: clamp(28px, 5vw, 48px); }
.downed p { color: #e0c0b8; max-width: 30em; }
.downed.dead { background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%); }
.downed.dead h2 { color: #c0c8c8; }
.chatlive { position: absolute; left: 14px; bottom: 200px; width: min(340px, 60vw); }
.chatlive ul { list-style: none; margin: 0 0 4px; padding: 0; font-size: 12px; text-shadow: 0 1px 2px #000; }
.chatlive li { margin: 2px 0; }
.chatlive input { width: 100%; pointer-events: auto; }
.acts { position: absolute; right: 14px; bottom: 14px; display: none; gap: 8px; }
body.touch .acts { display: flex; }
.acts button { width: 70px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; }
.acts button small { color: var(--dim); font-size: 10px; }
.acts button.ready { border-color: var(--amber-hi); color: var(--amber-hi); }
#bigmap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 92vw; max-height: 80vh; background: rgba(4, 6, 7, 0.95); border: 1px solid var(--amber); }
.splash { justify-content: center; text-align: center; background: rgba(3, 4, 5, 0.84); }
.splash-in { max-width: 640px; margin: 0 auto; }
.splash h1 { font-size: clamp(36px, 7vw, 66px); }
.splash.lose h1 { color: #ff9a8a; }
.times { margin: 12px 0 0; }
.times ol { margin: 4px 0 0; padding-left: 22px; font-size: 13px; }
.times li { padding: 2px 0; }
.times li b { color: var(--amber-hi); display: inline-block; min-width: 46px; }
.times li small { color: var(--dim); }
.times li.mine { color: #ffe090; }
.splash .times { max-width: 420px; margin: 16px auto 0; text-align: left; }
.stats { margin: 18px auto 0; border-collapse: collapse; font-size: 13px; }
.stats td { padding: 4px 12px; border-bottom: 1px solid #1c2226; text-align: left; }
.stats td:last-child { text-align: right; color: var(--amber-hi); }
#link-lost { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: var(--panel); padding: 6px 12px; z-index: 9; }
.stick { position: fixed; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 2px solid rgba(216, 220, 212, 0.3); z-index: 3; pointer-events: none; }
.stick.aim { border-color: rgba(224, 160, 48, 0.45); }
.stick i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(216, 220, 212, 0.25); }
body.touch .arms { bottom: 80px; }
body.touch .arm { width: 170px; padding: 4px 8px; }
body.touch #tracker { width: 120px; height: 120px; }
body.touch .vitals { bottom: auto; top: 50%; transform: translateY(-50%); flex-direction: column; align-items: flex-start; }
body.touch .hp { width: 140px; }
@media (max-height: 500px) {
  .obj { font-size: 11px; padding: 5px 8px; min-width: 180px; }
  .obj b { font-size: 12px; }
  .squad li { grid-template-columns: 10px 70px 50px; font-size: 10px; padding: 2px 6px; }
  .arms { bottom: 74px; }
  .arm { width: 150px; padding: 3px 6px; }
  .arm b { font-size: 10px; }
  .prompt { bottom: 76px; }
  .chatlive { bottom: 160px; }
  .radio { bottom: 150px; font-size: 12px; }
  .cmdbar button { min-width: 70px; padding: 5px 8px; }
  .cmd-help { display: none; }
}

/* Generators: the job, the spin. */
.obj .gen { flex-wrap: wrap; }
.obj .gen em { font-style: normal; min-width: 92px; }
.obj .gen small { flex-basis: 100%; color: var(--dim); font-size: 11px; margin-top: -2px; }
.obj .gen.job span i { background: var(--amber); }
.obj .gen.ready { color: var(--amber-hi); }
.obj .gen.ready span i { background: var(--amber-hi); }
.obj .gen.spin span i { background: var(--cyan); animation: spinbar 0.8s linear infinite alternate; }
.obj .gen.spin.hit small { color: #ff7060; }
@keyframes spinbar { from { opacity: 0.6; } to { opacity: 1; } }
/* The build bar. */
.buildbar { position: absolute; right: 14px; bottom: 262px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.buildbar .scrap { background: rgba(6, 9, 10, 0.8); border: 1px solid #2c3438; padding: 3px 10px; font-size: 12px; }
.buildbar .scrap span { color: #f0c070; font-weight: 600; }
.buildbar button { width: 200px; display: flex; justify-content: space-between; align-items: baseline; padding: 3px 8px; font-size: 12px; letter-spacing: 0.03em; white-space: nowrap; background: rgba(6, 9, 10, 0.8); }
.buildbar button small { color: var(--dim); font-size: 10px; }
.buildbar button.on { border-color: var(--amber-hi); color: var(--amber-hi); box-shadow: 0 0 10px rgba(240, 180, 60, 0.35); }
.buildbar button.wait { opacity: 0.45; }
.packhint { margin: 0; font-size: 11px; color: var(--amber-hi); }
.carrying { position: absolute; left: 50%; bottom: 170px; transform: translateX(-50%); margin: 0; background: rgba(6, 9, 10, 0.85); border: 1px solid var(--cyan); color: var(--cyan); padding: 4px 12px; font-size: 13px; }
body.touch .buildbar { bottom: auto; top: 8px; right: auto; left: 50%; transform: translateX(-50%); flex-direction: row; align-items: center; }
body.touch .buildbar button { width: auto; padding: 3px 6px; gap: 6px; }
body.cmd .buildbar, body.cmd .carrying { display: none !important; }
#hud .buildbar button { pointer-events: auto; }

/* The phone: one line of objective (tap it for the rest), dots for the squad, the radio up top,
   the weapon on its button, the build bar, map and pack behind "more". */
.squad li em { font-style: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.obj .ups { color: #f0c070; font-size: 11px; margin-top: 4px; }
#b-more, #b-swap i { display: none; }
body.touch #b-more { display: flex; }
body.touch .obj { pointer-events: auto; min-width: 0; max-width: min(40vw, 330px); padding: 5px 9px; font-size: 11px; cursor: pointer; }
body.touch .obj b { font-size: 12px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.touch .obj b::after { content: " ▾"; color: var(--dim); }
body.touch.objopen .obj b::after { content: " ▴"; }
body.touch .obj .gen small { font-size: 10px; }
body.touch .obj .gen em { min-width: 0; }
body.touch .obj .gen > em { display: none; }
body.touch:not(.objopen) .obj .more { display: none; }
body.touch .squad { flex-direction: row; gap: 3px; right: 10px; top: 8px; }
body.touch .squad li { display: block; width: 14px; height: 14px; padding: 0; background: none; position: relative; }
body.touch .squad li em, body.touch .squad li span { display: none; }
body.touch .squad li .dot { width: 12px; height: 12px; }
body.touch .squad li.down .dot { outline: 2px solid var(--red); animation: pulse 0.5s infinite alternate; }
body.touch .squad li.dead { text-decoration: none; }
body.touch .chatlive, body.touch .arms, body.touch #b-map, body.touch #b-pack, body.touch #b-zoom, body.touch #b-set { display: none; }
body.touch.more #b-map, body.touch.more #b-pack, body.touch.more #b-zoom, body.touch.more #b-set { display: flex; }
body.touch .buildbar { display: none; }
body.touch.more .buildbar { display: flex; top: auto; bottom: 74px; left: auto; right: 10px; transform: none; }
body.touch #b-more.on { border-color: var(--amber-hi); color: var(--amber-hi); }
body.touch .vitals { top: 30px; bottom: auto; left: auto; right: 10px; transform: none; flex-direction: column; align-items: flex-end; gap: 6px; }
body.touch .hp { width: 96px; height: 14px; }
body.touch .hp b { line-height: 14px; font-size: 10px; }
body.touch #tracker { width: 84px; height: 84px; }
body.touch .radio { top: 8px; bottom: auto; left: auto; right: 118px; transform: none; max-width: min(360px, 36vw); padding: 4px 8px; font-size: 11px; line-height: 1.35; }
body.touch .radio b { font-size: 10px; display: block; }
body.touch .banner { top: 26%; font-size: clamp(16px, 4.4vw, 26px); letter-spacing: 0.12em; white-space: normal; max-width: 70vw; }
body.touch .prompt { bottom: 74px; min-width: 0; padding: 5px 10px; }
body.touch .prompt b { font-size: 13px; margin-bottom: 4px; }
body.touch .note { bottom: 116px; font-size: 11px; padding: 4px 9px; }
body.touch .carrying { bottom: 140px; font-size: 11px; }
body.touch .acts { right: 10px; bottom: 10px; gap: 6px; align-items: flex-end; }
body.touch .acts button { width: 56px; height: 50px; padding: 4px; position: relative; }
body.touch #b-use { width: 76px; height: 62px; font-size: 13px; }
body.touch #b-use.ready { background: rgba(224, 160, 48, 0.22); box-shadow: 0 0 12px rgba(255, 208, 112, 0.4); }
body.touch #b-swap { width: 72px; }
body.touch #b-swap i { display: block; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; background: #12181a; }
body.touch #b-swap i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--amber); }
body.touch #b-swap.hot i::after { background: var(--red); }
body.touch #b-swap small { font-size: 9px; }
body.cmd #b-more { display: none !important; }

/* Menus on a phone: no clipped tops, rules in a column, less text on a short screen. */
html, body { touch-action: manipulation; }
canvas#view, #hud, #hud *, .stick { touch-action: none; }
body.touch { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
body.touch input, body.touch select { -webkit-user-select: text; user-select: text; font-size: 16px; }
@media (max-width: 600px) {
  .screen { padding: 16px; }
  .card.wide { padding: 16px; }
  .lobby-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .rules { flex-direction: column; align-items: stretch; gap: 10px; }
  .rules label.check { justify-content: flex-start; }
  .rules select { flex: 1 1 auto; min-width: 0; width: 0; }
  .rules #reroll { align-self: flex-start; }
}
@media (max-height: 500px) {
  .screen { padding: 12px 5vw; }
  h1 { font-size: 40px; }
  .lede { font-size: 12px; line-height: 1.45; margin: 6px 0; }
  label { margin-top: 8px; }
  .card.wide { padding: 12px 16px; }
  .lobby-head { margin-bottom: 6px; }
  .code { font-size: 26px; }
  .swatch { width: 30px; height: 30px; }
  .roster, .colors, .command { margin-bottom: 8px; }
  .chat ul { max-height: 24vh; }
}

.badge { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--amber); color: var(--amber-hi); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }

/* Hit marker (at the crosshair or the cursor) and the kill streak. */
.hitmark { position: fixed; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; z-index: 30; }
.hitmark::before, .hitmark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; margin: -1px 0 0 -11px; background: linear-gradient(90deg, #fff 0 32%, transparent 32% 68%, #fff 68%); transform: rotate(45deg); }
.hitmark::after { transform: rotate(-45deg); }
.hitmark.kill::before, .hitmark.kill::after { background: linear-gradient(90deg, #ff6a3a 0 36%, transparent 36% 64%, #ff6a3a 64%); height: 3px; }
.streak { position: fixed; right: 18px; top: 38%; text-align: right; color: #ffd27a; text-shadow: 0 0 10px rgba(255, 140, 40, 0.7); pointer-events: none; z-index: 20; transition: transform 0.08s; }
.streak b { display: block; font-size: 34px; line-height: 1; }
.streak small { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.streak.pop { transform: scale(1.25); }
body.touch .streak { top: 22%; right: 10px; }
.ctl-help:empty { display: none; }
