Files

202 lines
8.3 KiB
CSS
Raw Permalink Normal View History

/*
* operator.css — the sound desk view.
*
* The START button is deliberately enormous. On a Sunday it is pressed once,
* often by a volunteer, sometimes in the dark, sometimes on a tablet, usually
* while three other things are going wrong.
*/
/*
* Make the `hidden` attribute actually hide things.
*
* The browser's own [hidden] rule is `display: none`, but it lives in the user-
* agent stylesheet, so any author rule that sets `display` — every .warn,
* .toast and flex row below — silently outranks it. The element stays on
* screen with hidden="true" and the JavaScript looks like it isn't running.
* That is how the operator console ended up permanently insisting the Mac
* engine was disconnected while it was sitting there working.
*/
[hidden] { display: none !important; }
:root {
--bg: #0b0d12; --surface: #151922; --raised: #1d2331; --line: #2a3244;
--text: #eef1f6; --muted: #8b93a7; --accent: #6ea8fe;
--go: #2fbf71; --stop: #e5484d; --warn: #f5a524;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
-webkit-text-size-adjust: 100%;
}
h1 { font-size: 1.5rem; margin: 0; font-weight: 650; }
h2 { font-size: 1.0625rem; margin: 0 0 .375rem; font-weight: 650; }
h2.mt { margin-top: 1.75rem; }
p { margin: 0 0 .875rem; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; }
.muted { color: var(--muted); font-size: .875rem; }
.tiny { font-size: .8125rem; }
.err { color: var(--stop); font-size: .875rem; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
/* ---- PIN gate ---- */
.gate { display: none; min-height: 100dvh; place-items: center; padding: 1.25rem; }
.gate.is-active { display: grid; }
#console { display: none; }
#console.is-active { display: block; }
.gate-card {
width: 100%; max-width: 21rem;
background: var(--surface); border: 1px solid var(--line);
border-radius: 18px; padding: 1.75rem;
display: flex; flex-direction: column; gap: .75rem;
}
/* ---- shell ---- */
.wrap { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.125rem 5rem; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ghost { color: var(--accent); text-decoration: none; font-size: .875rem; white-space: nowrap; }
.ghost:hover { text-decoration: underline; }
.card {
background: var(--surface); border: 1px solid var(--line);
border-radius: 18px; padding: 1.375rem; margin-bottom: 1rem;
}
.card.control { padding-bottom: 1rem; }
/* ---- the button ---- */
.big {
width: 100%; min-height: 8.5rem;
border: 0; border-radius: 16px; cursor: pointer;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .375rem;
background: var(--go); color: #052e18;
font: inherit; transition: background .18s ease, transform .08s ease;
}
.big:active { transform: scale(.99); }
.big:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.big[data-live="true"] { background: var(--stop); color: #fff; }
.big[disabled] { background: var(--raised); color: var(--muted); cursor: not-allowed; }
.big-label { font-size: 1.625rem; font-weight: 750; letter-spacing: .02em; }
.big-sub { font-size: .9375rem; opacity: .85; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.stat { background: var(--raised); border-radius: 12px; padding: .75rem; text-align: center; }
.stat b { display: block; font-size: 1.375rem; font-weight: 700; }
.stat span { font-size: .75rem; color: var(--muted); }
.warn {
margin-top: 1rem; padding: .875rem 1rem;
background: rgba(245, 165, 36, .12);
border: 1px solid rgba(245, 165, 36, .4);
border-radius: 12px; font-size: .875rem; line-height: 1.5;
display: flex; flex-direction: column; gap: .25rem;
}
.warn strong { color: var(--warn); }
.enginebar {
margin-top: .75rem; font-size: .8125rem; color: var(--muted);
display: flex; flex-wrap: wrap; gap: .875rem;
}
/* ---- inputs ---- */
input, textarea, select {
width: 100%; padding: .75rem .875rem;
background: var(--raised); color: var(--text);
border: 1px solid var(--line); border-radius: 10px;
font: inherit; font-size: .9375rem; outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; line-height: 1.6; }
label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
label input { margin-top: .375rem; }
.btn {
appearance: none; border: 1px solid var(--line);
background: var(--raised); color: var(--text);
padding: .6875rem 1.125rem; border-radius: 10px;
font: inherit; font-size: .9375rem; font-weight: 550;
cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
}
.btn:hover { background: #262d3d; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #08101f; font-weight: 650; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; }
.row .btn { flex: none; }
.row input { flex: 1; min-width: 10rem; }
/* ---- language chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: .4375rem; margin-bottom: .75rem; min-height: 2rem; }
.chip {
display: inline-flex; align-items: center; gap: .4375rem;
background: var(--raised); border: 1px solid var(--line);
border-radius: 999px; padding: .375rem .5rem .375rem .8125rem;
font-size: .875rem;
}
.chip button {
appearance: none; border: 0; background: transparent; color: var(--muted);
cursor: pointer; font-size: 1.125rem; line-height: 1; padding: 0 .25rem;
}
.chip button:hover { color: var(--stop); }
.chips:empty::before { content: "None yet"; color: var(--muted); font-size: .875rem; }
.results { display: grid; gap: .25rem; margin-top: .5rem; max-height: 15rem; overflow-y: auto; }
.results:empty { display: none; }
.results button {
appearance: none; text-align: left; width: 100%;
background: var(--raised); border: 1px solid transparent; color: var(--text);
border-radius: 8px; padding: .5625rem .75rem; font: inherit; font-size: .875rem; cursor: pointer;
}
.results button:hover { border-color: var(--accent); }
.results button span { color: var(--muted); margin-left: .5rem; font-size: .8125rem; }
/* ---- qr + code ---- */
.qrrow { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: flex-start; }
.qr { width: 10rem; height: 10rem; background: #fff; border-radius: 12px; padding: .5rem; flex: none; }
.qrside { flex: 1; min-width: 14rem; }
.codeblock {
display: flex; align-items: center; gap: .5rem;
background: var(--raised); border: 1px solid var(--line);
border-radius: 10px; padding: .625rem .75rem; margin-bottom: .5rem;
}
.codeblock code { flex: 1; overflow-x: auto; white-space: nowrap; color: #cbd5e6; }
.copy {
appearance: none; border: 0; background: var(--line); color: var(--text);
border-radius: 7px; padding: .3125rem .625rem; font: inherit; font-size: .75rem; cursor: pointer; flex: none;
}
.copy:hover { background: var(--accent); color: #08101f; }
.toast {
position: fixed; left: 50%; transform: translateX(-50%);
bottom: 1.5rem; background: var(--raised); border: 1px solid var(--line);
padding: .6875rem 1.125rem; border-radius: 999px; font-size: .875rem; z-index: 20;
}
.toast[hidden] { display: none; }
@media (max-width: 30rem) {
.big-label { font-size: 1.375rem; }
.qr { width: 100%; height: auto; max-width: 15rem; margin: 0 auto; }
}
/* ---- who is listening, by language ---- */
.wholist { display: flex; flex-wrap: wrap; gap: .4375rem; margin-top: .75rem; }
.wholist[hidden] { display: none; }
.who {
display: inline-flex; align-items: baseline; gap: .4375rem;
background: var(--raised); border: 1px solid var(--line);
border-radius: 999px; padding: .3125rem .75rem;
font-size: .8125rem;
}
.who b { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9375rem; }
.who span { color: var(--muted); }
.op-health { margin: .5rem 0 0; font-size: .8125rem; font-weight: 600; text-align: center; }
.op-health[data-level="green"] { color: #4ade80; }
.op-health[data-level="amber"] { color: #fbbf24; }
.op-health[data-level="red"] { color: #f87171; }