
    :root { color-scheme: dark; --bg:#10131d; --panel:#171b28; --line:#2b3040; --muted:#a3aabe; --ink:#f5f2eb; --gold:#f0c875; --white-key:#f7f4ed; --black-key:#232633; }
    * { box-sizing:border-box; }
    body { margin:0; min-height:100vh; color:var(--ink); background:radial-gradient(ellipse at 50% -15%,#263047 0%,#10131d 52%); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
    .shell { width:min(1160px,100%); margin:auto; padding:28px 30px 42px; }
    header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:30px; }
    .brand { display:flex; align-items:center; gap:12px; font-weight:700; letter-spacing:.02em; }
    .brand-mark { width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#161820;background:var(--gold);font-size:19px;box-shadow:0 5px 22px #f0c87535; }
    .eyebrow { color:var(--gold); font-size:.76rem; letter-spacing:.15em; text-transform:uppercase; font-weight:700; }
    .hero { text-align:center; max-width:760px; margin:22px auto 31px; }
    h1 { margin:9px 0 12px; font-size:clamp(2.2rem,5vw,4rem); letter-spacing:-.055em; line-height:1.04; }
    h1 span { color:var(--gold); }
    .intro { color:#b9c0ce; line-height:1.65; font-size:1.05rem; margin:0 auto; max-width:600px; }
    .studio { background:linear-gradient(160deg,#1a1f2d,#141823); border:1px solid #34394b; border-radius:22px; padding:22px; box-shadow:0 24px 70px #05070c72; }
    .controls { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-bottom:18px; }
    .readout { display:flex; align-items:center; gap:13px; min-width:180px; }
    .note-dot { width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:#292d3a;color:var(--gold);font-size:1.15rem;font-weight:800; }
    .readout small { display:block; color:var(--muted); font-size:.78rem; margin-bottom:3px; }
    .tools { display:flex;align-items:center;gap:18px; flex-wrap:wrap; }
    .volume { display:flex;align-items:center;gap:9px;color:#d8dce5;font-size:.88rem; }
    input[type=range] { width:100px;accent-color:var(--gold); }
    .toggle { display:flex;align-items:center;gap:9px;font-size:.88rem;color:#d8dce5;cursor:pointer; }
    .toggle input { accent-color:var(--gold);width:17px;height:17px; }
    .sound-hint { color:var(--muted);font-size:.81rem; }
    .keyboard-frame { overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-color:#565b6b #222633; scrollbar-width:thin; padding:8px 3px 14px; touch-action:pan-x; }
    .keyboard { height:clamp(200px,28vw,265px); min-width:900px; position:relative; display:flex; border-radius:0 0 9px 9px; border:1px solid #b9b8b4; background:#c7c5c0; box-shadow:0 11px 0 #090b11,0 17px 24px #07090d80; user-select:none; }
    .white-key { position:relative; flex:1 1 0; min-width:0; height:100%; border:0; border-right:1px solid #c7c5c0; border-radius:0 0 5px 5px; padding:0; background:linear-gradient(90deg,#e7e4dd 0%,#fffefa 18%,#f6f3ec 75%,#d9d7d0 100%); color:#777b84; cursor:pointer; touch-action:none; }
    .white-key:active,.white-key.active { background:linear-gradient(#dedbd4,#e8c77a); }
    .white-key.active.retrigger-gap { background:linear-gradient(90deg,#e7e4dd 0%,#fffefa 18%,#f6f3ec 75%,#d9d7d0 100%); }
    .white-key .key-name { position:absolute; bottom:10px; left:0; right:0; text-align:center; font-size:clamp(9px,.85vw,12px); font-weight:700; }
    .black-key { position:absolute; top:0; z-index:2; height:62%; width:1.12%; min-width:13px; max-width:19px; transform:translateX(-50%); border:1px solid #090b11; border-radius:0 0 5px 5px; padding:0; background:linear-gradient(90deg,#11131a,#292c37 55%,#090a0f); box-shadow:0 5px 5px #080a0e9c; color:#aeb3c0; cursor:pointer; touch-action:none; }
    .black-key:active,.black-key.active { background:linear-gradient(#413c32,#b39052); }
    .black-key.active.retrigger-gap { background:linear-gradient(90deg,#11131a,#292c37 55%,#090a0f); }
    .black-key .key-name { position:absolute; bottom:8px; left:0; right:0; font-size:9px; text-align:center; }
    .lower-bar { display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:22px;padding-top:16px;border-top:1px solid #303545;color:var(--muted);font-size:.84rem; }
    .score-panel { flex:none; height:clamp(232px,28vh,282px); min-height:0; margin:0 18px; padding:10px 12px 12px; border:1px solid #353b4d; border-radius:12px; background:linear-gradient(145deg,#1b2030,#131722); box-shadow:inset 0 1px #ffffff08; }
    .score-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:7px; color:#dfe2ea; font-size:.78rem; font-weight:700; letter-spacing:.04em; }
    .score-heading span:last-child { color:var(--muted); font-weight:500; letter-spacing:0; }
    .score-viewport { width:100%; height:calc(100% - 25px); padding-top:8px; overflow-x:auto; overflow-y:hidden; overscroll-behavior-inline:contain; scrollbar-color:#5b6070 #252a38; scrollbar-width:thin; border:1px solid #303648; border-radius:7px; background:#f7f6f1; color:#3b3d42; }
    .score-viewport, .score-viewport * { -webkit-user-select:none; user-select:none; }
    .score-viewport svg { -webkit-user-drag:none; }
    .score-canvas { position:relative; min-width:100%; min-height:100%; width:max-content; }
    .score-placeholder { min-width:100%; min-height:100%; display:grid; place-items:center; padding:12px; color:#7b7f89; font-size:.9rem; text-align:center; }
    #scoreCanvas .score-note-clickable { cursor:pointer; touch-action:none; }
    #scoreCanvas .score-loop-start { stroke:#2563eb !important; stroke-width:1.6px !important; filter:drop-shadow(0 0 2px #2563eb80); }
    #scoreCanvas .score-loop-end { stroke:#0f8a72 !important; stroke-width:1.6px !important; filter:drop-shadow(0 0 2px #0f8a7280); }
    .legend { display:flex;gap:8px;align-items:center; }
    kbd { border:1px solid #515768;border-bottom-width:2px;border-radius:5px;padding:2px 6px;color:#e5e7ed;background:#232735;font:inherit;font-size:.78rem; }
    .range-label { color:#d9dce4; }
    .footer { text-align:center;color:#777f91;font-size:.82rem;padding:25px 0 0; }
    @media(max-width:640px) { .shell{padding:18px 15px 30px} header{padding-bottom:16px}.hero{margin:20px auto 25px}.intro{font-size:.96rem}.studio{padding:16px 12px;border-radius:17px}.controls{align-items:flex-start}.tools{gap:12px;width:100%;justify-content:space-between}.keyboard{min-width:860px;height:210px}.sound-hint{width:100%}.lower-bar{font-size:.8rem} }
    @media(prefers-reduced-motion:no-preference) { .white-key,.black-key{transition:background .08s ease,transform .08s ease} .white-key.active{transform:translateY(2px)} }
  