.practice-card {
  border: 1px solid var(--app-border);
  text-align: left;
  font: inherit;
  cursor: pointer;
  width: 100%;
}

.practice-card.is-active {
  border-color: var(--app-border-strong);
  background: color-mix(in srgb, var(--card-accent) 12%, var(--app-surface));
}

.practice-card:focus-visible,
.module-button:focus-visible,
.module-icon-button:focus-visible,
.module-select:focus-visible,
.module-range:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--app-accent-2) 55%, transparent);
  outline-offset: 2px;
}

.practice-workspace {
  margin-top: 22px;
}

.practice-workspace[hidden] {
  display: none;
}

.practice-module {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.module-kicker {
  color: var(--app-accent-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.module-header h2 {
  color: var(--app-text);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.1;
  margin: 0 0 8px;
}

.module-header p {
  color: var(--app-muted);
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 680px;
}

.module-status-pill {
  min-height: 34px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--app-accent);
  background: color-mix(in srgb, var(--app-surface-solid) 80%, transparent);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.module-panel {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: color-mix(in srgb, var(--app-surface-solid) 76%, transparent);
  padding: 18px;
}

.module-panel-title {
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.module-display {
  min-height: 156px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--app-border);
  border-radius: var(--app-radius);
  background: color-mix(in srgb, var(--app-bg-soft) 44%, transparent);
  padding: 20px;
}

.module-big-note {
  color: var(--app-text);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
}

.module-subtext {
  color: var(--app-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 10px;
}

.module-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.module-button,
.module-icon-button {
  min-height: 40px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  color: var(--app-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 13px;
  font: 800 0.88rem/1 var(--app-font);
  cursor: pointer;
}

.module-button.primary {
  border-color: transparent;
  color: #0b1418;
  background: linear-gradient(135deg, var(--app-accent), var(--app-accent-2));
}

.module-button.ghost {
  color: var(--app-accent);
}

.module-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.module-icon-button {
  width: 40px;
  padding: 0;
}

.module-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-field {
  display: grid;
  gap: 7px;
}

.module-field span {
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.module-select,
.module-number {
  min-height: 40px;
  border: 1px solid var(--app-border-strong);
  border-radius: var(--app-radius);
  background: var(--app-surface-solid);
  color: var(--app-text);
  padding: 8px 10px;
  font: 800 0.9rem/1 var(--app-font);
  width: 100%;
}

.module-range {
  accent-color: var(--app-accent-2);
  width: 100%;
}

.module-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-muted) 18%, transparent);
  margin-top: 14px;
}

.module-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--app-accent-2), var(--app-accent));
  transition: width 100ms ease;
}

.module-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.module-stat {
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: color-mix(in srgb, var(--app-surface-solid) 72%, transparent);
}

.module-stat-label {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.module-stat-value {
  color: var(--app-text);
  font-size: 1.35rem;
  font-weight: 900;
}

.note-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
}

.note-chip {
  min-width: 42px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  color: var(--app-muted);
  background: var(--app-surface);
  padding: 8px 10px;
  font-weight: 900;
}

.note-chip.is-active {
  color: #0b1418;
  border-color: transparent;
  background: linear-gradient(135deg, var(--app-accent), var(--app-accent-2));
}

.note-chip.is-done {
  color: #0b1418;
  border-color: transparent;
  background: var(--app-success);
}

.note-chip.is-wrong {
  color: #fff;
  border-color: transparent;
  background: var(--app-danger);
}

.module-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.module-list-row {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: color-mix(in srgb, var(--app-surface-solid) 74%, transparent);
  padding: 12px;
}

.module-list-title {
  color: var(--app-text);
  font-weight: 900;
  margin-bottom: 5px;
}

.module-list-detail {
  color: var(--app-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.module-alert {
  border: 1px solid var(--app-border-strong);
  border-radius: var(--app-radius);
  color: var(--app-text);
  background: color-mix(in srgb, var(--app-accent-2) 12%, var(--app-surface-solid));
  padding: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  margin-top: 14px;
}

.module-result {
  font-weight: 800;
}

.module-result[hidden] {
  display: none;
}

@media (max-width: 980px) {
  .module-grid,
  .module-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .module-header {
    display: grid;
  }

  .module-stats {
    grid-template-columns: 1fr;
  }
}
