*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f3ef;
  color: #1d1d1f;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.header {
  margin-bottom: 24px;
}

.subtitle {
  margin-top: 8px;
  color: #4d4d52;
}

.main-menu,
.sub-menu {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.lesson3-note-menu {
  display: none;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.lesson3-note-menu.active {
  display: block;
}

.note-menu-title {
  font-size: 14px;
  color: #6c5b49;
  margin-bottom: 10px;
}

.note-menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note-weight-btn {
  border: 2px solid #e3dfd5;
  background: #f7f2e9;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.note-weight-btn .weight-indicator {
  display: inline-block;
  min-width: 26px;
  text-align: center;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 12px;
  background: #e3dfd5;
  color: #4d4d52;
}

.note-weight-btn.weight-1 {
  border-color: #e3dfd5;
}

.note-weight-btn.weight-2 {
  border-color: #b28d5c;
  background: #f2e7d6;
}

.note-weight-btn.weight-3 {
  border-color: #6a4f2d;
  background: #efe2cf;
}

.timer-menu {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.timer-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timer-label {
  font-size: 13px;
  color: #6c5b49;
}

.timer-buttons {
  display: flex;
  gap: 8px;
}

.timer-btn {
  border: 2px solid #e3dfd5;
  background: #f7f2e9;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.timer-btn.active {
  border-color: #6a4f2d;
  background: #efe2cf;
}

.menu-btn,
.submenu-btn {
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: #e3dfd5;
  cursor: pointer;
  font-weight: 600;
}

.menu-btn.active,
.submenu-btn.active {
  background: #6a4f2d;
  color: #fff;
}

.lesson {
  display: none;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.lesson.active {
  display: block;
}

.lesson-desc {
  color: #4d4d52;
  margin-bottom: 20px;
}

.status {
  font-size: 14px;
  color: #7a6a58;
  margin-bottom: 8px;
  min-height: 18px;
}

.staff-area {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}

.staff-card {
  position: relative;
  width: min(520px, 100%);
  height: 160px;
  border-radius: 12px;
  background: #f9f7f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.staff-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px 18px;
}

.note-dot {
  position: absolute;
  width: 18px;
  height: 12px;
  background: #111;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px #111;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.option-btn {
  padding: 12px;
  border-radius: 12px;
  border: 2px solid #e3dfd5;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: border 0.2s ease, transform 0.2s ease;
}

.option-btn:hover {
  transform: translateY(-2px);
}

.option-btn.correct {
  border-color: #2e7d32;
  background: #e6f4ea;
}

.option-btn.wrong {
  border-color: #c62828;
  background: #fdecea;
}

.lesson-2-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.lesson-3-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.note-text {
  font-size: 24px;
  font-weight: 700;
}

.note-hint {
  color: #7a6a58;
}

.image-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.image-option {
  border: 2px solid #e3dfd5;
  border-radius: 12px;
  padding: 12px;
  background: #faf8f4;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
  position: relative;
}

.image-option:hover {
  transform: translateY(-2px);
}

.image-option.correct {
  border-color: #2e7d32;
  background: #e6f4ea;
}

.image-option.wrong {
  border-color: #c62828;
  background: #fdecea;
}

.image-option.locked {
  pointer-events: none;
}

.image-option .staff-card {
  height: 140px;
}

.countdown {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 12px 0 20px;
}

.fingering-area {
  display: flex;
  justify-content: center;
  min-height: 240px;
  margin-bottom: 18px;
}

.fingering-area img {
  width: 200px;
  max-width: 100%;
}

.next-btn {
  display: block;
  margin: 0 auto;
  border: none;
  background: #6a4f2d;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.next-btn:disabled {
  background: #b6aa9c;
  cursor: not-allowed;
}
