:root {
  color-scheme: dark;       /* the game is a single dark thermal display in every theme */
  --g: #9dffb8;            /* phosphor green text */
  --g-dim: rgba(157, 255, 184, 0.55);
  --line: rgba(157, 255, 184, 0.32);
  --panel: rgba(2, 14, 7, 0.62);
  --yellow: #ffe600;       /* Super Earth accent (placeholder) */
  --blue: #3da9ff;
  --red: #ff4a4a;
  --amber: #ffb020;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--g);
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em;
  touch-action: none; overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
#app { position: fixed; inset: 0; height: 100dvh; width: 100vw; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; }
.ovfx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hidden { display: none !important; }
b { color: #fff; font-weight: 700; }
kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 2px; text-align: center;
  border: 1px solid var(--line); border-radius: 4px; background: rgba(157, 255, 184, 0.1); color: var(--yellow); font: inherit; font-size: 12px;
}

/* ---------- panels and buttons ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; backdrop-filter: blur(2px); }
.btn {
  appearance: none; font: inherit; letter-spacing: 0.08em; color: var(--g); cursor: pointer;
  min-height: 44px; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--line);
  background: rgba(8, 30, 16, 0.85); pointer-events: auto; touch-action: none;
}
.btn:hover { border-color: var(--g); background: rgba(20, 60, 30, 0.9); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--yellow); color: #000; border-color: var(--yellow); font-weight: 700; }
.btn.primary:hover { background: #fff27a; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.big { font-size: 18px; min-height: 54px; padding: 10px 28px; }
.btn.small { min-height: 38px; padding: 4px 10px; font-size: 12px; }
.btn.icon { min-height: 40px; min-width: 40px; padding: 4px 10px; font-weight: 700; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn .key { display: inline-block; padding: 0 5px; margin-right: 4px; border: 1px solid currentColor; border-radius: 3px; font-size: 11px; }
.btn small { display: block; font-size: 10px; opacity: 0.8; }

/* ---------- screens ---------- */
.screen {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: flex-start; flex-direction: column;
  padding: 16px; overflow-y: auto; touch-action: pan-y;
  background: radial-gradient(ellipse at center, rgba(0, 8, 3, 0.35), rgba(0, 4, 2, 0.88));
}
.screen.on { display: flex; }
.screen.overlay { background: rgba(0, 4, 2, 0.78); z-index: 30; }
.card {
  width: min(94vw, 560px); padding: 22px 22px 18px; text-align: center; margin: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; backdrop-filter: blur(4px);
  box-shadow: 0 0 60px rgba(60, 255, 130, 0.08);
}
.card.wide { width: min(94vw, 640px); }
.card.wide2 { width: min(94vw, 880px); }
.b-cols { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; text-align: left; }
.b-left, .b-right { min-width: 0; }
.b-left .eyebrow { text-align: left; }
.b-right h2 { margin-top: 0; }
.b-left .btns { justify-content: flex-start; position: sticky; bottom: 4px; z-index: 2; padding: 8px 0 2px; background: linear-gradient(to bottom, transparent, var(--panel) 28%); }
#b-continue:not(:disabled) { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 22px rgba(255, 230, 0, 0.6); } }
.eyebrow { font-size: 12px; color: var(--g-dim); letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 6px; }
h1 { margin: 6px 0 4px; font-size: clamp(32px, 8vw, 54px); line-height: 1; color: var(--yellow); letter-spacing: 0.12em; text-shadow: 0 0 18px rgba(255, 230, 0, 0.35); }
h2 { margin: 4px 0 10px; font-size: clamp(20px, 5vw, 28px); letter-spacing: 0.14em; color: #fff; }
.tag { margin: 0 0 18px; color: var(--g-dim); }
.fine { font-size: 11px; color: var(--g-dim); margin: 10px 0 0; line-height: 1.5; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.field { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 4px 0 6px; color: var(--g-dim); font-size: 12px; }
.field input {
  font: inherit; color: #fff; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 10px; width: 190px; letter-spacing: 0.1em; text-transform: none; touch-action: auto; user-select: text; -webkit-user-select: text;
}
.field input:focus { outline: 1px solid var(--yellow); }
/* Language picker on the title screen */
.langs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 2px 0 12px; }
.langs .btn.lang { min-height: 34px; padding: 4px 12px; font-size: 12px; letter-spacing: 0.06em; opacity: 0.75; }
.langs .btn.lang.on { opacity: 1; border-color: var(--yellow); color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
/* difficulty picker (title): ten numbered buttons, the level's name above, what it changes below */
.diff { margin: 0 0 10px; }
.diff-h { font-size: 11px; letter-spacing: 0.18em; color: var(--g-dim); margin-bottom: 6px; }
.diff-h b { color: var(--yellow); letter-spacing: 0.08em; margin-left: 4px; }
.diff-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; max-width: 360px; margin: 0 auto; }
.diff-row .btn.dl { min-height: 34px; padding: 0; font-size: 13px; letter-spacing: 0; opacity: 0.7; }
.diff-row .btn.dl.on { opacity: 1; border-color: var(--yellow); color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.diff-row .btn.dl.hot { border-color: color-mix(in srgb, var(--red, #ff5a4a) 70%, transparent); }
.diff-note { margin: 6px auto 0; max-width: 360px; min-height: 2.6em; }
.f-diff { font-size: 12px; letter-spacing: 0.1em; color: var(--yellow); margin: 2px 0 6px; text-align: center; }

.brief-top { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; justify-content: space-between; color: var(--g-dim); font-size: 13px; }
.ctl { text-align: left; font-size: 12px; line-height: 1.9; margin: 6px 0 8px; }
.ctl > div { margin-bottom: 3px; }
.ctl .sub { color: var(--g-dim); font-size: 11px; line-height: 1.5; margin: 0 0 6px 4px; }
#s-brief { padding-top: 40px; }
.tips { text-align: left; margin: 8px 0; padding-left: 18px; font-size: 12px; color: var(--g-dim); line-height: 1.7; }
.progress { height: 4px; background: rgba(157, 255, 184, 0.15); border-radius: 2px; overflow: hidden; margin: 12px 0 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--yellow); }
.r-line { text-align: left; padding: 7px 4px; border-bottom: 1px solid rgba(157, 255, 184, 0.12); min-height: 34px; font-size: 15px; opacity: 0; }
.r-line.show { opacity: 1; }
.r-line.big { font-size: clamp(20px, 5vw, 26px); color: var(--yellow); letter-spacing: 0.1em; }

table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
td { padding: 5px 4px; border-bottom: 1px solid rgba(157, 255, 184, 0.12); text-align: left; }
td:last-child { text-align: right; color: #fff; }
td.neg:last-child { color: var(--red); }
.d-total { margin-top: 6px; font-size: 16px; text-align: right; }
.d-total b { color: var(--yellow); font-size: 20px; margin-left: 8px; }
#d-outcome.victory { color: #7dff9b; } #d-outcome.complete { color: #c8ff7d; } #d-outcome.defeat { color: var(--red); } #d-outcome.timeout, #d-outcome.retired { color: var(--amber); }
.f-id { font-size: 15px; margin: 2px 0; } .f-id b { color: var(--yellow); letter-spacing: 0.12em; }
.f-local { font-size: 11px; color: var(--g-dim); margin-bottom: 8px; }
#f-score { color: var(--yellow); font-size: 1.15em; margin-left: 8px; }
textarea {
  width: 100%; margin-top: 10px; padding: 10px; font: inherit; font-size: 12px; line-height: 1.5; color: var(--g); background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line); border-radius: 6px; resize: none; touch-action: auto; user-select: text; -webkit-user-select: text; white-space: pre-wrap; overflow-wrap: anywhere;
}
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid rgba(157, 255, 184, 0.12); text-align: left; font-size: 13px; }
.set-row small { display: block; color: var(--g-dim); font-size: 11px; }
.set-row input[type=range] { width: 130px; touch-action: auto; }
.set-row select { font: inherit; color: var(--g); background: #05140a; border: 1px solid var(--line); padding: 6px; border-radius: 4px; }
.tog { min-width: 64px; min-height: 36px; padding: 4px 10px; }
.tog.on { background: var(--yellow); color: #000; border-color: var(--yellow); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; font-size: 12px; z-index: 5; }
.hud-l { position: absolute; top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 6px; width: 208px; }
.hud-tl { width: 100%; }
.tl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#timer { font-size: 24px; color: #fff; letter-spacing: 0.08em; line-height: 1.1; }
#timer.low { color: var(--red); }
#opname { font-size: 10px; color: var(--g-dim); text-transform: uppercase; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#roster { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(157, 255, 184, 0.18); display: flex; flex-direction: column; gap: 3px; }
.rr { display: grid; grid-template-columns: 14px minmax(0, 1fr) 42px 52px; align-items: center; gap: 5px; font-size: 11px; line-height: 1.3; }
.rr .l { color: var(--tc); font-size: 12px; text-align: center; }
.rr .t { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr .hp { display: block; height: 5px; background: rgba(157, 255, 184, 0.14); border-radius: 2px; overflow: hidden; }
.rr .hp u { display: block; height: 100%; width: 0; background: var(--tc); text-decoration: none; }
.rr .st { font-size: 9.5px; color: var(--g-dim); text-align: right; white-space: nowrap; }
.rr.hurt .hp u { background: var(--red); } .rr.hurt .t { color: var(--red); }
.rr.drop .t, .rr.drop .st { color: var(--yellow); } .rr.wait .t, .rr.wait .st { color: var(--amber); }
.rr.lost { opacity: 0.45; } .rr.lost .st { color: var(--red); }
#supply { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; padding-top: 4px; border-top: 1px solid rgba(157, 255, 184, 0.18); font-size: 10.5px; color: var(--g-dim); }
#supply i { color: var(--yellow); font-style: normal; } #supply .lives.low { color: var(--red); }
#notices { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt { --nc: var(--g-dim); padding: 3px 8px; background: rgba(2, 14, 7, 0.66); border-left: 3px solid var(--nc); font-size: 11px; line-height: 1.3; color: #e6fff0; animation: fadein .2s; transition: opacity 1.1s; }
.nt.good { --nc: #7dff9b; } .nt.warn { --nc: var(--amber); color: #ffe6b0; } .nt.bad { --nc: var(--red); color: #ffd0d0; } .nt.info { --nc: var(--blue); } .nt.dim { --nc: rgba(157, 255, 184, 0.3); color: var(--g-dim); }
.nt.old { opacity: 0; }

.hud-tc { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(500px, calc(100vw - 2 * 232px)); }
#objective { width: 100%; text-align: center; color: var(--yellow); white-space: normal; }
#obj-sub { font-size: 10px; color: var(--g-dim); margin-top: 2px; letter-spacing: 0.08em; }
#obj-bar { height: 4px; margin-top: 5px; background: rgba(157, 255, 184, 0.15); border-radius: 2px; overflow: hidden; }
#obj-bar i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .25s linear; }
#obj-bar.urgent i { background: var(--red); }
#obj-bar.urgent { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { box-shadow: 0 0 18px rgba(255, 230, 0, 0.5); } }
#place-hint { width: 100%; text-align: center; color: var(--yellow); border-color: var(--yellow); font-size: 11px; }

/* the twelve stratagems: four groups, one Helldiver each */
#strats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; width: 100%; pointer-events: auto; }
#strats:empty { display: none; }
.sg { --tc: var(--g); min-width: 0; padding: 3px; border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); border-radius: 4px; background: rgba(2, 14, 7, 0.4); }
.sh { display: flex; align-items: baseline; gap: 4px; font-size: 8.5px; line-height: 1.2; margin-bottom: 3px; min-width: 0; letter-spacing: 0.02em; }
.sh b { color: var(--tc); font-size: 10px; } .sh span { color: var(--g-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.sc {
  position: relative; aspect-ratio: 1 / 1; min-width: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 4px;
  background: rgba(2, 14, 7, 0.75); display: flex; align-items: center; justify-content: center; cursor: help;
}
.sc .g { position: relative; z-index: 2; font-size: 8.5px; letter-spacing: 0; font-weight: 700; color: var(--c); }
.sc .f { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0, 0, 0, 0.78); z-index: 1; }
.sc.cd { opacity: 0.7; } .sc.cd .g { color: var(--g-dim); }
.sc.rdy { box-shadow: inset 0 0 6px color-mix(in srgb, var(--c) 40%, transparent); }
.sc.act { border-color: #7dff9b; box-shadow: 0 0 8px rgba(125, 255, 155, 0.5); opacity: 1; } .sc.act .g { color: #7dff9b; }
.sc.inc { border-color: var(--yellow); animation: blink 0.8s steps(2) infinite; opacity: 1; }
.sc.off { opacity: 0.28; border-style: dashed; }

.hud-tr { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.scorebox { text-align: right; line-height: 1.5; font-size: 11px; }
.scorebox .cr { color: #ffe27a; }
.combo { color: var(--yellow); min-height: 16px; }
.combo:empty { display: none; }
#minimap { width: 120px; height: 120px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0, 10, 4, 0.6); pointer-events: auto; touch-action: none; }
.tr-btns { display: flex; gap: 6px; }
.tr-btns .btn { min-height: 36px; padding: 4px 10px; font-size: 11px; }

#radio { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 224px; width: min(340px, 56vw); display: flex; flex-direction: column; gap: 3px; }
#radio .line { padding: 3px 8px; background: rgba(2, 14, 7, 0.6); border-left: 2px solid var(--yellow); font-size: 12px; animation: fadein .2s; transition: opacity 1s; }
#radio .line.old { opacity: 0; }
@keyframes fadein { from { opacity: 0; transform: translateX(-6px); } }

/* SEAF orders */
#orders { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 94px; width: min(500px, 66vw); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 5px; pointer-events: auto; }
.ord {
  position: relative; min-width: 0; height: 50px; padding: 5px 3px 3px; text-align: center; touch-action: none; cursor: pointer;
  font: inherit; font-size: 10px; color: var(--g); background: rgba(8, 30, 16, 0.85); border: 1px solid var(--line); border-radius: 5px;
}
.ord .k { position: absolute; top: 2px; right: 4px; color: var(--g-dim); font-size: 9px; }
.ord .n { display: block; font-size: 9px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 7px 0 0; margin-top: 4px; }
.ord .s { display: block; font-size: 11px; margin-top: 5px; color: #fff; }
.ord.ready .s { color: #7dff9b; } .ord.cd .s { color: var(--amber); } .ord.off { opacity: 0.45; } .ord.off .s { color: var(--g-dim); }
.ord.active { border-color: var(--yellow); background: rgba(70, 60, 0, 0.7); box-shadow: 0 0 12px rgba(255, 230, 0, 0.3); } .ord.active .s { color: var(--yellow); }
.ord:hover:not(.off) { border-color: var(--g); }
/* the build menu: what SEAF can put up */
#orders { grid-template-columns: repeat(7, minmax(0, 1fr)); width: min(550px, 70vw); }
#buildmenu { position: absolute; left: calc(max(10px, env(safe-area-inset-left)) + min(550px, 70vw) + 6px); bottom: 94px; display: grid; grid-template-columns: repeat(3, 92px); gap: 4px; padding: 4px; pointer-events: auto; }
.bld { min-width: 0; height: 50px; padding: 4px 3px; text-align: center; font: inherit; font-size: 10px; color: var(--g); background: rgba(8, 30, 16, 0.92); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; touch-action: none; }
.bld .n { display: block; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld .s { display: block; margin-top: 5px; font-size: 10px; color: #fff; white-space: nowrap; }
.bld.ready .s { color: #7dff9b; } .bld.poor .s { color: var(--amber); } .bld.off { opacity: 0.45; }
.bld:hover:not(.off) { border-color: var(--g); }
/* SEAF squads: pick one, draw it a play, split it, merge it, hand it troopers */
#squads { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 160px; width: min(500px, 66vw); display: grid; grid-template-columns: repeat(5, minmax(0, 1.1fr)) repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; pointer-events: auto; }
.sqb, .sqa {
  position: relative; min-width: 0; height: 40px; padding: 3px 2px; text-align: center; touch-action: none; cursor: pointer;
  font: inherit; font-size: 10px; color: var(--g); background: rgba(8, 30, 16, 0.85); border: 1px solid var(--line); border-radius: 5px;
}
.sqb { --sc: var(--g); border-color: color-mix(in srgb, var(--sc) 55%, transparent); }
.sqb[data-sq="-1"] { --sc: #ffffff; }
.sqb .n { display: block; font-size: 11px; font-weight: 700; color: var(--sc); margin-top: 1px; }
.sqb .s { display: block; font-size: 9px; color: #fff; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.sqb.sel { background: color-mix(in srgb, var(--sc) 26%, rgba(8, 30, 16, 0.92)); border-color: var(--sc); box-shadow: 0 0 10px color-mix(in srgb, var(--sc) 55%, transparent); }
.sqb.empty { opacity: 0.55; } .sqb.empty.sel { opacity: 1; }
.sqa .k { position: absolute; top: 1px; right: 3px; color: var(--g-dim); font-size: 8px; }
.sqa .n { display: block; font-size: 9px; margin-top: 8px; letter-spacing: 0.02em; }
.sqa.ready .n { color: #7dff9b; } .sqa.off { opacity: 0.45; }
.sqa.active { border-color: var(--yellow); background: rgba(70, 60, 0, 0.7); box-shadow: 0 0 12px rgba(255, 230, 0, 0.3); } .sqa.active .n { color: var(--yellow); }
.sqb:hover, .sqa:hover:not(.off) { border-color: var(--g); }
/* Helldivers: one button per group beside the SEAF squads, in the same style (a double tap on either moves the camera there) */
#hdbar { position: absolute; left: calc(max(10px, env(safe-area-inset-left)) + min(500px, 66vw) + 6px); bottom: 160px; width: 272px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; pointer-events: auto; }
.hdb.hurt .s { color: #ff8a6a; } .hdb.wait .s { color: var(--amber); } .hdb.empty { opacity: 0.5; }
body.drawing #view { cursor: crosshair; }
#flavor { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: 96px; text-align: right; font-size: 10px; color: var(--g-dim); line-height: 1.6; white-space: pre; }

/* UAV, orbitals, nuke */
#weapons { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; pointer-events: auto; }
.wbtn {
  position: relative; width: 98px; height: 64px; padding: 5px 6px 4px; text-align: left; overflow: hidden; touch-action: none;
  font: inherit; font-size: 11px; color: var(--g); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.wbtn .k { position: absolute; top: 3px; right: 6px; color: var(--g-dim); }
.wbtn .n { display: block; font-size: 10px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 7px; }
.wbtn .sub { display: block; font-size: 12px; margin-top: 4px; color: #fff; white-space: nowrap; overflow: hidden; }
.wbtn .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(157, 255, 184, 0.12); }
.wbtn .bar i { display: block; height: 100%; width: 100%; background: var(--g); }
.wbtn.sel { border-color: var(--yellow); box-shadow: 0 0 12px rgba(255, 230, 0, 0.3); }
.wbtn.sel .n { color: var(--yellow); }
.wbtn.uav-w .n { color: #9dffb8; } .wbtn.uav-w.sel .n { color: var(--yellow); }
.wbtn.act .sub { color: #9dffb8; } .wbtn.act .bar i { background: #9dffb8; }
.wbtn.cd .bar i { background: var(--amber); }
.wbtn.cd .sub { color: var(--amber); }
.wbtn.nomark .sub { color: var(--red); }
.wbtn.ready .sub { color: #7dff9b; }
.wbtn.gun-w { border-color: rgba(255, 194, 71, 0.55); } .wbtn.gun-w .n { color: #ffc247; } .wbtn.gun-w.sel .n { color: var(--yellow); } .wbtn.gun-w .bar i { background: #ffc247; } .wbtn.gun-w.cd .bar i { background: var(--red); }
.wbtn.obj-w { border-color: rgba(255, 90, 60, 0.5); }
.wbtn.obj-w.ready { border-color: #ff5a3a; box-shadow: 0 0 14px rgba(255, 90, 60, 0.6); animation: blink 0.9s steps(2) infinite; }
.wbtn.obj-w .bar i { background: #ff5a3a; }

#touch-ctl { display: none; }
body.touch #touch-ctl { display: block; }
#fire-btn {
  position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: 100px; width: 100px; height: 100px; border-radius: 50%;
  font-size: 18px; font-weight: 700; color: #000; background: rgba(255, 230, 0, 0.9); border-color: var(--yellow); letter-spacing: 0.1em;
}
#fire-btn.held { background: #fff; box-shadow: 0 0 30px rgba(255, 255, 255, 0.6); }
#btn-follow { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: 208px; width: 100px; }
body.lefty #fire-btn, body.lefty #btn-follow { right: auto; left: max(14px, env(safe-area-inset-left)); }
body.lefty #orders { left: auto; right: 10px; } body.lefty #radio { left: 10px; bottom: auto; top: 250px; } body.lefty #flavor { right: auto; left: 12px; text-align: left; }
/* The big message sits just under the objective and callouts (ui.js sets its top), clear of the fighting mid-screen */
#center-msg { position: absolute; left: 0; right: 0; top: 22%; text-align: center; font-size: clamp(15px, 2.2vw, 24px); letter-spacing: 0.16em; padding: 0 12px; color: #fff; text-shadow: 0 0 18px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.9); opacity: 0; transition: opacity 0.5s; }
#center-msg.show { opacity: 1; }
/* Small acknowledgements and refusals, just above the weapon bar */
#toast { position: absolute; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 74px); transform: translateX(-50%); max-width: 92vw; padding: 3px 10px; font-size: 11px; letter-spacing: 0.08em;
  color: #ffe6b0; background: rgba(2, 14, 7, 0.82); border: 1px solid rgba(255, 176, 32, 0.45); border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.3s; }
#toast.show { opacity: 1; }
body.touch #toast { bottom: calc(max(8px, env(safe-area-inset-bottom)) + 66px); font-size: 10.5px; }
#rotate-hint { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); padding: 6px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; z-index: 40; pointer-events: none; }
#debug { position: absolute; left: 8px; bottom: 4px; z-index: 50; font-size: 11px; color: #0f0; white-space: pre; pointer-events: none; background: rgba(0, 0, 0, 0.6); padding: 4px 6px; }

/* ---------- armory ---------- */
.card.wide3 { width: min(100%, 980px); text-align: left; }
.card.wide3 h2, .card.wide3 .eyebrow { text-align: left; }
#s-shop .card, #s-armory .card { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
#shop-root, #arm-root { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.shop-cr { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 2px 8px; font-size: 12px; color: var(--g-dim); letter-spacing: 0.2em; }
.shop-cr b { font-size: 26px; letter-spacing: 0.06em; color: #ffe27a; margin-left: 10px; }
.shop-cr .note { color: var(--amber); letter-spacing: 0.06em; font-size: 11px; margin-left: auto; text-align: right; }
.shop-lo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.slot { position: relative; min-width: 0; padding: 5px 7px 6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(2, 14, 7, 0.55); font-size: 11px; line-height: 1.35; }
.slot .sn { display: block; font-size: 9px; color: var(--g-dim); letter-spacing: 0.14em; }
.slot .nm { display: block; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 20px; }
.slot .lv { position: absolute; right: 7px; bottom: 5px; color: var(--yellow); font-size: 10px; }
.slot.filled { border-color: color-mix(in srgb, var(--yellow) 55%, transparent); }
.slot.empty .nm { color: var(--g-dim); } .slot.locked { border-style: dashed; opacity: 0.5; }
.slot .x { position: absolute; top: 1px; right: 2px; width: 26px; height: 26px; padding: 0; font: inherit; font-size: 16px; line-height: 1; color: var(--g-dim); background: none; border: 0; cursor: pointer; touch-action: manipulation; }
.slot .x:hover { color: var(--red); }
.shop-scroll { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding-right: 4px; border-top: 1px solid rgba(157, 255, 184, 0.14); }
.shop-h { margin: 12px 0 6px; font-size: 11px; letter-spacing: 0.24em; color: var(--g-dim); font-weight: 400; text-align: left; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 8px; margin-bottom: 5px; border: 1px solid rgba(157, 255, 184, 0.16); border-radius: 6px; background: rgba(2, 14, 7, 0.4); }
.item.owned { border-color: rgba(157, 255, 184, 0.34); }
.item.equipped { border-color: color-mix(in srgb, var(--yellow) 55%, transparent); }
.it-name { color: #fff; font-size: 13px; }
.it-name .pips { margin-left: 8px; color: var(--yellow); letter-spacing: 2px; font-size: 11px; }
.it-name .tagq { margin-left: 8px; padding: 1px 5px; border: 1px solid var(--yellow); border-radius: 3px; color: var(--yellow); font-size: 9px; letter-spacing: 0.1em; }
.it-blurb { font-size: 11px; color: var(--g-dim); margin-top: 2px; line-height: 1.45; }
.it-stat { font-size: 10.5px; color: var(--g); margin-top: 3px; letter-spacing: 0.04em; }
.it-btns { display: flex; flex-direction: column; gap: 5px; align-items: stretch; min-width: 112px; }
.btn.buy { min-height: 42px; padding: 4px 10px; font-size: 12px; touch-action: manipulation; }
.btn.buy small { margin-top: 1px; color: #ffe27a; font-size: 11px; }
.btn.buy.poor { border-color: rgba(255, 74, 74, 0.4); color: var(--g-dim); } .btn.buy.poor small { color: var(--red); }
.btn.buy:not(:disabled):not(.poor) { border-color: var(--yellow); }
.btn.buy:disabled:not(.poor) small { display: none; }
.it-btns .btn { touch-action: manipulation; }
/* armory colours: one per kind of upgrade, plus a tag on every item so colour is never the only cue */
.sec-loadout { --sec: #ffe600; } .sec-orbitals { --sec: #ff7a3d; } .sec-utilities { --sec: #7fd8ff; } .sec-ship-gun { --sec: #ffc247; } .sec-uav-scan { --sec: #6dffa0; }
.sec-seaf-troops { --sec: #4db3ff; } .sec-seaf-specialists { --sec: #c58bff; } .sec-squad-support { --sec: #3fe0c4; }
.shop-h[class*="sec-"] { display: flex; align-items: center; gap: 8px; color: var(--sec); letter-spacing: 0.24em; border-bottom: 1px solid color-mix(in srgb, var(--sec) 35%, transparent); padding-bottom: 4px; }
.shop-h .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--sec); box-shadow: 0 0 8px color-mix(in srgb, var(--sec) 70%, transparent); }
.item[class*="sec-"] { border-left: 4px solid var(--sec); background: color-mix(in srgb, var(--sec) 7%, rgba(2, 14, 7, 0.4)); }
.item[class*="sec-"].owned { background: color-mix(in srgb, var(--sec) 11%, rgba(2, 14, 7, 0.4)); }
.it-name .tagc { margin-left: 8px; padding: 1px 5px; border: 1px solid color-mix(in srgb, var(--sec) 65%, transparent); border-radius: 3px; color: var(--sec); font-size: 9px; letter-spacing: 0.1em; }
.item[class*="sec-"] .it-name .pips { color: var(--sec); }
.item[class*="sec-"] .btn.buy:not(:disabled):not(.poor) { border-color: var(--sec); }
.item[class*="sec-"] .it-stat { color: color-mix(in srgb, var(--sec) 55%, var(--g)); }
.shop-go { justify-content: space-between; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line); }
.btns.col { flex-direction: column; align-items: stretch; }

/* ---------- squad names ---------- */
#s-names .card { text-align: left; }
.nrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin: 6px 0; }
.nrow b { color: var(--tc); font-size: 20px; text-align: center; }
.nrow input { font: inherit; font-size: 13px; color: #fff; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); border-radius: 4px; padding: 9px 8px; width: 100%; min-width: 0; letter-spacing: 0.06em; touch-action: auto; user-select: text; -webkit-user-select: text; }
.nrow input:focus { outline: 1px solid var(--tc); }
.nhead { font-size: 9.5px; color: var(--g-dim); letter-spacing: 0.16em; margin-bottom: 0; }
#s-names .btns { justify-content: flex-end; }

/* ---------- briefing: the twelve stratagems in four groups ---------- */
#b-strats { margin: 10px 0 2px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bgrp { --tc: var(--g); min-width: 0; padding: 5px; border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); border-radius: 5px; }
.bgh { font-size: 10px; color: var(--tc); letter-spacing: 0.06em; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.chip {
  display: flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 6px; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); border-radius: 4px; background: rgba(2, 14, 7, 0.6); font-size: 10px; line-height: 1.2;
}
.chip.show { opacity: 1; transform: none; }
.chip .g { flex: none; color: var(--c); font-weight: 700; font-size: 10px; min-width: 24px; }
.chip .nm { flex: 1; min-width: 0; overflow: hidden; color: #e6fff0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.chip .x { flex: none; color: var(--yellow); font-weight: 700; font-size: 9px; }
#b-strat-note { text-align: left; margin: 4px 0 4px; }

/* ---------- debrief ---------- */
.card.wide h3 { margin: 14px 0 4px; font-size: 11px; letter-spacing: 0.24em; color: var(--g-dim); font-weight: 400; text-align: left; }
.card.wide { text-align: left; } .card.wide h2, .card.wide .eyebrow, .card.wide .f-id, .f-local, #f-totals { text-align: center; }
tr.sum td { color: #fff; border-top: 1px solid var(--line); font-weight: 700; }
.deaths { max-height: 190px; overflow-y: auto; touch-action: pan-y; border: 1px solid rgba(157, 255, 184, 0.14); border-radius: 5px; padding: 4px 8px; background: rgba(0, 0, 0, 0.25); }
.dr { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid rgba(157, 255, 184, 0.08); font-size: 11.5px; }
.dr:last-child { border-bottom: 0; }
.dr .tm { flex: none; width: 42px; color: var(--g-dim); }
.dr .tg { flex: none; min-width: 64px; font-weight: 700; }
.dr .cs { flex: 1; min-width: 0; color: #e6fff0; }
.dr .sh { flex: none; color: var(--g-dim); font-size: 10px; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr.hd { background: rgba(255, 74, 74, 0.05); }
.d-none { padding: 8px 2px; color: var(--g-dim); font-size: 12px; }
#d-extra { text-align: left; margin: 8px 0 4px; line-height: 1.7; }
#d-why { text-align: center; }

@media (prefers-reduced-motion: reduce) { #b-continue, .sc.inc, #obj-bar.urgent { animation: none !important; } }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .hud-tc { width: min(440px, calc(100vw - 2 * 222px)); }
  /* no room beside the SEAF squads: the Helldivers sit just above them */
  #hdbar { left: max(10px, env(safe-area-inset-left)); bottom: 210px; width: min(272px, 40vw); }
  #radio { bottom: 264px; }
  #buildmenu { left: auto; right: max(10px, env(safe-area-inset-right)); bottom: 94px; }
}
@media (max-width: 760px), (max-height: 520px) {
  body { font-size: 12px; }
  .hud-l { width: 168px; } .hud-tl { padding: 4px 7px; }
  #timer { font-size: 19px; } #opname { display: none; }
  #roster { margin-top: 3px; padding-top: 3px; gap: 1px; }
  .rr { grid-template-columns: 12px minmax(0, 1fr) 32px 44px; gap: 4px; font-size: 10px; } .rr .st { font-size: 8.5px; }
  #supply { font-size: 9.5px; margin-top: 3px; padding-top: 2px; }
  .nt { font-size: 10px; padding: 2px 6px; } #notices .nt:nth-last-child(n+4) { display: none; }
  #minimap { width: 88px; height: 88px; } .scorebox { font-size: 10px; padding: 3px 7px; line-height: 1.4; } .scorebox > div:nth-child(2) { display: none; }
  .tr-btns .btn { min-height: 34px; padding: 3px 8px; font-size: 10px; }
  .hud-tc { width: min(330px, calc(100vw - 2 * 182px)); gap: 4px; } #objective { font-size: 11px; padding: 4px 8px; } #obj-sub { display: none; }
  #strats { gap: 3px; padding: 3px; } .sg { padding: 2px; } .sh { font-size: 7.5px; margin-bottom: 2px; } .sh b { font-size: 9px; } .sc .g { font-size: 7px; }
  .wbtn { width: auto; flex: 1; min-width: 0; height: 52px; padding: 4px 4px; } .wbtn .n { font-size: 9px; } .wbtn .sub { font-size: 10px; margin-top: 2px; }
  #squads { bottom: 148px; } #hdbar { bottom: 192px; } #radio { bottom: 240px; } .sqb, .sqa { height: 34px; } .sqa .n { margin-top: 6px; font-size: 8.5px; } .sqb .s { margin-top: 1px; }
  .ord { height: 40px; padding: 3px 2px; } .ord .n { font-size: 8px; margin-top: 2px; padding-right: 6px; } .ord .s { font-size: 10px; margin-top: 2px; } .ord .k { display: none; }
  #radio { width: min(250px, 50vw); bottom: 240px; } #radio .line { font-size: 10.5px; } #flavor { display: none; }
  #fire-btn { width: 88px; height: 88px; font-size: 16px; } #btn-follow { width: 88px; }
  .card { padding: 16px 14px 14px; }
  .shop-lo { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; } .slot { padding: 4px 4px 5px; font-size: 10px; } .slot .nm { padding-right: 0; font-size: 9px; letter-spacing: 0; } .slot .lv { display: none; } .slot .x { top: -2px; right: -2px; width: 24px; height: 24px; }
  .it-btns { min-width: 92px; } .it-name { font-size: 12px; }
  .shop-cr b { font-size: 21px; }
}
/* landscape phones: orders in a 3x2 block at the bottom-left, the weapon bar between them and the CALL button */
@media (max-height: 520px) and (orientation: landscape) {
  .hud-l { width: 156px; }
  #orders { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 214px; bottom: 8px; left: max(8px, env(safe-area-inset-left)); padding: 4px; gap: 4px; }
  .ord { height: 38px; }
  #weapons { left: calc(max(8px, env(safe-area-inset-left)) + 226px); right: 112px; bottom: 8px; transform: none; }
  #fire-btn { bottom: 10px; right: max(12px, env(safe-area-inset-right)); width: 84px; height: 84px; }
  #btn-follow { bottom: 100px; right: max(12px, env(safe-area-inset-right)); width: 84px; min-height: 32px; }
  body.lefty #fire-btn, body.lefty #btn-follow { right: auto; left: max(12px, env(safe-area-inset-left)); }
  body.lefty #orders { left: auto; right: max(8px, env(safe-area-inset-right)); } body.lefty #weapons { left: 112px; right: calc(max(8px, env(safe-area-inset-right)) + 226px); }
  #squads { left: calc(max(8px, env(safe-area-inset-left)) + 226px); right: 112px; width: auto; bottom: 66px; gap: 3px; padding: 3px; }
  .sqb, .sqa { height: 30px; padding: 2px 1px; } .sqb .n { font-size: 10px; margin-top: 0; } .sqb .s { font-size: 8.5px; margin-top: 0; } .sqa .n { margin-top: 5px; font-size: 8px; } .sqa .k { display: none; }
  body.lefty #squads { left: 112px; right: calc(max(8px, env(safe-area-inset-right)) + 226px); }
  #hdbar { left: calc(max(8px, env(safe-area-inset-left)) + 226px); width: min(240px, 34vw); bottom: 102px; gap: 3px; padding: 3px; }
  body.lefty #hdbar { left: 112px; }
  #buildmenu { left: calc(max(8px, env(safe-area-inset-left)) + 226px); right: auto; bottom: 140px; }
  #radio { display: none; }
  #notices { width: max-content; max-width: min(250px, 34vw); } #notices .nt:nth-last-child(n+3) { display: none; }
  #btn-follow { white-space: nowrap; font-size: 10px; padding: 2px 4px; }
  .card { padding: 14px; } h1 { font-size: 30px; } .ctl { line-height: 1.6; font-size: 11px; } .tips { font-size: 11px; line-height: 1.5; }
  .b-cols { gap: 14px; }
  #s-shop .card, #s-armory .card { max-height: calc(100dvh - 20px); } .screen { padding: 10px; }
}
/* phones in portrait: objective and stratagems drop below the two top corners */
@media (max-width: 520px) {
  .hud-l { width: min(172px, 46vw); }
  .hud-tc { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); transform: none; width: auto; top: calc(max(10px, env(safe-area-inset-top)) + 190px); align-items: stretch; }
  #notices { position: fixed; left: max(10px, env(safe-area-inset-left)); top: calc(max(10px, env(safe-area-inset-top)) + 330px); width: min(270px, 66vw); }
  #notices .nt:nth-last-child(n+3) { display: none; }
  #minimap { width: 80px; height: 80px; }
  #orders { left: 6px; right: 6px; width: auto; bottom: 68px; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 3px; }
  #buildmenu { left: 6px; bottom: 236px; grid-template-columns: repeat(3, minmax(0, 96px)); }
  #squads { left: 6px; right: 6px; width: auto; bottom: 118px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 3px; }
  #hdbar { left: 6px; right: auto; width: min(240px, 62vw); bottom: 194px; gap: 3px; padding: 3px; }
  .sqb, .sqa { height: 32px; } .sqa .k { display: none; } .sqa .n { margin-top: 5px; }
  .ord .n { font-size: 7.5px; letter-spacing: 0; }
  #weapons { left: 6px; right: 6px; bottom: max(8px, env(safe-area-inset-bottom)); gap: 3px; transform: none; }
  .wbtn { padding: 4px 3px; } .wbtn .n { font-size: 8px; letter-spacing: 0; padding-right: 7px; } .wbtn .sub { font-size: 9px; letter-spacing: -0.03em; } .wbtn .k { right: 3px; font-size: 9px; }
  #radio { bottom: 300px; width: min(230px, 52vw); }
  #fire-btn { bottom: 206px; right: 12px; } #btn-follow { bottom: 206px; right: auto; left: 12px; min-height: 40px; width: 88px; font-size: 11px; }
  body.lefty #fire-btn { right: auto; left: 12px; } body.lefty #btn-follow { left: auto; right: 12px; }
  #rotate-hint { top: auto; bottom: 380px; }
  #s-brief { padding-top: 44px; }
  #b-strats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .it-btns { min-width: 86px; } .it-blurb { display: none; } .it-stat { font-size: 10px; }
  .dr .sh { display: none; }
}
@media (max-width: 700px) { .b-cols { grid-template-columns: 1fr; gap: 6px; } .b-left .btns { justify-content: center; } }

/* ---------- fading: panels step back until they are touched or have news ---------- */
.fadeable { transition: opacity 0.3s; opacity: 0.84; }
.fadeable:hover, .fadeable.hot { opacity: 1; }
#tray { display: contents; }
#dock, #tl-cr { display: none; }
.dkb {
  appearance: none; position: relative; min-width: 0; height: 40px; padding: 3px 8px; text-align: left; cursor: pointer; pointer-events: auto; touch-action: none;
  font: inherit; color: var(--g); background: rgba(8, 30, 16, 0.88); border: 1px solid var(--line); border-radius: 6px;
}
.dkb .n { display: block; font-size: 8px; letter-spacing: 0.06em; color: var(--g-dim); white-space: nowrap; }
.dkb .s { display: block; margin-top: 2px; font-size: 11px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dkb.open { border-color: var(--yellow); }
.dkb.active { border-color: var(--yellow); background: rgba(70, 60, 0, 0.78); } .dkb.active .s { color: var(--yellow); }
.dkb.drop.ready .s { color: #7dff9b; } .dkb.drop.cd .s { color: var(--amber); } .dkb.drop.off { opacity: 0.5; } .dkb.drop.active .s { color: var(--yellow); }
#btn-follow.dkb { display: flex; align-items: center; justify-content: center; padding: 0 8px; }
#btn-follow.dkb .n { font-size: 10px; color: var(--g); letter-spacing: 0.04em; }

/* ---------- phones and tablets (touch): the compact HUD ----------
   Top row: a slim status chip (left), the objective (middle), the minimap with MENU and pause buttons (right).
   Bottom: the weapon bar, a dock (SEAF squads, SEAF drop, re-center once the camera has moved) and CALL.
   The stratagem grid, squad status, armory and camera live in the MENU. News is one short feed of two lines at most.
   Everything steps back after a few seconds without a touch on it, and the map stays readable. */
.nt.radio { --nc: var(--yellow); }
.mn {
  appearance: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; text-align: left; cursor: pointer;
  font: inherit; font-size: 11px; letter-spacing: 0.05em; color: var(--g); background: rgba(8, 30, 16, 0.85); border: 1px solid var(--line); border-radius: 5px;
}
.mn b { color: var(--yellow); font-weight: 400; }
#btn-menu { display: none; }
body.touch #btn-menu { display: block; }
body.touch #btn-shop { display: none; }
body.touch #radio, body.touch #flavor { display: none !important; }
body.touch .fadeable { opacity: 0.7; }
body.touch .fadeable.hot, body.touch .hud-tl.open { opacity: 1; }

/* top row */
body.touch .hud-l { width: 150px; top: max(8px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); gap: 3px; }
body.touch .hud-tl { padding: 3px 7px 4px; pointer-events: auto; position: relative; background: rgba(2, 14, 7, 0.5); border-color: transparent; }
body.touch .tl-top { align-items: center; }
body.touch #timer { font-size: 16px; }
body.touch #opname { display: none; }
body.touch #tl-cr { display: block; font-size: 10px; color: #ffe27a; white-space: nowrap; } body.touch #tl-cr b { color: #ffe27a; }
body.touch #supply { margin-top: 2px; padding-top: 2px; font-size: 9px; }
body.touch #roster { display: none; }
body.touch .hud-tl.open #roster {
  display: flex; position: absolute; left: -1px; top: 100%; width: min(236px, 64vw); margin: 0; padding: 6px 7px; z-index: 4;
  background: rgba(2, 14, 7, 0.95); border: 1px solid var(--line); border-radius: 0 0 6px 6px;
}
body.touch .rr { grid-template-columns: 12px minmax(0, 1fr) 30px 48px; }
body.touch #notices { position: static; width: max-content; max-width: min(62vw, 260px); gap: 2px; }
body.touch #notices .nt { font-size: 10px; padding: 2px 6px; background: rgba(2, 14, 7, 0.55); }
body.touch #notices .nt:nth-last-child(n+3) { display: none; }
body.touch.drawing #notices { display: none; }

body.touch .hud-tc {
  top: max(8px, env(safe-area-inset-top)); left: calc(max(8px, env(safe-area-inset-left)) + 156px); right: calc(max(8px, env(safe-area-inset-right)) + 76px);
  transform: none; width: auto; max-width: 340px; margin: 0 auto; gap: 3px; align-items: stretch;
}
body.touch #objective { padding: 3px 6px; font-size: 10px; line-height: 1.25; border-radius: 5px; border-color: transparent; background: rgba(2, 14, 7, 0.5); }
body.touch #obj-sub { display: none; } body.touch #obj-bar { margin-top: 3px; height: 3px; }
body.touch #place-hint { position: fixed; left: max(8px, env(safe-area-inset-left)); transform: none; top: calc(max(8px, env(safe-area-inset-top)) + 56px); width: max-content; max-width: calc(100vw - 150px); text-align: left; font-size: 10px; padding: 3px 8px; background: rgba(2, 14, 7, 0.8); }

body.touch .hud-tr { display: contents; }
body.touch #minimap { position: absolute; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); width: 66px; height: 66px; }
body.touch .tr-btns { position: absolute; top: calc(max(8px, env(safe-area-inset-top)) + 70px); right: max(8px, env(safe-area-inset-right)); gap: 4px; }
body.touch .tr-btns .btn { min-height: 30px; padding: 2px 8px; font-size: 10px; }
body.touch .scorebox { position: absolute; top: calc(max(8px, env(safe-area-inset-top)) + 106px); right: max(8px, env(safe-area-inset-right)); padding: 1px 6px; font-size: 9px; }
body.touch .scorebox > div:not(.combo) { display: none; }
body.touch .scorebox:has(.combo:empty) { display: none; }
body.touch #menu {
  display: flex; flex-direction: column; gap: 4px; position: absolute; z-index: 6; width: 176px; padding: 5px; pointer-events: auto; background: rgba(2, 14, 7, 0.95);
  top: calc(max(8px, env(safe-area-inset-top)) + 104px); right: max(8px, env(safe-area-inset-right));
}

/* the stratagem drawer: information only, so it is closed until asked for */
body.touch #strats { display: none; }
body.touch #hud.strats-open #strats {
  display: grid; position: fixed; z-index: 6; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); top: calc(max(8px, env(safe-area-inset-top)) + 112px);
  width: auto; max-width: 440px; margin: 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 6px; background: rgba(2, 14, 7, 0.94);
}
body.touch #hud.strats-open #strats, body.touch #hud.idle.strats-open #strats { opacity: 1; }
body.touch #hud.strats-open .sg { display: block; padding: 3px; }
body.touch #hud.strats-open .sh { margin: 0 0 3px; font-size: 9px; } body.touch #hud.strats-open .sh span { display: inline; }
body.touch #hud.strats-open .sc { aspect-ratio: auto; height: 24px; } body.touch #hud.strats-open .sc .g { font-size: 9px; }

/* bottom: weapons, dock, CALL */
body.touch #weapons { left: 6px; right: 6px; bottom: max(8px, env(safe-area-inset-bottom)); gap: 3px; transform: none; }
body.touch .wbtn { height: 44px; padding: 3px 4px; }
body.touch .wbtn .n { font-size: 8.5px; padding-right: 8px; } body.touch .wbtn .sub { font-size: 9.5px; margin-top: 2px; } body.touch .wbtn .bar { height: 4px; }
body.touch #dock { display: flex; position: absolute; left: max(6px, env(safe-area-inset-left)); gap: 4px; pointer-events: none; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 52px); }
body.touch .dkb { height: 36px; }
body.touch #dk-sq { width: 104px; } body.touch #dk-drop { width: 74px; }
body.touch #dk-sq .s { font-size: 10px; letter-spacing: 0; }
body.touch #btn-follow { position: relative; left: auto; right: auto; bottom: auto; width: 84px; min-height: 0; }
body.touch #btn-follow:not(.free) { display: none; }
body.touch #fire-btn { width: 78px; height: 78px; font-size: 14px; right: max(10px, env(safe-area-inset-right)); bottom: calc(max(8px, env(safe-area-inset-bottom)) + 52px); }
/* the tray: squads and orders, opened from the dock */
body.touch #tray {
  display: none; position: absolute; flex-direction: column; gap: 4px; left: max(6px, env(safe-area-inset-left)); right: 100px;
  bottom: calc(max(8px, env(safe-area-inset-bottom)) + 94px);
}
body.touch #hud.tray-open #tray { display: flex; }
body.touch.drawing #tray { display: none !important; }
body.touch #tray #buildmenu { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; background: rgba(2, 14, 7, 0.9); }
body.touch #tray #orders { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
body.touch #tray #hdbar { position: static; width: auto; gap: 3px; padding: 3px; background: rgba(2, 14, 7, 0.9); }
body.touch #tray #squads, body.touch #tray #orders { position: static; left: auto; right: auto; bottom: auto; width: auto; gap: 3px; padding: 3px; grid-template-columns: repeat(5, minmax(0, 1fr)); background: rgba(2, 14, 7, 0.9); }
body.touch #tray .sqb, body.touch #tray .sqa { height: 34px; }
body.touch #tray .ord { height: 38px; } body.touch #tray .ord[data-o="seaf"] { display: none; }
body.touch #tray .ord .n { font-size: 8px; letter-spacing: 0; padding-right: 0; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } body.touch #tray .ord .s { font-size: 9.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.02em; }
body.touch #tray .sqa .n { margin-top: 7px; }
body.touch #center-msg { font-size: clamp(13px, 3.6vw, 20px); }

/* idle: the HUD steps back until it is touched */
body.touch .hud-tl, body.touch #minimap, body.touch .tr-btns, body.touch .dkb, body.touch .wbtn, body.touch #fire-btn { transition: opacity 0.6s; }
body.touch #hud.idle .fadeable:not(#strats) { opacity: 0.4; }
body.touch #hud.idle .tr-btns { opacity: 0.45; }
body.touch #hud.idle #minimap { opacity: 0.55; }
body.touch #hud.idle .dkb { opacity: 0.5; }
body.touch #hud.idle .wbtn:not(.sel) { opacity: 0.55; }
body.touch #hud.idle #fire-btn { opacity: 0.75; }
body.touch #hud.idle .fadeable.hot, body.touch #hud.idle .hud-tl.open { opacity: 1; }

/* phones in landscape */
@media (max-height: 520px) and (orientation: landscape) {
  body.touch .hud-tc { top: max(6px, env(safe-area-inset-top)); }
  body.touch #hud.strats-open #strats { top: calc(max(6px, env(safe-area-inset-top)) + 44px); }
  body.touch #weapons { left: max(8px, env(safe-area-inset-left)); right: 100px; bottom: 8px; }
  body.touch #fire-btn { bottom: 10px; width: 76px; height: 76px; }
  body.touch #dock { bottom: 58px; }
  body.touch #tray { right: auto; width: 330px; bottom: 100px; }
}
/* left-handed: everything on the bottom mirrors */
body.touch.lefty #dock { left: auto; right: max(6px, env(safe-area-inset-right)); flex-direction: row-reverse; }
body.touch.lefty #tray { left: 100px; right: max(6px, env(safe-area-inset-right)); }
body.touch.lefty #fire-btn { right: auto; left: max(10px, env(safe-area-inset-left)); }
@media (max-height: 520px) and (orientation: landscape) {
  body.touch.lefty #weapons { left: 100px; right: max(8px, env(safe-area-inset-right)); }
  body.touch.lefty #tray { left: auto; right: max(6px, env(safe-area-inset-right)); }
}

/* ---------- Revision 7: close buttons, info cards, mission info, the project page, feedback ---------- */
.card { position: relative; }
.x-close {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line);
  background: rgba(8, 30, 16, 0.9); color: var(--g); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; pointer-events: auto; z-index: 3;
}
.x-close:hover { border-color: var(--g); color: #fff; }
#menu { position: relative; }
#menu .x-close { top: 4px; right: 4px; width: 28px; height: 28px; font-size: 13px; }
#menu .mn:first-of-type { margin-top: 24px; }
/* Info cards dock where they cover no controls (ui.js placeCard): down the right side above the readout on a computer (left with the
   left-handed layout), or across the top under the callouts (phones, or Settings > Info cards: At the top). */
#infocard {
  position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: 150px; width: min(340px, 30vw); z-index: 6;
  font-size: 11px; line-height: 1.45; pointer-events: none; text-align: left; padding: 8px 12px; background: rgba(2, 14, 7, 0.88);
}
body.lefty #infocard.dock-side { right: auto; left: max(12px, env(safe-area-inset-left)); bottom: 96px; }
#infocard.dock-top { left: 50%; right: auto; bottom: auto; transform: translateX(-50%); width: min(420px, 92vw); }
#infocard .ic-h { color: var(--yellow); font-weight: 700; margin-bottom: 4px; letter-spacing: 0.08em; }
#infocard .ic-h i { font-style: normal; color: var(--g-dim); font-weight: 400; margin-left: 6px; }
#infocard .ic-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted rgba(157, 255, 184, 0.15); padding: 1px 0; }
#infocard .ic-row span { color: var(--g-dim); }
#infocard .ic-row b { text-align: right; font-weight: 600; }
#infocard .ic-b { margin-top: 5px; color: var(--g); opacity: 0.9; }
body.touch #infocard { font-size: 10.5px; padding: 6px 10px; }
body.touch #infocard .ic-b { margin-top: 3px; }
#info-body { text-align: left; font-size: 12.5px; line-height: 1.55; max-height: 62vh; overflow-y: auto; padding-right: 4px; touch-action: pan-y; }
#info-body h3 { margin: 14px 0 6px; font-size: 13px; color: var(--yellow); letter-spacing: 0.1em; }
#info-body h3 .ok { color: #7dff9b; font-size: 11px; margin-left: 6px; }
#info-body p { margin: 4px 0; color: var(--g); opacity: 0.92; }
ol.steps { margin: 4px 0; padding-left: 22px; }
ol.steps li { margin: 4px 0; color: var(--g-dim); }
ol.steps li.done { color: rgba(125, 255, 155, 0.55); text-decoration: line-through; }
ol.steps li.now { color: #fff; font-weight: 600; }
ol.steps li.now::marker { color: var(--yellow); }
.about { text-align: left; font-size: 13px; line-height: 1.6; }
.about p { margin: 8px 0; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.fb { border-color: var(--yellow); color: var(--yellow); }
.btn.fb.primary { color: #000; }
.fb-note { max-width: 520px; margin-left: auto; margin-right: auto; }
.tr-btns #btn-info { color: var(--yellow); border-color: rgba(255, 230, 0, 0.5); }
.card > .x-close ~ .eyebrow { padding: 0 38px; }
#about-body { max-height: 58vh; overflow-y: auto; padding-right: 4px; touch-action: pan-y; }
body.touch #info-body { max-height: 56vh; }

/* Loading screen: what is going on, and a tip */
.b-story { text-align: left; }
.b-story p { margin: 4px 0 8px; font-size: 12.5px; line-height: 1.55; color: var(--g); }
.b-tip {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; margin: 6px 0 14px; padding: 9px 11px; text-align: left; cursor: pointer;
  font: inherit; font-size: 12.5px; line-height: 1.5; color: var(--g); background: rgba(255, 230, 0, 0.06); border: 1px solid rgba(255, 230, 0, 0.35); border-radius: 6px;
  min-height: 4.4em;
}
.b-tip:hover { border-color: var(--yellow); }
.b-tip .tip-tag { flex: none; color: var(--yellow); font-weight: 700; letter-spacing: 0.12em; }
.b-tip #b-tip { flex: 1; }
.b-tip .tip-next { flex: none; align-self: flex-end; font-size: 10px; letter-spacing: 0.08em; color: var(--g-dim); }
@media (max-width: 700px), (max-height: 500px) { .b-story p { font-size: 11.5px; line-height: 1.45; } .b-tip { font-size: 11.5px; } }
/* Phones held upright: one column, with what is going on and the tip right under the mission header, and the controls last */
@media (max-width: 700px) {
  .b-cols { display: flex; flex-direction: column; gap: 4px; }
  .b-left, .b-right { display: contents; }
  .b-left > * { order: 1; }
  .b-right > * { order: 4; }
  .b-right > h2:first-child, #b-story, #b-tipbox { order: 2; }
  #b-strats, #b-strat-note { order: 3; }
  .b-left .progress, #b-status, .b-left .btns { order: 5; }
  .b-right > h2:first-child { margin-top: 8px; }
}

/* Tactical map */
.mapcard { width: min(96vw, 760px); padding: 14px 16px; }
.mapwrap { display: flex; justify-content: center; margin: 6px 0 8px; }
#bigmap { width: min(88vw, 64vh, 640px); height: auto; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; cursor: crosshair; touch-action: none; background: #020a05; }
.map-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 11px; color: var(--g-dim); letter-spacing: 0.06em; }
.map-key .k-rad { color: #ff9a7a; opacity: 0.8; } .map-key .k-side { color: #7fd8ff; } .map-key .k-bcn { color: #6fc0ff; }
.map-key .k-hd { color: #3da9ff; } .map-key .k-en { color: #ff7a5a; } .map-key .k-ffz { color: #ff9a4a; } .map-key .k-obj { color: var(--yellow); } .map-key .k-base { color: #c8d2cc; } .map-key .k-poi { color: #ffb020; } .map-key .k-boss { color: #ff8a6a; }
#minimap { cursor: pointer; }
@media (max-height: 520px) { #bigmap { width: min(70vh, 88vw); } .mapcard { padding: 8px 12px; } .mapcard .fine, .map-key { display: none; } }

/* Callouts: the free-fire zone and supply requests, under the objective */
#callouts { display: flex; flex-direction: column; gap: 4px; align-items: center; margin-top: 4px; pointer-events: none; }
.callout { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 8px 6px 10px; font-size: 11.5px; letter-spacing: 0.06em; border-radius: 5px;
  background: rgba(2, 14, 7, 0.88); border: 1px solid var(--line); pointer-events: auto; overflow: hidden; max-width: min(560px, 94vw); }
.callout .co-i { font-size: 15px; line-height: 1; }
.callout .co-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callout .co-b { font: inherit; font-size: 10.5px; padding: 3px 8px; border-radius: 4px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; white-space: nowrap; }
.callout .co-b kbd { font-size: 9px; opacity: 0.8; padding: 0 3px; border: 1px solid currentColor; border-radius: 3px; margin-left: 3px; }
.callout .co-b.primary { background: var(--yellow); color: #000; border-color: var(--yellow); }
.callout .co-b.x { padding: 3px 6px; }
.callout .co-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: currentColor; opacity: 0.7; }
.callout.ffz { color: #ffae6a; border-color: rgba(255, 122, 42, 0.7); animation: copulse 1.2s ease-in-out infinite; }
.callout.boss { color: #ff8a6a; border-color: rgba(255, 90, 60, 0.75); padding-bottom: 8px; }
.callout.boss.block { animation: bosspulse 1.1s ease-in-out infinite; }
.callout .co-hp { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 90, 60, 0.18); }
.callout .co-hp u { position: absolute; inset: 0 auto 0 0; background: #ff4a4a; }
.callout .co-hp s { position: absolute; inset: 0 auto auto 0; height: 2px; background: #8fd0ff; }
@keyframes bosspulse { 50% { box-shadow: 0 0 16px rgba(255, 80, 50, 0.55); } }
.callout.sup { color: #9dffb8; border-color: rgba(125, 255, 155, 0.6); }
.callout.time { color: #ffe27a; border-color: rgba(255, 226, 122, 0.65); animation: copulse 0.9s ease-in-out infinite; }
.callout.time.poor .co-b.primary { opacity: 0.45; }
.callout.sup.ask { animation: copulse 0.9s ease-in-out infinite; }
@keyframes copulse { 50% { box-shadow: 0 0 14px rgba(255, 160, 80, 0.45); } }
body.touch .callout { font-size: 10.5px; padding: 4px 6px 5px 8px; gap: 6px; }
body.touch .callout .co-b { padding: 6px 9px; }
body.touch .callout .co-b kbd { display: none; }

/* The supply loading game */
#supgame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -38%); width: min(460px, 94vw); z-index: 8; pointer-events: auto; padding: 12px 14px; text-align: center;
  background: rgba(2, 16, 8, 0.94); border-color: rgba(125, 255, 155, 0.6); box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
#supgame .sg-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; letter-spacing: 0.1em; color: #9dffb8; }
#supgame .sg-h b { color: var(--yellow); }
#supgame .sg-bars { display: grid; gap: 4px; margin: 8px 0 10px; }
#supgame .sg-time, #supgame .sg-fast { position: relative; height: 6px; background: rgba(157, 255, 184, 0.12); border-radius: 3px; overflow: hidden; }
#supgame .sg-time i { position: absolute; inset: 0 auto 0 0; background: #9dffb8; }
#supgame .sg-fast { height: 14px; }
#supgame .sg-fast i { position: absolute; inset: 0 auto 0 0; background: rgba(255, 230, 0, 0.55); }
#supgame .sg-fast span { position: relative; font-size: 9.5px; letter-spacing: 0.12em; line-height: 14px; color: #fff; }
#supgame .sg-fast.gone i { background: rgba(255, 255, 255, 0.08); } #supgame .sg-fast.gone span { color: var(--g-dim); }
#supgame .sg-pod { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; border: 2px solid rgba(200, 220, 210, 0.5); border-radius: 22px 22px 10px 10px;
  background: linear-gradient(to bottom, rgba(40, 52, 46, 0.9), rgba(16, 24, 20, 0.95)); }
.sg-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 6px; border-radius: 8px; border: 1px solid rgba(157, 255, 184, 0.3); background: rgba(0, 0, 0, 0.35);
  color: var(--c); font: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform 0.06s; }
.sg-slot:active { transform: scale(0.96); }
.sg-slot.stims { --c: #7dff9b; } .sg-slot.gren { --c: #ffb020; } .sg-slot.ammo { --c: #ffe600; }
.sg-slot .sg-k { font-size: 10px; color: var(--g-dim); }
.sg-slot .sg-cells { display: flex; flex-direction: column-reverse; gap: 4px; width: 70%; }
.sg-slot .sg-cells i { display: block; height: 18px; border-radius: 3px; border: 1px solid var(--c); opacity: 0.35; }
.sg-slot .sg-cells i.on { background: var(--c); opacity: 1; box-shadow: 0 0 8px var(--c); }
.sg-slot.full { border-color: var(--c); box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.08); }
.sg-slot .sg-n { font-size: 10.5px; letter-spacing: 0.1em; }
#supgame .sg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; text-align: left; }
#supgame .sg-foot .fine { margin: 0; font-size: 10.5px; }
body.touch #supgame { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); }
body.touch .sg-slot .sg-cells i { height: 22px; }
body.slowmo #supgame .sg-h b::after { content: "  · SLOW MOTION"; color: var(--g-dim); font-weight: 400; }
/* Phones: callouts sit just under the top row of buttons, across the screen */
body.touch #callouts { position: fixed; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); top: calc(max(8px, env(safe-area-inset-top)) + 100px); z-index: 6; margin: 0; }
body.touch .callout { max-width: 100%; }

/* ---------- 0.13: soft pause, difficulty lock-in, retry, score so far ---------- */
#softpause { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
#softpause .sp-frame { position: absolute; inset: 0; border: 3px solid rgba(255, 230, 0, 0.55); box-shadow: inset 0 0 40px rgba(255, 230, 0, 0.12); }
#softpause .sp-bar {
  position: absolute; left: 50%; transform: translateX(-50%); top: 140px;   /* placed under the top HUD by Hud.placeSoft() */
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; pointer-events: auto; white-space: nowrap;
  border-color: rgba(255, 230, 0, 0.6); background: rgba(2, 14, 7, 0.9);
}
#softpause .sp-bar b { color: var(--yellow); letter-spacing: 0.2em; font-size: 13px; }
#softpause .sp-hint { color: var(--g-dim); font-size: 11px; }
#softpause .btn { padding: 5px 10px; font-size: 11px; }
#softpause kbd { font: inherit; font-size: 9px; opacity: 0.7; border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; margin-left: 3px; }
body.touch #softpause kbd { display: none; }
body.touch #softpause .sp-bar { gap: 6px; padding: 4px 4px 4px 10px; }
body.touch #softpause .btn { min-height: 36px; padding: 4px 10px; }
body.touch #softpause .sp-hint { display: none; }
body.softpaused #center-msg, body.softpaused #toast { opacity: 0; }
#btn-pause.on { background: var(--yellow); color: #000; border-color: var(--yellow); }

.r-line.fail b { color: #ff8a7a; }
.lockchip { display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 9.5px; letter-spacing: 0.12em; color: var(--yellow); border: 1px solid rgba(255, 230, 0, 0.6); border-radius: 3px; vertical-align: 1px; }
.eyebrow .again { margin-left: 8px; padding: 1px 6px; color: #000; background: var(--yellow); border-radius: 3px; letter-spacing: 0.14em; }

.lockcard { border-color: rgba(255, 230, 0, 0.55); }
.lockcard h2 { color: var(--yellow); letter-spacing: 0.14em; margin: 2px 0 8px; }
.lock-big { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin: 4px 0 2px; }
.lock-big b { font-size: clamp(54px, 15vw, 84px); line-height: 1; color: var(--yellow); text-shadow: 0 0 24px rgba(255, 230, 0, 0.45); }
.lock-big span { font-size: clamp(16px, 4.4vw, 24px); letter-spacing: 0.14em; color: #fff; text-align: left; }
#s-lock.hot .lock-big b { color: #ff8a3a; text-shadow: 0 0 24px rgba(255, 110, 40, 0.5); }
.lock-pay { color: var(--g-dim); font-size: 12px; letter-spacing: 0.08em; }
.lock-stay { margin: 10px auto 4px; max-width: 440px; font-size: 13px; color: #e6fff0; line-height: 1.45; }
.lockcard h3 { margin: 14px 0 6px; font-size: 12px; letter-spacing: 0.22em; color: #ff8a7a; }
.lock-rules { text-align: left; margin: 0 auto 6px; padding-left: 20px; max-width: 460px; font-size: 12.5px; line-height: 1.55; color: #e6fff0; }
.lock-rules li { margin: 0 0 6px; }
.lock-rules li::marker { color: var(--yellow); }

.btn.retry.armed { background: #ff8a3a; color: #000; border-color: #ff8a3a; font-weight: 700; }
.retry-note { min-height: 1em; }
.retry-note.warn { color: #ffb27a; }
.d-copy { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(157, 255, 184, 0.18); }
.d-copy h3 { margin: 0 0 2px; }
.d-copy .fine { margin-top: 2px; }
#d-text { width: 100%; margin-top: 8px; resize: vertical; background: rgba(0, 0, 0, 0.4); color: var(--g); border: 1px solid var(--line); border-radius: 4px; font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace; padding: 6px; }
