@font-face {
  font-family:"Space Grotesk";
  src:url("fonts/space-grotesk-latin.woff2") format("woff2");
  font-style:normal;
  font-weight:300 700;
  font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark;
  --tool-width: 520px;
  --shell:#191817;
  --brand:#cba574;
  --page:#151413;
  --panel:#211f1d;
  --panel-raised:#26231f;
  --well:#181715;
  --control:#302c27;
  --control-hover:#3e3932;
  --edge:#514536;
  --text:#f1ece3;
  --soft:#d5cbbd;
  --muted:#b3a89b;
  --amber:#d2ad77;
  --amber-text:#f2cc94;
  --amber-edge:#9c703b;
  --amber-surface:#493a29;
  --action:#b99565;
  --action-ink:#191511;
  --wave-bg:#111210;
  --wave-grid:#2b2c26;
  --wave-axis:#5c574d;
  --wave-kick:#a29f96;
  --wave-punch-tint:#b5804f;
  --wave-guide:#f6f3ec;
  --wave-original:#cbc2b5;
  --wave-sub:#97b8b7;
  --wave-tone:#b6aac3;
  accent-color:var(--amber);
}

* { box-sizing:border-box; }
[hidden] { display:none !important; }
body {
  margin:0;
  background:var(--page);
  color:var(--text);
  font:13px/1.35 system-ui,sans-serif;
}
body.tool-page {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-content:center;
  min-height:100vh;
  min-height:100svh;
  padding:max(10px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right))
    max(10px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  background-color:#121110;
  background-image:radial-gradient(ellipse 64% 75% at 50% 44%, #12111008 25%, #1211109c 95%),
    var(--tool-background,url("xtrmraw-amber.webp"));
  background-size:cover;
  background-position:center,var(--tool-background-mobile-position,center);
  background-repeat:no-repeat;
}
.tool-stage { min-width:0; }
#xr {
  width:min(var(--tool-width),100%);
  margin:0 auto;
  padding:12px;
  border:1px solid #61503b;
  border-radius:10px;
  background:var(--shell);
}
#xr.tool {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  border-color:#5b4c39;
  background:linear-gradient(158deg,#1d1b18 0%,#191817 38%,#171614 100%);
  box-shadow:inset 0 1px 0 #ffffff08,0 18px 40px #000a,0 3px 12px #0008;
  user-select:none;
  -webkit-user-select:none;
}
button {
  font:inherit;
  color:var(--text);
  border:0;
  border-radius:5px;
  background:var(--control);
  cursor:pointer;
  touch-action:manipulation;
}
button:not(:disabled):hover { background:var(--control-hover); }
button:disabled { opacity:.48; cursor:default; }
:focus-visible { outline:2px solid var(--amber); outline-offset:2px; }
a { color:var(--amber); }
.tool-heading .brand {
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 1 auto;
  width:clamp(136px,45vw,184px);
  min-width:0;
}
.brand-mark { display:block; flex:none; width:28px; height:28px; }
.brand-title {
  display:block;
  width:calc(100% * 184 / 247);
  max-width:calc(100% - 36px);
  height:auto;
}
.tool-heading { display:flex; justify-content:space-between; align-items:center; gap:6px; min-width:0; min-height:38px; }
.segments {
  display:flex;
  align-items:center;
  padding:3px;
  background:#201e1b;
  box-shadow:inset 0 0 0 1px #36312a;
  border-radius:6px;
}
.segments button {
  min-height:23px;
  padding:0 9px;
  background:transparent;
  color:#a99e8e;
  font-size:10px;
  font-weight:750;
  letter-spacing:.06em;
  transition:background-color .15s,color .15s;
}
.segments button[aria-pressed="true"] {
  color:var(--amber-text);
  background:#342d24;
  box-shadow:inset 0 0 0 1px #584832;
}
#tier button { min-width:51px; min-height:28px; }
#tier { position:relative; isolation:isolate; flex:none; }
#tier::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:3px auto 3px 3px;
  width:calc((100% - 6px) / 2);
  border-radius:4px;
  background:#3a3024;
  box-shadow:inset 0 0 0 1px #5e4b33;
  transition:transform .17s ease;
}
#tier:has([data-tier="pro"][aria-pressed="true"])::before { transform:translateX(100%); }
#tier button[aria-pressed="true"] { background:transparent; box-shadow:none; }

#monitor {
  position:relative;
  height:118px;
  border:1px solid #3d372d;
  border-radius:6px;
  background:var(--wave-bg);
  overflow:hidden;
}
#monitorMode { position:absolute; top:6px; right:6px; z-index:1; }
#monitorMode button { min-height:21px; font-size:9px; }
#analysisCanvas { display:block; width:100%; height:100%; }

.tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
.module {
  position:relative;
  min-width:0;
  display:flex;
  align-items:center;
  border-radius:6px;
  min-height:43px;
  background:#24221f;
  overflow:hidden;
  transition:background-color .12s,box-shadow .12s;
}
.module:has([aria-selected="true"]) { background:#33291f; box-shadow:inset 0 0 0 1px #765b3b; }
.module:has([role="tab"]:focus-visible) { outline:1px solid var(--amber); outline-offset:-1px; }
.module:has([role="tab"][aria-disabled="false"]):hover {
  background:#3b3732;
  box-shadow:inset 0 0 0 1px #655e54;
}
.module:has([role="tab"][aria-selected="true"][aria-disabled="false"]):hover {
  background:#403225;
  box-shadow:inset 0 0 0 1px #8f7049;
}
.module [role="tab"] {
  min-width:0;
  min-height:43px;
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:4px 2px;
  background:transparent;
  color:var(--soft);
  font-size:10px;
  font-weight:700;
  letter-spacing:.035em;
  white-space:nowrap;
}
.module [role="tab"]:focus-visible { outline:none; }
.module [aria-selected="true"] { color:var(--amber-text); }
.module [role="tab"]:hover { background:transparent; }
.module [role="tab"], .fx-title h2 { font-family:"Space Grotesk",system-ui,sans-serif; }
.module svg { width:13px; height:13px; stroke:currentColor; stroke-width:1.35; fill:none; }
.module [aria-selected="false"] svg { color:var(--brand); }
.module [aria-disabled="true"] { color:#a19889; cursor:default; }
.module [aria-disabled="true"] svg { opacity:.45; }
.module [aria-disabled="true"]::after {
  position:absolute;
  align-self:flex-end;
  margin:0 5px 15px 0;
  width:6px;
  height:5px;
  border:1px solid #a19889;
  border-radius:1px;
  box-shadow:0 -3px 0 -1px #a19889;
  content:"";
}
.bypass {
  min-width:22px;
  min-height:31px;
  padding:0 3px;
  margin-inline-end:4px;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:3px;
  color:var(--muted);
  background:var(--well);
  border:1px solid var(--edge);
  font-size:8px;
  font-weight:800;
}
.bypass::before { content:""; width:4px; height:4px; border-radius:50%; background:#82786a; }
.bypass[aria-checked="true"] { color:var(--amber-text); background:#2c261f; border-color:#584832; }
.bypass[aria-checked="true"]::before { background:#d9ad71; }
.bypass[aria-checked="true"]:not(:disabled):hover { background:#403225; }

.drop {
  display:flex;
  align-items:center;
  min-height:52px;
  gap:8px;
  padding:6px 9px;
  border:1px solid #3f372d;
  border-radius:7px;
  background:#1c1916;
}
.tool[data-loaded="false"] .drop {
  border-style:dashed;
  border-color:#6e573d;
  background:linear-gradient(100deg,#292117,#201c17);
}
.drop.over { background:var(--amber-surface); border-color:var(--amber); }
.tool[data-loaded="false"] .drop.over { background:var(--amber-surface); border-color:var(--amber); }
.filetext { min-width:0; flex:1; }
.filename { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:700; }
.tool[data-loaded="false"] .filename { font-size:13px; }
#info { margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-note { color:var(--amber-text); }
#add, #remove { min-height:32px; border:1px solid #423a30; }
#add { padding:0 9px; white-space:nowrap; font-size:11px; font-weight:650; }
#remove { min-width:30px; font-size:17px; }
.tool[data-loaded="false"] #add, .export:not(:disabled) {
  color:var(--action-ink);
  border-color:#be9a69;
  background:linear-gradient(180deg,#d1ad7c,#b99260);
  box-shadow:inset 0 1px 0 #ffffff24,0 2px 4px #0003;
}
.tool[data-loaded="false"] #add:hover:not(:disabled), .export:hover:not(:disabled) {
  background:linear-gradient(180deg,#dfbf8f,#c6a06d);
}
.play {
  display:inline-grid;
  place-items:center;
  flex:none;
  width:29px;
  height:25px;
  padding:0;
  color:var(--amber);
  background:linear-gradient(#302923,#191613);
  box-shadow:inset 0 0 0 1px #6b573c;
}
.play::before {
  width:8px;
  height:8px;
  background:currentColor;
  clip-path:polygon(0 0,100% 50%,0 100%);
  transform:translateX(1px);
  content:"";
}
.play[data-playing],.play[aria-pressed="true"] { color:#ffe0a8; box-shadow:inset 0 0 0 1px var(--amber); }

#editor { display:flex; flex-direction:column; height:330px; gap:5px; min-width:0; }
.panel {
  min-width:0;
  background:var(--panel);
  border-radius:6px;
  padding:8px 10px;
  box-shadow:inset 0 0 0 1px #39342c;
}
.line { display:flex; align-items:center; justify-content:space-between; gap:5px; }
.label { color:var(--soft); font-size:10px; font-weight:750; letter-spacing:.075em; }
.value { color:var(--amber-text); font-size:11px; font-variant-numeric:tabular-nums; }
.value, .dial-copy output, .eq-readout, .stretchpanel .small, #exportDetail {
  font-family:"Space Grotesk",system-ui,sans-serif;
  font-variant-numeric:tabular-nums;
}
.small { color:var(--muted); font-size:10px; }
.tool[data-loaded="false"] #editor .value { color:var(--muted); }
.wave-panel { display:flex; flex:1; flex-direction:column; min-height:0; }
.plot { display:block; width:100%; min-height:0; }
#wave { flex:1; overflow:visible; touch-action:none; }
.wave-labels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; margin:5px 0; }
.wave-labels .label:first-child { color:var(--amber-text); }
.wave-labels .label:last-child { grid-column:2; justify-self:center; }
.tool[data-loaded="false"] .wave-labels { opacity:.44; }
.wave-time { position:relative; min-height:15px; color:#a0988a; font-size:9px; }
.wave-time span { position:absolute; left:var(--tick); transform:translateX(-50%); white-space:nowrap; }
.wave-time span:first-child { transform:none; }
.wave-time span:last-child { transform:translateX(-100%); }
.wave-guides { filter:drop-shadow(0 0 1px #111); }
#wave:has([data-d="boundary"]:hover) .boundary-grip { fill:var(--brand); }
.editvalues { min-height:22px; gap:3px; }
.editvalues .value { margin-left:5px; }
.reset, .reset:not(:disabled):hover { padding:0; background:transparent; }
#sv { font-size:17px; }
#stretch {
  appearance:none;
  width:100%;
  height:26px;
  margin:2px 0 0;
  background:transparent;
}
#stretch::-webkit-slider-runnable-track {
  height:6px;
  border-radius:4px;
  background:linear-gradient(to right,var(--action) var(--stretch-fill),var(--well) var(--stretch-fill));
}
#stretch::-moz-range-track {
  height:6px;
  border-radius:4px;
  background:linear-gradient(to right,var(--action) var(--stretch-fill),var(--well) var(--stretch-fill));
}
#stretch::-webkit-slider-thumb {
  appearance:none;
  width:15px;
  height:20px;
  margin-top:-7px;
  border:1px solid #9f7f55;
  border-radius:3px;
  background:linear-gradient(#e8d5b8,#a88a63);
  cursor:ew-resize;
}
#stretch::-moz-range-thumb {
  width:15px;
  height:20px;
  border:1px solid #9f7f55;
  border-radius:3px;
  background:linear-gradient(#e8d5b8,#a88a63);
}
#stretch:disabled::-webkit-slider-thumb { background:#50463b; border-color:#605548; cursor:default; }
#stretch:disabled::-moz-range-thumb { background:#50463b; border-color:#605548; }
#editor[data-mode="p"] { display:grid; grid-template-rows:minmax(0,1.24fr) repeat(3,minmax(0,1fr)); }
.track-panel { display:flex; flex-direction:column; gap:4px; min-height:0; padding:5px 8px; }
.track-panel[data-layer-track="full"] { background:#2b2520; box-shadow:inset 0 0 0 1px #564637; }
.track-panel[data-playing] { background:#33291e; box-shadow:inset 0 0 0 1px #ae8456; }
.track-header { justify-content:flex-start; }
.track-header .play { width:26px; height:20px; }
.track-panel .plot { flex:1; }
#editor[data-mode="g"], #editor[data-mode="r"] { display:grid; }
#editor[data-mode="g"] { grid-template-rows:95px 96px 62px 62px; }
#editor[data-mode="r"] {
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr)) 49px;
}
#editor > .fx-stage {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 7px 10px;
  background: linear-gradient(165deg, var(--panel-raised), var(--panel) 65%);
}

.fx-title {
  display: flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #41382e;
  padding-bottom: 4px;
}

.fx-title h2 {
  margin: 0;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .75px;
  line-height: 1;
  text-transform: uppercase;
}

.fx-title h2 span { color: var(--muted); }
.fx-segment, .fx-title-actions { display:flex; gap:3px; }
.fx-segment button, .fx-flat, .fx-open-eq { padding:2px 7px; font-size:10px; }
.fx-open-eq { background:#332a21; color:var(--amber-text); box-shadow:inset 0 0 0 1px #5c4932; }
.fx-segment button[aria-pressed="true"] {
  color: var(--amber-text);
  background: var(--amber-surface);
  box-shadow: inset 0 0 0 1px var(--amber-edge);
}

.fx-knobs {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 8px;
  align-items: stretch;
}

.fx-knob {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 4px;
  border-radius: 4px;
  touch-action: none;
  cursor: ns-resize;
}

.fx-knob:has(input:disabled) { cursor: default; opacity: .58; }
.fx-knob:focus-within { outline: 1px solid var(--amber-edge); }
.fx-knob input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }

.dial-face {
  --dial-size: 29px;
  position: relative;
  flex: none;
  width: var(--dial-size);
  height: var(--dial-size);
  border-radius: 50%;
  background: conic-gradient(from 225deg, #e7a351 var(--dial-angle), #4b3e32 var(--dial-angle) 270deg, transparent 270deg);
  filter: drop-shadow(0 2px 2px #100e0ccc);
}

.dial-face::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #675448;
  border-radius: 50%;
  background: linear-gradient(#51463c, #28221e 64%, #191612);
}

.dial-face::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(var(--amber-text), var(--amber-text)) 50% 1px / 2px 5px no-repeat;
  transform: rotate(calc(var(--dial-angle) - 135deg));
}

#editor[data-mode="g"] .dial-face { --dial-size: 27px; }
#editor[data-mode="g"] .fx-single-row .dial-face { --dial-size: 25px; }

.dial-copy { min-width: 0; display: grid; gap: 2px; font-size: 11px; line-height: 1.12; }
.dial-label { color: var(--soft); font-weight: 650; white-space: nowrap; }
.dial-copy output { color:var(--amber-text); font-size:10px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.fx-console { flex: 1; min-height: 0; display: grid; grid-template-columns: 194px minmax(0,1fr); grid-template-rows: minmax(0,1fr); gap: 10px; }
.fx-console-knobs { grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: repeat(2, minmax(0,1fr)); }
.eq-slot, .eq-detail-plot { display:grid; min-width:0; min-height:0; }
.eq-visual { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) 12px; gap: 2px; }
.eq-curve { display: block; width: 100%; height: 100%; min-height: 0; border: 1px solid #433830; border-radius: 5px; background: var(--wave-bg); touch-action: none; }
.eq-curve:not([aria-disabled="true"]) { cursor: crosshair; }
.eq-curve:focus-visible { outline: 1px solid var(--amber); }
.eq-axis { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 9px; }
.eq-readout { color: var(--amber-text); font-variant-numeric: tabular-nums; }
.eq-dialog {
  width:min(495px,calc(100% - 24px));
  max-height:calc(100dvh - 24px);
  padding:14px;
  border-color:#65513b;
  background:linear-gradient(145deg,#25201a,#191715);
  box-shadow:0 16px 50px #000b,inset 0 1px 0 #ffffff0b;
}
.eq-dialog-heading, .eq-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.eq-dialog-heading h2 { color:var(--text); font:700 17px "Space Grotesk",system-ui,sans-serif; }
.eq-detail-plot { height:clamp(138px,36dvh,270px); margin-block:12px; }
.eq-dialog .eq-visual { grid-template-rows:minmax(0,1fr) 20px; gap:5px; }
.eq-dialog .eq-axis { font-size:11px; }
.eq-done, .eq-actions button { min-height:36px; padding:0 12px; border:1px solid #4c4031; }
.eq-play { color:var(--amber-text); }
.eq-play[data-playing] { border-color:var(--amber); }

.gryd-knobs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.gryd-knobs .fx-knob { flex-direction: column; justify-content: center; gap: 7px; padding: 4px 0; text-align: center; }
.gryd-knobs .dial-face { --dial-size: 41px; }
.gryd-knobs .dial-face::after { inset: 5px; background-size: 2px 8px; }
.gryd-knobs .dial-copy { gap: 4px; }
#editor > .gryd-mono { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
.gryd-mono .fx-knobs { flex: 0 1 151px; grid-template-columns: 1fr; }
.gryd-mono .dial-face { --dial-size: 35px; }

#performance { display:flex; flex-direction:column; gap:4px; min-height:72px; }
.note-readout { display:flex; align-items:baseline; gap:6px; }
.keyboard { position:relative; height:48px; background:var(--wave-bg); border-radius:4px; overflow:hidden; }
.keyboard button {
  position:absolute;
  top:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:0 0 4px;
  border-radius:0 0 3px 3px;
  font-size:10px;
  outline-offset:-2px;
}
.keyboard .white {
  width:calc(100% / 7);
  height:100%;
  border-right:1px solid #191511;
  background:linear-gradient(#555044,#322d27);
}
.keyboard .black {
  width:calc(58% / 7);
  height:60%;
  z-index:1;
  color:var(--amber-text);
  background:linear-gradient(#302923,#161411);
  box-shadow:inset 0 0 0 1px #514536,0 2px 3px #000a;
}
.keyboard .chosen { color:var(--amber-text); background:var(--amber-surface); box-shadow:inset 0 0 0 1px var(--amber-edge); }
.keyboard button:disabled { opacity:1; color:var(--muted); }
.keyboard .white:disabled { background:linear-gradient(#38352f,#282521); }
.keyboard .black:disabled { background:linear-gradient(#2a241e,#151311); }
.keyboard .black:not(:disabled, .chosen):hover { background:linear-gradient(#42352b,#211a15); }
.keyboard .root::after { content:""; position:absolute; bottom:17px; left:calc(50% - 2px); width:4px; height:4px; border-radius:50%; background:var(--amber); }
.keyboard .black.root::after { bottom:auto; top:4px; }

.export {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:43px;
  padding:8px 12px;
  border:1px solid #4d4334;
  background:#25221e;
  color:var(--muted);
  text-align:start;
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
}
.export:disabled { opacity:1; }
.bottom-line { display:flex; align-items:center; gap:8px; min-height:16px; font-size:10px; color:var(--muted); }
.bottom-line a { color:var(--muted); text-decoration-color:#6a5a46; text-underline-offset:2px; }
.bottom-line a:hover { color:var(--amber-text); }
.export-status { flex:1; min-width:0; overflow-wrap:anywhere; }
#notice:not(:empty) + #sandboxHint { display:none; }
#recover { padding:0 3px; background:transparent; color:var(--amber-text); text-decoration:underline; }
.email-privacy { margin:6px 0 12px; color:var(--muted); font-size:12px; }

.privacy-page {
  width:min(680px,calc(100% - 24px));
  margin:clamp(12px,4vw,48px) auto;
  padding:clamp(18px,5vw,44px);
  background:var(--shell);
  border:1px solid var(--edge);
  border-radius:10px;
}
.privacy-back { display:inline-block; margin-bottom:24px; }
.privacy-copy { color:var(--soft); font-size:15px; line-height:1.6; overflow-wrap:anywhere; }
.privacy-copy h1,
.privacy-copy h2 { color:var(--text); font-family:"Space Grotesk",system-ui,sans-serif; }
.privacy-copy h1 { margin:0; font-size:clamp(28px,6vw,38px); line-height:1.15; }
.privacy-copy h2 { margin:0 0 6px; font-size:18px; line-height:1.35; }
.privacy-copy p { margin:0; }
.privacy-copy p + p { margin-top:12px; }
.privacy-copy .privacy-date { margin-top:6px; color:var(--muted); font-size:13px; }
.privacy-copy section { padding-top:18px; margin-top:20px; border-top:1px solid var(--edge); }
.privacy-page a,
.privacy-dialog a { text-underline-offset:3px; }

dialog {
  width:min(410px,calc(100% - 24px));
  color:var(--text);
  border:1px solid var(--edge);
  border-radius:8px;
  padding:18px;
  background:var(--shell);
}
dialog::backdrop { background:#000a; }
.privacy-dialog {
  width:min(680px,calc(100% - 24px));
  max-height:calc(100% - 24px);
  padding:clamp(16px,4vw,32px);
  overscroll-behavior:contain;
}
.privacy-dialog-actions { display:flex; justify-content:flex-end; margin:0 0 10px; }
.privacy-dialog-actions button { min-height:36px; padding:0 12px; }
.privacy-preview-note { color:var(--muted); margin:0 0 18px; }
dialog h2 { margin:0; font-size:18px; }
dialog label { display:grid; gap:6px; }
dialog input {
  color:var(--text);
  background:var(--well);
  border:1px solid var(--edge);
  border-radius:5px;
  padding:8px;
  font:inherit;
  font-size:16px;
  width:100%;
}
.dialogActions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.dialogActions button { padding:8px; min-height:34px; }
#continue { background:var(--action); color:var(--action-ink); font-weight:750; }
#gateMessage { color:var(--amber-text); min-height:16px; }
.otp { position:relative; height:43px; }
#codeRow label { margin-bottom:6px; }
#code { position:absolute; inset:0; padding:0; opacity:.01; }
#codeCells { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; height:100%; pointer-events:none; }
#codeCells span { display:grid; place-items:center; border:1px solid var(--edge); border-radius:5px; background:var(--well); font-size:18px; }
.otp:focus-within #codeCells span[data-active] { border-color:var(--amber); box-shadow:inset 0 0 0 1px var(--amber-edge); }
#table { overflow-wrap:anywhere; }
#table td { padding:4px; }
#xr:not(.tool) { margin:12px auto; }

@media (max-width:460px) {
  #xr { padding:9px; }
  #monitor { height:106px; }
  .module [role="tab"] { font-size:9px; letter-spacing:0; }
  .bypass { min-width:20px; margin-inline-end:2px; padding:0 2px; }
  .fx-flat-inline { display:none; }
  .fx-open-eq { min-height:23px; }
  .eq-done, .eq-actions button { min-height:42px; }
  #editor > .fx-stage { padding-inline:7px; }
  .fx-console { grid-template-columns:minmax(130px,.95fr) minmax(0,1fr); gap:5px; }
  .fx-knobs { column-gap:3px; }
  .fx-knob { gap:4px; padding-inline:1px; }
  #editor[data-mode="g"] .dial-face { --dial-size:22px; }
  .dial-label { font-size:10px; white-space:normal; line-height:1.05; }
  .gryd-knobs .dial-face { --dial-size:33px; }
}
@media (max-width:365px) {
  .module [role="tab"] { font-size:8px; }
  .module [aria-disabled="true"]::after { margin-inline-end:2px; }
  .bypass { min-width:18px; font-size:7px; }
  .dial-copy output { font-size:9px; }
  #editor { height:364px; }
  #editor[data-mode="g"] { grid-template-rows:123px 92px 67px 67px; }
  .fx-morph-knobs .fx-knob, .fx-single-row .fx-knob {
    flex-direction:column;
    justify-content:center;
    gap:2px;
    text-align:center;
  }
  .fx-morph-knobs .dial-copy, .fx-single-row .dial-copy { gap:1px; }
  .fx-console { grid-template-columns:132px minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) { .segments button,#tier::before,.module { transition:none; } }
