@import "./core/base.css";
@import "./core/header.css";
@import "./core/panel.css";
@import "./core/tokens.css";
@import "./core/shop-offers.css";
@import "./core/orientation.css";

/* Biotron's values for the site roles (core/tokens.css), then its stage palette. Two roles have a second value here:
   the settings tooltip shadow (--shadow-tooltip) and the sound picker's focus ring (--focus-picker). */
:root {
  font-family:var(--font-ui);
  color:var(--ink);
  background:var(--stage-surface);
  --quiet:#626b62;
  --line:#dce1d9;
  --surface-panel:#ffffffeb;
  --shadow:0 6px 24px #0000000f;
  --shadow-tooltip:0 6px 24px rgb(0 0 0 / .06);
  --focus:#5357aa;
  --focus-picker:#333;
  --stage-surface:#fff;
  --stage-wash:#ffffffd9;
  --stage-controls-offset:max(64px,calc(env(safe-area-inset-bottom) + 52px));
  --icon-surface:#ffffff88;
  --control-hover:#edf0eb;
  --control-active:#e8ede3;
  --control-active-line:#879b7b;
  --connection-ready:#3e6d4b;
  --connection-error:#a33a30;
  color-scheme:light;
  font-synthesis:none
}
body {
  min-height:100svh;
  display:flex;
  flex-direction:column
}
button,input,select,textarea {
  color:inherit
}
textarea {
  font:inherit
}
button,select,summary,.file-button {
  cursor:pointer;
  min-height:var(--control-size)
}
button {
  background:transparent;
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px 12px;
  font-size:14px
}
button:hover:not(:disabled),.file-button:hover {
  background:var(--control-hover)
}
button:disabled,input:disabled {
  opacity:.45;
  cursor:default
}
button[aria-pressed=true] {
  background:var(--control-active);
  border-color:var(--control-active-line)
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:3px
}
input {
  accent-color:#607357
}
input[type=checkbox] {
  width:18px;
  height:18px;
  vertical-align:middle;
  margin-right:6px
}
label,p,summary {
  font-size:14px
}
p {
  line-height:1.6
}
a {
  color:inherit;
  text-underline-offset:4px
}
select {
  background:var(--stage-surface);
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px 12px;
  font-size:14px;
  max-width:100%
}
[hidden] {
  display:none!important
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.skip {
  position:absolute;
  top:-80px;
  left:16px;
  z-index:100;
  padding:12px;
  background:var(--surface-solid)
}
.skip:focus {
  top:12px
}
.stage-first #feedback-open {display:grid;position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));z-index:6;font-size:22px;}

.stage-first .play-top>* {pointer-events:auto;}
.stage-first .play-brand {color:var(--ink);font-size:15px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;text-decoration:none;white-space:nowrap;}
.stage-first .play-top svg {display:block;flex:none;width:24px;height:24px;}
.stage-first .play-icon {display:grid;place-items:center;width:var(--control-size);height:var(--control-size);min-height:var(--control-size);padding:0;border:0;border-radius:50%;background:var(--icon-surface);color:var(--ink);}
.stage-first .play-icon:hover:not(:disabled) {background:var(--surface-solid);}
.stage-first .play-icon:not(:disabled):is([aria-expanded=true],[aria-pressed=true]) {background:var(--ink);color:var(--surface-solid);}
.stage-first .play-card:not([hidden]) {display:block;position:fixed;z-index:6;top:calc(var(--top-height,64px) + 4px);right:max(12px,env(safe-area-inset-right));width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - var(--top-height,64px) - 24px);overflow:auto;overscroll-behavior:contain;padding:12px 16px 16px;background:var(--surface-panel);border-radius:var(--radius-panel);box-shadow:var(--shadow);transition:opacity .2s,visibility .2s;}
.stage-first .play-card-head {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.stage-first .play-card-head h2 {margin:0;font-size:16px;font-weight:600;}
.stage-first .play-card-close {min-width:var(--control-size);margin-right:0;padding:0;border:0;background:transparent;font-size:22px;line-height:1;color:var(--quiet);}
.stage-first .play-card-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line);}
.stage-first .play-card-actions button {min-height:var(--control-size);padding:8px 12px;font-size:16px;}
.fw-pill {display:none;}
.stage-first .fw-pill:not([hidden]) {display:inline-flex;align-items:center;min-height:var(--control-size);padding:8px 14px;border:0;border-radius:18px;background:var(--ink);color:var(--surface-solid);font-size:14px;white-space:nowrap;}
.stage-first .play-card > .firmware-open {display:block;width:100%;margin:4px 0 12px;}
/* 06.11 iteration: one readable scale, reachable mobile controls and a playable Visual card. */
body.stage-first {font-family:var(--font-stage);font-size:16px;}
body.stage-first :is(button,input,select,textarea,output,label,p,span,a,strong) {font-family:inherit;font-size:16px;letter-spacing:0;}
body.stage-first :is(.play-card-head h2,#feedback-card>h3) {font-size:20px;}
body.stage-first .play-brand {font-size:16px;letter-spacing:.03em;text-transform:none;}
body.stage-first .play-icon {width:var(--control-size);height:var(--control-size);min-width:var(--control-size);min-height:var(--control-size);flex:0 0 var(--control-size);aspect-ratio:1;border-radius:50%;padding:10px;}
body.stage-first .play-top {gap:6px;}
body.stage-first .play-pickers {gap:6px;}
body.stage-first .play-picker select {max-width:180px;text-transform:none;}
body.stage-first .play-card {background:var(--surface-solid);overscroll-behavior:contain;scrollbar-gutter:stable;}
body.stage-first .play-card :is(input[type=text],textarea) {width:100%;max-width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;}
body.stage-first .play-card label:has(input[type=checkbox]) {display:flex;gap:10px;align-items:center;min-height:var(--control-size);}
body.stage-first .play-card input[type=checkbox] {flex:0 0 20px;width:20px;height:20px;}
body.stage-first #preset-tools {border-top:1px solid var(--line);padding-top:12px;margin-top:12px;}
body.stage-first #feedback-card .play-card-actions {gap:8px;}
body.stage-first #feedback-card details {margin-top:12px;}
body.stage-first #feedback-card summary {min-height:var(--control-size);cursor:pointer;}
body.stage-first #feedback-card #feedback-submit {background:var(--ink);color:var(--surface-solid);}
body.stage-first #feedback-card button:disabled {opacity:.45;cursor:default;}
body.stage-first .play-card-head {position:sticky;top:-16px;padding-top:8px;padding-bottom:8px;background:var(--surface-solid);z-index:3;}
body.stage-first .play-brand {display:flex;align-items:center;}
body.stage-first .play-brand img {width:92px;height:48px;object-fit:contain;}
@media(max-width:600px){body.stage-first .play-brand img {width:76px;height:40px;}}

/* Biotron — Plant music layout and Garden fallback from SoundLab d35e937. */
/* Header volume markup/skin from Play's performance-controls and TouchMe's play-volume. */
.stage-first :is(.play-performance,.play-volume) {display:flex;align-items:center;min-width:0;gap:6px;color:var(--ink);}
.stage-first #volume {width:68px;min-width:var(--control-size);height:var(--control-size);margin:0;accent-color:var(--ink);}
body.stage-first {background:var(--stage-surface);color:var(--ink);}
/* Full-bleed stage from TouchMe's stage-home/field; Garden remains the playable visual. */
.sound-lab {position:fixed;inset:0;isolation:isolate;overflow:hidden;}
.garden-visual {display:grid;place-items:center;position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;border-radius:0;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;padding:calc(var(--top-height,68px) + 16px) 16px calc(var(--bottom-height,200px) + var(--stage-controls-offset) + 16px);background:transparent!important;touch-action:none;}
.orb {display:block;width:max(0px,min(65vmin,calc(100dvh - var(--top-height,68px) - var(--bottom-height,200px) - var(--stage-controls-offset) - 32px)));aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 30% 25%,#ffffffee,#aac2d8aa 25%,#688db988 55%,#fff9 70%,#55749999 85%);box-shadow:inset 0 0 32px #fff,0 24px 64px #687b8d33;border:1px solid #ffffffe0;}
.garden-visual[aria-pressed=true] .orb {transform:scale(.96) rotate(var(--orb-turn,0deg));filter:saturate(calc(1 + var(--orb-note,0)));}
/* 34379 items 12-14: the 3D Garden ball sits in the orb box (garden.mjs); states also show on the static ball. */
.orb {position:relative;transition:opacity .2s,filter .2s;}
.garden-3d {position:absolute;left:50%;top:50%;width:140%;height:140%;translate:-50% -50%;pointer-events:none;}
.garden-3d canvas {display:block;width:100%!important;height:100%!important;cursor:grab;}
.orb--live {background:none;box-shadow:none;border-color:transparent;}
.garden-visual[aria-pressed=true] .orb--live {transform:none;filter:none;}
.garden-visual[data-asleep='0'][data-stage=attention] .orb {opacity:.4;filter:grayscale(1);}
.garden-visual[data-asleep='0'][data-stage=paused] .orb {opacity:.65;}
.garden-visual[data-asleep='0']:is([data-stage=connecting],[data-stage=calibrating]) .orb::before {content:'';position:absolute;inset:-3%;border:2px solid transparent;border-top-color:#7663bc;border-radius:50%;animation:garden-ring 1.6s linear infinite;pointer-events:none;}
.garden-visual[data-asleep='0'][data-stage=calibrating] .orb::before {border-style:dotted;border-color:#7663bc;animation-duration:6s;animation-direction:reverse;}
@keyframes garden-ring {to {transform:rotate(360deg);}}
@media(prefers-reduced-motion:reduce) {.orb {transition:none;} .orb::before {animation:none!important;}}
.play-bottom {position:absolute;left:0;right:0;bottom:var(--stage-controls-offset);padding:16px 16px 0;pointer-events:none;} /* no white wash over the note strips, as on Play (Sergey 18.11 13:11) */
.play-bottom :is(button,a) {pointer-events:auto;}
.play-notice {display:flex;align-items:center;justify-content:center;gap:8px;max-width:620px;margin:8px auto;color:var(--quiet);font-size:14px;line-height:1.4;}
.play-notice>span {flex:1;}
.play-bottom:has(#audio-notice:not([hidden])) #first-run {display:none;}
.play-notice>button {flex:0 0 auto;min-width:var(--control-size);min-height:var(--control-size);}
.connection-message {display:flex;flex-direction:column;gap:8px;margin:10px 0 12px;} /* TouchMe's caption and status format: core/stage-text.css (Sergey 18.11 13:51) */
.play-status {overflow-wrap:anywhere;pointer-events:auto;}
.stage-first .keys-hint {margin:0;text-align:center;color:var(--quiet);font-size:14px;line-height:1.5;}
.connection-detail {flex:1;min-height:0;width:calc(100% - 32px);max-width:620px;overflow:auto;pointer-events:auto;margin:0 auto;padding:2px 12px;border:1px solid currentColor;border-radius:8px;background:var(--surface-solid);color:var(--connection-error);text-align:center;overflow-wrap:anywhere;}
.input-view {max-width:620px;margin:6px auto;}
/* The footer line (Privacy, Company & terms, Contact support) is core/footer.css (Sergey 18.11 13:34, 13:49). */
.stage-first .play-performance {gap:6px;width:168px;min-width:128px;flex:none;}
.stage-first .play-performance .play-volume {flex:1;}
.stage-first .performance-stop {background:transparent;border-radius:5px;}
.stage-first :is(.play-pickers,.play-picker) {display:flex;align-items:center;min-width:0;gap:6px;}
.stage-first .play-picker select {max-width:180px;height:var(--control-size);min-height:var(--control-size);padding:8px 18px 8px 6px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--ink);}
.stage-first .play-picker select:focus-visible {outline:2px solid var(--focus-picker);outline-offset:2px;}
/* Connection keeps Play's Device picker skin and the existing connect action/status. */
.stage-first .play-connection {max-width:260px;}
#connection-status {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* P17: Play's two phone rows; connection remains visible beside Volume and Stop. */
@media(max-width:900px) {
 body.stage-first .play-top {display:flex;flex-wrap:wrap;gap:2px;padding:8px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left));}
 body.stage-first .play-top>.play-lead {order:1;flex:1;min-width:65px;min-height:var(--control-size);margin:0;gap:6px;}
 body.stage-first .play-brand img {width:65px;height:auto;}
 body.stage-first .play-top>.play-performance {order:4;width:134px;min-width:0;gap:2px;}
 body.stage-first .play-volume {gap:2px;}
 body.stage-first .play-volume svg {width:20px;height:20px;}
 body.stage-first #volume {width:var(--control-size);min-width:var(--control-size);}
 body.stage-first .play-top>.play-connection {order:3;flex:1.5 1 0;width:auto;min-width:96px;} /* the Input picker keeps room, so the sound picker drops to the second row */
 body.stage-first .play-connection svg {display:none;}
 body.stage-first #connection-status {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;font-size:inherit;line-height:1.2;overflow-wrap:anywhere;}
 body.stage-first .play-top>.play-pickers {order:2;flex:none;width:calc(100% - 232px);}
 body.stage-first .play-picker {width:100%;}
 body.stage-first .play-picker svg {display:none;}
 body.stage-first .play-picker select {width:100%;min-width:0;max-width:none;font-size:16px;padding:6px 12px 6px 0;}
 body.stage-first :is(#effects-open,#settings-open,#visual-open) {order:5;}
 body.stage-first #fullscreen {order:6;}
 body.stage-first #help-open {order:7;}
}
.knob {display:grid;justify-items:center;align-content:start;gap:4px;min-width:0;text-align:center;}
body.stage-first .knob>label {font-size:14px;line-height:1.3;min-height:36px;display:grid;align-items:center;}
body.stage-first .knob .value-display {font-size:14px;color:var(--quiet);min-height:32px;padding:4px;border:0;}
.knob .value-editor {width:100%;max-width:96px;min-height:32px;padding:4px;border:1px solid var(--line);border-radius:6px;}
body.stage-first .knob-hint {font-size:12px;color:var(--quiet);margin:8px 0;}
.sound-lab__quality {display:flex;min-height:var(--control-size);align-items:center;gap:.4rem;margin-top:12px;color:var(--quiet);}
.computer-keys {--keyboard-columns:20;margin:1rem 0;}
/* The 16 keys are TouchMe's (Sergey 34503) in Play's two rows on every screen: core/keyboard.css [data-core-keys] (Sergey 18.11 13:40, 13:47). */
#keyboard.computer-keys {margin:1rem auto;}
#keyboard.computer-keys button {font-size:14px;}
/* Key labels and fill are core's (core/keyboard.css, Sergey 34516 п. 7): fill 'scale' by the current Scale and Home note, held 100 %. */
dialog {border:0;border-radius:var(--radius-panel);padding:16px 20px;background:var(--surface-solid);color:var(--ink);width:min(640px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;box-shadow:var(--shadow);}
dialog::backdrop {background:#242a2533;}
/* Biotron settings, Effects, Visual and Help: TouchMe's window frame from core/panel.css (Sergey 34516 п. 9); only the content is Biotron's. */
.effect-knobs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0;}
#effects-reset {margin-top:4px;}
/* Setting hints use TouchMe's info-button/info-pop skin and existing shared tokens. */
#settings .setting-caption {display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;}
#settings .setting-caption label {min-width:0;overflow-wrap:anywhere;}
#settings :is(.setting,.knob)>.setting-caption {min-height:36px;}
#settings :is(.setting,.knob)>.setting-caption label {font-size:14px;line-height:1.3;}
#settings .knob>.setting-caption label {line-height:18px;} /* Standard 19 (34881): knob label 14 px on an 18 px line, two-line box 36 px (was 1.3 = 18.2 / 36.4). */
#settings .setting-info {display:inline-flex;flex-shrink:0;}
#settings .setting-info-button {display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;min-height:0;padding:0;border-radius:50%;font-size:12px;font-weight:600;color:var(--quiet);}
#settings .setting-info-tooltip {position:fixed;z-index:3;width:max-content;max-width:min(280px,calc(100vw - 24px));margin:0;padding:8px 12px;background:var(--surface-solid);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow-tooltip);font-size:13px;line-height:1.5;font-weight:400;color:var(--quiet);text-align:left;overflow-wrap:anywhere;}
dialog .play-card-head {display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-16px;background:var(--surface-solid);z-index:1;}
dialog .play-card-head h2 {font-size:20px;}
dialog [data-close] {border:0;font-size:22px;min-width:var(--control-size);}
.help-tabs,.preset-actions {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
#midi-panel label {display:block;margin-top:16px;}
#midi-panel select {width:100%;}
.daw-handoff {margin-top:16px;}
.daw-handoff p {margin:8px 0 0;color:var(--quiet);}
.settings-group {display:block;min-width:0;border:0;border-top:1px solid var(--line);margin:0;padding:4px 0;}
/* 34379 #17: foldable groups; the summary is the full-width, keyboard-reachable title row. */
.settings-group>summary {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:var(--control-size);font-size:20px;cursor:pointer;list-style:none;}
.settings-group>summary::-webkit-details-marker {display:none;}
.settings-group>summary::after {content:"";width:8px;height:8px;border-right:2px solid var(--quiet);border-bottom:2px solid var(--quiet);transform:rotate(45deg);transition:transform .15s;}
.settings-group[open]>summary::after {transform:rotate(-135deg);}
.settings-group[open]>:not(summary) {margin-top:12px;}
.settings-group[open]>.setting-selects+.setting-knobs {margin-top:16px;}
.experiments-group>p {margin:0 0 12px;}
.calibration-control {display:grid;gap:8px;justify-items:start;}
.calibration-control p {margin:0;}
.calibration-status {color:var(--quiet);}
/* 34379 #16: stage line next to the status line; the long hint is dropped on small screens to keep the orb's room. */
.play-stage {margin:0;text-align:center;line-height:1.4;}
.play-stage strong {font-weight:600;}
.play-stage .stage-hint {color:var(--quiet);}
.no-sound {margin-top:16px;}
.no-sound>summary,.no-sound details>summary {min-height:var(--control-size);display:flex;align-items:center;cursor:pointer;}
.no-sound textarea {width:100%;font-family:monospace;font-size:13px;}
/* Two columns: Biotron settings is TouchMe's 320 px window now (Sergey 34516 п. 9), as it was on phones. */
.setting-selects,.setting-knobs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px 12px;}
.setting-knobs {grid-template-columns:repeat(3,minmax(0,1fr));} /* standard 9 (Sergey 18.11 15:35): 3 knobs a row, as every other knob grid */
#settings .setting {display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:4px;min-width:0;margin:0;text-align:center;}
#settings .setting select {width:100%;min-width:0;min-height:var(--control-size);padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:var(--stage-surface);}
.preset-tools {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;}
#preset-name {width:100%;min-height:var(--control-size);padding:8px;}
#settings-status {line-height:1.5;margin-bottom:0;} /* Standard 18 (34881): the knob hint under the status stands 8 px below it (was 14: the paragraph's default 1em bottom margin). */
body.stage-first .light-status {grid-column:1/-1;margin:0;font-size:14px;line-height:1.5;color:var(--quiet);}
.feedback-preview-tools {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;}
.setup-hub :is(#how-panel,#midi-panel) {margin:0;}
.stage-first #settings>.fw-pill:not([hidden]) {display:flex;justify-content:center;min-height:var(--control-size);margin:4px 0 12px;text-decoration:none;}
@media(max-width:420px) {
 .play-bottom {padding-inline:5px;}
 .setting-selects {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-height:600px) {
 .play-notice {margin:0 auto;}
 #keyboard.computer-keys {margin:8px auto;}
}
/* Short landscape screens share the footer width to leave room for the playable scene. */
@media(max-height:500px) and (orientation:landscape) {
 :root {--stage-controls-offset:max(var(--core-footer-bottom,12px),env(safe-area-inset-bottom));} /* ends where the fixed footer does (standard 1) */
 body.stage-first .play-top {flex-wrap:nowrap;gap:4px;}
 body.stage-first .play-top>.play-lead {flex:0 1 auto;}
 body.stage-first .play-top>.play-pickers {flex:1;width:auto;min-width:var(--control-size);}
 body.stage-first .play-top>.play-connection {flex:1 1 0;min-width:var(--control-size);} /* one row: the sound and Input pickers share what the five icons leave, 44 px at least */
 body.stage-first #connection-status {display:block;white-space:nowrap;}
 .play-bottom {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:16px;padding-top:8px;}
 .play-bottom>:is(.play-notice,.connection-message,.keys-hint) {grid-column:1;width:100%;}
 /* Sergey 18.11 21:47Z (34855, item 12): with the keyboard hidden the right column is empty, so the stage text spans both columns and stands in the centre. */
 .play-bottom:has(>.input-view[hidden])>:is(.play-notice,.connection-message,.keys-hint) {grid-column:1 / -1;}
 .play-bottom>#audio-notice {grid-column:1 / -1;grid-row:1;}
 .input-view {grid-column:2;grid-row:1 / 5;align-self:end;width:100%;}
 .play-bottom>.core-footer-space {grid-column:1 / -1;} /* the footer's line runs under both columns, not beside the text (standard 1) */
 .play-bottom:has(#audio-notice:not([hidden])) .input-view {grid-row:2 / 5;}
 #keyboard.computer-keys {margin:4px auto;}
 .connection-message {margin:4px 0;}
 .connection-detail {padding:0 8px;}
 .garden-credit {grid-column:1 / -1;margin-top:4px;}
}

/* 34379: the page and stage are white in every colour scheme; there is no dark theme. */
@media(prefers-reduced-motion:reduce) {
 .stage-first .play-card,.stage-first .computer-keys button {transition:none;}
}

/* Left side as TouchMe's and Play's (Sergey 34435): the logo, the dark Get Biotron pill (shown while no Biotron is connected) and Web synths. */
body.stage-first .play-lead {display:flex;flex:none;align-items:center;gap:14px;margin-right:auto;}
body.stage-first .play-lead .play-brand {margin:0;min-height:var(--control-size);}
body.stage-first .get-biotron:hover {background:#434c44;} /* the pill itself is core's .core-get (standard 14) */
body.stage-first .header-synth {display:inline-flex;align-items:center;min-height:var(--control-size);color:inherit;white-space:nowrap;text-underline-offset:3px;}
/* Narrower headers have no room for Web synths (Play hides its wordmark from 1250 px). */
@media(max-width:1250px){body.stage-first .header-synth {display:none;}}
@media(max-width:900px){body.stage-first .play-lead {gap:6px;margin:0;}}
/* New sound dice beside the sound picker, in TouchMe's skin. */
body.stage-first #change-sound {display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--control-size);min-height:var(--control-size);padding:0;border:1px solid transparent;border-radius:22px;background:#ffffff88;color:var(--ink);cursor:pointer;}
body.stage-first #change-sound:hover {background:#ffffffcc;}
body.stage-first #change-sound svg {width:24px;height:24px;}
/* The smallest landscape phones (568 px wide) have no room beside the sound picker. */
@media(max-height:500px) and (orientation:landscape) and (max-width:700px){body.stage-first #change-sound {display:none;}}

/* Header type and order as TouchMe's (Sergey 34476): the header uses the UI font, the pickers 14 px 600 with .03em, Web synths 12 px. */
body.stage-first .play-top {font-family:var(--font-ui);}
body.stage-first .play-top select {font-family:var(--font-ui);font-size:14px;font-weight:600;letter-spacing:.03em;text-transform:none;}
body.stage-first .play-top .header-synth {font-size:12px;color:#333;}
body.stage-first .help-footer {margin:12px 0 0;font-size:13px;}

/* The device panel is TouchMe's and Play's Input picker (Sergey 34476): the MIDI connector pictogram and a select, 14 px 600. */
body.stage-first .play-connection select {max-width:180px;}
@media(min-width:1101px){body.stage-first .play-connection select {width:180px;flex:none;}} /* standard 14: the list is a 180 px field */
body.stage-first #connection-status {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
.visual-lead {margin:0 0 4px;font-size:13px;color:var(--quiet);}
#visual-reset {margin-top:4px;}

/* «New sound»: an icon in a wide header, an icon with its name inside the Effects card on a narrow one (TouchMe's way). */
body.stage-first #change-sound span {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}
body.stage-first #effects #change-sound {width:auto;padding:0 14px;gap:6px;margin:8px 0;border-color:var(--line);background:transparent;}
body.stage-first #effects #change-sound span {position:static;width:auto;height:auto;clip:auto;font-size:14px;}
/* Sergey 34500 mute, 18.11: a real 44x44 box at every width, as Play (01baa95). The core hit extension (negative margins) overlapped
   the slider and the dice (6 px on desktop) and left 40x40 where the icon is 20 px; neighbours are 2-6 px away, so the icon and slider move a few px. */
button.header-mute,button.header-mute:is(:hover,:active,[aria-pressed]):not(:disabled){box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding:0;}
/* Sergey 34516 п. 1 «как в Love»: TouchMe's phone header (touchme style.css @media max-width:900px). Row 1: logo, Sound and Input as
   44 px icon pickers, ⚙; row 2: Volume and Stop, Effects, Biotron settings, Visual, Full screen. New sound is in the Effects card
   (app.mjs, as TouchMe's Sound card). Short landscape phones keep their one row above. */
@media(max-width:900px) and (min-height:501px),(max-width:900px) and (orientation:portrait),(max-width:649px){
 body.stage-first .play-top {display:grid;grid-template-columns:minmax(72px,1fr) repeat(5,var(--control-size));grid-template-rows:var(--control-size) var(--control-size);gap:2px;padding:8px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left));}
 body.stage-first .play-top>.play-lead {grid-column:1/3;grid-row:1;min-width:0;}
 body.stage-first .play-top>.play-pickers {display:contents;}
 body.stage-first .play-top>.play-pickers>.play-picker {grid-column:3;grid-row:1;}
 body.stage-first #change-sound {grid-column:4;grid-row:1;}
 body.stage-first .play-top>.play-connection {grid-column:5;grid-row:1;width:var(--control-size);min-width:0;max-width:none;}
 body.stage-first .play-top .play-picker {position:relative;flex:0 0 var(--control-size);width:var(--control-size);height:var(--control-size);}
 body.stage-first .play-top .play-picker svg {display:block;position:absolute;left:10px;top:10px;pointer-events:none;}
 body.stage-first .play-top .play-picker select {position:relative;width:var(--control-size);min-width:var(--control-size);max-width:var(--control-size);height:var(--control-size);color:transparent;appearance:none;padding:0;border:0;border-radius:50%;}
 body.stage-first .play-top .play-picker option {color:#222;}
 body.stage-first .play-top .play-connection svg {display:none;}
 body.stage-first .play-top .play-connection::before {content:'⌨';position:absolute;inset:0;display:grid;place-items:center;font-size:20px;pointer-events:none;}
 body.stage-first .play-top #connection-status {display:none;}
 body.stage-first #help-open {grid-column:6;grid-row:1;}
 body.stage-first .play-top>.play-performance {grid-column:1/3;grid-row:2;width:auto;min-width:0;margin:0;display:flex;align-items:center;gap:2px;}
 body.stage-first .play-top #volume {min-width:83px;width:83px;}
 body.stage-first #effects-open {grid-column:3;grid-row:2;}
 body.stage-first #settings-open {grid-column:4;grid-row:2;}
 body.stage-first #visual-open {grid-column:5;grid-row:2;}
 body.stage-first #fullscreen {grid-column:6;grid-row:2;}
}

/* Standard 15: the grey description under the Sound window's title; the Bind line under it is core's .core-bind-line. */
.core-sound-desc {margin:0 0 8px;font-size:14px;line-height:1.5;color:#626b62;min-height:1.5em;}

/* Standard 16 (Sergey 18.11): the keyboard sits 25 px above the footer line (bottom edge of the lower key row to the top of .core-footer), as on TouchMe.
   Biotron's block ended 44.81 px above it; the keyboard moves down by the difference, the footer and the text above stay. */
@media not ((max-height:500px) and (orientation:landscape)){
 body.stage-first .input-view {margin-bottom:-19.83px;}
}

/* AM-6224: a short phone has room beside the scene text, not above it. */
@media(max-height:500px) and (orientation:landscape) and (max-width:900px) {
 .play-bottom:has(>.input-view[hidden])>.connection-message {
  position:absolute;left:128px;right:128px;bottom:30px;width:auto; /* symmetric: the scene text stays centred (Sergey: Biotron sideways — text in the centre) */
  pointer-events:auto;
 }
 .sound-lab:has(.input-view[hidden]) .garden-visual {padding-right:calc(100% - 112px);}
 .sound-lab:has(.input-view[hidden]) .orb {width:min(96px,calc(100dvh - var(--top-height,68px) - var(--bottom-height,200px) - var(--stage-controls-offset) - 32px));}
}
/* Give every scene line room before reserving space for the orb. */
@media(max-height:500px) and (orientation:landscape) and (max-width:649px) {
 .play-bottom:has(>.input-view[hidden])>.connection-message {left:50px;right:50px;padding-inline:0;bottom:28px;margin-block:0;}
 .sound-lab:has(.input-view[hidden]) .garden-visual {padding-left:6px;padding-right:calc(100% - 50px);}
 .sound-lab:has(.input-view[hidden]) .orb {width:44px;}
}
/* Standard 8 (Sergey 19.11, 34900), Play's idle on a desktop: with the top bar (core .core-fade) the stage text, status, keyboard and the
   Feedback «?» fade over the same .6 s; only the note strips, the footer and the orb (Visual) stay. Phones never go idle. */
.play-bottom,.stage-first #feedback-open {transition:opacity .6s ease,visibility .6s ease;}
@media(hover:hover) and (pointer:fine){[data-controls-idle] :is(.play-bottom,#feedback-open) {opacity:0;visibility:hidden;pointer-events:none;}}
