/* shared look of the lab tool pages: the portal's flat palette (solid fills, hard edges) */
:root { --bg:#0d1321; --panel:#131b2d; --panel2:#1a2439; --line:#2b3b5e; --ink:#ece3cb; --dim:#8d95a9; --amber:#ffb23f; --cyan:#4fd6c8; --red:#ff5a4e; --green:#7be08a; --gut:clamp(12px,3vw,32px); color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--lab-h, 48px) + 8px); }
body { margin: 0; padding-top: var(--lab-h, 48px); background: var(--bg); color: var(--ink); font: 400 15px/1.7 "Zen Kaku Gothic New","Hiragino Sans","Yu Gothic",system-ui,sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); }
main { padding: 12px var(--gut) 48px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: clamp(20px,4vw,28px); margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 0 0 8px; color: var(--amber); }
.lead { color: var(--dim); margin: 0 0 14px; max-width: 70ch; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; box-shadow: 4px 4px 0 #070b14; }
.panel h2 + p { margin-top: 0; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
button, .btn, select, input[type=text], textarea { font: inherit; color: var(--ink); background: var(--panel2); border: 1px solid #4a5b82; border-radius: 4px; padding: 6px 12px; min-height: 40px; cursor: pointer; }
select, input[type=text], textarea { cursor: auto; }
textarea { width: 100%; min-height: 160px; font: 12px/1.5 ui-monospace, Consolas, monospace; }
button:hover:not(:disabled) { border-color: var(--amber); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.on, button[aria-pressed=true] { background: var(--amber); color: #1a1205; border-color: var(--amber); font-weight: 700; }
button.warn { border-color: var(--red); }
label.sl { display: grid; grid-template-columns: minmax(7em, 11em) 1fr 4.2em; gap: 8px; align-items: center; margin: 4px 0; font-size: 13px; }
label.sl output { text-align: right; font-variant-numeric: tabular-nums; color: var(--cyan); }
input[type=range] { width: 100%; min-height: 32px; accent-color: var(--amber); }
input[type=color] { width: 44px; height: 32px; padding: 0; border: 1px solid #4a5b82; background: none; }
.stage { position: relative; background: #000; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.log { font: 12px/1.5 ui-monospace, Consolas, monospace; background: #070b14; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; max-height: 180px; overflow: auto; white-space: pre-wrap; color: #b9c4dd; }
.meter { height: 12px; background: #070b14; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--amber) 80%, var(--red)); }
.chip { display: inline-block; padding: 1px 8px; border: 1px solid #4a5b82; border-radius: 99px; font-size: 12px; color: var(--dim); }
.ok { color: var(--green); } .ng { color: var(--red); } .dim { color: var(--dim); } .mono { font-family: ui-monospace, Consolas, monospace; }
.note { border-left: 3px solid var(--amber); padding: 4px 10px; background: rgba(255,178,63,.08); font-size: 13px; margin: 8px 0; }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
table.t th { color: var(--amber); position: sticky; top: var(--lab-h, 48px); background: var(--panel); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 10px; }
@media (max-width: 560px) { label.sl { grid-template-columns: 1fr 3.6em; } label.sl span { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
