[hidden] { display: none !important; }

.keys-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding-top: 57px; padding-bottom: 42px; }
.keys-hero h1 { margin-bottom: 12px; font-size: clamp(43px, 5.5vw, 68px); }
.keys-hero .hero-lead { max-width: 760px; font-size: clamp(15px, 1.8vw, 18px); }
.hero-note { margin-bottom: 6px; padding: 10px 14px; color: #526076; background: rgba(255, 255, 255, .77); border: 1px solid #e2e7ec; border-radius: 12px; font-size: 12px; white-space: nowrap; }

.keys-trainer { position: relative; padding: 29px 34px 30px; }
.trainer-heading { margin-bottom: 18px; }
.trainer-heading h2 { font-size: clamp(25px, 3.2vw, 35px); }
.session-badge { white-space: nowrap; }
.resume-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; padding: 15px; background: #eff7fd; border: 1px solid #d3e7f6; border-radius: 13px; }
.resume-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.resume-card > div:last-child { display: flex; gap: 8px; }

.keys-mode-tabs { margin-bottom: 15px; }
.keys-mode-tabs .mode-tab { min-height: 59px; }
.keys-mode-tabs .mode-tab:disabled { cursor: not-allowed; opacity: .58; }

.keys-settings { margin-bottom: 17px; overflow: visible; border-color: #e3e8ed; border-radius: 13px; }
.keys-settings > summary { min-height: 66px; padding: 11px 45px 11px 16px; }
.keys-settings > summary::after, .keys-settings[open] > summary::after { content: none; }
.keys-settings > summary > span { font-size: 14px; font-weight: 720; }
.keys-settings > summary > small { margin-top: 2px; font-size: 12px; }
.settings-chevron { position: absolute; top: 24px; right: 16px; width: 18px; height: 18px; color: #738096; transition: transform .18s ease; }
.keys-settings[open] > summary > .settings-chevron { transform: rotate(180deg); }
.settings-content { padding: 16px; border-top: 1px solid #eef0f2; }
.settings-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 26px; }
.setting-field { min-width: 0; }
.setting-field h3 { margin: 0 0 9px; font-size: 13px; font-weight: 730; }
.octave-field { grid-column: 1 / -1; }
.keys-settings .chips, .keys-settings .count-control { gap: 7px; }
.keys-settings .chip { min-height: 37px; padding-inline: 10px; color: #405069; border-color: #e1e6ec; border-radius: 9px; font-size: 12px; }
.keys-settings .chip.selected { color: #176dab; background: #edf6fd; border-color: #c7e2f6; }
.note-presets { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 8px; }
.notes-grid { display: grid; grid-template-columns: repeat(6, minmax(38px, 1fr)); gap: 6px; }
.notes-grid .chip { min-width: 0; padding-inline: 3px; }
.count-control { display: flex; flex-wrap: wrap; }
.custom-count { width: 150px; height: 37px; margin-top: 9px; padding: 0 9px; border: 1px solid #dbe2ea; border-radius: 9px; }
.setting-stack { display: grid; gap: 8px; }
.setting-row { min-height: 35px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.setting-row > span:first-child { min-width: 0; color: #556276; font-size: 12px; }
.setting-row select { max-width: 198px; min-width: 118px; height: 36px; margin: 0; padding: 0 9px; color: #37445a; background: #fff; border: 1px solid #e0e5eb; border-radius: 8px; font-size: 12px; }
.setting-hint { margin: 6px 0 0; color: #687589; font-size: 11px; line-height: 1.55; }
.setting-hint.error { color: var(--error); font-weight: 650; }
.text-action { min-height: 29px; padding: 2px 0; cursor: pointer; color: #3975ab; background: transparent; border: 0; font-size: 12px; text-align: left; }
.text-action:hover { color: var(--blue-dark); }
.text-action:disabled { cursor: not-allowed; opacity: .45; }
.toggle-input { appearance: none; flex: none; width: 36px; height: 21px; position: relative; margin: 0; cursor: pointer; background: #dce2e8; border-radius: 99px; transition: background .17s; }
.toggle-input::after { content: ""; width: 17px; height: 17px; position: absolute; top: 2px; left: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .17); transition: transform .17s; }
.toggle-input:checked { background: #3f94dc; }
.toggle-input:checked::after { transform: translateX(15px); }

.keys-status { margin: 17px 0; border-color: #eaedf0; }
.keys-status > div { padding: 11px 14px; }
.keys-status span { font-size: 11px; }
.keys-status strong { font-size: 16px; font-weight: 720; }
.status-indicator { position: relative; }
.feedback-toast { position: absolute; z-index: 8; left: 50%; bottom: calc(100% + 10px); width: max-content; max-width: min(340px, 82vw); padding: 9px 13px; color: #fff; background: #29384d; border-radius: 10px; box-shadow: 0 9px 24px rgba(29, 42, 60, .18); font-size: 13px; line-height: 1.4; text-align: center; pointer-events: none; transform: translateX(-50%); }
.feedback-toast.hint { background: #315984; }
.feedback-toast.wrong { background: #a94442; }
.feedback-toast.correct { background: #357248; }

.learning-controls { min-height: 51px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 16px; }
.level-switcher { display: flex; align-items: center; gap: 6px; }
.level-caption { color: #687589; font-size: 12px; }
.level-arrow { width: 35px; height: 35px; display: grid; place-items: center; cursor: pointer; color: #506078; background: #fff; border: 1px solid #dce3ea; border-radius: 9px; font-size: 19px; }
.level-current { min-width: 144px; min-height: 42px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 5px 9px; cursor: pointer; text-align: left; color: #435168; background: #fff; border: 1px solid #dce3ea; border-radius: 10px; }
.level-current strong { color: var(--blue-dark); }
.level-current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.level-current svg { width: 15px; height: 15px; }
.level-arrow:disabled, .level-current:disabled { cursor: not-allowed; opacity: .44; }
.difficulty-control { display: flex; align-items: center; gap: 7px; color: #526075; font-size: 12px; }
.difficulty-step { width: 35px; height: 35px; display: grid; place-items: center; cursor: pointer; color: #506078; background: #fff; border: 1px solid #dce3ea; border-radius: 9px; font-size: 19px; }
.difficulty-step:disabled { cursor: not-allowed; opacity: .44; }
#difficultyValue { min-width: 48px; text-align: center; }
.volume-control { min-height: 38px; display: flex; align-items: center; gap: 7px; color: #58677b; }
.volume-control svg { width: 19px; height: 19px; flex: none; }
.volume-control input { width: 84px; height: 30px; margin: 0; cursor: pointer; accent-color: var(--blue); }
.volume-control span { min-width: 34px; color: #526075; font-size: 12px; text-align: right; }
.start-button, .session-controls .button, .reveal-button { min-height: 44px; padding-inline: 15px; border-radius: 11px; font-size: 13px; }
.session-controls { display: flex; gap: 7px; }

.level-popover { position: absolute; z-index: 22; top: 390px; left: 50%; width: min(850px, calc(100% - 46px)); max-height: min(610px, 72vh); overflow: auto; padding: 18px; background: #fff; border: 1px solid #dce3ea; border-radius: 16px; box-shadow: 0 24px 70px rgba(22, 40, 63, .2); transform: translateX(-50%); }
.popover-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 12px; }
.popover-close { width: 36px; height: 36px; cursor: pointer; color: #526075; background: #f5f7f9; border: 0; border-radius: 10px; font-size: 24px; }
.curriculum-list { display: grid; gap: 14px; }
.curriculum-group { padding: 13px; background: #fafbfd; border: 1px solid #e6eaf0; border-radius: 13px; }
.curriculum-group-heading { margin-bottom: 10px; }
.curriculum-group-heading strong, .curriculum-group-heading span { display: block; }
.curriculum-group-heading span { margin-top: 2px; color: #6b7789; font-size: 11px; }
.curriculum-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.curriculum-step { min-height: 52px; padding: 7px 9px; cursor: pointer; text-align: left; color: #47556b; background: #fff; border: 1px solid #dfe5ec; border-radius: 9px; }
.curriculum-step strong, .curriculum-step span { display: block; }
.curriculum-step span { margin-top: 2px; overflow: hidden; color: #6b7789; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.curriculum-step.selected { color: #176dab; background: #edf6fd; border-color: #acd3ef; }
.curriculum-step.completed::after { content: " ✓"; color: var(--success); }
.curriculum-step.exam { background: #fff9e9; }

.keys-task-card { min-height: 178px; margin-top: 4px; }
.keys-task-card .task-value { font-size: clamp(28px, 5vw, 50px); }
.answer-grid button { min-width: 65px; }
.answer-grid button:disabled { cursor: not-allowed; opacity: .55; }
.audio-notice { margin: 9px 0 2px; padding: 8px 11px; color: #785812; background: #fff8e6; border: 1px solid #f1dfac; border-radius: 9px; font-size: 12px; line-height: 1.45; text-align: center; }
.audio-notice.error { color: #9c3c37; background: #fff2f0; border-color: #efcbc6; }

.keys-keyboard-scroll { --key-width: 72px; --key-height: 276px; --octave-gap: 10px; width: 100%; padding: 16px 1px 15px; overflow-x: hidden; }
.keys-keyboard { width: 100%; min-width: 0; align-items: start; }
.keys-keyboard[data-layout="fit"] { display: grid; grid-template-columns: repeat(var(--octave-columns, 1), minmax(0, 1fr)); column-gap: var(--octave-gap); row-gap: 17px; justify-items: center; }
.keys-keyboard[data-layout="single"] { display: flex; justify-content: center; }
.keys-keyboard[data-layout="swipe"] { width: max-content; min-width: 100%; display: flex; justify-content: flex-start; gap: var(--octave-gap); }
.keys-keyboard-scroll[data-layout="swipe"] { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline: 11px; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.octave-group { min-width: 0; scroll-snap-align: start; }
.octave-name { height: 23px; padding-left: 3px; color: #637084; font-size: 13px; font-weight: 750; }
.octave-group.active-computer .octave-name { color: var(--blue-dark); }
.octave-group.only-octave .octave-name { visibility: hidden; }
.octave-keyboard.piano { --white-width: var(--key-width); width: calc(var(--key-width) * 7) !important; min-width: calc(var(--key-width) * 7); height: calc(var(--key-height) + 13px); padding-bottom: 10px; }
.octave-keyboard .piano-key.white { width: var(--key-width); min-width: var(--key-width); height: var(--key-height); border-color: #9eabb8; border-top-color: #d1d8de; box-shadow: 0 7px #c8d0d8, 0 10px 9px rgba(30, 43, 56, .15); }
.octave-keyboard .piano-key.black { width: calc(var(--key-width) * .62); height: calc(var(--key-height) * .65); box-shadow: 0 7px #090e15, 0 10px 8px rgba(20, 26, 35, .29); }
.octave-keyboard .piano-key.white:active, .octave-keyboard .piano-key.white.pressed { transform: translateY(7px); box-shadow: 0 1px #c8d0d8, 0 3px 4px rgba(30, 43, 56, .17); }
.octave-keyboard .piano-key.black:active, .octave-keyboard .piano-key.black.pressed { transform: translate(-50%, 7px); box-shadow: 0 1px #090e15, 0 3px 4px rgba(20, 26, 35, .3); }
.octave-keyboard .piano-key.white.inactive { background-color: #f5f7f9 !important; background-image: repeating-linear-gradient(-45deg, transparent 0, transparent 7px, rgba(109, 124, 142, .27) 7px, rgba(109, 124, 142, .27) 9px) !important; border-color: #bbc5cf !important; opacity: .95; }
.octave-keyboard .piano-key.black.inactive { background-color: #202832 !important; background-image: repeating-linear-gradient(-45deg, transparent 0, transparent 6px, rgba(227, 234, 243, .34) 6px, rgba(227, 234, 243, .34) 8px) !important; border: 1px solid #384250 !important; box-shadow: 0 7px #10161e, 0 10px 8px rgba(20, 26, 35, .22) !important; opacity: 1 !important; }
.octave-keyboard .piano-key.target, .octave-keyboard .piano-key.correct { background: #86d3a0 !important; background-image: none !important; }
.octave-keyboard .piano-key.wrong { background: #e87373 !important; background-image: none !important; }
.octave-keyboard .piano-key.preview-active { opacity: 1 !important; border-color: #73a77e !important; }
.keyboard-note { margin: -2px 0 0; color: #606d80; text-align: center; font-size: 12px; }

.lesson-description { margin: 14px 0 0; padding: 0 15px; background: #fafbfd; border: 1px solid #e5e9ee; border-radius: 12px; }
.lesson-description summary { min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; color: #4c5a70; font-size: 12px; font-weight: 700; }
.lesson-description > div { padding: 0 0 15px; color: #536176; font-size: 12px; line-height: 1.65; }
.lesson-description h3 { margin: 5px 0 6px; color: #2f3d53; font-size: 14px; }
.lesson-description p, .lesson-description ul { margin: 7px 0 0; }

.keys-result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.result-recommendation { margin: 14px 0; padding: 14px; color: #425169; background: #eef7fd; border: 1px solid #d3e7f6; border-radius: 12px; }
.mistakes-heading { margin: 17px 0 8px; color: #35445a; font-size: 14px; }
.result-booking { display: block; margin-top: 18px; color: var(--blue-dark); text-align: center; font-size: 13px; font-weight: 750; }
.stats-actions { display: flex; justify-content: center; margin-top: 15px; }
.stats-actions .text-action { padding: 7px 10px; }
.stats-actions .text-action.confirming { color: var(--error); font-weight: 750; }
.seo-section { padding-bottom: 74px; }
.seo-intro { max-width: 860px; margin-bottom: 30px; }
.seo-intro h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; }
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.seo-grid article { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.seo-grid h3 { margin-bottom: 9px; font-size: 16px; }
.seo-grid p { margin-bottom: 0; color: #4e5c72; font-size: 13px; line-height: 1.7; }
.faq-block { margin-top: 32px; }
.faq-block > h3 { margin-bottom: 12px; font-size: 21px; }
.faq-block > details { margin-top: 8px; padding: 15px 17px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.faq-block summary { cursor: pointer; font-size: 13px; font-weight: 750; }
.faq-block details p { margin: 11px 0 0; color: #4e5c72; font-size: 12px; }
.cta-section { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin-bottom: 72px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.cta-photo { min-height: 345px; }
.cta-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cta-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 39px; }
.cta-copy h2 { font-size: clamp(29px, 4vw, 45px); line-height: 1.12; }
.cta-copy > p:not(.eyebrow) { color: var(--muted); }

@media (max-width: 920px) {
  .keys-hero { grid-template-columns: 1fr; padding-top: 50px; padding-bottom: 37px; }
  .hero-note { display: none; }
  .curriculum-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-section { grid-template-columns: 1fr; }
  .cta-photo { min-height: 300px; max-height: 380px; }
  .cta-copy { padding: 29px; }
}

@media (max-width: 680px) {
  .keys-hero { padding-top: 29px; padding-bottom: 26px; }
  .keys-hero h1 { margin-bottom: 9px; font-size: clamp(39px, 11vw, 56px); }
  .keys-hero .hero-lead { font-size: 14px; line-height: 1.5; }
  .keys-trainer { width: 100%; padding: 20px 13px 22px; }
  .trainer-heading { margin-bottom: 13px; }
  .trainer-heading h2 { font-size: 25px; }
  .settings-columns { grid-template-columns: 1fr; gap: 18px; }
  .octave-field { grid-column: auto; }
  .keys-settings .chip, .difficulty-step { min-height: 41px; }
  .notes-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .keys-status { grid-template-columns: 1fr 1fr; margin: 14px 0; }
  .keys-status > div:last-child { grid-column: 1 / -1; }
  .learning-controls { justify-content: space-between; gap: 9px 6px; }
  .level-switcher { width: 100%; justify-content: center; }
  .level-arrow { width: 42px; height: 42px; }
  .level-current { min-height: 42px; }
  .difficulty-control { width: 100%; justify-content: center; }
  .volume-control { min-height: 44px; }
  .volume-control input { width: min(120px, 31vw); }
  .start-button { min-height: 44px; }
  .session-controls { margin-left: auto; }
  .level-popover { top: 450px; width: calc(100% - 20px); padding: 13px; }
  .curriculum-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keys-task-card { min-height: 164px; padding-inline: 10px; }
  .answer-grid { gap: 6px; }
  .answer-grid button { min-width: 53px; padding-inline: 7px; }
  .keys-keyboard-scroll { width: calc(100% + 26px); margin-left: -13px; padding-inline: 10px; }
  .keys-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-grid { grid-template-columns: 1fr; }
  .cta-section { width: 100%; border-radius: 0; }
  .cta-copy .button { width: 100%; }
  .resume-card { flex-direction: column; align-items: stretch; }
  .resume-card > div:last-child { flex-direction: column; }
}

@media (max-width: 390px) {
  .level-caption { display: none; }
  .setting-row:not(.setting-toggle) { align-items: stretch; flex-direction: column; gap: 5px; }
  .setting-row:not(.setting-toggle) select { width: 100%; max-width: none; }
}
