/* The page uses the homepage palette. The keys themselves are UIKit captures. */
.keyboard-page [hidden] { display: none !important; }
.keyboard-hero { background: radial-gradient(ellipse at 85% 40%, #e6ecff 0%, transparent 54%), var(--paper); }
.keyboard-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 100px); padding-block: clamp(58px, 7vw, 112px); }
.intro h1 { line-height: 1.12; font-size: clamp(45px, 5vw, 76px); text-wrap: balance; }
:lang(zh-Hans) .intro h1 { line-height: 1.3; letter-spacing: -.055em; }
.intro-copy { margin: 24px 0 0; max-width: 33rem; font-size: 1.125rem; color: var(--muted); line-height: 1.7; text-wrap: pretty; }
.mode-controls { margin-top: 38px; }
.control-label { color: var(--muted); font-weight: 550; font-size: .875rem; margin: 0 0 9px; }
.mode-list { display:flex; gap: 6px; flex-wrap: wrap; }
.mode-list button { font-size: .9375rem; padding: 8px 13px; min-height: 44px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.mode-list button[aria-pressed=true] { color: var(--blue-deep); background: var(--selected-surface); border-color: #abbef9; font-weight: 600; }
.mode-list button:hover { border-color: var(--blue); }
.studio { width: 100%; max-width: 510px; margin-inline: auto; }
.sheet { border: 1px solid #cfd6e8; border-radius: 24px; background: white; overflow: hidden; box-shadow: var(--shadow), 0 2px 8px #26365a08; }
.sheet-head { padding: 17px 22px; display:flex; justify-content:space-between; align-items:center; border-bottom: 1px solid #e5e9f1; gap:12px; }
.sheet-head label { color: var(--muted); font-size: .875rem; font-weight: 550; }
.sheet-head select { color: var(--ink); font: inherit; font-size: .875rem; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; background-color: #f8f9fd; min-height: 36px; }
.draft-line { padding: 14px 22px 10px; }
#draft { display:block; width:100%; resize: none; border: none; background: transparent; font: inherit; font-size:1.125rem; line-height:1.55; color: var(--ink); }
#draft::placeholder { color: #65718a; }
.studio figure { margin:0; }
.keys-image { position: relative; border-top: 1px solid #d7d9de; background: #f3f3f4; }
.keys-image img { width:100%; height:auto; }
#hit-regions { position:absolute; inset:0; }
#hit-regions button { position:absolute; display:block; padding:0; background:transparent; border:0; border-radius:7px; }
#hit-regions button:hover { box-shadow: inset 0 0 0 2px #315cf55c; }
#hit-regions button:focus-visible { outline-offset:-3px; }
.studio figcaption { padding: 9px 18px; font-size: .8125rem; text-align:center; color:var(--muted); border-top:1px solid #e2e5ee; }
.sample-control { margin: 19px 3px 0; }
.instruction h2 { font-size:1.125rem; letter-spacing: -.02em; line-height:1.45; }
.instruction p { color:var(--muted); line-height:1.55; margin-top:3px; }
.sample-actions { display:flex; align-items:center; gap:14px; margin:14px 0 0; }
.sample-actions .button { min-height:44px; padding:9px 18px; font-size:.9375rem; }
#clear { font-size:.875rem; min-height:44px; padding:5px 8px; border:0; background:transparent; color:var(--muted); }
#clear:disabled { opacity:.48; }
.studio-note { font-size:.8125rem; color:var(--muted); margin:8px 3px 0; }
.guide { background:white; padding-block:clamp(46px,7vw,92px); }
.guide h2 { margin:8px 0 24px; font-size:clamp(1.85rem,3.6vw,3rem); line-height:1.2; letter-spacing:-.045em; }
.guide ol { list-style:none; padding:0; display:grid; gap:26px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.guide li { padding-top:15px; border-top:1px solid var(--line); }
.guide h3 { font-size:1.125rem; }
.guide li p { margin:5px 0 0; color:var(--muted); }
.guide-link { display:inline-flex; align-items:center; margin-top:12px; min-height:44px; color:var(--blue-deep); font-weight:550; }
@media(max-width:900px){
  .keyboard-grid { grid-template-columns: minmax(0,.9fr) minmax(0,1fr); gap:26px; }
}
@media(max-width:760px){
  .keyboard-grid { grid-template-columns:1fr; align-items:start; gap:22px; padding-block:32px 42px; }
  .intro,.studio { max-width:510px; width:100%; margin:auto; }
  .intro h1 { font-size:clamp(2.3rem,7vw,3rem); }
  .hero-eyebrow { margin-bottom:12px; }
  .intro-copy { margin-top:13px; font-size:1rem; }
  .mode-controls { margin-top:15px; }
  .mode-controls .control-label { position:absolute; clip-path:inset(50%); width:1px;height:1px;overflow:hidden; }
  .mode-list { gap:5px; }
  .mode-list button { padding:6px 11px; font-size:.875rem; }
  .sheet { border-radius:17px; }
  .sheet-head { padding:8px 15px; }
  .draft-line { padding:11px 15px; }
  .guide ol { grid-template-columns:1fr; gap:15px; }
}
