
:root{
  --bg:#0a0e13;
  --bg2:#111823;
  --panel:#121a24;
  --panel-2:#0e141d;
  --line:rgba(255,255,255,.1);
  --soft-line:rgba(255,255,255,.06);
  --text:#eef2f6;
  --muted:#95a4b6;
  --gold:#d8b178;
  --gold-2:#f0d7a7;
  --accent:rgba(226,188,125,.22);
  --white-width:49px;
  --black-width:31px;
  --black-height:60%;
  color-scheme:dark;
  font-family:Inter,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:radial-gradient(circle at top, #1a2432 0, #0a0e13 38%, #090d12 100%);color:var(--text);font-size:14px;line-height:1.6;overflow-x:hidden}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible,.overview:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.page-glow{position:fixed;pointer-events:none;inset:-10vh 0 auto;left:50%;transform:translateX(-50%);width:min(1200px,100vw);height:420px;background:radial-gradient(circle, rgba(89,113,141,.20), transparent 68%);z-index:-1}
.site-header{max-width:1280px;margin:auto;padding:18px 26px 10px;display:flex;justify-content:space-between;align-items:center;gap:16px}
.brand{display:flex;align-items:center;gap:12px}
.brand-mark{height:34px;width:34px;border-radius:9px;display:flex;align-items:stretch;gap:2px;padding:6px;background:linear-gradient(180deg,#f1d8aa,#c59b60);box-shadow:0 4px 14px rgba(0,0,0,.28)}
.brand-mark i{background:#fffaf1;border-radius:1px;flex:1}
.brand-mark i:nth-child(2),.brand-mark i:nth-child(4){background:#18202a;height:65%;align-self:flex-end;z-index:1}
.brand-name{display:block;font-size:15px;font-weight:700;letter-spacing:.12em;line-height:1.05}
.brand-name strong{color:var(--gold-2)}
.brand-name small{display:block;margin-top:5px;color:#8c9caf;font-size:8px;letter-spacing:.18em}
.header-right{display:flex;align-items:center;gap:18px}
.header-tag{font-size:10px;letter-spacing:.16em;color:#a8b7c7;font-weight:700}
.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#88d7a9;margin-right:7px;box-shadow:0 0 10px rgba(136,215,169,.85)}
.mini-link{font-size:12px;color:#bdcad6}
.mini-link:hover{color:var(--gold-2)}
main{padding:0 18px}
.studio{max-width:1280px;margin:0 auto 68px;padding:16px 18px 18px;border-radius:20px;background:linear-gradient(180deg,rgba(24,34,48,.94),rgba(10,15,22,.98));border:1px solid rgba(255,255,255,.08);box-shadow:0 20px 60px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.03)}
.compact-intro{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;padding:6px 6px 14px}
.compact-kicker{margin:0 0 4px;font-size:10px;letter-spacing:.22em;color:#abbbcb;font-weight:700}
.compact-title{margin:0;font-size:clamp(22px,2.2vw,28px);line-height:1.1}
.compact-sub{margin:6px 0 0;color:var(--muted);font-size:12px}
.compact-tags{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.compact-tags span{padding:5px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.035);color:#c0ceda;font-size:11px}
.studio-top{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 6px 12px}
.studio-label{display:flex;align-items:center;gap:12px;min-width:0}
.studio-label-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:rgba(216,177,120,.11);border:1px solid rgba(216,177,120,.22);font-size:18px;color:var(--gold-2);flex:0 0 auto}
.studio-label strong{display:block;font-size:11px;letter-spacing:.18em}
.studio-label span:last-child{display:block;font-size:10px;color:#9cb0c2;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:340px}
.studio-buttons{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.small-button,.quick-practice,.action-button,.toggle-button,.gold-button,.demo-button{border-radius:10px;border:1px solid rgba(255,255,255,.1);background:linear-gradient(180deg,#27384b,#1a2430);color:#eaf0f5;min-height:38px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.small-button:hover,.action-button:not(:disabled):hover,.toggle-button:hover,.gold-button:hover,.demo-button:hover,.quick-practice:hover{border-color:rgba(240,215,167,.4)}
.quick-practice{background:linear-gradient(135deg,#f1d39d,#d3a260);color:#241b14;font-weight:800;border:none}
.visual-panel{position:relative;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(180deg,#0b1018,#0f151e);overflow:hidden;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.roll-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:14px 16px 10px;border-bottom:1px solid rgba(255,255,255,.04)}
.note-hud{display:flex;flex-direction:column;gap:2px;min-width:0}
.hud-caption{font-size:10px;letter-spacing:.2em;color:#8fa1b4;font-weight:700}
.note-hud strong{font-size:25px;line-height:1.15;color:#f6e8d1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(40vw,340px)}
.note-hud #detected-chord{font-size:12px;color:#c6d2dd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(60vw,480px)}
.visual-meta{font-size:10px;letter-spacing:.15em;color:#768ba1;display:flex;gap:8px;align-items:center;padding-top:4px;white-space:nowrap}
.signal-icon{color:#92cfb2;font-size:14px}
.roll-viewport{height:230px;overflow:hidden;position:relative;background:
  linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.01)),
  repeating-linear-gradient(to right, rgba(255,255,255,.06) 0 1px, transparent 1px calc(var(--white-width))),
  linear-gradient(180deg,#0a0f16,#0e131b 40%,#10161f)}
.roll-viewport::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 46px);pointer-events:none}
.roll-track{position:relative;height:100%;width:max-content;min-width:100%}
.roll-bar{position:absolute;top:0;border-radius:12px 12px 0 0;background:linear-gradient(180deg,rgba(247,214,160,.92),rgba(220,168,88,.76));border:1px solid rgba(255,244,218,.36);box-shadow:0 0 18px rgba(226,188,125,.24), inset 0 1px 0 rgba(255,255,255,.28);pointer-events:none;will-change:top,height}
.roll-bar.black{background:linear-gradient(180deg,rgba(255,232,190,.96),rgba(214,160,78,.82));border-color:rgba(255,236,204,.42);box-shadow:0 0 18px rgba(226,188,125,.28), inset 0 1px 0 rgba(255,255,255,.35)}
.roll-bar.released{transition:none}
.practice-key-tip{display:flex;align-items:center;gap:12px;margin:10px 0 0;padding:10px 14px;border-radius:10px;background:rgba(216,177,120,.14);border:1px solid rgba(216,177,120,.22)}
.practice-key-tip[hidden]{display:none}
.practice-key-tip span{font-size:10px;letter-spacing:.14em;color:#eccd98}
.practice-key-tip strong{font-size:12px;color:#fff5e4}
.piano-surround{margin-top:10px;padding:12px 12px 10px;border-radius:16px;background:linear-gradient(180deg,#1a2028,#141920);border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.piano-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px}
.piano-nav-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.instrument-badge{font-size:10px;letter-spacing:.16em;color:#efcf9c;font-weight:800}
#range-label{font-size:11px;color:#a8bac9}
.octave-nav{display:flex;align-items:center;gap:10px;font-size:11px;color:#9db0c1}
.octave-nav button,.tiny-step{background:linear-gradient(180deg,#2c3e51,#1c2834);border:1px solid rgba(255,255,255,.12);color:#e4ebf2;border-radius:8px;min-width:34px;height:30px;display:grid;place-items:center}
.keyboard-viewport{height:295px;overflow-x:auto;overflow-y:hidden;border-radius:10px 10px 12px 12px;background:#101215;border:1px solid rgba(0,0,0,.75);box-shadow:inset 0 4px 16px rgba(0,0,0,.45), 0 10px 20px rgba(0,0,0,.25);position:relative;scrollbar-color:#64758a transparent;scrollbar-width:thin}
.keyboard{display:flex;position:relative;height:100%;width:max-content;--white-width:49px;--black-width:31px;user-select:none;-webkit-user-select:none}
.piano-key{position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none}
.white-key{height:100%;flex:0 0 var(--white-width);width:var(--white-width);background:linear-gradient(90deg,#d8d7d3 0%, #fcfcfa 10%, #fffefc 35%, #faf8f4 75%, #d5d0ca 100%);border-right:1px solid #b2afa8;border-left:1px solid #f5f4f1;border-bottom:8px solid #b8b2a8;border-radius:0 0 8px 8px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.24), inset -6px 0 10px rgba(0,0,0,.06), inset 0 -16px 24px rgba(0,0,0,.06);color:#62615f}
.white-key::before{content:"";position:absolute;left:3px;right:3px;top:0;height:14px;background:linear-gradient(180deg,rgba(255,255,255,.3),transparent);border-radius:0 0 8px 8px;pointer-events:none}
.white-key.active{background:linear-gradient(180deg,#fff1d7,#f7d39a 48%,#e7b76d 100%);border-bottom-color:#b67c36;box-shadow:inset 0 0 0 1px rgba(255,255,255,.28), inset 0 -14px 18px rgba(185,119,32,.25), 0 0 18px rgba(226,188,125,.18)}
.black-key{z-index:3;position:absolute;top:0;left:var(--left);height:var(--black-height);width:var(--black-width);background:linear-gradient(90deg,#020406 0%,#3b434b 18%,#10151a 45%,#06090d 100%);border:1px solid #0b0f14;border-bottom:10px solid #010204;border-radius:0 0 8px 8px;box-shadow:2px 6px 8px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.11), inset 0 -10px 14px rgba(0,0,0,.4);color:#d0d6dd}
.black-key::before{content:"";position:absolute;left:5px;right:5px;top:0;height:10px;background:linear-gradient(180deg,rgba(255,255,255,.18),transparent)}
.black-key.active{background:linear-gradient(180deg,#fff2de,#f2d3a2 36%,#c9954e 100%);border-color:#d8b07a;border-bottom-color:#986537;box-shadow:0 0 16px rgba(226,188,125,.24), 2px 6px 8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.35)}
.key-name{font-size:10px;line-height:1;margin-bottom:18px;font-weight:700;opacity:.8;pointer-events:none}
.white-key .key-name{color:#605e59}
.black-key .key-name{color:#d4dbe4;font-size:9px;margin-bottom:9px}
.key-letter{font-size:11px;color:#826238;background:#e6d6c0;border:1px solid #cfbea7;border-radius:5px;min-width:21px;height:20px;padding:0 4px;line-height:18px;text-align:center;margin-bottom:12px;box-shadow:0 2px 4px rgba(0,0,0,.08);pointer-events:none}
.black-key .key-letter{background:#2a2f36;color:#edf3fa;border-color:#57616f;margin-bottom:8px}
.key-c-label{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-size:11px;font-weight:700;color:#b5b3b0;pointer-events:none}
.keyboard-under{margin-top:12px}
.map-wrap{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;color:#91a6b8;font-size:10px;font-weight:700;letter-spacing:.14em}
.overview{position:relative;height:54px;border-radius:10px;background:linear-gradient(180deg,#1a2330,#0f151d);border:1px solid rgba(255,255,255,.08);overflow:hidden;cursor:pointer}
.overview-board{position:absolute;inset:0}
.overview-white,.overview-black{position:absolute;bottom:0}
.overview-white{height:100%;background:linear-gradient(180deg,#d9d9d6,#f6f6f4 12%,#eceae6 90%,#c8c3ba);border-right:1px solid rgba(0,0,0,.13)}
.overview-black{height:60%;background:linear-gradient(180deg,#14191f,#303843 24%,#0a0d11 100%);border-radius:0 0 3px 3px;z-index:2}
.overview-dim{position:absolute;top:0;bottom:0;background:rgba(15,19,26,.68);z-index:4;pointer-events:none;box-shadow:inset 0 0 18px rgba(0,0,0,.10)}
.overview-window{position:absolute;top:0;bottom:0;z-index:5;border-left:3px solid rgba(246,245,238,.96);border-right:3px solid rgba(246,245,238,.96);background:transparent;box-shadow:0 0 0 1px rgba(0,0,0,.22);pointer-events:none}
.overview-grip{position:absolute;top:50%;width:4px;height:19px;transform:translateY(-50%);border-radius:6px;background:#25313b;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.overview-grip-left{left:-3px}.overview-grip-right{right:-3px}
.keyboard-under p{margin:10px 0 0;color:#8ea2b4;font-size:11px}
.control-area{padding-top:15px}
.control-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.primary-controls{padding-bottom:12px;border-bottom:1px solid var(--line)}
.secondary-controls{padding-top:12px}
.control-cluster{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.control-label{font-size:10px;letter-spacing:.16em;color:#95a8b9;font-weight:700}
.inline-select{min-height:38px;min-width:132px;border-radius:10px;background:#1b2430;border:1px solid rgba(255,255,255,.12);color:#eef2f6;padding:0 12px}
.volume-wrap{display:flex;align-items:center;gap:8px;color:#a8b8c6;font-size:12px}
.volume-wrap input{accent-color:#e1bc7c;width:112px}
.volume-wrap output{min-width:34px;font-size:11px;color:#d6dee7}
.toggle-button[aria-pressed="true"]{background:linear-gradient(180deg,#4b3722,#33261b);border-color:#a27b48;color:#fde9c9}
.toggle-led,.metro-led,.record-dot{width:8px;height:8px;border-radius:50%}
.toggle-led{background:#7b8b99}
.toggle-button[aria-pressed="true"] .toggle-led{background:#f0cb8d;box-shadow:0 0 10px rgba(240,203,141,.7)}
.key-hint{font-size:10px;padding:1px 5px;border-radius:4px;border:1px solid rgba(255,255,255,.14);color:#a4b4c3}
.record-group,.metronome-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.record-button{background:linear-gradient(180deg,#60333d,#45242d);border-color:#8e5061;color:#ffe2e3}
.record-button.recording{background:linear-gradient(180deg,#9d3548,#742637);border-color:#ff93a3}
.record-dot{background:#ff9aa6}.recording .record-dot{animation:pulse 1s infinite;background:#fff}
.record-time{min-width:40px;font-variant-numeric:tabular-nums;color:#c4cfda}
.metro-on .metro-led{background:#f0cb8d;box-shadow:0 0 8px rgba(240,203,141,.8)}
.metro-led{background:#6f8294}
.metronome-group output{width:34px;text-align:right;font-variant-numeric:tabular-nums}
.bpm-unit{font-size:10px;color:#93a6b8}
.studio-footnote{display:flex;align-items:center;gap:8px;padding-top:10px;color:#9fb0bf;font-size:11px;flex-wrap:wrap}
.footnote-right{margin-left:auto;color:#718599}
.practice-section,.guide{max-width:1160px;margin:0 auto 78px;padding:0 8px}
.section-kicker{font-size:10px;letter-spacing:.2em;color:#aebfce;font-weight:700}
.section-title-row,.guide-heading{text-align:center}
.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:20px;text-align:left}
.section-title-row h2,.guide-heading h2{font-size:clamp(24px,2.8vw,32px);margin:8px 0 10px;line-height:1.25}
.section-title-row p,.guide-heading p{margin:0;color:#98a7b8}
.practice-illustration{font-size:72px;color:rgba(216,177,120,.18);line-height:1}
.practice-panel{margin-top:22px;padding:22px 24px;border-radius:16px;background:linear-gradient(180deg,#16212f,#101720);border:1px solid rgba(255,255,255,.08);display:flex;justify-content:space-between;gap:18px;align-items:center}
.practice-left{display:flex;align-items:center;gap:16px}.practice-icon{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;background:rgba(216,177,120,.14);border:1px solid rgba(216,177,120,.24);color:#efcf9c;font-size:24px}.practice-left p{margin:4px 0 0;color:#95a5b5;font-size:11px}.practice-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.practice-actions select{min-height:40px;padding:0 12px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#1b2430;color:#eef2f6;min-width:150px}
.gold-button{background:linear-gradient(135deg,#f1d39d,#d3a260);color:#241b14;font-weight:800;border:none;padding:0 18px}
.demo-button{padding:0 16px}
.practice-progress{margin-top:12px;padding:18px 20px;border-radius:14px;background:#111923;border:1px solid rgba(255,255,255,.08)}
.practice-progress-head{display:flex;justify-content:space-between;gap:12px;color:#efd1a1;font-weight:700;font-size:13px}
.progress-track{height:6px;border-radius:999px;background:#334252;overflow:hidden;margin:12px 0}.progress-track>div{height:100%;width:0;background:#efca8c;transition:width .18s}.practice-progress p{margin:0;color:#94a4b4;font-size:11px}
.guide-heading{margin-bottom:26px}.guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.guide-card{padding:24px;border-radius:16px;background:linear-gradient(180deg,#16212f,#101720);border:1px solid rgba(255,255,255,.08)}
.guide-icon{font-size:28px;color:#e7c38b}.guide-card h3{margin:14px 0 8px;font-size:16px}.guide-card p{margin:0;color:#96a6b6;font-size:12px;line-height:1.8}.guide-card kbd{display:inline-block;padding:1px 4px;border-radius:4px;background:#273347;border:1px solid #40506a;color:#ead09e}
.footer{margin-top:30px;background:#070b10;border-top:1px solid rgba(255,255,255,.08);padding:34px max(22px,calc((100% - 1180px)/2)) 20px}.footer-main{display:flex;justify-content:space-between;gap:18px}.footer-brand{display:flex;flex-direction:column}.footer-brand strong{letter-spacing:.18em;font-size:14px}.footer-brand span{font-size:9px;color:#b09065;letter-spacing:.14em}.footer-main p{margin:0;color:#7f92a5;font-size:11px}.footer-bottom{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid rgba(255,255,255,.08);margin-top:24px;padding-top:15px;color:#6d7f90;font-size:10px}.footer-bottom a,.source-credit a{text-decoration:underline;text-underline-offset:2px}.source-credit{max-width:1180px;margin:14px auto 0;color:#93a3b4;font-size:10px;line-height:1.75}.dot-sep{padding:0 5px}.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);background:#1b2430;border:1px solid rgba(240,215,167,.5);color:#fff3da;border-radius:10px;padding:11px 16px;box-shadow:0 12px 28px rgba(0,0,0,.38);font-size:12px;opacity:0;pointer-events:none;transition:.2s;max-width:calc(100% - 24px);text-align:center;z-index:50}.toast.show{opacity:1;transform:translate(-50%,0)}
.studio:fullscreen{max-width:none;border-radius:0;margin:0;min-height:100vh}.studio:fullscreen .keyboard-viewport{height:min(38vh,360px)}
@keyframes pulse{50%{opacity:.35;transform:scale(.82)}}
@media (max-width:980px){
  .compact-intro{align-items:flex-start;flex-direction:column}
  .section-title-row{flex-direction:column;align-items:flex-start}
  .guide-grid{grid-template-columns:1fr}
  .practice-panel{flex-direction:column;align-items:stretch}
}
@media (max-width:700px){
  :root{--white-width:40px;--black-width:26px}
  .site-header{padding:14px 14px 10px}
  .header-tag{display:none}
  main{padding:0 8px}
  .studio{padding:12px 10px 14px;border-radius:16px;margin-bottom:54px}
  .compact-intro{padding:0 2px 10px}
  .compact-title{font-size:22px}
  .compact-sub{font-size:11px}
  .compact-tags span{font-size:10px;padding:4px 8px}
  .studio-top{padding:2px 2px 10px;align-items:flex-start;flex-direction:column}
  .studio-label span:last-child{max-width:100%}
  .studio-buttons{width:100%;justify-content:flex-start}
  .small-button,.quick-practice{min-height:34px;font-size:10px;padding:0 10px}
  .roll-head{padding:10px 12px 8px}
  .note-hud strong{font-size:18px;max-width:170px}
  .note-hud #detected-chord{font-size:10px;max-width:200px}
  .visual-meta{display:none}
  .roll-viewport{height:185px}
  .piano-surround{padding:9px 8px 8px}
  .piano-nav{flex-direction:column;align-items:flex-start}
  .piano-nav-heading{gap:6px}
  .octave-nav span{display:none}
  .keyboard-viewport{height:255px}
  .key-letter{font-size:10px;min-width:20px;height:19px;line-height:17px;margin-bottom:10px}
  .key-name{font-size:9px}.black-key .key-name{font-size:8px}
  .key-c-label{font-size:10px}
  .control-area{padding-top:12px}
  .control-row{gap:9px}
  .control-cluster{flex:1 1 44%;min-width:0}
  .control-label{font-size:9px;min-width:48px}
  .inline-select{width:100%;min-width:0}
  .volume-wrap{width:100%}
  .volume-wrap input{width:100%;min-width:40px}
  .toggle-button{width:100%}
  .record-group,.metronome-group{width:100%}
  .record-group .action-button{flex:1 1 auto;padding:0 8px}
  .footnote-right{display:none}
  .practice-section,.guide{margin-bottom:56px;padding:0 2px}
  .practice-illustration{display:none}
  .practice-panel{padding:18px}
  .practice-actions{flex-direction:column;align-items:stretch}
  .practice-actions select,.practice-actions button{width:100%}
  .footer{padding:26px 14px 18px}.footer-main{flex-direction:column}
}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* V4.1: Guide and keys form a continuous instrument; navigation stays above. */
.piano-nav{margin:0 0 9px;padding:0 6px 2px}
.visual-panel{border-radius:14px 14px 0 0;border-bottom:0}
.piano-surround{margin-top:0;border-radius:0 0 14px 14px;border-top:0;padding-top:0}
.roll-viewport{border-bottom:1px solid rgba(255,255,255,.1)}
@media(max-width:700px){.piano-nav{margin-bottom:7px}.piano-surround{padding-top:0}}

/* Ver.4.3: clear lesson choices, complete melody guide & tempo controls */
.lesson-panel{align-items:stretch;gap:16px;flex-wrap:wrap;padding:18px 20px}
.lesson-choice{display:flex;flex-direction:column;justify-content:center;gap:7px;min-width:145px;flex:1 1 160px}
.lesson-choice:first-child{flex:1.4 1 190px}
.lesson-label{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#bbc8d3;font-weight:700}
.lesson-panel select{min-width:0;max-width:none;width:100%;min-height:40px;padding:7px 12px;border:1px solid #3b5165;border-radius:9px;background:#1a2938;color:#ecf4f8}
.lesson-song-meta{font-size:11px;color:#e6c28d}
.lesson-tempo-choice input{width:100%;accent-color:#dfb878;cursor:pointer}
.lesson-tempo-hint{color:#91a5b9;font-size:10px}
.lesson-bpm-output{color:#f4d4a3;font-variant-numeric:tabular-nums}
.lesson-actions{display:flex;align-items:stretch;flex:1.2 1 238px;flex-direction:column;justify-content:center;gap:9px}
.lesson-actions button{min-height:40px;white-space:nowrap;width:100%}
.lesson-dashboard{background:linear-gradient(145deg,#101b29,#0b141f);border:1px solid #324456;border-radius:14px;padding:18px 20px;margin-top:12px}
.lesson-dashboard-head{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:13px}
.lesson-dashboard-head>div{display:flex;flex-direction:column;gap:4px}
.lesson-dashboard-head strong{color:#f1e5d2;font-size:14px}
.lesson-play-time{border-radius:6px;background:#223449;padding:5px 9px;font-size:12px;color:#e4c89e;font-variant-numeric:tabular-nums}
.lesson-measures{display:grid;grid-template-columns:repeat(var(--lesson-bar-columns,12),minmax(0,1fr));gap:5px;margin-bottom:12px}
.lesson-measure{display:flex;align-items:center;justify-content:center;height:34px;border:1px solid #33475b;border-radius:6px;font-size:11px;font-weight:700;color:#a6b5c3;background:#1b2a3a;font-variant-numeric:tabular-nums}
.lesson-measure.complete{background:#345947;border-color:#679377;color:#e5fae9}
.lesson-measure.current{background:#debb82;color:#2b2419;border-color:#f8dfa9;box-shadow:0 0 0 2px #d7b4752d}
.lesson-playback-progress{height:5px;border-radius:99px;background:#253748;overflow:hidden}
#lesson-demo-progress-fill{width:0;height:100%;background:linear-gradient(90deg,#d7a761,#f7e2b4);transition:width .12s linear}
.lesson-dashboard-foot{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:10px;font-size:11px;color:#9fafc0}
.lesson-dashboard-foot span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lesson-dashboard-foot span:last-child{white-space:nowrap;font-variant-numeric:tabular-nums;color:#e6c28d}
.lesson-attribution{font-size:11px;color:#869cac;margin:13px 2px 0;line-height:1.65}
.practice-progress[hidden]{display:none}
@media(max-width:900px){.lesson-measures{grid-template-columns:repeat(8,minmax(0,1fr))}.lesson-actions{flex:1 1 100%;flex-direction:row}.lesson-actions button{width:auto;flex:1}}
@media(max-width:500px){.lesson-panel{padding:15px;gap:14px}.lesson-choice{flex:1 1 100%}.lesson-choice:first-child{flex:1 1 100%}.lesson-actions{flex-direction:column}.lesson-actions button{width:100%}.lesson-measures{grid-template-columns:repeat(6,minmax(0,1fr))}.lesson-dashboard{padding:13px}.lesson-measure{height:28px}.lesson-dashboard-foot{font-size:10px}}

/* Ver.4.4 — one-note-at-a-time guided practice; free play stays untouched. */
.piano-key.target-key.white-key{background:linear-gradient(180deg,#fff8e7 0%,#ffedbd 40%,#e7bc69 95%);box-shadow:inset 0 0 0 2px rgba(191,134,45,.56),inset 0 -15px 20px rgba(179,112,35,.18),0 0 18px rgba(245,206,125,.28);border-bottom-color:#bb8e4e}
.piano-key.target-key.black-key{background:linear-gradient(180deg,#f7e3be,#d5b06e 58%,#815d31);border-bottom-color:#62431d;box-shadow:0 0 20px rgba(244,190,97,.5),2px 5px 8px #0008}
.piano-key.target-key .key-name{color:#533712}
.piano-key.wrong-key.white-key{background:linear-gradient(180deg,#ffe8e8,#f6a7a7);border-bottom-color:#a7464d}
.piano-key.wrong-key.black-key{background:linear-gradient(180deg,#f5c0c1,#b14954);border-bottom-color:#762833}
.practice-wait-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:10px 0 10px;padding:12px 14px;background:linear-gradient(90deg,rgba(220,169,86,.18),rgba(220,169,86,.07));border:1px solid rgba(240,203,141,.35);border-radius:11px}
.practice-cue-main{display:flex;align-items:center;gap:11px;flex-wrap:wrap;min-width:0}
.practice-chip{display:inline-flex;align-items:center;gap:5px;color:#f4d49c;border:1px solid rgba(244,212,156,.33);background:rgba(20,22,25,.26);font-size:10px;font-weight:800;border-radius:99px;padding:4px 9px;white-space:nowrap}
.practice-wait-bar #practice-key-tip-text{font-size:17px;color:#fff3dd;line-height:1.3}
.practice-cue-main small{font-size:11px;color:#d7c6a7;white-space:nowrap}
.practice-hint-button,.practice-secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:9px 13px;min-height:38px;white-space:nowrap;border:1px solid rgba(255,255,255,.16);border-radius:9px;color:#eaf0f7;background:#253344;cursor:pointer}
.practice-hint-button:hover,.practice-secondary-button:hover:not(:disabled){border-color:#d9b578;color:#fce3b7}
.practice-hint-button{background:linear-gradient(180deg,#354352,#253344);font-weight:700}
.practice-step-actions{margin-top:15px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.practice-step-actions .practice-secondary-button{font-size:12px}
.practice-error-summary{font-size:11px;color:#aebac6;margin-left:auto}
#practice-feedback{border-radius:8px;padding:9px 11px;min-height:38px;background:rgba(255,255,255,.035);color:#d1dbe4;line-height:1.65}
#practice-feedback[data-feedback="wrong"]{background:rgba(184,70,78,.16);color:#ffd1d5;border-left:3px solid #cc6c73}
#practice-feedback[data-feedback="correct"]{background:rgba(73,140,91,.15);color:#d4f1d8;border-left:3px solid #81b58b}
#practice-feedback[data-feedback="complete"]{background:rgba(214,164,81,.16);color:#f9e4bd;border-left:3px solid #dcb873}
@media(max-width:650px){.practice-wait-bar{align-items:flex-start;flex-direction:column}.practice-wait-bar #practice-key-tip-text{font-size:16px}.practice-hint-button{width:100%}.practice-error-summary{width:100%;margin-left:0}.practice-step-actions .practice-secondary-button{flex:1}}

/* Ver.4.5: challenge scorecard, restrained visuals outside the performance viewport. */
.challenge-button{background:linear-gradient(135deg,#304451,#1b2b3b);border:1px solid rgba(226,190,132,.53);color:#fff0d5;border-radius:9px;min-height:40px;font-weight:800;padding:8px 13px;cursor:pointer}
.challenge-button:hover{background:linear-gradient(135deg,#425460,#243548)}
.challenge-panel,.challenge-result{margin-top:12px;padding:19px 20px;border:1px solid #46515b;background:linear-gradient(145deg,#17222d,#101921);border-radius:14px}
.challenge-panel[hidden],.challenge-result[hidden],.challenge-worst[hidden]{display:none!important}
.challenge-panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px}
.challenge-panel-head>div{display:flex;flex-direction:column;gap:4px}
.challenge-panel-head strong{font-size:15px;color:#f9e6c1}
.challenge-count{font-size:24px;letter-spacing:.08em;color:#ffdb9b;font-variant-numeric:tabular-nums}
#challenge-instruction{color:#b1c2d0;font-size:12px;line-height:1.8}
.challenge-track{height:7px;background:#314455;border-radius:99px;overflow:hidden}
#challenge-progress-bar{height:100%;width:0%;background:linear-gradient(90deg,#caa269,#f4d39c)}
.challenge-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;color:#aabcc9;font-size:11px}
.challenge-bottom button{font-size:11px}
.challenge-result-header{display:flex;align-items:center;justify-content:space-between;gap:14px}
.challenge-result-header h3{margin:5px 0 0;font-size:20px;line-height:1.3}
.challenge-total{display:flex;align-items:baseline;color:#f5d6a4;font-size:42px;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.challenge-total small{font-size:13px;color:#c7b499;font-weight:500;margin-left:5px}
.challenge-score-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0 12px}
.challenge-score-grid>div{padding:13px 16px;background:#212c38;border:1px solid #394856;border-radius:10px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}
.challenge-score-grid span{font-size:11px;color:#c3d1db}
.challenge-score-grid strong{font-size:18px;font-variant-numeric:tabular-nums;color:#fce7c4}
.challenge-meter{height:6px;border-radius:99px;background:#415164;grid-column:1/-1;overflow:hidden}
.challenge-meter i{display:block;width:0%;height:100%;background:linear-gradient(90deg,#cb9b5f,#eec88d);transition:width .28s}
.challenge-summary{font-size:12px;color:#d0dbe4;line-height:1.75}
.challenge-worst{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;padding:13px 15px;border:1px solid #8e6a4b;border-radius:10px;background:rgba(206,160,102,.09);margin:14px 0}
.challenge-worst>div{display:flex;flex-direction:column;gap:4px}
.challenge-worst strong{font-size:13px;color:#ffdfad}
.challenge-worst small{font-size:10px;color:#afbfc9}
.challenge-result-actions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0 10px}
.challenge-method{font-size:10px;color:#8da3b6;line-height:1.75;margin:10px 0 0}
.lesson-measure.challenge-good{background:#28533f;border-color:#5a9d7a;color:#d5f7e4}
.lesson-measure.challenge-weak{background:#5a3b36;border-color:#a66c5a;color:#ffe3d7}
.lesson-measure.challenge-worst{border:2px solid #f2c57f;box-shadow:0 0 0 2px rgba(242,197,127,.18)}
@media(max-width:700px){.challenge-panel,.challenge-result{padding:14px}.challenge-total{font-size:34px}.challenge-result-header h3{font-size:17px}.challenge-score-grid{gap:8px}.challenge-score-grid>div{padding:10px}.challenge-score-grid span{font-size:10px}.challenge-score-grid strong{font-size:16px}.challenge-bottom{align-items:flex-start;flex-direction:column}.challenge-bottom button{width:100%}.challenge-worst .gold-button{width:100%}.challenge-result-actions button{flex:1}}

.challenge-hud{display:inline-flex;align-items:center;justify-content:space-between;gap:9px;padding:5px 12px;border-radius:9px;background:#523b25;border:1px solid #c49a62;color:#f9e3bc;font-size:11px;font-weight:700;margin-left:auto}.challenge-hud[hidden]{display:none!important}.challenge-hud strong{font-size:18px;min-width:18px;text-align:center;font-variant-numeric:tabular-nums}.challenge-hud + .visual-meta{display:none}@media(max-width:700px){.challenge-hud{margin-left:auto}}

/* Public-release site footer links, below the playing area */
.release-footer-nav{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px 19px;border-top:1px solid rgba(255,255,255,.1);margin:18px auto 0;padding:17px 0 0;font-size:11px;color:#9babbc}
.release-footer-nav a:hover{color:#e7c992;text-decoration:underline}

/* Public release: language, share & optional analytics choices */
.language-switch{font-size:12px;white-space:nowrap;display:inline-flex;align-items:center;padding:6px 12px;border:1px solid #607186;border-radius:7px;color:#f4d8ab}.language-switch:hover{background:#27384b}.site-share{max-width:1160px;margin:0 auto 36px;padding:24px 12px;text-align:center;border-top:1px solid #344252}.site-share h2{font-size:20px;margin:0 0 16px}.share-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.share-actions a,.share-actions button{color:#fff;border-radius:8px;min-height:43px;min-width:95px;padding:10px 16px;font-weight:600;font-size:13px;background:#253448;border:1px solid #42546a}.share-actions a[data-share=x]{background:#151515}.share-actions a[data-share=facebook]{background:#1855aa}.share-actions a[data-share=line]{background:#087b40}.share-actions a:hover,.share-actions button:hover{filter:brightness(1.2)}#share-status{font-size:12px;color:#e9ca9a;min-height:1.5em;overflow-wrap:anywhere}.analytics-preferences{position:fixed;z-index:80;bottom:12px;right:12px;background:#192432;border:1px solid #52647a;box-shadow:0 8px 30px #0008;border-radius:10px;padding:11px 14px;max-width:min(340px,calc(100% - 24px));font-size:12px;color:#e9edf3}.analytics-preferences[hidden]{display:none}.analytics-preferences p{margin:0 0 10px;line-height:1.5}.analytics-preferences div{display:flex;gap:8px;justify-content:flex-end}.analytics-preferences button,.analytics-settings{background:#263649;border:1px solid #596d82;border-radius:5px;color:#e9edf3;padding:5px 10px;font-size:12px}.analytics-preferences button[data-analytics=yes]{background:#f0cb8d;color:#201910;border-color:#f0cb8d}.analytics-settings{font:inherit;color:#9aaaba;background:transparent}.release-footer-nav{flex-wrap:wrap}.studio:fullscreen .analytics-preferences{display:none}html[lang=en] .control-label{letter-spacing:.04em}html[lang=en] .lesson-actions button{white-space:normal}html[lang=en] .practice-key-tip-count{white-space:normal}html[lang=en] .lesson-panel{min-width:0}html[lang=en] .control-cluster{min-width:0}html[lang=en] .lesson-choice select{min-width:0;max-width:100%}@media(max-width:700px){.header-right{gap:8px}.language-switch{padding:4px 8px;font-size:11px}.site-share{margin-bottom:20px}.share-actions a,.share-actions button{flex:1 1 42%;min-width:0}.site-share h2{font-size:17px}html[lang=en] .studio-label span:last-child{white-space:normal}html[lang=en] .practice-cue-main{min-width:0}html[lang=en] .practice-hint-button{white-space:normal}html[lang=en] .record-group .action-button{font-size:10px;padding:0 5px;white-space:normal}}
/* Keep consent controls outside the playable keyboard and away from ads. */
.analytics-preferences{position:static;max-width:760px;margin:0 auto 24px;box-shadow:none;z-index:auto}.analytics-preferences[hidden]{display:none}
@media(max-width:700px){.analytics-preferences{margin:0 12px 20px}}

/* Ver.4.6 - illuminated performance stage; keyboard geometry unchanged. */
.roll-viewport{background:radial-gradient(ellipse at 50% 110%,rgba(208,139,51,.075),transparent 54%),radial-gradient(ellipse at 76% 0%,rgba(55,83,118,.14),transparent 52%),linear-gradient(180deg,#0b111b,#101722 72%,#141923);border-bottom:0}
.roll-viewport::before{display:none}
.roll-head{border-bottom:0}
.roll-bar,.roll-bar.black{z-index:2;border-radius:9px;border:1px solid #ffe0a1;background:linear-gradient(90deg,#d98628 0%,#ffcb70 22%,#ffe5a6 50%,#ffc166 78%,#d78127 100%);box-shadow:0 0 7px #ffc76dbb,0 0 19px #ff9d3c60,inset 0 1px 3px #fff6d6,inset 0 -2px 4px #c16d1b55;pointer-events:none}
.roll-bar.black{background:linear-gradient(90deg,#d98930,#ffd38a 30%,#ffe9ba 50%,#ffb857 82%,#cc7626)}
.white-key.active{background:linear-gradient(180deg,#ffdf9d,#fff0bf 42%,#ffbf57 100%);border-bottom-color:#c3873e;box-shadow:inset 0 0 0 1px #fff1ca,inset 0 0 18px #ffbe5480,0 0 18px #ffbc4660}
.black-key.active{background:linear-gradient(180deg,#fff2c6,#ffc76b 48%,#d7872e);border-color:#f8cd85;border-bottom-color:#ad6b2c;box-shadow:inset 0 0 8px #ffe2a480,0 0 14px #ffad5366,2px 6px 8px #0008}
.piano-fx{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:1}
.fx-burst{position:absolute;bottom:0;width:0;height:0;pointer-events:none;overflow:visible}
.fx-mote{position:absolute;bottom:0;left:0;display:block;color:#ffe2a1;font-family:Georgia,'Segoe UI Symbol',serif;font-size:var(--sz);font-weight:normal;line-height:1;text-shadow:0 0 6px #ffd075,0 0 16px #ef9c44;opacity:0;will-change:transform,opacity;animation:fx-float var(--duration) cubic-bezier(.17,.65,.28,1) var(--delay) both}
.fx-spark{width:var(--sz);height:var(--sz);border-radius:50%;background:#fff1c6;box-shadow:0 0 8px #ffbc54,0 0 14px #ffac49;}
@keyframes fx-float{0%{opacity:0;transform:translate(0,3px) scale(.45)}12%{opacity:.78}52%{opacity:.68}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--rot)) scale(.78)}}
.fx-ribbon{position:absolute;bottom:0;height:190px;width:460px;left:-230px;overflow:visible;opacity:0;animation:fx-ribbon-life 1.65s ease-out both;will-change:opacity}
.fx-ribbon path{fill:none;stroke:#ffd17f;stroke-width:1.7;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;animation:fx-draw .95s ease-out forwards;filter:drop-shadow(0 0 4px #ffbb56)}
.fx-ribbon path.echo{stroke-width:.9;opacity:.4;animation-delay:.1s}
@keyframes fx-draw{to{stroke-dashoffset:0}}
@keyframes fx-ribbon-life{0%{opacity:0;transform:translateY(12px)}18%{opacity:.85}57%{opacity:.63}100%{opacity:0;transform:translateY(-20px)}}
@media(max-width:700px){.fx-ribbon{width:320px;left:-160px;height:145px}}
@media(prefers-reduced-motion:reduce){.piano-fx{display:none!important}}

