/* style.css - the look of Captain Koro AI's Loop Studio.
 *
 * Koro Te Ao, 17 November 2026: "I want this all to be built nicely and profesionaly for koroai.org".
 * The studio is a room of koroai.org, so it wears the site's own clothes: the same nine colours in light and in
 * dark (whichever the visitor's own device is set to), the same plain system type, the same one teal accent,
 * rounded the same. Nothing here is decoration: colour is kept for what a player must see at a glance -
 * recording is red, waiting is amber, playing is the accent.
 *
 * Held to (Builder's School page 102): text 4.5:1 against what it sits on, large text and the edges of controls
 * 3:1 (WCAG 2.2, 1.4.3 and 1.4.11); nothing to press smaller than 24 px, and the things pressed while playing
 * 40 px or more (2.5.8); the page may be zoomed; movement stops for anyone who has asked their device for less.
 * tests/loop_studio/look.test.mjs reads the colours out of this file and checks every pair that carries text.
 */

:root {
  --bg: #ffffff;
  --side: #f9f9f9;
  --ink: #0d0d0d;
  --dim: #5d5d5d;
  --faint: #767676;
  --line: #e5e5e5;
  --edge: #8a8a8a;
  --bubble: #f1f1f1;
  --hover: #e7e7e7;
  --accent: #1f6f5f;
  --on-accent: #ffffff;
  --accent-soft: #e3f1ee;
  --danger: #b83227;
  --on-danger: #ffffff;
  --danger-soft: #fbe9e7;
  --wait: #8a5a00;
  --wait-soft: #fbf0d9;
  --well: #f4f4f4;
  --key-white: #ffffff;
  --key-black: #1c1c1c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 28px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #212121;
    --side: #171717;
    --ink: #ececec;
    --dim: #b4b4b4;
    --faint: #9a9a9a;
    --line: #383838;
    --edge: #7c7c7c;
    --bubble: #303030;
    --hover: #3a3a3a;
    --accent: #5fb3a1;
    --on-accent: #10231f;
    --accent-soft: #24403a;
    --danger: #ff7b6b;
    --on-danger: #2b0d09;
    --danger-soft: #4a211c;
    --wait: #e7b65c;
    --wait-soft: #3d2f12;
    --well: #1a1a1a;
    --key-white: #ececec;
    --key-black: #111111;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overscroll-behavior: none; }
body {
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  user-select: none;
  -webkit-user-select: none;
}
a { color: var(--accent); }
p { margin: 8px 0; }
h1 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h2 { margin: 0; font-size: 16px; font-weight: 600; padding: 14px 16px; display: flex; align-items: center; cursor: pointer; }
h2 small { color: var(--dim); font-size: 13px; font-weight: 400; margin-left: 8px; margin-right: auto; }
.small, .hint { color: var(--dim); font-size: 13px; }
.hint { user-select: text; -webkit-user-select: text; }

/* ------------------------------------------------------------ things to press */

button, select, input { font: inherit; color: inherit; }
button {
  border: 0;
  background: var(--bubble);
  border-radius: 10px;
  padding: 9px 14px;
  min-height: 40px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.12s;
}
button:hover { background: var(--hover); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: default; transform: none; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible, h2:focus-visible, .pad:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
select {
  background: var(--bubble);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  min-height: 40px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
select:hover { background: var(--hover); }
input[type=text] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 42px;
  user-select: text;
  -webkit-user-select: text;
}
input[type=text]::placeholder { color: var(--faint); }
input[type=range] { accent-color: var(--accent); cursor: pointer; }

.go { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.go:hover { background: var(--accent); filter: brightness(1.08); }
.plain { background: var(--bubble); }
.warn { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.warn:hover { background: var(--danger-soft); }
.sq { width: 40px; padding: 0; font-size: 20px; flex: none; }
.sq.wide { width: 58px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }

/* one choice of a few: the chosen one is lifted out of the well */
.seg { display: flex; background: var(--bubble); border-radius: 10px; padding: 3px; gap: 3px; flex: 1; min-width: 120px; }
.seg button { flex: 1; background: transparent; padding: 5px 6px; min-height: 34px; font-size: 13px; border-radius: 8px; color: var(--dim); }
.seg button:hover { background: var(--hover); color: var(--ink); }
.seg button.on { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--edge); }
.seg.locked { opacity: 0.5; }
.seg.locked button { cursor: default; }

/* ------------------------------------------------------------ the front door */

#gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 20px; }
.gate-card { width: 100%; max-width: 560px; user-select: text; -webkit-user-select: text; }
.gate-card .home { display: inline-flex; align-items: center; min-height: 32px; margin-bottom: 20px; font-size: 14px; text-decoration: none; }
.gate-card .home:hover { text-decoration: underline; }
.by { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; margin: 0 0 6px; }
.lede { font-size: 18px; color: var(--dim); margin: 12px 0 22px; max-width: 34em; }
.does { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.does li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.does svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.does b { display: block; font-weight: 600; }
.does span { color: var(--dim); font-size: 14px; }
.big { background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 17px; padding: 14px 26px; border-radius: 12px; min-height: 52px; }
.big:hover { background: var(--accent); filter: brightness(1.08); }
#gateNote { margin-top: 14px; }
.promise { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ------------------------------------------------------------ the studio */

#main { max-width: 680px; margin: 0 auto; padding: 0 12px 48px; }
#brand { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 2px 2px; font-size: 14px; }
#brand a { text-decoration: none; color: var(--dim); display: inline-flex; align-items: center; min-height: 32px; }
#brand a:hover { color: var(--ink); }
#brand b { font-weight: 600; font-size: 15px; }
#brand .sp { flex: 1; }
#top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-bottom: 4px; }
/* A phone on its side is a short window: a bar held at the top took half of it (Koro Te Ao's phone, 17 Nov 2026),
   so there the bar moves away with the page like everything else. */
@media (max-height: 520px) { #top { position: static; } }
#bar { display: flex; gap: 10px; align-items: center; padding: 10px 0 8px; }
.round { width: 56px; height: 56px; border-radius: 50%; padding: 0; background: var(--accent); color: var(--on-accent); flex: none; display: grid; place-items: center; }
.round:hover { background: var(--accent); filter: brightness(1.08); }
.round.on { background: var(--danger); color: var(--on-danger); }
.round svg { width: 22px; height: 22px; display: block; }
.tempo { display: flex; gap: 6px; align-items: center; flex: 1; }
.bpm { text-align: center; min-width: 58px; }
.bpm span { font-size: 26px; font-weight: 650; display: block; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.bpm small { color: var(--dim); font-size: 10px; letter-spacing: 0.12em; }
.meter { width: 10px; height: 52px; background: var(--bubble); border-radius: 5px; overflow: hidden; display: flex; align-items: flex-end; flex: none; }
.meter i { display: block; width: 100%; height: 0; background: var(--accent); }
.meter i.hot { background: var(--danger); }

#beats { display: flex; gap: 4px; margin: 2px 0 6px; }
#beats i { flex: 1; height: 6px; border-radius: 3px; background: var(--bubble); }
#beats i.bar { background: var(--line); box-shadow: inset 0 0 0 1px var(--edge); }
#beats i.now { background: var(--accent); box-shadow: none; }
#beats i.now.one { background: var(--ink); }
#loopBar { position: relative; height: 22px; background: var(--bubble); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
#loopFill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-soft); }
#loopText { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
#benchNote { background: var(--wait-soft); color: var(--wait); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }

.panel { background: var(--side); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; padding: 12px 14px; }
.panel.fold { padding: 0; }
.panel.fold .body { padding: 0 14px 14px; display: none; }
.panel.fold.open .body { display: block; }
.chev { width: 20px; height: 20px; flex: none; display: grid; place-items: center; color: var(--dim); }
.chev::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.fold.open .chev::after { transform: translateY(2px) rotate(-135deg); }
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.row label { color: var(--dim); font-size: 13px; min-width: 58px; }
.row label.r { min-width: 0; }
.row.one { flex-wrap: nowrap; }
.row.one .seg { min-width: 0; }
.row input[type=range] { flex: 1; min-width: 120px; height: 34px; }

/* ------------------------------------------------------------ a track */

.track { background: var(--side); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; padding: 12px; position: relative; overflow: hidden; }
.track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.track.play::before { background: var(--accent); }
.track.armed::before { background: var(--wait); }
.track.rec::before { background: var(--danger); }
.track .top { display: flex; gap: 12px; align-items: center; }
.recBtn { width: 72px; height: 72px; border-radius: 50%; flex: none; padding: 0; font-weight: 700; font-size: 14px; letter-spacing: 0.03em; line-height: 1.1; background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); font-variant-numeric: tabular-nums; }
.recBtn:hover { background: var(--danger-soft); filter: brightness(0.97); }
.track.play .recBtn { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.track.armed .recBtn { background: var(--wait-soft); color: var(--wait); box-shadow: inset 0 0 0 2px var(--wait); animation: pulse 0.6s infinite alternate; }
.track.rec .recBtn { background: var(--danger); color: var(--on-danger); box-shadow: none; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.55; } }
.track .mid { flex: 1; min-width: 0; }
.track .name { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); margin-bottom: 4px; }
.track .name span:first-child { color: var(--ink); font-weight: 600; }
.track canvas { width: 100%; height: 44px; background: var(--well); border-radius: 8px; display: block; }
.wave { position: relative; }
.wave .ph { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); display: none; }
.track .vol { width: 100%; height: 30px; margin-top: 4px; }
.track .btns { display: flex; gap: 6px; margin-top: 8px; }
.track .btns button { flex: 1; padding: 6px 2px; min-height: 38px; font-size: 13px; }
.track .btns button.on { background: var(--wait-soft); color: var(--wait); font-weight: 600; box-shadow: inset 0 0 0 1px var(--wait); }
.track .more { display: none; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.track.wide .more { display: block; }
.track .rev.go { background: var(--accent); color: var(--on-accent); }

/* ------------------------------------------------------------ the drum machine's grid */

#grid { overflow-x: auto; padding-bottom: 4px; }
.lane { display: flex; align-items: center; gap: 3px; margin: 3px 0; }
.lane b { width: 62px; flex: none; font-size: 12px; font-weight: 500; color: var(--dim); }
.lane i { flex: 1; min-width: 17px; height: 30px; border-radius: 5px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--edge); cursor: pointer; }
.lane i.beat { background: var(--hover); }
.lane i.on { background: var(--accent); box-shadow: none; }
.lane i.soft { background: var(--accent); opacity: 0.55; box-shadow: none; }
.lane i.at { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ------------------------------------------------------------ the drum kit, the keys, the slide pad */

#pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; touch-action: none; }
.pad { aspect-ratio: 1; border-radius: 14px; background: var(--bubble); box-shadow: inset 0 0 0 1px var(--edge), inset 0 -3px 0 rgba(0, 0, 0, 0.08); display: grid; place-items: center; align-content: center; gap: 2px; font-weight: 600; font-size: 13px; color: var(--ink); touch-action: none; cursor: pointer; }
.pad kbd, .key kbd { font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--faint); display: none; }
.pad.down { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.pad.down kbd { color: var(--on-accent); }

#keys { position: relative; height: 170px; touch-action: none; border-radius: 10px; overflow: hidden; background: var(--key-black); box-shadow: 0 0 0 1px var(--edge); }
.key { position: absolute; top: 0; bottom: 0; background: var(--key-white); border: 1px solid #9a9a9a; border-top: 0; border-radius: 0 0 7px 7px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; color: #5d5d5d; font-size: 11px; padding-bottom: 6px; touch-action: none; cursor: pointer; }
.key kbd { color: #767676; }
.key.black { background: var(--key-black); bottom: 40%; z-index: 2; border-color: #000; color: transparent; }
.key.black kbd { color: #b4b4b4; }
.key.down { background: var(--accent); color: var(--on-accent); }
.key.down kbd { color: var(--on-accent); }
.key.black.down { background: var(--accent); filter: brightness(0.8); }
#octVal { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* every stripe is a note; the finger's height is the tone (brighter toward the top) */
#slide { position: relative; height: 230px; border-radius: 14px; overflow: hidden; touch-action: none; display: flex; cursor: pointer; background: linear-gradient(0deg, var(--well) 0%, var(--bubble) 60%, var(--accent-soft) 100%); box-shadow: inset 0 0 0 1px var(--edge); }
#slide .stripe { flex: 1; border-right: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font-size: 11px; color: var(--dim); pointer-events: none; }
#slide .stripe:last-child { border-right: 0; }
#slide .stripe.root { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
#slide .stripe.on { background: var(--accent); color: var(--on-accent); }
#slide .mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--accent); opacity: 0.6; pointer-events: none; }
#slide .mark span { position: absolute; bottom: 6px; left: 4px; font-size: 11px; color: var(--accent); font-weight: 700; }
#slide .dot { position: absolute; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 25%, transparent); pointer-events: none; }

.recHere { flex: 1; }
.recHere.busy { background: var(--danger); color: var(--on-danger); }
.recHere.busy:hover { background: var(--danger); }
.keysHint { display: none; }

/* ------------------------------------------------------------ the song */

#keptList .kept { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
#keptList .kept .what { flex: 1; min-width: 0; }
#keptList .kept .what b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#keptList .kept .what span { color: var(--dim); font-size: 12px; }
#keptList .kept button { min-height: 38px; padding: 6px 12px; }
#keptList .kept button.sure { background: var(--danger); color: var(--on-danger); }
#songNote:empty { display: none; }
#calOut { color: var(--dim); font-size: 13px; }
#latVal { font-variant-numeric: tabular-nums; font-weight: 600; }

#toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 460px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 20;
  font-weight: 500;
  text-align: center;
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------------ on a phone: the instrument being recorded sits under the fingers */

@media (max-width: 979px) {
  body[data-dock="pads"] #padPanel, body[data-dock="keys"] #keyPanel, body[data-dock="slide"] #slidePanel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; margin: 0 auto; max-width: 680px; border-radius: 16px 16px 0 0; box-shadow: var(--shadow); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body[data-dock="pads"] #padPanel .hint, body[data-dock="keys"] #keyPanel .hint, body[data-dock="slide"] #slidePanel .hint { display: none; }
  body[data-dock="pads"] #padPanel h2, body[data-dock="keys"] #keyPanel h2, body[data-dock="slide"] #slidePanel h2 { padding: 10px 16px; }
  body[data-dock="pads"] #main { padding-bottom: 330px; }
  body[data-dock="keys"] #main { padding-bottom: 360px; }
  body[data-dock="slide"] #main { padding-bottom: 470px; }
  body[data-dock="slide"] #slide { height: 200px; }
  body[data-dock="pads"] .pad { aspect-ratio: 1.25; }
  body[data-dock="pads"] #toast, body[data-dock="keys"] #toast, body[data-dock="slide"] #toast { bottom: auto; top: 120px; }
}
/* a phone on its side has no room for a docked instrument above the tracks: there it stays in the page */
@media (max-width: 979px) and (max-height: 520px) {
  body[data-dock] #padPanel, body[data-dock] #keyPanel, body[data-dock] #slidePanel { position: static; box-shadow: none; border-radius: 14px; margin: 10px 0; }
  body[data-dock] #main { padding-bottom: 48px; }
}

/* ------------------------------------------------------------ on a laptop: tracks on the left, instruments on the right */

@media (min-width: 980px) {
  #main { max-width: 1240px; padding: 0 24px 64px; }
  /* left: the song - its settings, its tracks, then finishing it. right: the instruments, all the way down */
  #cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "a b" "c b"; grid-template-rows: auto 1fr; column-gap: 24px; align-items: start; }
  #colA { grid-area: a; }
  #colB { grid-area: b; }
  #colC { grid-area: c; }
  #colA > :first-child, #colB > :first-child { margin-top: 10px; }
  #colC > :first-child { margin-top: 0; }
  #bar { padding-top: 12px; }
  .panel, .track { margin: 12px 0; }
  .keysHint { display: block; }
  #keys { height: 190px; }
  #slide { height: 260px; }
  #pads { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  #pads .pad { min-width: 0; padding: 6px 2px; }
}
/* a keyboard under the hands (app.js says so): each pad and key shows the letter that plays it */
body.keyboard .pad kbd, body.keyboard .key kbd { display: block; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* A studio within the shared creative workspace. */
#gate{display:block;min-height:100dvh;padding:24px clamp(18px,4vw,56px) 32px}
.entry-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1160px;margin:0 auto 36px;font-size:12px;color:var(--dim)}
.entry-nav a{font-size:13px;text-decoration:none;padding-block:6px;min-height:36px;display:inline-flex;align-items:center}
.entry-private::before{content:"";display:inline-block;width:6px;height:6px;background:var(--accent);border-radius:50%;margin-right:7px}
.gate-card{max-width:1160px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px 60px;margin:0 auto;align-items:start}
.gate-intro{padding-top:22px;position:sticky;top:28px}
.gate-intro .by{font-size:10px;letter-spacing:.13em;margin:0 0 22px}
.gate-intro h1{font-size:clamp(40px,5.3vw,68px);line-height:1.03;font-weight:650;letter-spacing:-.055em}
.gate-intro .lede{font-size:17px;line-height:1.7;max-width:380px;margin:24px 0}
.studio-specs{display:flex;gap:22px;margin:26px 0 32px;color:var(--dim);font-size:11px}
.studio-specs span{display:flex;flex-direction:column;gap:3px}.studio-specs b{font-size:20px;letter-spacing:-.02em;font-weight:600;color:var(--ink)}
.gate-intro .big{display:inline-flex;align-items:center;gap:28px;font-size:14px;min-height:50px;padding:12px 20px;border-radius:10px}
#gateNote{max-width:340px;font-size:12px;line-height:1.6;margin:14px 0}.entry-tip{font-size:12px;color:var(--dim);margin-top:22px}
.loop-preview{border:1px solid var(--line);border-radius:18px;background:var(--side);padding:20px;margin-bottom:18px}
.preview-heading{display:flex;justify-content:space-between;gap:8px;font-size:9px;letter-spacing:.12em;color:var(--dim);font-weight:650;margin-bottom:18px}
.preview-lane{display:flex;align-items:center;gap:10px;margin:6px 0;color:var(--accent)}.preview-lane>span{font-size:9px;color:var(--dim);font-variant-numeric:tabular-nums}
.preview-lane>div{flex:1;min-width:0;display:flex;align-items:center;gap:14px;background:var(--accent-soft);border-radius:5px;padding:5px 10px}
.preview-lane b{font-size:9px;font-weight:550;min-width:92px}.preview-lane svg{display:block;flex:1;min-width:0;width:100%;height:26px;fill:currentColor;opacity:.7}
.preview-lane:last-child>div{background:var(--bubble);color:var(--dim)}.preview-foot{display:flex;justify-content:space-between;margin-top:16px;padding-top:12px;border-top:1px solid var(--line);font-size:10px;color:var(--dim)}
.studio-lesson{padding:22px;border:1px solid var(--line);border-radius:16px;background:var(--bg);user-select:text}
.lesson-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}.lesson-heading .by{font-size:10px;letter-spacing:.12em;margin:0}.lesson-heading [data-lesson-count]{font-size:11px;color:var(--dim)}
.studio-lesson h2{font-size:22px;line-height:1.25;letter-spacing:-.025em;padding:0;display:block;margin:0 0 10px;cursor:default}
.studio-lesson [data-lesson-copy]{font-size:13px;color:var(--dim);line-height:1.65;min-height:84px}
.lesson-example{padding:12px;margin:14px 0;border:1px solid var(--line);border-radius:8px;background:var(--side);font-size:12px;line-height:1.6;color:var(--accent);font-weight:550}
.studio-lesson .hint{font-size:11px;line-height:1.65;min-height:54px}.lesson-nav{display:flex;justify-content:space-between;gap:10px;margin-top:18px}.lesson-nav button{min-width:76px;font-size:12px}
.studio-capabilities{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px;border-top:1px solid var(--line);padding-top:28px}
.cap-number{font-size:10px;letter-spacing:.12em;color:var(--accent);font-weight:650}.studio-capabilities h2{display:block;font-size:16px;letter-spacing:-.015em;padding:0;margin:10px 0 8px;cursor:default}.studio-capabilities p{font-size:13px;color:var(--dim);line-height:1.65;margin:0}
.gate-card>.promise{grid-column:1/-1;margin:0;padding-top:20px;font-size:11px;line-height:1.7}.promise a{white-space:nowrap}
.embedded #gateHome,.embedded #brandHome{display:none}.embedded .entry-nav{justify-content:flex-end;margin-bottom:16px}.embedded #gate{min-height:0}
#brand{padding:24px 0 16px;align-items:center;justify-content:space-between;gap:18px;border:0;margin:0}
.studio-title .by{font-size:9px;letter-spacing:.14em;margin:0 0 8px}.studio-title h1{font-size:30px;letter-spacing:-.035em}.studio-title>p:last-child{font-size:12px;color:var(--dim);margin:6px 0 0}#brandHome{font-size:12px;margin-bottom:16px}
#studioGuideOpen{font-size:12px;white-space:nowrap;border:1px solid var(--line);background:var(--bg)}
.studio-sections{display:flex;gap:4px;border-bottom:1px solid var(--line);padding:0 0 12px;overflow-x:auto}.studio-sections button{background:transparent;border-radius:8px;font-size:12px;min-height:38px;white-space:nowrap;color:var(--dim);padding:6px 12px}.studio-sections button:hover{background:var(--accent-soft);color:var(--accent)}
#top{padding:4px 0 10px;border-bottom:1px solid var(--line);margin-bottom:18px}.session-state{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:12px;color:var(--dim)}.session-state .by{font-size:9px;letter-spacing:.12em;margin:0}.tempo{flex:none}
.section-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:6px 0}.section-label h2{padding:0;font-size:13px;letter-spacing:-.01em;cursor:default}.section-label span{font-size:10px;color:var(--dim)}
.panel,.track{border-radius:12px}.track{background:var(--bg)}.track .recBtn{width:60px;height:60px;font-size:12px}.track .btns button{font-size:11px}.track canvas{height:40px}.panel.fold h2{font-size:14px}.panel.fold h2 small{font-size:11px}
#tracks,#drumPanel,#padPanel,#keyPanel,#slidePanel,#songPanel,#setupPanel{scroll-margin-top:160px}
#studioGuideDialog{width:min(520px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:var(--shadow)}
#studioGuideDialog::backdrop{background:#101b1999}.lesson-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;margin-bottom:16px}#studioGuideDialog .studio-lesson{padding:18px}
@media(min-width:980px){#main{max-width:1400px;padding-inline:32px}#cols{column-gap:24px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}#bar{padding:12px 0}.panel,.track{margin:10px 0}#colC{padding-top:6px}}
@media(max-width:979px){.gate-card{gap:30px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.preview-lane b{min-width:70px;font-size:8px}.studio-capabilities{gap:22px}.gate-intro h1{font-size:48px}.session-state{font-size:11px}}
@media(max-width:760px){#gate{padding:18px}.entry-nav{margin-bottom:18px}.entry-private{font-size:10px}.gate-card{display:block;max-width:560px}.gate-intro{position:static;padding-top:4px}.gate-intro .by{margin-bottom:16px}.gate-intro h1{font-size:48px}.gate-intro .lede{font-size:15px;margin:18px 0;max-width:400px}.studio-specs{margin:20px 0;gap:28px}.studio-specs b{font-size:18px}.entry-tip{margin:16px 0 22px}.entry-preview{margin:0 0 26px}.loop-preview{display:none}.studio-lesson{padding:18px}.studio-lesson [data-lesson-copy],.studio-lesson .hint{min-height:0}.studio-capabilities{grid-template-columns:1fr;gap:22px;padding:24px 0}.studio-capabilities h2{margin-top:6px}.gate-card>.promise{padding-top:18px}.studio-title h1{font-size:26px}.studio-title>p:last-child{font-size:11px}.session-state{display:none}.tempo{flex:1}.section-label span{font-size:10px}#brand{padding-top:18px}.studio-sections{gap:0}.studio-sections button{padding-inline:10px}}
@media(max-width:360px){.entry-private{display:none}.gate-intro h1{font-size:42px}.studio-specs{gap:22px}.panel.fold h2 small{max-width:115px;line-height:1.4}.section-label{flex-wrap:wrap}.track .btns{gap:4px}}
@media(max-height:520px){.gate-intro{position:static}#top{position:static}#tracks,#drumPanel,#keyPanel,#slidePanel,#songPanel,#setupPanel{scroll-margin-top:12px}}
