mirror of
https://github.com/db9979/uconsole_asw_game.git
synced 2026-12-05 12:24:25 +01:00
HQ offers up to six tasks per built-in mission over the teletype. The radio room (and the Remote Crew radio station) accepts or declines them; accepted positions are plotted on every chart. Tasks progress on the slow simulation cadence with detrand draws, are scored at mission end and are saved in the new save v21 root field "tasking". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019eZphdvoJiBgWqq2zSH4aJ
222 lines
18 KiB
CSS
222 lines
18 KiB
CSS
/* Instruments on the stage and station-specific arrangement. */
|
|
|
|
.role-visuals { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; padding: .45rem .55rem .35rem; overflow: hidden; background: var(--bg-0); }
|
|
.visual-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex: 0 0 auto; padding-bottom: .3rem; }
|
|
.visual-heading h3 { color: var(--live); font-size: var(--font-xs); text-transform: uppercase; letter-spacing: .14em; font-weight: 650; }
|
|
.visual-state { color: var(--text-dim); font: var(--font-xs) var(--font-mono); }
|
|
.visual-panel { min-width: 0; }
|
|
.visual-panel:not([hidden]) { display: flex; flex: 1; flex-direction: column; min-height: 0; }
|
|
#map-visual:not([hidden]) { flex-grow: 2.2; }
|
|
|
|
/* Canvases scale with the stage; the bitmap follows the CSS size. */
|
|
.role-canvas { display: block; width: 100%; height: clamp(14rem, 42vh, 28rem); min-width: 0; min-height: 6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--scope); touch-action: none; }
|
|
.stage .role-canvas { flex: 1; height: auto; }
|
|
.role-map-frame { position: relative; flex: 1; width: 100%; min-width: 0; min-height: 8rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--scope); }
|
|
#role-map, #role-map-sweep { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; border: 0; }
|
|
#role-map-sweep { pointer-events: none; }
|
|
.actionable-canvas { cursor: crosshair; }
|
|
|
|
/* Canvas prose equivalents stay for screen readers, not for the eye. */
|
|
.visual-equivalent, #role-map-help {
|
|
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
|
|
}
|
|
|
|
/* Instrument tabs and toolbars. */
|
|
.visual-toolbar { flex: 0 0 auto; padding-bottom: .3rem; }
|
|
.visual-tabs { display: flex; flex-wrap: wrap; gap: .2rem; flex: 0 0 auto; margin-bottom: .3rem; }
|
|
.visual-tabs button, .helicopter-visual-tabs button {
|
|
min-height: 1.9rem; padding: .1rem .7rem; border-radius: var(--radius) var(--radius) 0 0; border-color: transparent;
|
|
border-bottom: 2px solid var(--line); background: transparent; color: var(--text-dim); font-size: var(--font-xs);
|
|
text-transform: uppercase; letter-spacing: .08em;
|
|
}
|
|
.visual-tabs button[aria-selected="true"], .helicopter-visual-tabs button[aria-selected="true"] { color: var(--live-strong); border-bottom-color: var(--live); background: var(--bg-2); }
|
|
.helicopter-visual-tabs { display: flex; gap: .2rem; flex: 0 0 auto; margin-bottom: .3rem; }
|
|
.plot-tools { flex: 0 0 auto; padding-bottom: .25rem; }
|
|
.plot-tools > summary { cursor: pointer; color: var(--plot); font-size: var(--font-xs); min-height: 1.5rem; }
|
|
.plot-toolbar { align-items: center; }
|
|
.plot-toolbar label { color: var(--plot); font-size: var(--font-xs); }
|
|
.plot-toolbar #plot-speed { width: 5.5rem; }
|
|
.plot-toolbar #plot-label-input { width: 10rem; }
|
|
.plot-list { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin: .3rem 0 0; padding: 0; list-style: none; color: var(--plot); font: var(--font-xs) var(--font-mono); }
|
|
.plot-list button { min-height: 1.7rem; padding: .1rem .4rem; font-size: var(--font-xs); }
|
|
|
|
/* Sonar: listening strip, display controls, plots. */
|
|
.sonar-live-audio { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; min-width: 0; padding-bottom: .3rem; }
|
|
.sonar-live-audio p { color: var(--text-dim); font-size: var(--font-sm); line-height: 1.3; }
|
|
#sonar-live-toggle[aria-pressed="true"] { background: var(--live-bg); border-color: var(--live-2); color: var(--live-2); }
|
|
.sonar-audition-controls, .sonar-display-controls {
|
|
display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; flex: 0 0 auto; min-width: 0;
|
|
padding: .25rem .45rem; margin-bottom: .3rem; background: var(--bg-1); border: 1px solid var(--line-faint); border-radius: var(--radius);
|
|
}
|
|
.sonar-audition-controls .check { font-size: var(--font-xs); color: var(--text); }
|
|
.sonar-audition-controls > label:not(.check), .sonar-display-controls label { color: var(--text-dim); font-size: var(--font-xs); text-transform: uppercase; letter-spacing: .05em; }
|
|
.sonar-audition-controls select, .sonar-display-controls select, .sonar-display-controls button { min-height: 1.8rem; padding: .05rem .4rem; font-size: var(--font-xs); }
|
|
.sonar-audition-controls input[type="range"], .sonar-display-controls input[type="range"] { width: 6.5rem; }
|
|
.sonar-audition-controls output, .sonar-display-controls output { color: var(--live); font-size: var(--font-xs); white-space: nowrap; }
|
|
.sonar-cursor-readout { flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }
|
|
.sonar-plots { display: flex; flex: 1; flex-direction: column; min-height: 0; }
|
|
.sonar-plots > section:not([hidden]) { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
|
|
.sonar-plots[data-layout="overview"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .35rem; }
|
|
.sonar-plots[data-layout="overview-wide"] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .35rem; }
|
|
.spectrum-canvas { flex: 0 0 5rem !important; height: 5rem !important; min-height: 5rem; margin-top: .3rem; }
|
|
.sonar-band-plots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; flex: 0 0 6rem; margin-top: .3rem; }
|
|
.sonar-plots:not([data-layout="single"]) .sonar-band-plots { display: none; }
|
|
.band-canvas { height: 6rem !important; min-height: 0; flex: none !important; }
|
|
.sonar-active-plots { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); grid-template-rows: minmax(0, 1fr); flex: 1; min-height: 0; gap: .35rem; }
|
|
.sonar-active-plots > canvas { height: 100% !important; min-width: 0; min-height: 6rem; }
|
|
|
|
/* Split stage (ultra-wide screens): helicopter acoustic console beside the map. */
|
|
.role-visuals[data-split="on"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr); column-gap: .6rem; }
|
|
.role-visuals[data-split="on"] > .visual-heading { grid-column: 1 / -1; }
|
|
.role-visuals[data-split="on"] > .visual-panel:not([hidden]) { grid-row: 2; }
|
|
|
|
/* Damage / engine / ESM / weapons instruments. */
|
|
.damage-visual-controls { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; padding-bottom: .3rem; }
|
|
.damage-visual-controls label { color: var(--text-dim); font-size: var(--font-xs); }
|
|
|
|
/* Helicopter: dip picture and buoy console on the stage. */
|
|
#helicopter-dip-display:not([hidden]) { flex: 1 1 40%; min-height: 0; overflow-y: auto; }
|
|
#helicopter-dip-canvas { display: block; width: 100%; max-width: 560px; height: auto; margin: .35rem auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--scope); }
|
|
.helicopter-acoustic-visual:not([hidden]) { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; gap: .3rem; }
|
|
.helicopter-acoustic-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; font-size: var(--font-xs); }
|
|
.helicopter-acoustic-controls select { flex: 1; min-width: 8rem; }
|
|
.helicopter-acoustic-controls input[type="range"] { flex: 1; min-width: 7rem; }
|
|
.helicopter-acoustic-controls output { min-width: 3.5rem; color: var(--live); font-size: var(--font-xs); }
|
|
.helicopter-inline-form { display: flex; flex: 1; align-items: center; gap: .35rem; }
|
|
.helicopter-inline-form input { width: 7rem; }
|
|
#helicopter-audio-controls { padding: .25rem .45rem; border: 1px solid var(--line); border-radius: var(--radius); }
|
|
#helicopter-audio-controls summary { cursor: pointer; color: var(--live); font-size: var(--font-xs); }
|
|
#helicopter-audio-controls[open] { max-height: 13rem; overflow: auto; }
|
|
.helicopter-acoustic-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 25%); gap: .5rem; flex: 1; min-height: 0; }
|
|
.helicopter-acoustic-plots { display: flex; min-height: 0; }
|
|
.helicopter-acoustic-plots > div:not([hidden]) { display: flex; flex: 1; flex-direction: column; min-height: 0; }
|
|
.helicopter-acoustic-plots .role-canvas { flex: 1; height: auto; min-height: 12rem; }
|
|
.helicopter-acoustic-plots .helicopter-spectrum-canvas { flex: none; height: 7rem; min-height: 7rem; margin-bottom: .35rem; }
|
|
.helicopter-acoustic-rail { display: flex; flex-direction: column; min-height: 0; padding: .35rem; border: 1px solid var(--line); border-radius: var(--radius); }
|
|
#helicopter-buoy-observations { flex: 1; min-height: 0; overflow: auto; }
|
|
|
|
/* Radio room: a rack of receiver units instead of a chart. Device fronts with
|
|
engraved plates, amber digital frequency readouts, segment S-meters and a
|
|
teletype printing the message traffic. */
|
|
.radio-visual:not([hidden]) { display: grid; grid-template-rows: minmax(0, 1.6fr) minmax(8rem, 1fr); gap: .55rem; min-height: 0; }
|
|
.radio-rack { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: .55rem; min-height: 0; }
|
|
.radio-unit {
|
|
display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: .45rem .55rem .55rem;
|
|
background: linear-gradient(var(--bg-3), var(--bg-2)); border: 1px solid var(--line-strong); border-radius: calc(var(--radius) * 2);
|
|
box-shadow: inset 0 1px 0 var(--bg-4), inset 0 -2px 0 var(--bg-0), 0 .4rem 1rem -.6rem var(--shadow);
|
|
}
|
|
.radio-plate { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex: 0 0 auto; padding: .1rem .3rem .4rem; }
|
|
.radio-plate h4 { padding: .1rem .5rem; color: var(--text-dim); background: var(--bg-1); border: 1px solid var(--line); border-radius: 2px; font-size: var(--font-xs); letter-spacing: .16em; text-transform: uppercase; }
|
|
.radio-count { color: var(--text-faint); font: var(--font-xs) var(--font-mono); }
|
|
.radio-lamp { display: inline-flex; align-items: center; gap: .4rem; color: var(--live-2); font: var(--font-xs) var(--font-mono); text-transform: uppercase; }
|
|
.radio-lamp::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 .5rem currentColor; }
|
|
.radio-lamp[data-state="down"] { color: var(--alarm); }
|
|
.radio-scope-frame { flex: 1; min-height: 0; padding: .45rem; background: var(--bg-0); border: 1px solid var(--line); border-radius: calc(var(--radius) * 3); box-shadow: inset 0 0 2.5rem -1rem var(--shadow); }
|
|
.radio-scope-frame .role-canvas { height: 100% !important; border: 0; border-radius: 0; background: transparent; }
|
|
.radio-channels { display: flex; flex: 1; flex-direction: column; gap: .35rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: .1rem; }
|
|
.radio-channel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: .35rem; }
|
|
.radio-tune {
|
|
display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: .15rem .7rem;
|
|
padding: .35rem .6rem; text-align: left; font-weight: 500; background: var(--scope); border: 1px solid var(--line); border-radius: var(--radius);
|
|
}
|
|
.radio-tune:hover:not(:disabled) { background: var(--bg-2); }
|
|
.radio-channel.selected .radio-tune { border-color: var(--live); box-shadow: inset 3px 0 0 var(--live); }
|
|
.radio-channel.stale .radio-frequency { opacity: .55; }
|
|
.radio-channel > .station-action { align-self: stretch; min-width: 6.5rem; font-size: var(--font-xs); }
|
|
.radio-dial { grid-row: 1 / 3; display: flex; align-items: baseline; gap: .3rem; padding: .15rem .5rem; background: var(--bg-0); border: 1px solid var(--line); border-radius: 2px; }
|
|
.radio-frequency { color: var(--caution); font: 700 clamp(1.15rem, 1.1vw + .6rem, 2rem)/1 var(--font-mono); letter-spacing: .06em; text-shadow: 0 0 .6rem color-mix(in srgb, var(--caution) 45%, transparent); font-variant-numeric: tabular-nums; }
|
|
.radio-unit-label { color: var(--text-faint); font: var(--font-xs) var(--font-mono); }
|
|
.radio-mode { justify-self: start; padding: .05rem .4rem; border: 1px solid currentColor; border-radius: 2px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
|
|
.radio-mode.ground { color: var(--live-2); }
|
|
.radio-mode.sky { color: var(--info); }
|
|
.radio-smeter { display: inline-flex; gap: 2px; align-items: flex-end; height: 1rem; }
|
|
.radio-smeter i { width: .38rem; height: 100%; background: var(--line); border-radius: 1px; }
|
|
.radio-smeter i.on { background: var(--live-2); box-shadow: 0 0 .3rem color-mix(in srgb, var(--live-2) 60%, transparent); }
|
|
.radio-smeter i.hot { background: var(--caution); }
|
|
.radio-meta { grid-column: 2 / 4; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .8rem; font: var(--font-sm) var(--font-mono); }
|
|
.radio-label { color: var(--text); }
|
|
.radio-bearing { color: var(--live); }
|
|
.radio-age { color: var(--text-faint); }
|
|
.radio-idle { color: var(--text-faint); font-family: var(--font-mono); }
|
|
.radio-teletype-unit { min-height: 0; }
|
|
.radio-lower { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: .55rem; min-height: 0; }
|
|
.radio-tasks-unit { min-height: 0; }
|
|
.radio-tasks { display: flex; flex: 1; flex-direction: column; gap: .35rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
|
|
.radio-task { padding: .35rem .55rem; background: var(--scope); border: 1px solid var(--line); border-radius: var(--radius); font: var(--font-sm) var(--font-mono); }
|
|
.radio-task[data-state="offered"] { border-color: var(--caution); box-shadow: inset 3px 0 0 var(--caution); }
|
|
.radio-task[data-state="active"] { border-color: var(--live); box-shadow: inset 3px 0 0 var(--live); }
|
|
.radio-task[data-state="done"], .radio-task[data-state="failed"], .radio-task[data-state="declined"] { opacity: .7; }
|
|
.radio-task-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .6rem; color: var(--text); }
|
|
.radio-task-state { color: var(--text-dim); letter-spacing: .08em; }
|
|
.radio-task[data-state="offered"] .radio-task-state { color: var(--caution); }
|
|
.radio-task-brief { margin: .25rem 0 0; color: var(--text-dim); font-family: var(--font-body, inherit); }
|
|
.radio-task-facts { margin: .2rem 0 0; color: var(--live); }
|
|
.radio-task-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
|
|
.radio-task-actions .station-action { font-size: var(--font-xs); }
|
|
.radio-teletype {
|
|
flex: 1; min-height: 0; margin: 0; padding: .5rem .7rem; overflow-y: auto; overscroll-behavior: contain; list-style: none;
|
|
background: var(--scope); border: 1px solid var(--line); border-radius: var(--radius);
|
|
color: var(--caution); font: var(--font-md)/1.55 var(--font-mono); text-shadow: 0 0 .5rem color-mix(in srgb, var(--caution) 30%, transparent);
|
|
}
|
|
.radio-teletype li { display: grid; grid-template-columns: 6.5ch minmax(0, 1fr); gap: .9rem; padding: .05rem 0; }
|
|
.radio-teletype li:not(.latest) { opacity: .78; }
|
|
.radio-teletype .radio-stamp { color: var(--text-dim); }
|
|
.radio-teletype li.latest .radio-text::after { content: "\2588"; margin-left: .25ch; animation: pulse 1s steps(1) infinite; }
|
|
@media (min-width: 2400px) {
|
|
.radio-visual:not([hidden]) { grid-template-rows: minmax(0, 2fr) minmax(10rem, 1fr); }
|
|
.radio-rack { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
|
|
}
|
|
@media (max-width: 899px) {
|
|
.radio-visual:not([hidden]) { display: flex; flex-direction: column; }
|
|
.radio-rack { display: flex; flex-direction: column; }
|
|
.radio-scope-frame { flex: none; height: min(70vw, 22rem); }
|
|
.radio-teletype { max-height: 18rem; }
|
|
.radio-lower { display: flex; flex-direction: column; }
|
|
.radio-tasks { max-height: 22rem; }
|
|
}
|
|
|
|
/* Lists duplicated by the contacts dock stay out of the station dock. */
|
|
body.workstation-mode .station-grid > :has(#bridge-tactical),
|
|
body.workstation-mode .station-grid > :has(#sonar-observations),
|
|
body.workstation-mode .station-grid > :has(#opz-observations),
|
|
body.workstation-mode .station-grid > :has(#radio-observations) { display: none; }
|
|
body.workstation-mode .bridge-order-heading p, body.workstation-mode #bridge-order-values { display: none; }
|
|
body.workstation-mode .station-list { display: block; max-height: none; overflow: visible; }
|
|
body.workstation-mode .station-list > .station-row + .station-row { margin-top: .35rem; }
|
|
/* Station cards flow into as many columns as the dock is wide (two on
|
|
2560 px and 4K monitors, one on a 1920 px screen). */
|
|
body.workstation-mode .station-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); align-content: start; }
|
|
body.workstation-mode .station-grid > .station-controls, body.workstation-mode .station-grid > .direct-fire-controls { grid-column: 1 / -1; }
|
|
|
|
/* A just-switched station shows its cached picture; dim it only if the fresh
|
|
state takes noticeably long, so a normal switch does not flicker. */
|
|
body[data-role-stale="true"] .stage, body[data-role-stale="true"] .dock-right { opacity: .55; transition: opacity .15s ease .3s; }
|
|
|
|
/* Crewed-submarine torpedo alarm tints the whole frame. */
|
|
body.uboot-torpedo-alarm .statusbar { border-bottom-color: var(--alarm); box-shadow: inset 0 -2px 0 var(--alarm); }
|
|
|
|
/* Detached sonar plot window (?scope=...): only the plot. */
|
|
body[data-sonar-scope][data-remote-role="assigned"] #shell { grid-template-rows: minmax(0, 1fr); }
|
|
body[data-sonar-scope][data-remote-role="assigned"] .statusbar,
|
|
body[data-sonar-scope][data-remote-role="assigned"] .alert-band,
|
|
body[data-sonar-scope][data-remote-role="assigned"] .tablist,
|
|
body[data-sonar-scope][data-remote-role="assigned"] .dock,
|
|
body[data-sonar-scope][data-remote-role="assigned"] .drawer,
|
|
body[data-sonar-scope][data-remote-role="assigned"] #station-command-status,
|
|
body[data-sonar-scope][data-remote-role="assigned"] #sonar-page-tabs { display: none !important; }
|
|
body[data-sonar-scope][data-remote-role="assigned"] .cic-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "stage"; }
|
|
|
|
@media (max-width: 899px) {
|
|
.stage { overflow: visible; }
|
|
.role-visuals { overflow: visible; }
|
|
.stage .role-canvas { flex: none; height: min(54svh, 22rem); }
|
|
.role-map-frame { flex: none; height: min(54svh, 22rem); }
|
|
.sonar-plots[data-layout="overview"], .sonar-plots[data-layout="overview-wide"] { display: flex; flex-direction: column; }
|
|
.sonar-active-plots { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
|
|
.sonar-active-plots > canvas { height: 18rem !important; }
|
|
.sonar-band-plots { grid-template-columns: minmax(0, 1fr); flex-basis: auto; }
|
|
.helicopter-acoustic-workspace { display: flex; flex-direction: column; }
|
|
.helicopter-acoustic-plots { min-height: 16rem; }
|
|
.role-visuals[data-split="on"] { display: flex; }
|
|
}
|