/* Old Light: a warship's plotting table. Dark slate glass, thin vector lines. */
:root {
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Roboto Mono", "Liberation Mono", monospace;
  --bg0: #05080b; --bg1: #0a1117; --bg2: #101a22;
  --glass: rgba(11, 18, 25, 0.86); --glass2: rgba(16, 26, 35, 0.92);
  --line: rgba(150, 180, 200, 0.14); --line2: rgba(150, 180, 200, 0.26);
  --ink: #c8d5de; --dim: #71838f; --faint: #46555f;
  --amber: #ffb54a; --amber2: #d99236; --amberBg: rgba(255, 181, 74, 0.11);
  --cyan: #a6e4ef; --red: #ff5d4f; --redBg: rgba(255, 93, 79, 0.12);
  --green: #84d39c; --yellow: #f2d36b; --orange: #ff8c42;
  --panelW: 384px; --sheetH: 44vh;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg0); color: var(--ink); font: 13px/1.35 var(--mono); -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: rgba(150, 180, 200, 0.06); border: 1px solid var(--line2); border-radius: 4px; min-height: 40px; min-width: 40px; padding: 0 10px; cursor: pointer; touch-action: manipulation; letter-spacing: 0.02em; }
button:hover:not(:disabled) { border-color: rgba(190, 215, 230, 0.45); }
button.on { border-color: var(--amber); color: var(--amber); background: var(--amberBg); }
button:disabled { opacity: 0.38; cursor: default; }
button.ghost { background: none; border-color: transparent; }
button.prime { border-color: var(--amber2); color: var(--amber); }
button.icon { padding: 0; width: 40px; font-size: 16px; }
input { font: inherit; color: var(--ink); background: var(--bg1); border: 1px solid var(--line2); border-radius: 4px; min-height: 40px; padding: 0 10px; }
.screen { position: fixed; inset: 0; display: none; }
.screen.on { display: flex; }

/* ---------------------------------------------------------------- title */
#title, #setup { align-items: center; justify-content: center; background:
  radial-gradient(ellipse at 50% 40%, #0f1a22 0%, #070b0f 60%, #040608 100%); }
#title::before, #setup::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.title-glass { position: relative; text-align: center; padding: 48px 28px; width: min(92vw, 520px); }
.title-rings { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.title-rings i { position: absolute; border: 1px dashed rgba(166, 228, 239, 0.22); border-radius: 50%; transform: translate(-50%, -50%); animation: breathe 9s ease-in-out infinite; }
.title-rings i:nth-child(1) { width: 220px; height: 220px; }
.title-rings i:nth-child(2) { width: 380px; height: 380px; border-style: solid; border-color: rgba(150, 180, 200, 0.08); animation-delay: -3s; }
.title-rings i:nth-child(3) { width: 70px; height: 70px; border: 1.5px solid rgba(166, 228, 239, 0.55); border-radius: 50%; animation: fade 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.6; } }
@keyframes fade { 50% { opacity: 0.25; } }
h1 { position: relative; font-weight: 400; font-size: clamp(28px, 8vw, 64px); letter-spacing: 0.24em; margin: 0 0 6px 0.24em; max-width: 100%; overflow-wrap: normal; text-align: center; color: #e7eef2; text-shadow: 0 0 28px rgba(166, 228, 239, 0.18); }
.tag { position: relative; color: var(--cyan); opacity: 0.8; margin: 0 0 40px; letter-spacing: 0.04em; }
.title-btns { position: relative; display: flex; flex-direction: column; gap: 12px; align-items: center; }
button.big { min-height: 52px; min-width: 240px; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(10, 17, 23, 0.8); }
button.big small { display: block; font-size: 10px; letter-spacing: 0.08em; color: var(--dim); text-transform: none; }
.snd { position: relative; margin-top: 28px; color: var(--dim); background: none; }

/* ---------------------------------------------------------------- setup */
.setup-glass { position: relative; width: min(100vw, 640px); height: min(100%, 860px); display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--line); }
@media (min-width: 680px) { .setup-glass { border-radius: 8px; height: min(94%, 860px); } }
.setup-head { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.setup-head h2 { margin: 0; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; font-size: 15px; }
.setup-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.setup-body h3 { font-weight: 400; color: var(--dim); text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px; margin: 18px 0 8px; }
.scen-list { display: flex; flex-direction: column; gap: 8px; }
.scen { text-align: left; padding: 10px 12px; min-height: 56px; display: block; width: 100%; }
.scen b { display: block; font-weight: 600; color: #e2ebf0; margin-bottom: 2px; }
.scen span { color: var(--dim); font-size: 12px; }
.scen.on b { color: var(--amber); }
.scen-brief { margin: 10px 2px 0; color: #c8d4da; font-size: 13px; line-height: 1.45; }
.side-pick { display: flex; gap: 8px; }
.side-pick button { flex: 1; text-align: left; padding: 8px 10px; min-height: 56px; }
.side-pick button b { display: block; letter-spacing: 0.08em; }
.side-pick button span { color: var(--dim); font-size: 11px; }
.seed-row { display: flex; gap: 8px; }
.seed-row input { width: 9em; }
.setup-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; justify-content: center; }

/* ---------------------------------------------------------------- battle */
#battle { display: none; }
#battle.on { display: block; }
#plotWrap { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; background: var(--bg0); }
#plot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
#plot.grab { cursor: grabbing; }
#topbar { position: absolute; left: 0; right: 0; top: 0; padding: 6px 6px 0; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; padding-top: calc(6px + env(safe-area-inset-top)); }
.tb-row { display: flex; gap: 4px; align-items: center; pointer-events: auto; background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 3px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tb-main { flex: 1 1 auto; min-width: 0; }
.tb-time button { padding: 0 8px; min-width: 44px; }
.clock { font-size: 15px; letter-spacing: 0.06em; color: #e5edf1; padding: 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scn-name { flex: 1; min-width: 0; color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-now { color: var(--dim); font-size: 11px; min-width: 4.5em; padding: 0 4px; white-space: nowrap; }
#bPause.paused { color: var(--amber); border-color: var(--amber); }
.threats { position: absolute; left: 6px; right: 6px; top: 104px; display: flex; gap: 6px; overflow-x: auto; pointer-events: none; scrollbar-width: none; }
.threats::-webkit-scrollbar { display: none; }
.threat { pointer-events: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; background: rgba(40, 10, 8, 0.78); border: 1px solid rgba(255, 93, 79, 0.5); color: #ffd1cb; border-radius: 5px; padding: 2px 3px 2px 8px; min-height: 40px; white-space: nowrap; font-size: 12px; }
.threat b { color: var(--red); font-weight: 600; }
.threat .pct { color: #fff; }
.threat button { min-height: 34px; padding: 0 7px; font-size: 11px; border-color: rgba(255, 180, 160, 0.35); }
.threat.quiet { background: rgba(11, 18, 25, 0.8); border-color: var(--line2); color: var(--dim); }
.threat .th-a, .threat .th-b { display: flex; align-items: center; gap: 6px; }
.threat .th-b { gap: 3px; }
.threat .src { color: inherit; opacity: 0.75; font-size: 11px; }
.threat .nd { color: #fff; }
.threat .nd.cur { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.threat button { border-bottom: 2px solid var(--gc, rgba(255, 180, 160, 0.35)); }
.threat button.on { color: var(--gc); border-color: var(--gc); background: rgba(255, 255, 255, 0.06); font-weight: 600; }
@media (max-width: 899px) {
  .threat { flex-direction: column; align-items: stretch; gap: 2px; padding: 3px 4px 3px 8px; }
  .threat button { min-height: 40px; padding: 0 6px; }
}
.banner { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); display: none; align-items: center; gap: 10px; background: rgba(30, 22, 8, 0.92); border: 1px solid var(--amber2); color: #ffe2b0; border-radius: 6px; padding: 4px 4px 4px 12px; max-width: calc(100% - 12px); z-index: 3; }
.banner.on { display: flex; }
.banner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card { position: absolute; right: 6px; top: 150px; width: 250px; display: none; background: var(--glass); border: 1px solid rgba(166, 228, 239, 0.4); border-radius: 6px; padding: 8px 10px; color: var(--cyan); font-size: 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card.on { display: block; }
.card .ct { color: #e3f6fa; font-size: 13px; margin-bottom: 3px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card .ct button { min-height: 40px; min-width: 40px; padding: 0; border-color: transparent; background: none; color: var(--dim); }
.card .cr { display: flex; justify-content: space-between; gap: 8px; }
.card .cr span:first-child { color: var(--dim); }
.log { position: absolute; left: 8px; bottom: 8px; right: 150px; pointer-events: none; font-size: 11.5px; color: var(--ink); text-shadow: 0 0 4px #000, 0 0 2px #000; }
.log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.9; }
.log div:nth-last-child(n+3) { opacity: 0.55; }
.log div:nth-last-child(n+5) { opacity: 0.3; }
.log i { font-style: normal; color: var(--dim); margin-right: 6px; }
.log .bad { color: #ff9d92; } .log .good { color: var(--amber); } .log .see { color: var(--cyan); } .log .own { color: rgba(255,181,74,0.75); }
.logf { position: absolute; right: 6px; bottom: 54px; min-height: 32px; padding: 0 8px; font-size: 11px; color: var(--dim); background: var(--glass); }
.plot-btns { position: absolute; right: 6px; bottom: 8px; display: flex; gap: 6px; }
.plot-btns button { background: var(--glass); }

/* ---------------------------------------------------------------- the ship panel */
#panel { position: absolute; right: 0; top: 0; bottom: 0; width: var(--panelW); display: flex; flex-direction: column; background: var(--glass2); border-left: 1px solid var(--line2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.grab { display: none; }
@media (min-width: 900px) { #plotWrap { right: var(--panelW); } }
@media (max-width: 899px) {
  #panel { left: 0; width: auto; top: auto; height: var(--sheetH); border-left: 0; border-top: 1px solid var(--line2); border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  #plotWrap { bottom: var(--sheetH); }
  .grab { display: flex; justify-content: center; align-items: center; height: 18px; flex: 0 0 18px; cursor: ns-resize; touch-action: none; }
  .grab i { width: 44px; height: 4px; border-radius: 2px; background: var(--line2); }
  .card { top: auto; bottom: 56px; left: 6px; right: auto; width: min(260px, calc(100% - 12px)); }
  .log { right: 140px; bottom: 6px; font-size: 11px; }
  .log div:nth-last-child(n+4) { display: none; }
}
#pHead { padding: 6px 8px 4px; border-bottom: 1px solid var(--line); }
.shipchips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.shipchips::-webkit-scrollbar { display: none; }
.shipchips button { flex: 0 0 auto; padding: 0 9px; font-size: 12px; }
.shipchips button.dead { color: var(--faint); text-decoration: line-through; }
.shipchips button.hurt { color: #ffb0a6; }
.sh-title { display: flex; align-items: baseline; gap: 8px; margin: 2px 2px 4px; }
.sh-title b { font-size: 15px; color: var(--amber); font-weight: 600; letter-spacing: 0.04em; }
.sh-title span { color: var(--dim); font-size: 11px; }
.sh-title .st { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.st.ok { color: var(--green); } .st.crippled { color: var(--orange); } .st.disabled, .st.destroyed, .st.captured { color: var(--red); }
.meters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meter { font-size: 10.5px; color: var(--dim); }
.meter .mv { color: var(--ink); font-size: 12px; display: block; white-space: nowrap; }
.bar { height: 3px; background: rgba(150, 180, 200, 0.12); border-radius: 2px; margin-top: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--amber); }
.bar.heat i { background: var(--orange); } .bar.strain i { background: var(--yellow); } .bar.crit i { background: var(--red); } .bar.cool i { background: var(--cyan); } .bar.ok i { background: var(--green); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; border-radius: 0; background: none; color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--amber); border-bottom-color: var(--amber); background: none; }
.pbody { flex: 1; overflow-y: auto; padding: 4px 10px 14px; overscroll-behavior: contain; touch-action: pan-y; }
.sec { margin-top: 10px; }
.sec > h4 { margin: 0 0 5px; font-weight: 400; font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.15em; display: flex; justify-content: space-between; gap: 8px; }
.sec > h4 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips button { padding: 0 9px; font-size: 12px; }
.chips.g4 button { flex: 1 1 0; min-width: 0; padding: 2px 4px; display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.chips.g4 button small { font-size: 9.5px; color: var(--dim); }
.gl-cruise { --gc: var(--green); } .gl-combat { --gc: var(--yellow); } .gl-brace { --gc: var(--orange); } .gl-crash { --gc: var(--red); }
.chips.g4 button { border-bottom: 2px solid var(--gc); }
.chips.g4 button.on { color: var(--gc); border-color: var(--gc); background: rgba(255, 255, 255, 0.05); }
.row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.row .grow { flex: 1; min-width: 0; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper span { min-width: 8.5em; text-align: center; color: var(--ink); }
.tgt { color: var(--cyan); }
.note { color: var(--dim); font-size: 11px; margin-top: 4px; }
.note.warn { color: #ffcf8a; }
.man .ghelp { color: var(--dim); font-size: 10.5px; line-height: 1.3; margin: 2px 0 4px; }
.wg { border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px 8px; margin-top: 8px; background: rgba(5, 9, 12, 0.35); }
.wg-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.wg-h b { font-weight: 600; color: #e2ebf0; }
.wg-h span { color: var(--dim); font-size: 11px; }
.wg-h .hc { margin-left: auto; font-size: 15px; color: var(--amber); font-variant-numeric: tabular-nums; }
.wg-h .hc.lo { color: var(--dim); }
.wg .lbl, .man .lbl { color: var(--dim); font-size: 10.5px; min-width: 4.6em; }
.wg .chips button { min-height: 40px; }
.wg .ghelp { color: var(--dim); font-size: 10.5px; line-height: 1.3; margin: 2px 0 2px calc(4.6em + 6px); }
.wg .ghelp b { color: #cfd9df; font-weight: 600; }
button.fire { border-color: var(--red); color: #ffb9b0; background: var(--redBg); }
.mods { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12px; }
.mods .s0 { color: var(--green); } .mods .s1 { color: var(--orange); } .mods .s2 { color: var(--red); }
.armour { display: grid; grid-template-columns: 4.5em 1fr 3.5em; gap: 3px 8px; align-items: center; font-size: 12px; }
.fleet { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.fleet td { padding: 3px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fleet td:first-child { color: var(--amber); }

/* ---------------------------------------------------------------- pop-ups and overlays */
.pop { position: absolute; top: 52px; display: none; z-index: 6; background: var(--glass2); border: 1px solid var(--line2); border-radius: 6px; padding: 8px; min-width: 240px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
.pop.on { display: block; }
#menu { left: 6px; }
#settings { left: 6px; right: auto; }
@media (min-width: 900px) { #settings { left: auto; right: calc(var(--panelW) + 6px); } }
.pop h4 { margin: 4px 2px 6px; font-weight: 400; font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.15em; }
.pop .item { display: flex; width: 100%; justify-content: space-between; align-items: center; text-align: left; margin-top: 4px; gap: 12px; }
.pop .item em { font-style: normal; color: var(--dim); }
.pop .item.on em { color: var(--amber); }
.overlay { position: absolute; inset: 0; z-index: 8; display: none; align-items: center; justify-content: center; background: rgba(3, 5, 7, 0.72); padding: 16px; }
.overlay.on { display: flex; }
.ov-box { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--glass2); border: 1px solid var(--line2); border-radius: 8px; padding: 18px 18px 14px; }
.ov-box h2 { margin: 0 0 10px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; font-size: 16px; }
.help-list { margin: 0; padding: 0; list-style: none; }
.help-list li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.help-list canvas { width: 44px; height: 30px; }
.ov-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.end-word { font-size: clamp(30px, 9vw, 46px); letter-spacing: 0.28em; font-weight: 400; margin: 4px 0 4px; }
.end-word.win { color: var(--amber); } .end-word.lose { color: var(--red); } .end-word.even { color: var(--cyan); }
.end-why { color: var(--dim); margin-bottom: 14px; }
.end-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; font-size: 12.5px; }
.end-grid .h { color: var(--dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; }
.dmg { display: grid; grid-template-columns: 6em 1fr 4.5em; gap: 4px 8px; align-items: center; font-size: 12px; margin-top: 6px; }

/* ---------------------------------------------------------------- crew: G bands, officer cards, contact crew, end crew */
.gbands { display: flex; flex-direction: column; gap: 4px; }
.gb { display: grid; grid-template-columns: 8.6em minmax(0, 1fr); gap: 8px; align-items: center; }
.gb button { text-align: left; font-size: 12px; padding: 0 8px; border-bottom: 2px solid var(--gc); }
.gb button.on { color: var(--gc); border-color: var(--gc); background: rgba(255, 255, 255, 0.05); }
.gh { font-size: 11px; line-height: 1.3; }
.gh span { white-space: nowrap; }
.gh .hurt, .threat small.hurt { color: var(--red); }
.gh .fill { color: var(--amber); }
.gh span + span::before { content: "· "; color: var(--faint); }
.threat .th-b button { display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
.threat small.hurt { font-size: 10px; font-weight: 600; }
.ofc { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px 7px; margin-top: 6px; background: rgba(5, 9, 12, 0.35); }
.ofc-h { display: flex; align-items: baseline; gap: 8px; }
.ofc-h b { font-weight: 600; color: #e2ebf0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofc-h .eff { margin-left: auto; font-size: 15px; color: var(--amber); font-variant-numeric: tabular-nums; }
.ofc-s, .ofc-g { color: var(--dim); font-size: 11px; }
.ofc-g { font-size: 10.5px; margin-top: 3px; }
.ofc-m { display: grid; grid-template-columns: 4.4em minmax(0, 1fr) 2.2em; gap: 3px 8px; align-items: center; font-size: 11px; margin-top: 5px; color: var(--dim); }
.ofc-m span:nth-child(3n) { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.ofc-m .bar, .eo-r .bar { margin-top: 0; height: 4px; }
.ofc-ab { display: flex; width: 100%; justify-content: space-between; align-items: center; margin-top: 6px; text-align: left; font-size: 12px; }
.ofc-ab em { font-style: normal; color: var(--dim); }
.ofc-ab.lost { min-height: 0; color: var(--faint); font-size: 11px; margin-top: 4px; }
.ofc-ab.lost em { color: var(--faint); }
.ofc-t { margin: 5px 2px 0; font-size: 11.5px; color: var(--ink); }
.ofc.down { opacity: 0.6; filter: grayscale(1); }
.ofc-d { color: var(--ink); margin-top: 5px; font-size: 12px; }
.cast { font-style: normal; color: var(--amber2); font-size: 8px; margin-left: 5px; vertical-align: 2px; }
.card .cc, .card .cc-u { border-top: 1px solid rgba(166, 228, 239, 0.18); margin-top: 4px; padding-top: 3px; }
.card .cc-u { color: var(--dim); }
.eo-ship { color: var(--amber); margin: 8px 0 2px; font-size: 12px; }
.eo-r { display: grid; grid-template-columns: minmax(0, 1fr) 5em 2.2em; gap: 1px 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.eo-r b { font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eo-r .eh { text-align: right; font-variant-numeric: tabular-nums; }
.eo-r .ef { grid-column: 1 / -1; color: var(--dim); font-size: 11.5px; }
.eo-r.down .ef { color: var(--orange); }
.eo-r.dead b { color: var(--dim); }
.eo-r.dead .ef { color: var(--red); }
/* tutorial card (styled like the pause notice) and the outline on the part of the screen it describes */
.tut { position: absolute; left: 50%; transform: translateX(-50%); width: min(360px, calc(100% - 16px)); z-index: 9; display: none; background: rgba(30, 22, 8, 0.95); border: 1px solid var(--amber2); color: #ffe2b0; border-radius: 6px; padding: 9px 12px 8px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6); }
.tut.on { display: block; }
.tut.mid { top: 50%; transform: translate(-50%, -50%); }
.tut.bottom { bottom: 52px; }
.tut h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--amber); letter-spacing: 0.04em; }
.tut p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.tut-btns { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 8px; }
.tut-btns .prime { min-width: 84px; }
.tut-skip { margin-right: auto; border-color: transparent; background: none; color: var(--dim); font-size: 11.5px; text-decoration: underline; padding-left: 0; }
#battle.tut-on #banner { display: none; }
/* captain's call: the tutorial card's look, two lines of numbers and large buttons */
.call { z-index: 10; }
.call p + p { margin-top: 4px; }
.call p:last-of-type { color: var(--amber); }
.call-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.call-btns button { flex: 1 1 30%; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; padding: 4px 6px; }
.call-btns button small { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.call-btns button.prime small { color: inherit; opacity: 0.8; }
.call-btns button.is-auto { border-color: var(--amber2); }
#battle.call-on #banner { display: none; }
#battle.tut-low #card { top: auto; bottom: 8px; z-index: 8; }
#battle.tut-hi-time #timeCtl, #battle.tut-hi-man #pBody .sec.man, #battle.tut-hi-gbands #pBody .gbands, #battle.tut-hi-gbands #pTabs button[data-a="tab:crew"],
#battle.tut-hi-card #card, #battle.tut-hi-threats #threats, #battle.tut-hi-meters #pHead .meters { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 14px rgba(255, 181, 74, 0.45); }
#battle.tut-hi-guns #pBody { outline: 2px solid var(--amber); outline-offset: -3px; box-shadow: inset 0 0 14px rgba(255, 181, 74, 0.3); }
