.practice-page{
  --practice-blue:#7eb6cf;
  --practice-panel:#fffdf8;
}
.practice-shell{width:min(1240px,calc(100% - 36px));padding-bottom:72px}
.practice-site-header{padding-bottom:28px}
.practice-header-actions{display:flex;align-items:center;gap:9px}
.compact-action{background:rgba(255,253,248,.66)}

.catalog-view,.player-view{position:relative;z-index:1}
.practice-hero{
  padding:56px 0 44px;
}
.practice-hero .display-title{font-size:clamp(48px,7vw,86px)}

.section-index{
  display:block;
  margin-bottom:8px;
  color:var(--coral-dark);
  font-size:11px;
  font-weight:950;
  letter-spacing:.16em;
}
.session-selector{
  display:grid;
  grid-template-columns:minmax(260px,.8fr) minmax(420px,1.2fr);
  gap:36px;
  align-items:center;
  padding:26px 30px;
  border:2px solid var(--ink);
  border-radius:24px;
  background:#f8d9cf;
  box-shadow:7px 7px 0 var(--ink);
}
.session-selector h2,.category-summary h2,.instruction-card h2,.tips-card h2{
  margin:0;
  font-family:var(--display);
  font-size:clamp(24px,3vw,34px);
  line-height:1.15;
}
.session-selector p,.category-summary p{margin:9px 0 0;color:var(--ink-soft);font-size:13px;line-height:1.7}
.duration-picker{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
}
.duration-picker button,.category-tab,.exercise-start,.back-to-catalog,
.tempo-row button,.sound-toggle-button,.exercise-navigation button{
  border:2px solid var(--ink);
  background:var(--white);
  font-weight:900;
  cursor:pointer;
}
.duration-picker button{
  min-height:48px;
  border-radius:13px;
  box-shadow:3px 3px 0 var(--ink);
}
.duration-picker button.active{background:var(--coral);color:var(--white)}
.duration-picker button:active,.exercise-start:active,.back-to-catalog:active,
.tempo-row button:active,.sound-toggle-button:active,
.exercise-navigation button:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}

.category-tabs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-top:52px;
}
.category-tab{
  position:relative;
  min-height:128px;
  padding:19px;
  border-radius:21px;
  box-shadow:5px 5px 0 var(--ink);
  text-align:left;
  transition:transform .18s ease,box-shadow .18s ease;
}
.category-tab:hover{transform:translate(-2px,-2px);box-shadow:8px 8px 0 var(--ink)}
.category-tab[data-color="mint"]{background:#dff2e9}
.category-tab[data-color="sun"]{background:#f4df9e}
.category-tab[data-color="coral"]{background:#f8d9cf}
.category-tab[data-color="blue"]{background:#dcecf3}
.category-tab.active::after{
  content:"";
  position:absolute;
  right:18px;
  bottom:17px;
  width:13px;
  height:13px;
  border:2px solid var(--ink);
  border-radius:50%;
  background:var(--coral);
}
.category-tab small{display:block;margin-bottom:24px;font-family:var(--display);font-weight:900}
.category-tab strong{font-family:var(--display);font-size:25px}

.category-summary{
  display:grid;
  grid-template-columns:1fr auto;
  gap:24px;
  align-items:end;
  margin-top:38px;
  padding-bottom:17px;
  border-bottom:2px solid var(--ink);
}
.category-summary-count{
  min-width:82px;
  text-align:right;
  font-family:var(--display);
  font-size:36px;
  font-weight:900;
}
.category-summary-count small{display:block;color:var(--ink-soft);font-family:var(--body);font-size:10px;letter-spacing:.14em}
.exercise-groups{display:grid;gap:34px;margin-top:30px}
.exercise-group-heading{
  display:flex;
  align-items:center;
  gap:15px;
  margin:0 0 14px;
}
.exercise-group-heading h3{margin:0;font-family:var(--display);font-size:22px}
.exercise-group-heading::after{content:"";height:1px;flex:1;background:var(--line)}
.exercise-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:15px;
}
.exercise-card{
  position:relative;
  min-height:245px;
  display:flex;
  flex-direction:column;
  padding:22px;
  border:2px solid var(--ink);
  border-radius:21px;
  background:var(--white);
  box-shadow:5px 5px 0 var(--ink);
}
.exercise-card:nth-child(3n+2){background:#fff9e8}
.exercise-card:nth-child(3n+3){background:#eef7f3}
.exercise-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.level-badge{
  display:inline-flex;
  min-height:25px;
  align-items:center;
  padding:0 9px;
  border:1.5px solid var(--ink);
  border-radius:999px;
  background:var(--paper);
  font-size:10px;
  font-weight:900;
}
.exercise-number{color:var(--ink-soft);font-family:var(--display);font-size:12px;font-weight:900}
.exercise-card h4{margin:27px 0 8px;font-family:var(--display);font-size:25px;line-height:1.18}
.exercise-card p{margin:0;color:var(--ink-soft);font-size:13px;line-height:1.65}
.exercise-meta{display:flex;flex-wrap:wrap;gap:7px;margin:17px 0 21px}
.exercise-meta span{font-size:10px;font-weight:900}
.exercise-meta span+span::before{content:"·";margin-right:7px;color:var(--coral)}
.exercise-start{
  min-height:43px;
  margin-top:auto;
  border-radius:12px;
  background:var(--ink);
  color:var(--white);
  box-shadow:3px 3px 0 var(--coral);
}

.player-heading{padding:28px 0 22px}
.back-to-catalog{
  min-height:39px;
  padding:0 13px;
  border-radius:12px;
  box-shadow:3px 3px 0 var(--ink);
}
.player-title-row{margin-top:30px}
.player-path{margin:0 0 7px;color:var(--coral-dark);font-size:11px;font-weight:900;letter-spacing:.14em}
.player-title-row h1{margin:0;font-family:var(--display);font-size:clamp(34px,5vw,58px);line-height:1.08}
.player-goal{max-width:720px;margin:12px 0 0;color:var(--ink-soft);line-height:1.7}
.practice-stage{
  overflow:hidden;
  border:2px solid var(--ink);
  border-radius:27px;
  background:var(--practice-panel);
}
.stage-status{
  display:grid;
  grid-template-columns:1fr 1fr 1fr 1.5fr;
  background:var(--ink);
  color:var(--white);
}
.stage-status>div{min-width:0;padding:15px 19px;border-right:1px solid rgba(255,255,255,.18)}
.stage-status>div:last-child{border-right:0}
.stage-status span{display:block;margin-bottom:5px;color:rgba(255,255,255,.62);font-size:9px;font-weight:900;letter-spacing:.12em}
.stage-status strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums}

.score-frame{position:relative;min-height:385px;overflow:hidden}
.score-viewport{
  position:relative;
  min-height:385px;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  background:
    linear-gradient(rgba(23,37,45,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(23,37,45,.035) 1px,transparent 1px),
    #fffdf8;
  background-size:24px 24px;
  scrollbar-width:none;
}
.score-viewport::-webkit-scrollbar{display:none}
.score-viewport.is-playing{cursor:not-allowed;touch-action:pan-y}
.fixed-score-cursor{
  position:absolute;
  z-index:6;
  top:10.4%;
  left:50%;
  width:32px;
  height:76.9%;
  border:2px solid var(--coral);
  border-radius:9px;
  background:rgba(239,106,75,.14);
  box-shadow:0 0 0 1px rgba(255,253,248,.72);
  transform:translateX(-50%);
  pointer-events:none;
}
.fixed-score-cursor::before{
  content:"";
  position:absolute;
  top:-7px;
  left:50%;
  width:0;
  height:0;
  border-right:6px solid transparent;
  border-bottom:7px solid var(--coral);
  border-left:6px solid transparent;
  transform:translateX(-50%);
}
.score-track{min-height:385px}
.practice-score{display:block;width:auto;max-width:none;height:385px}
.staff-line,.tab-line,.measure-line,.ledger-line,.note-stem,.note-beam{stroke:var(--ink);vector-effect:non-scaling-stroke}
.staff-line{stroke-width:1.5}
.tab-line{stroke-width:1}
.measure-line{stroke-width:1.4;opacity:.7}
.ledger-line{stroke-width:1.4}
.note-stem{stroke-width:1.7}
.note-beam{stroke-width:5}
.score-label{fill:var(--ink);font-family:var(--display);font-weight:900}
.score-clef{font-size:46px}
.score-tab-label{font-family:var(--body);font-size:14px;font-weight:950;letter-spacing:0;text-anchor:middle}
.measure-number{fill:var(--coral-dark);font-family:var(--body);font-size:11px;font-weight:900;letter-spacing:.08em}
.note-accidental{fill:var(--ink);font-family:var(--display);font-size:18px;font-weight:900;text-anchor:middle}
.notation-note{fill:var(--ink);stroke:var(--ink);stroke-width:1.4}
.notation-note.muted{fill:none;stroke-width:2.3}
.picking-mark{
  fill:none;
  stroke:var(--ink);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}
.tab-note-bg{fill:#fffdf8}
.tab-note{fill:var(--ink);font-family:var(--body);font-size:14px;font-weight:950;text-anchor:middle;dominant-baseline:central}
.measure-hit{fill:transparent;cursor:pointer}
.measure-hit:hover+.measure-outline{fill:rgba(232,180,79,.08)}
.measure-outline{fill:transparent;stroke:transparent;stroke-width:2;pointer-events:none}
.measure-outline.selected{fill:rgba(232,180,79,.12);stroke:var(--sun)}
.score-viewport.is-playing .measure-outline.selected{fill:transparent;stroke:transparent}
.note-group.active .notation-note{fill:var(--coral);stroke:var(--coral-dark)}
.note-group.active .notation-note.muted{fill:none}
.note-group.active .picking-mark{stroke:var(--coral-dark)}
.note-group.active .tab-note-bg{fill:var(--coral)}
.note-group.active .tab-note{fill:var(--white)}
.note-group.active .ledger-line{stroke:var(--coral-dark)}
.note-group{pointer-events:none}

.transport-panel{
  display:grid;
  grid-template-columns:1.15fr 1fr 1.1fr;
  gap:0;
  border-top:2px solid var(--ink);
  background:#f8d9cf;
}
.transport-panel>div,.practice-play-button{min-height:150px;padding:20px;border:0;border-right:1.5px solid var(--ink)}
.control-label{display:block;margin-bottom:13px;font-size:10px;font-weight:950;letter-spacing:.12em}
.tempo-row{display:grid;grid-template-columns:44px 1fr 44px;gap:8px;align-items:center}
.tempo-row button{
  height:40px;
  border-radius:11px;
  box-shadow:2px 2px 0 var(--ink);
}
.tempo-row label{text-align:center}
.tempo-row output{display:block;font-family:var(--display);font-size:32px;font-weight:900;line-height:1}
.tempo-row small{font-size:9px;font-weight:900;letter-spacing:.1em}
.tempo-block input{
  width:100%;
  margin-top:13px;
  accent-color:var(--coral);
  cursor:pointer;
}
.beat-block .control-label{text-align:center}
.player-beats{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  min-height:44px;
}
.player-beats button{
  width:32px;
  height:32px;
  padding:0;
  border:2px solid var(--ink);
  border-radius:50%;
  background:var(--white);
  cursor:pointer;
  transition:transform .08s ease,background .08s ease,box-shadow .08s ease,opacity .08s ease;
}
.player-beats button.accent{background:var(--coral)}
.player-beats button.muted{background:transparent;border-style:dashed;opacity:.48}
.player-beats button.current{transform:scale(1.18);box-shadow:0 0 0 4px rgba(238,93,70,.22)}
.player-beats button.counting{box-shadow:0 0 0 4px var(--sun)}
.player-beats button:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.sound-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:10px}
.sound-controls select{
  min-width:0;
  height:36px;
  padding:0 26px 0 9px;
  border:2px solid var(--ink);
  border-radius:10px;
  background:var(--white);
  color:var(--ink);
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}
.sound-toggle-button{
  min-height:34px;
  padding:0 10px;
  border-radius:10px;
  box-shadow:2px 2px 0 var(--ink);
  font-size:10px;
}
.sound-toggle-button.active{background:#dff2e9}
.practice-play-button{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:11px;
  border-right:0;
  background:var(--coral);
  color:var(--white);
  font-family:var(--display);
  font-size:20px;
  font-weight:900;
  cursor:pointer;
}
.practice-play-button .play-icon{
  position:relative;
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  border:2px solid var(--white);
  border-radius:50%;
}
.practice-play-button .play-icon::before{
  content:"";
  width:0;
  height:0;
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
  border-left:16px solid currentColor;
  transform:translateX(2px);
}
.practice-play-button .play-icon::after{content:"";display:none}
.practice-play-button.is-playing .play-icon::before,
.practice-play-button.is-playing .play-icon::after{
  display:block;
  position:absolute;
  top:14px;
  width:5px;
  height:18px;
  border:0;
  background:currentColor;
  transform:none;
}
.practice-play-button.is-playing .play-icon::before{left:17px}
.practice-play-button.is-playing .play-icon::after{right:17px}
.practice-play-button.is-playing{background:var(--mint)}
.practice-play-button:disabled{cursor:wait;opacity:.65}

.practice-notes{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:17px;
  margin-top:34px;
}
.instruction-card,.tips-card{
  min-height:270px;
  padding:28px;
  border:2px solid var(--ink);
  border-radius:24px;
  box-shadow:6px 6px 0 var(--ink);
}
.instruction-card{background:#dff2e9}
.tips-card{background:#f4df9e}
.instruction-card ol,.tips-card ul{margin:20px 0 0;padding-left:22px;color:var(--ink-soft);line-height:1.85}
.instruction-card li+li,.tips-card li+li{margin-top:7px}
.exercise-navigation{display:flex;justify-content:space-between;gap:16px;margin-top:30px}
.exercise-navigation button{
  min-width:150px;
  min-height:48px;
  padding:0 18px;
  border-radius:14px;
  box-shadow:4px 4px 0 var(--ink);
}
.exercise-navigation button:disabled{opacity:.35;cursor:not-allowed}

@media (max-width:980px){
  .exercise-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .transport-panel{grid-template-columns:1fr 1fr}
  .transport-panel>div:nth-child(2){border-right:0}
  .transport-panel>div{border-bottom:1.5px solid var(--ink)}
  .practice-play-button{grid-column:1/-1;border-top:0}
  .stage-status{grid-template-columns:repeat(2,1fr)}
  .stage-status>div:nth-child(2){border-right:0}
  .stage-status>div:nth-child(-n+2){border-bottom:1px solid rgba(255,255,255,.18)}
}

@media (max-width:760px){
  .practice-shell{width:min(100% - 24px,1240px);padding-top:18px}
  .practice-site-header{align-items:flex-start}
  .brand-text{display:none}
  .compact-action{display:none}
  .practice-hero{padding:42px 0 30px}
  .session-selector{grid-template-columns:1fr;gap:22px;padding:23px 20px}
  .duration-picker{grid-template-columns:repeat(3,1fr)}
  .duration-picker button{font-size:12px}
  .category-tabs{grid-template-columns:repeat(2,1fr);margin-top:42px}
  .category-tab{min-height:108px;padding:16px}
  .category-tab small{margin-bottom:16px}
  .exercise-list{grid-template-columns:1fr}
  .stage-status{grid-template-columns:1fr 1fr}
  .stage-status>div{padding:12px}
  .score-frame,.score-viewport,.score-track{min-height:330px}
  .practice-score{height:330px}
  .transport-panel{grid-template-columns:1fr}
  .transport-panel>div,.practice-play-button{min-height:auto;border-right:0;border-bottom:1.5px solid var(--ink)}
  .practice-play-button{grid-column:auto;min-height:110px;border-bottom:0}
  .practice-notes{grid-template-columns:1fr}
}

@media (max-width:430px){
  .practice-header-actions{gap:6px}
  .header-action{padding:0 11px}
  .category-summary{grid-template-columns:1fr}
  .category-summary-count{text-align:left}
  .stage-status strong{font-size:11px}
  .exercise-navigation button{min-width:0;flex:1;font-size:12px}
}

@media (prefers-reduced-motion:reduce){
  .category-tab,.exercise-card{transition:none}
}
