:root { font: 16px/1.5 system-ui, sans-serif; color: #e9f0f4; background: #101b25; }
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { max-width: 1100px; min-height: 100vh; padding: clamp(18px, 4vw, 48px); margin: auto; }
.topbar, .detailbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.15; }
h2 { font-size: 1.2rem; margin-top: 36px; }
.eyebrow { color: #79cce9; letter-spacing: .16em; font-size: .73rem; font-weight: 700; margin: 0 0 8px; }
.privacy { color: #c2d4dd; margin: 16px 0 34px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 14px; }
button { font: inherit; cursor: pointer; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-height: 132px; padding: 22px; color: inherit; background: #203342; border: 1px solid #466072; border-radius: 14px; text-align: left; }
.tile:hover, .tile:focus-visible { background: #29465a; border-color: #8bd9ee; }
.tile strong { font-size: 1.2rem; }
.tile span { color: #c6d8df; }
.secondary { padding: 10px 15px; background: transparent; color: #edf8fb; border: 1px solid #7196a5; border-radius: 9px; }
.secondary:hover, .secondary:focus-visible { background: #264455; }
:focus-visible { outline: 3px solid #f8cd79; outline-offset: 3px; }
.detailbar { margin-top: 28px; }
.status { color: #b8d8e2; }
.surface { min-height: 220px; border: 1px solid #466072; border-radius: 14px; padding: 28px; background: #203342; }
footer { margin-top: 60px; color: #b2c3cd; font-size: .85rem; }
@media(max-width: 520px) { .topbar { align-items: flex-start; flex-direction: column; } .detailbar { flex-wrap: wrap; } }
.control-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
select { font: inherit; padding: 10px; color: #e9f0f4; background: #101b25; border: 1px solid #7196a5; border-radius: 9px; }
.key-focus { padding: 18px; border: 2px dashed #7196a5; border-radius: 10px; text-align: center; background: #122531; }
.key-focus:focus { border-color: #79cce9; }
.reading { font-weight: 700; }
.keyboard-board { overflow-x: auto; padding-bottom: 10px; }
.key-row { display: flex; gap: 5px; margin: 5px 0; min-width: max-content; }
.key { min-width: 42px; min-height: 42px; padding: 8px; text-align: center; border: 1px solid #688090; border-radius: 6px; background: #152734; }
.key.space { min-width: 210px; }
.key.optional { border-style: dashed; color: #b3c1cb; }
.key.seen { border-color: #76d7a4; background: #24543f; color: white; }
.key.pressed { background: #b7dfec; color: #07161e; }
.hint { color: #c6d8df; font-size: .92rem; }
.meter { height: 24px; border: 1px solid #7196a5; background: #10212c; border-radius: 9px; overflow: hidden; margin: 18px 0; }
.meter-fill { height: 100%; width: 0; background: #79cce9; }
.waveform { width: 100%; height: 120px; background: #122531; border-radius: 9px; margin-bottom: 16px; }
.preview { display: block; width: min(100%, 780px); min-height: 240px; max-height: 60vh; background: #101b25; border-radius: 10px; object-fit: contain; }
.control-row button, .surface > button, .display-toolbar button { padding: 10px 15px; color: #081e28; background: #91d8ea; border: 1px solid #91d8ea; border-radius: 9px; font-weight: 650; }
.control-row button.secondary, .surface > button.secondary, .display-toolbar button.secondary { color: #edf8fb; background: #203342; border-color: #7196a5; }
button:disabled { opacity: .55; cursor: default; }
.pointer-zone { display: grid; place-items: center; min-height: 230px; border: 2px dashed #87a7b5; background: #122531; border-radius: 12px; user-select: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px; margin: 18px 0; }
.check-item { padding: 12px; border: 1px solid #688090; border-radius: 8px; }
.check-item.seen { background: #24543f; border-color: #76d7a4; }
.display-overlay { position: fixed; z-index: 10; inset: 0; background: black; display: flex; flex-direction: column; }
.display-overlay[hidden] { display: none; }
.display-paint { flex: 1; }
.display-toolbar { padding: 10px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: #152734; color: #fff; }
.touch-grid { display: grid; width: 100%; height: min(60vh, 480px); min-height: 260px; gap: 3px; padding: 4px; background: #122531; border-radius: 8px; touch-action: none; user-select: none; margin: 18px 0; }
.touch-cell { background: #3c5361; border-radius: 3px; }
.touch-cell.seen { background: #76d7a4; }
