:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; font-weight: 400; background: #000; color: #fff; font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; padding: 3vh 3vw; min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; }
button { border: 1px solid #718593; border-radius: 14px; padding: 11px 16px; min-height: 44px; font-weight: 600; background: #34414c; color: #fff; cursor: pointer; line-height: 1.3; }
button:hover:not(:disabled), button[aria-pressed="true"] { background: #617789; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 2px solid #a7e5cf; outline-offset: 4px; }
.container { position: relative; height: 94vh; height: 94dvh; min-height: 480px; border: 2px solid #eee; border-radius: 36px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 20px 24px; isolation: isolate; }
.toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; z-index: 2; }
.brand { font-size: .85rem; letter-spacing: .12em; color: #d6dfe5; font-weight: 600; }
.toolbar-actions { display: flex; gap: 8px; }
.primary-button { background: #bcebd9; color: #10251e; border-color: #bcebd9; }
.primary-button:hover:not(:disabled) { background: #e0fff2; }
.primary-button[aria-pressed="true"] { background: #bcebd9; }
.controls { position: absolute; top: 84px; left: 22px; width: 340px; max-width: calc(100% - 44px); max-height: calc(100% - 108px); overflow-y: auto; scrollbar-gutter: stable; z-index: 3; background: #111820; border: 1px solid #657987; border-radius: 20px; padding: 20px; box-shadow: 0 10px 40px #000a; display: grid; gap: 16px; }
[hidden] { display: none !important; }
.controls label { font-size: 1rem; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; line-height: 1.45; }
.controls output { font-variant-numeric: tabular-nums; color: #c2f2df; font-weight: 600; }
.controls input { width: 100%; min-width: 0; accent-color: #a7e5cf; }
.controls input[type="file"] { font-size: .9rem; }
.controls input[type="range"] { margin: 3px 0 10px; }
.transport { display: flex; flex-wrap: wrap; gap: 6px; }
.transport button { flex: 1; padding: 10px 8px; white-space: nowrap; font-size: .9rem; }
fieldset { border: 1px solid #43515c; border-radius: 12px; padding: 12px; margin: 0; min-width: 0; }
legend { font-size: 1rem; font-weight: 600; padding: 0 6px; }
.curves { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.curves button { font-size: .9rem; padding: 10px 7px; }
.smooth-curve { grid-column: 1 / -1; }
.hint { font-size: .9rem; line-height: 1.55; color: #d0dbe3; margin: 0; }
.flowers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; gap: 12px; padding-top: 10px; }
figure { margin: 0; min-height: 0; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.canvas-slot { min-height: 0; position: relative; }
canvas { display: block; position: absolute; width: 100%; height: 100%; object-fit: contain; }
figcaption { text-align: center; font-size: 1.1rem; font-weight: 600; padding: 8px 0; }
figcaption span { display: block; font-size: .85rem; font-weight: 400; color: #d0dae2; margin: 6px 0; }
meter { display: block; width: min(90%, 130px); height: 5px; margin: 8px auto 0; }
footer { text-align: center; padding-top: 8px; }
.lab-links { display:flex; justify-content:center; gap:20px; font-size:.8rem; line-height:1.5; }
.lab-links a { color:#b8c7c1; text-underline-offset:4px; padding:8px 4px; }
.lab-links a:hover { color:#fff; }
.status { font-size:.85rem; color:#d0dae2; margin:0; line-height:1.5; overflow-wrap:anywhere; }
.status[data-error="true"] { color:#ffb9a9; }
h1 { font-weight: 400; font-size: clamp(1.3rem, 3.2vw, 3.2rem); margin: 0 0 10px; letter-spacing: -.025em; }
footer p { font-size: .95rem; color: #d0dae2; margin: 6px 0; line-height: 1.45; overflow-wrap: anywhere; }
footer p[data-error="true"] { color: #ffb9a9; }
.container:fullscreen { width: 100%; height: 100dvh; border: 0; border-radius: 0; background: #000; }
body.window-fullscreen { padding: 0; }
body.window-fullscreen .container { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
@media (max-width: 600px) {
  body { padding: 10px; }
  .container { height: calc(100dvh - 20px); padding: 12px; border-radius: 22px; }
  .brand { font-size: .65rem; letter-spacing: .04em; }
  .toolbar-actions { gap: 5px; }
  .toolbar button { font-size: .85rem; padding: 9px 10px; }
  .flowers { gap: 4px; }
  figcaption { font-size: .9rem; }
  figcaption span { font-size: .65rem; }
  footer p { font-size: .8rem; }
  .controls { top: 72px; left: 12px; max-width: calc(100% - 24px); max-height: calc(100% - 88px); padding: 16px; }
}
