/* Silent Running: dark painted steel under a red light, brass edges, cream text, amber for warnings. */
:root {
  --steel: #161b1e; --steel2: #20272b; --plate: #0f1316; --edge: #8a6a32; --brass: #c9a25a; --brass2: #e7c987;
  --cream: #efe6d2; --dim: #a99f8c; --amber: #e8a33c; --red: #d2402c; --green: #6fbf73; --ink: #1a1d20;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #070909; color: var(--cream); }
body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.plate {
  background: linear-gradient(180deg, rgba(40, 18, 14, .55), rgba(10, 12, 14, .85)), var(--plate);
  border: 1px solid rgba(201, 162, 90, .55); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, .12), 0 6px 22px rgba(0, 0, 0, .5);
}
.btn {
  border: 1px solid var(--brass); background: linear-gradient(180deg, #3a2f1e, #241d13); border-radius: 12px;
  padding: 12px 18px; font-weight: 700; color: var(--brass2); font-size: 16px; min-height: 48px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .25), 0 2px 0 #0008;
}
.btn:active { transform: translateY(1px); }
.btn.go { background: linear-gradient(180deg, #b8452b, #7c2616); border-color: #e0896d; color: #fff3e6; }
.btn.on { background: linear-gradient(180deg, #e8a33c, #a8701f); color: #1a1208; border-color: #f2cd8a; }
.btn:disabled { opacity: .45; }
.segs { display: flex; gap: 6px; }
.segs .btn { flex: 1; padding: 10px 8px; font-size: 15px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #555; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.amber { color: var(--amber); }
.callout {
  border: 1px dashed rgba(232, 163, 60, .7); border-radius: 12px; padding: 10px 12px; background: rgba(232, 163, 60, .08);
  font-size: 15px; line-height: 1.35;
}
.callout b { color: var(--amber); display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 3px; }

/* ---------------- iPad ---------------- */
body.table { overflow: hidden; }
#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#stage {
  width: 1366px; height: 1024px; position: relative; flex: none; transform-origin: center center;
  background: url(/pictures/sr-panel-ipad.webp?v=8650435d4f) center/cover, #111;
}
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 68px; display: flex; align-items: center; padding: 0 28px; gap: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.35)); border-bottom: 1px solid rgba(201,162,90,.4); }
.topbar .name { font-weight: 800; font-size: 24px; letter-spacing: .22em; color: var(--brass2); }
.topbar .sub { color: var(--dim); font-size: 16px; }
.topbar .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.pill { border: 1px solid rgba(201,162,90,.6); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; background: rgba(0,0,0,.35); }
.pill.fast { border-color: var(--amber); color: var(--amber); }
.pill.normal { border-color: var(--green); color: #bfe8c1; }
.clock { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; min-width: 84px; text-align: right; }
.cutaway { position: absolute; left: 32px; top: 84px; width: 1302px; height: 360px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(201,162,90,.5); box-shadow: 0 8px 30px #000a; }
.cutaway img, .cutaway canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel { position: absolute; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass2); }
.chartbox { position: relative; flex: 1; border-radius: 8px; overflow: hidden; background: url(/pictures/sr-chart.webp?v=8650435d4f) center/cover; }
.chartbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dials { display: flex; gap: 14px; justify-content: center; }
.dialbox { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dialbox canvas { width: 172px; height: 172px; }
.dialbox .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: rgba(0,0,0,.35); border-radius: 10px; padding: 8px 12px; border: 1px solid rgba(201,162,90,.25); }
.stat .v { font-size: 20px; font-weight: 800; }
.join { display: flex; gap: 14px; align-items: center; }
.join img { width: 118px; height: 118px; border-radius: 8px; }
.join .code { font-size: 40px; font-weight: 800; letter-spacing: .14em; color: var(--brass2); }
.join small { color: var(--dim); font-size: 13px; line-height: 1.3; display: block; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid rgba(201,162,90,.25); }
.st-row .st { font-weight: 800; width: 118px; color: var(--brass2); }
.st-row .who { flex: 1; font-size: 16px; }
.st-row .who.empty { color: var(--dim); font-style: italic; }
.chip { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); z-index: 5; }
.overlay.side { left: 0; top: 68px; right: 414px; bottom: 0; background: rgba(0,0,0,.45); }
.overlay.top { left: 0; right: 0; top: 68px; height: 392px; background: rgba(0,0,0,.25); }
.overlay.top .card { padding: 20px 30px; gap: 10px; }
.overlay.top .card h1 { font-size: 34px; }
.card { width: 620px; padding: 32px 36px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.card h1 { font-size: 40px; color: var(--brass2); letter-spacing: .04em; }
.card p { font-size: 19px; line-height: 1.45; color: var(--cream); }
.card .btn { font-size: 20px; padding: 16px 26px; }
.card .row { display: flex; gap: 12px; justify-content: center; }
.knob { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.watch .btn.hostonly, .watch .hostonly { display: none !important; }

/* ---------------- phones ---------------- */
body.hand { background: url(/pictures/sr-panel-phone.webp?v=8650435d4f) center top/cover fixed, #0d1012; min-height: 100%; }
.phone { max-width: 480px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; min-height: 100vh; min-height: 100dvh; }
.phead { display: flex; align-items: center; gap: 10px; }
.phead .t { font-weight: 800; font-size: 20px; color: var(--brass2); letter-spacing: .06em; }
.phead .who { color: var(--dim); font-size: 14px; }
.phead .btn { margin-left: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input { font: inherit; font-size: 20px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--brass); background: #0b0d0f; color: var(--cream); -webkit-user-select: text; user-select: text; }
.colours { display: flex; gap: 10px; flex-wrap: wrap; }
.colours button { width: 42px; height: 42px; border-radius: 50%; border: 3px solid transparent; }
.colours button.on { border-color: var(--cream); }
.stcard { display: flex; gap: 14px; align-items: center; padding: 14px; text-align: left; width: 100%; }
.stcard .ico { width: 56px; height: 56px; flex: none; }
.stcard .nm { font-size: 20px; font-weight: 800; color: var(--brass2); }
.stcard .ds { font-size: 14px; color: var(--dim); line-height: 1.35; }
.stcard .by { font-size: 14px; margin-top: 4px; }
.stcard.mine { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(232,163,60,.4); }
.big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.readouts .stat .v { font-size: 26px; }
.note { font-size: 14px; color: var(--dim); line-height: 1.4; }
.warn { font-size: 15px; color: var(--amber); font-weight: 700; text-align: center; min-height: 20px; }
.scope { position: relative; width: 100%; aspect-ratio: 1; }
.scope canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.pad { position: relative; height: 150px; border-radius: 14px; border: 1px dashed rgba(201,162,90,.6); touch-action: none; background: rgba(0,0,0,.35); }
.pad .knobdot { position: absolute; width: 54px; height: 54px; border-radius: 50%; margin: -27px 0 0 -27px; background: radial-gradient(circle at 35% 30%, #f2d28f, #8a6a32); box-shadow: 0 3px 8px #000a; }
.pad .padlbl { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; color: var(--dim); font-size: 13px; pointer-events: none; text-align: center; padding: 10px; }
.wave { width: 100%; height: 70px; display: block; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(201,162,90,.3); }
.meter { height: 12px; border-radius: 6px; background: rgba(0,0,0,.5); border: 1px solid rgba(201,162,90,.3); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3d7a40, #e8a33c, #ff6a3a); transition: width .15s; }
.gate { display: flex; flex-direction: column; gap: 14px; justify-content: center; flex: 1; text-align: center; }
.gate h1 { font-size: 30px; color: var(--brass2); }
.gate p { font-size: 17px; line-height: 1.45; }
.conn { position: fixed; top: 0; left: 0; right: 0; text-align: center; font-size: 13px; padding: 4px; background: #7c2616; color: #fff; z-index: 9; display: none; }
.conn.show { display: block; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2b1a10; border: 1px solid var(--amber); color: var(--cream); padding: 10px 16px; border-radius: 12px; z-index: 9; font-size: 15px; }
