/* «Синтез» — оформление. Крупные цели касания, тёмный зал, золото. */

:root {
  --plum: #1d0d16;
  --wine: #3b1728;
  --wine-2: #55203a;
  --gold: #e8c87a;
  --gold-2: #c9a24c;
  --gold-3: #f3d79a;
  --rose: #e7a6c4;
  --mint: #9bd1c7;
  --cream: #f7ead9;
  --coral: #ef8f8f;
  --ink: #2a1220;
  --line: rgba(247, 234, 217, 0.14);
  --card: rgba(247, 234, 217, 0.07);
  --shadow-btn: 0 8px 0 rgba(0, 0, 0, 0.35), 0 16px 34px rgba(0, 0, 0, 0.35);
  --r: 22px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #140a10;
  color: var(--cream);
  font-family: 'Segoe UI', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
  font-size: clamp(16px, 2.05vmin, 21px);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  animation: screenIn 0.3s ease both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hall-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hall-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hall-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(29, 13, 22, 0) 30%, rgba(20, 10, 16, 0.55) 100%);
}

.screen > *:not(.hall-bg) {
  position: relative;
  z-index: 1;
}

.screen-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(24px, 3.6vmin, 42px);
  letter-spacing: 0.04em;
  margin: 0;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.muted {
  opacity: 0.7;
  font-size: 0.9em;
}

.empty {
  padding: 24px;
  text-align: center;
  opacity: 0.75;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------ кнопки */

.btn {
  border-radius: 999px;
  min-height: 68px;
  padding: 0 30px;
  font-weight: 800;
  font-size: clamp(17px, 2.3vmin, 24px);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

.btn.big {
  min-height: clamp(68px, 9.5vmin, 92px);
  font-size: clamp(18px, 2.7vmin, 28px);
  width: 100%;
}

.btn.huge {
  min-height: clamp(76px, 11vmin, 104px);
  font-size: clamp(20px, 3.1vmin, 32px);
  width: min(620px, 86vw);
}

.btn.gold {
  background: linear-gradient(180deg, #f7e0ac, #e0b65f 70%, #d0a24a);
  color: #3a1f12;
  box-shadow: 0 8px 0 #9a7429, 0 16px 30px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn.ghost {
  background: rgba(247, 234, 217, 0.1);
  color: var(--cream);
  border: 2px solid rgba(247, 234, 217, 0.28);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.icon-btn {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 16px;
  background: rgba(247, 234, 217, 0.1);
  border: 1px solid var(--line);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.icon-btn:active {
  background: rgba(247, 234, 217, 0.22);
}

.pill {
  flex: 1;
  min-height: 58px;
  border-radius: 18px;
  background: rgba(247, 234, 217, 0.08);
  border: 1px solid var(--line);
  font-size: clamp(14px, 1.85vmin, 18px);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
}

.pill b {
  color: var(--gold);
}

.pill:active {
  background: rgba(247, 234, 217, 0.18);
}

/* ------------------------------------------------------------ заставка */

.splash {
  align-items: center;
  justify-content: center;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2vmin, 26px);
  width: 100%;
}

.logo {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: clamp(46px, 11vmin, 120px);
  letter-spacing: 0.14em;
  line-height: 1;
  background: linear-gradient(180deg, #fdf1d4, #e8c87a 55%, #b98f3c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 40px rgba(232, 200, 122, 0.25);
  padding-left: 0.14em;
}

.logo-sub {
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: clamp(10px, 1.5vmin, 15px);
  opacity: 0.75;
}

.splash-doll {
  height: clamp(160px, 34vh, 380px);
  aspect-ratio: 220 / 420;
  margin: clamp(4px, 1.5vmin, 18px) 0;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5));
  animation: floatIn 1s ease both;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.splash-hint {
  font-size: clamp(12px, 1.7vmin, 16px);
  opacity: 0.6;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------ профили */

.profiles,
.onboarding {
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vmin, 28px);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 27vw), 1fr));
  gap: clamp(10px, 1.6vmin, 20px);
  width: min(1100px, 96%);
  max-height: 70vh;
  overflow: auto;
  padding: 4px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  min-height: 132px;
}

.profile-card:active {
  background: rgba(247, 234, 217, 0.16);
}

.avatar {
  width: clamp(48px, 8vmin, 84px);
  height: clamp(48px, 8vmin, 84px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(22px, 3.6vmin, 38px);
  font-weight: 800;
  color: #2a1220;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 60%), var(--c, var(--rose));
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.18), 0 8px 18px rgba(0, 0, 0, 0.3);
}

.avatar.sm {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.avatar.xs {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.avatar.plus {
  background: rgba(247, 234, 217, 0.14);
  color: var(--cream);
  font-weight: 400;
}

.profile-name {
  font-weight: 700;
  font-size: clamp(15px, 2vmin, 20px);
}

.profile-stars {
  font-size: clamp(12px, 1.7vmin, 15px);
  color: var(--gold);
}

.onb-card {
  width: min(560px, 94%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vmin, 22px);
  padding: clamp(18px, 3vmin, 34px);
  border-radius: 28px;
  background: rgba(29, 13, 22, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.onb-sub {
  margin: -8px 0 0;
  opacity: 0.72;
  text-align: center;
  font-size: clamp(13px, 1.8vmin, 16px);
}

.name-input {
  width: 100%;
  min-height: 76px;
  border-radius: 18px;
  border: 2px solid rgba(232, 200, 122, 0.45);
  background: rgba(247, 234, 217, 0.1);
  color: var(--cream);
  font: inherit;
  font-size: clamp(22px, 3.4vmin, 32px);
  text-align: center;
  font-weight: 700;
  outline: none;
}

.name-input::placeholder {
  color: rgba(247, 234, 217, 0.4);
}

.color-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.color-dot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid transparent;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.25);
}

.color-dot.on {
  border-color: var(--cream);
  transform: scale(1.08);
}

.color-row.big .color-dot {
  width: 64px;
  height: 64px;
}

.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

/* ------------------------------------------------------------ зал */

.hub {
  gap: 8px;
}

.hub .hall-bg {
  filter: brightness(0.52) saturate(0.85) blur(1.5px);
}

.hub-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(29, 13, 22, 0.55);
  border: 1px solid var(--line);
}

.hub-name {
  font-weight: 700;
  font-size: clamp(15px, 2vmin, 19px);
}

.hub-rank {
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 200, 122, 0.25), rgba(232, 200, 122, 0.08));
  border: 1px solid rgba(232, 200, 122, 0.5);
  color: var(--gold-3);
  font-weight: 700;
  font-size: clamp(13px, 1.8vmin, 17px);
  white-space: nowrap;
}

.hub-counters {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(29, 13, 22, 0.55);
  border: 1px solid var(--line);
  font-size: clamp(12px, 1.7vmin, 16px);
  white-space: nowrap;
}

.stars-chip {
  color: var(--gold);
  font-weight: 800;
}

.hub-lesson {
  display: flex;
  justify-content: center;
}

.lesson-strip {
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(29, 13, 22, 0.5);
  border: 1px solid var(--line);
  font-size: clamp(12px, 1.7vmin, 16px);
  opacity: 0.92;
}

.lesson-strip b {
  color: var(--gold);
  font-size: 1.15em;
}

.concert-banner {
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7e0ac, #d8ab52);
  color: #3a1f12;
  font-weight: 800;
  font-size: clamp(14px, 2vmin, 19px);
  box-shadow: 0 8px 24px rgba(232, 200, 122, 0.3);
  animation: glow 2.2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.12);
  }
}

.doors {
  flex: 1;
  display: grid;
  /* Шесть кабинетов — шесть колонок: перенос на вторую строку не влезал
     в телефон лёжа, а двери должны стоять одним рядом, как в коридоре. */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1.5vmin, 18px);
  align-content: center;
  overflow: auto;
  padding: 4px 2px 10px;
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px 16px;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(58, 26, 42, 0.95), rgba(28, 13, 21, 0.94));
  border: 1px solid rgba(232, 200, 122, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(247, 234, 217, 0.08);
  transition: transform 0.1s ease;
  min-height: min(44vh, 340px);
}

.door-progress {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 14px;
  height: 6px;
  border-radius: 99px;
  background: rgba(247, 234, 217, 0.14);
  overflow: hidden;
}

.door-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #e8c87a, #e7a6c4);
}

.door:active:not(.locked) {
  transform: translateY(3px) scale(0.99);
  background: linear-gradient(180deg, rgba(247, 234, 217, 0.2), rgba(247, 234, 217, 0.06));
}

.door-art {
  width: min(124px, 19vmin);
  height: min(124px, 19vmin);
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.door-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.door-num {
  position: absolute;
  top: 6px;
  left: 10px;
  font-family: Georgia, serif;
  font-size: clamp(14px, 2vmin, 20px);
  color: rgba(232, 200, 122, 0.85);
  font-weight: 700;
}

.door-title {
  font-weight: 700;
  font-size: clamp(14px, 1.95vmin, 19px);
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin-top: 2px;
}

.door-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(12px, 1.7vmin, 15px);
  color: var(--gold);
}

.door-score {
  font-style: normal;
  font-size: clamp(10px, 1.4vmin, 13px);
  opacity: 0.7;
  color: var(--cream);
}

.door.locked {
  opacity: 0.72;
  filter: saturate(0.45);
  background: linear-gradient(180deg, rgba(34, 16, 26, 0.94), rgba(20, 10, 17, 0.95));
}

.door-soon {
  font-size: clamp(10px, 1.4vmin, 12px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  color: var(--gold);
  margin-top: 2px;
}

.hub-bottom {
  display: flex;
  gap: 8px;
}

/* ------------------------------------------------------------ станок */

.ex-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
}

.ex-title {
  flex: 1;
  font-family: Georgia, serif;
  font-size: clamp(16px, 2.3vmin, 24px);
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ex-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
  padding: 4px 12px;
  border-radius: 16px;
  background: rgba(232, 200, 122, 0.12);
  border: 1px solid rgba(232, 200, 122, 0.4);
  margin-right: 2px;
}

.ex-level small {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.ex-level b {
  font-size: clamp(20px, 3vmin, 30px);
  color: var(--gold);
  line-height: 1;
}

.ex-level b span {
  font-size: 0.55em;
  opacity: 0.6;
}

.station-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) 1fr;
  gap: clamp(8px, 1.6vmin, 20px);
  min-height: 0;
}

.station-doll {
  align-self: end;
  height: 100%;
  min-height: 0;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.station-doll svg {
  width: 100%;
  height: 100%;
  display: block;
}

.slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding: 2px;
}

.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(247, 234, 217, 0.07);
  border: 1px solid var(--line);
  text-align: left;
  flex: 1;
}

.slot:active {
  background: rgba(247, 234, 217, 0.16);
}

.slot-i {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  color: #3a1f12;
  background: linear-gradient(180deg, #f3d79a, #d8ab52);
}

.slot-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.slot-title {
  font-weight: 700;
  font-size: clamp(15px, 2vmin, 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-meta {
  font-size: clamp(11px, 1.5vmin, 14px);
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-meta b {
  color: var(--gold);
}

.slot-go {
  font-size: 20px;
  color: var(--gold);
  opacity: 0.85;
}

.slot.done {
  border-color: rgba(155, 209, 199, 0.5);
  background: rgba(155, 209, 199, 0.1);
}

.slot.done .slot-i {
  background: linear-gradient(180deg, #b9e5dc, #7bbdb1);
}

/* Портрет танца вместо номера: круглая медалька с белым паспарту.
   У «Кавказского лирического» портрета нет — остаётся номер. */
.slot-portrait {
  overflow: hidden;
  background: #f7f1e6;
  border: 1px solid rgba(232, 200, 122, 0.55);
}

.slot-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.station-foot {
  padding-top: 10px;
}

/* ------------------------------------------------------------ упражнение */

.ex-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) 1fr;
  gap: clamp(8px, 1.6vmin, 18px);
  min-height: 0;
}

.doll-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}

.mirror-frame {
  position: absolute;
  inset: 0 4% 2% 4%;
  border-radius: 50% 50% 18px 18px / 34% 34% 18px 18px;
  background: linear-gradient(180deg, rgba(247, 234, 217, 0.1), rgba(247, 234, 217, 0.02));
  border: 2px solid rgba(232, 200, 122, 0.28);
  box-shadow: inset 0 0 60px rgba(232, 200, 122, 0.1);
}

.doll {
  position: relative;
  z-index: 1;
  height: 96%;
  max-height: 100%;
  aspect-ratio: 220 / 420;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.5));
}

/* образец-фото в зеркале (упражнение «Позиция») */
.doll-stage.has-photo {
  align-items: center;
}

.photo-frame {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 46% 46% 16px 16px / 26% 26% 16px 16px;
  overflow: hidden;
  border: 2px solid rgba(232, 200, 122, 0.45);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55), inset 0 0 60px rgba(232, 200, 122, 0.08);
  background: #150a11;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  display: block;
}

.photo-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(24, 10, 17, 0.78);
  border: 1px solid rgba(232, 200, 122, 0.45);
  color: var(--gold-3);
  font-size: clamp(9px, 1.3vmin, 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.doll svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ex-intro {
  position: relative;
  margin: 0 auto 8px;
  max-height: 160px;
  overflow: hidden;
  z-index: 2;
  width: min(96%, 720px);
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(29, 13, 22, 0.86);
  border: 1px solid rgba(232, 200, 122, 0.35);
  font-size: clamp(12px, 1.7vmin, 16px);
  line-height: 1.35;
  transition: max-height 0.45s ease, opacity 0.45s ease, margin 0.45s ease, padding 0.45s ease;
  text-align: center;
}

.ex-intro.fade {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
}

.ex-play {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ex-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.step-bar {
  flex: 1;
  display: flex;
  gap: 6px;
}

.step-bar i {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(247, 234, 217, 0.14);
}

.step-bar i.past {
  background: rgba(232, 200, 122, 0.5);
}

.step-bar i.now {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(232, 200, 122, 0.7);
}

.step-text {
  font-size: clamp(11px, 1.6vmin, 14px);
  opacity: 0.75;
  white-space: nowrap;
}

/* ------------------------------------------------------------ ритм */

.rhythm {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.rhythm-track {
  position: relative;
  flex: 1;
  min-height: 84px;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(247, 234, 217, 0.07), rgba(0, 0, 0, 0.3));
  border: 1px solid var(--line);
  overflow: hidden;
}

.rhythm-notes {
  position: absolute;
  inset: 0;
  transition: opacity 0.2s;
}

.rhythm-zone {
  position: absolute;
  left: 18%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(96px, 22vmin);
  height: min(96px, 22vmin);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 200, 122, 0.22), rgba(232, 200, 122, 0) 70%);
}

.zone-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(232, 200, 122, 0.65);
  box-shadow: 0 0 24px rgba(232, 200, 122, 0.35);
}

.zone-ring.pulse {
  animation: zonePulse 0.22s ease;
}

@keyframes zonePulse {
  0% {
    transform: scale(1);
    border-color: rgba(232, 200, 122, 0.95);
  }
  60% {
    transform: scale(1.16);
    border-color: rgba(255, 255, 255, 0.9);
  }
  100% {
    transform: scale(1);
    border-color: rgba(232, 200, 122, 0.65);
  }
}

.zone-label {
  font-size: clamp(18px, 3vmin, 30px);
  color: rgba(232, 200, 122, 0.7);
}

.rnote {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: min(64px, 15vmin);
  height: min(64px, 15vmin);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6, hsl(var(--hue, 330), 62%, 76%) 45%, hsl(var(--hue, 330), 38%, 50%));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2);
  color: #40142a;
  transition: opacity 0.15s;
}

.rnote b {
  font-size: clamp(18px, 3vmin, 28px);
  line-height: 1;
}

.rnote.digit {
  width: min(78px, 18vmin);
  height: min(78px, 18vmin);
  background: radial-gradient(circle at 35% 30%, #fff, #e8c87a 55%, #b98f3c);
}

.rnote.digit b {
  font-size: clamp(30px, 5.4vmin, 54px);
  font-family: Georgia, serif;
}

.rnote.hit {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.7);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.rnote.miss {
  opacity: 0;
  filter: grayscale(1);
}

.rhythm-pad {
  flex: 0 0 min(32vh, 210px);
  border-radius: 26px;
  background: radial-gradient(circle at 50% 42%, rgba(232, 200, 122, 0.2), rgba(232, 200, 122, 0.04) 70%);
  border: 2px solid rgba(232, 200, 122, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
  transition: transform 0.08s ease, background 0.12s;
}

.rhythm-pad:active {
  transform: scale(0.99);
  background: radial-gradient(circle at 50% 42%, rgba(232, 200, 122, 0.34), rgba(232, 200, 122, 0.08) 70%);
}

.rhythm-pad.off {
  animation: shake 0.28s;
}

.pad-label {
  font-size: clamp(15px, 2.4vmin, 24px);
  font-weight: 700;
  line-height: 1.2;
}

.pad-count {
  font-size: clamp(12px, 1.8vmin, 17px);
  opacity: 0.7;
}

/* ------------------------------------------------------------ выбор */

.choice {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.choice-prompt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(29, 13, 22, 0.6);
  border: 1px solid rgba(232, 200, 122, 0.3);
  text-align: center;
  font-weight: 800;
  font-size: clamp(18px, 2.8vmin, 28px);
}

.choice-hint {
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.78em;
}

.choice-grid {
  flex: 1;
  display: grid;
  gap: 10px;
  min-height: 0;
}

.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.choice-card {
  position: relative;
  min-height: 120px;
  border-radius: 24px;
  background: rgba(247, 234, 217, 0.08);
  border: 2px solid rgba(247, 234, 217, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-size: clamp(18px, 2.4vmin, 26px);
  line-height: 1.3;
  transition: transform 0.08s ease, background 0.15s;
}

.choice-card:active {
  transform: scale(0.98);
  background: rgba(247, 234, 217, 0.16);
}

.choice-art {
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 240px;
  aspect-ratio: 220 / 420;
  display: block;
}

.choice-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.choice-card.ok {
  border-color: var(--mint);
  background: rgba(155, 209, 199, 0.18);
}

.choice-card.bad {
  border-color: var(--coral);
  background: rgba(239, 143, 143, 0.16);
  animation: shake 0.32s;
}

.choice-mark {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 22px;
  font-weight: 800;
}

.choice-card.ok .choice-mark {
  color: var(--mint);
}

.choice-card.bad .choice-mark {
  color: var(--coral);
}

.choice-teacher {
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
}

.teacher-bubble {
  width: 100%;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: rgba(29, 13, 22, 0.8);
  border: 1px solid var(--line);
  font-size: clamp(12px, 1.75vmin, 17px);
  line-height: 1.3;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.teacher-bubble.good {
  border-color: rgba(155, 209, 199, 0.6);
  color: #d9f5ef;
}

.teacher-bubble.bad {
  border-color: rgba(239, 143, 143, 0.6);
  color: #ffdede;
}

/* ------------------------------------------------------------ дуга */

.drag {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.drag-cue {
  text-align: center;
  font-size: clamp(13px, 1.9vmin, 18px);
  opacity: 0.9;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(29, 13, 22, 0.5);
}

.drag-svg {
  flex: 1;
  width: 100%;
  min-height: 0;
  touch-action: none;
  border-radius: var(--r);
  background: radial-gradient(circle at 50% 20%, rgba(232, 200, 122, 0.08), rgba(0, 0, 0, 0.25));
  border: 1px solid var(--line);
}

.drag-bar {
  height: 12px;
  border-radius: 99px;
  background: rgba(247, 234, 217, 0.12);
  overflow: hidden;
}

.drag-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #e8c87a, #e7a6c4);
  transition: width 0.1s linear;
}

.drag.off .drag-bar i {
  background: var(--coral);
}

/* ------------------------------------------------------------ оверлеи */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 10, 16, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.overlay.show {
  opacity: 1;
}

.result-card {
  width: min(640px, 94vw);
  max-height: 92vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(18px, 3vmin, 32px);
  border-radius: 30px;
  background: linear-gradient(180deg, #3d1a2c, #24101c);
  border: 1px solid rgba(232, 200, 122, 0.5);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 1.2, 0.4, 1);
}

.overlay.show .result-card {
  transform: none;
}

.result-stars {
  display: flex;
  gap: 10px;
}

.big-star {
  font-size: clamp(44px, 9vmin, 72px);
  line-height: 1;
  color: rgba(247, 234, 217, 0.18);
}

.big-star.on {
  color: var(--gold);
  text-shadow: 0 0 28px rgba(232, 200, 122, 0.7);
  animation: starPop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

@keyframes starPop {
  from {
    transform: scale(0.3) rotate(-25deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.result-line {
  text-align: center;
  font-size: clamp(15px, 2.1vmin, 20px);
  line-height: 1.35;
}

.result-photo {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.result-photo img {
  height: clamp(84px, 13vh, 130px);
  width: auto;
  border-radius: 12px;
  border: 1px solid rgba(232, 200, 122, 0.45);
  display: block;
}

.result-photo span {
  font-size: clamp(11px, 1.6vmin, 14px);
  opacity: 0.82;
  max-width: 220px;
  text-align: left;
  line-height: 1.25;
}

.result-meta {
  font-size: clamp(12px, 1.7vmin, 16px);
  opacity: 0.8;
}

.result-meta b {
  color: var(--gold);
}

.result-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.result-actions .btn {
  flex: 1;
  min-height: 68px;
  width: 50%;
}

.overtake-overlay {
  background: linear-gradient(160deg, rgba(85, 32, 58, 0.96), rgba(29, 13, 22, 0.97));
  z-index: 40;
}

.overtake-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
}

.overtake-title {
  font-family: Georgia, serif;
  font-size: clamp(26px, 6vmin, 56px);
  color: var(--gold);
  letter-spacing: 0.04em;
  animation: starPop 0.5s both;
}

.overtake-name {
  font-size: clamp(38px, 9vmin, 92px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #e7a6c4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.overtake-sub {
  max-width: 620px;
  font-size: clamp(14px, 2vmin, 20px);
  opacity: 0.9;
  line-height: 1.35;
}

/* ------------------------------------------------------------ итог */

.summary,
.concert-final {
  align-items: center;
  justify-content: center;
}

.summary-card {
  width: min(900px, 96%);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vmin, 30px);
  padding: clamp(16px, 3vmin, 34px);
  border-radius: 30px;
  background: rgba(29, 13, 22, 0.82);
  border: 1px solid rgba(232, 200, 122, 0.35);
  backdrop-filter: blur(8px);
}

.summary-doll {
  height: clamp(160px, 34vh, 320px);
  aspect-ratio: 220 / 420;
  flex: 0 0 auto;
}

.summary-doll svg {
  width: 100%;
  height: 100%;
}

.summary-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.summary-main .screen-title {
  text-align: left;
}

.summary-stars {
  font-size: clamp(20px, 3vmin, 30px);
  color: var(--gold);
  font-weight: 800;
}

.summary-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: clamp(14px, 1.9vmin, 18px);
}

.summary-lines b {
  color: var(--gold-3);
}

.summary-actions {
  display: flex;
  gap: 10px;
}

.summary-actions .btn {
  flex: 1;
  min-height: 68px;
}

/* ------------------------------------------------------------ лестница */

.ladder-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(4px, 0.9vmin, 10px);
  overflow: auto;
  padding: clamp(10px, 1.6vmin, 18px);
  margin: 4px 0;
  border-radius: 24px;
  background: rgba(22, 10, 17, 0.74);
  border: 1px solid rgba(232, 200, 122, 0.18);
  backdrop-filter: blur(4px);
}

.ladder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(247, 234, 217, 0.06);
  border: 1px solid transparent;
  min-height: 54px;
}

.ladder-row.me {
  background: rgba(232, 200, 122, 0.16);
  border-color: rgba(232, 200, 122, 0.6);
  box-shadow: 0 0 24px rgba(232, 200, 122, 0.18);
}

.ladder-row.top {
  background: linear-gradient(90deg, rgba(232, 200, 122, 0.22), rgba(232, 200, 122, 0.05));
}

.ladder-place {
  width: 26px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: clamp(14px, 2vmin, 20px);
  color: var(--gold);
  opacity: 0.9;
}

.ladder-name {
  min-width: 96px;
  font-weight: 600;
  font-size: clamp(13px, 1.8vmin, 17px);
  white-space: nowrap;
}

.ladder-name i {
  font-style: normal;
  opacity: 0.6;
  font-size: 0.86em;
}

.ladder-bar {
  flex: 1;
  height: 12px;
  border-radius: 99px;
  background: rgba(247, 234, 217, 0.1);
  overflow: hidden;
}

.ladder-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c), rgba(255, 255, 255, 0.45));
}

.ladder-score {
  min-width: 62px;
  text-align: right;
  font-weight: 800;
  color: var(--gold);
  font-size: clamp(12px, 1.7vmin, 16px);
}

.ladder-foot {
  text-align: center;
  padding: 10px 20px;
  font-size: clamp(13px, 1.9vmin, 18px);
  opacity: 0.95;
  align-self: center;
  border-radius: 999px;
  background: rgba(22, 10, 17, 0.7);
  border: 1px solid rgba(232, 200, 122, 0.18);
}

.ladder-foot b {
  color: var(--gold);
}

/* ------------------------------------------------------------ гардероб */

.closet-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) 1.3fr;
  gap: clamp(8px, 1.8vmin, 20px);
  min-height: 0;
}

.closet-preview {
  height: 100%;
  max-height: 70vh;
  align-self: center;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.closet-preview svg {
  height: 100%;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.outfit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: center;
  overflow: auto;
  padding: 2px;
}

.outfit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #24111c;
  border: 1px solid var(--line);
  text-align: left;
  min-height: 82px;
}

.outfit.on {
  border-color: var(--gold);
  background: rgba(232, 200, 122, 0.15);
}

.outfit.locked {
  opacity: 1;
  background: #1a0d16;
  border-color: rgba(247, 234, 217, 0.08);
}

.outfit.locked .outfit-name,
.outfit.locked .outfit-dot,
.outfit.locked .outfit-need {
  opacity: 0.55;
}

.outfit-dot {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.25);
}

.outfit-name {
  flex: 1;
  min-width: 0;
  font-size: clamp(12px, 1.75vmin, 17px);
  font-weight: 600;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.outfit-need {
  flex: 0 0 auto;
  font-size: clamp(11px, 1.5vmin, 13px);
  color: var(--gold);
  opacity: 0.9;
  text-align: right;
}

/* ------------------------------------------------------------ дневник */

.diary-list {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 2px;
}

.diary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(247, 234, 217, 0.06);
  font-size: clamp(13px, 1.8vmin, 17px);
}

.diary-date {
  opacity: 0.6;
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}

.diary-title {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diary-lvl {
  opacity: 0.7;
  font-size: 0.88em;
  white-space: nowrap;
}

/* ------------------------------------------------------------ концерт */

.concert-locked {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-size: clamp(15px, 2.2vmin, 21px);
}

.big-lock {
  font-size: clamp(48px, 9vmin, 90px);
  opacity: 0.85;
}

.concert-steps {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.6vmin, 18px);
  padding: 8px 0;
  min-height: 0;
}

.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(247, 234, 217, 0.1), rgba(247, 234, 217, 0.03));
  border: 2px solid var(--line);
  min-height: 0;
}

.style-card.on {
  border-color: var(--gold);
  background: rgba(232, 200, 122, 0.14);
}

.style-doll {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.style-doll svg {
  height: 100%;
  max-width: 90%;
  width: auto;
}

.style-title {
  font-family: Georgia, serif;
  font-size: clamp(16px, 2.4vmin, 24px);
  font-weight: 700;
}

.style-sub {
  font-size: clamp(11px, 1.6vmin, 15px);
  opacity: 0.7;
}

.concert-costume {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

.concert-costume .closet-preview {
  flex: 1;
  min-height: 0;
}

.stage-glow .mirror-frame {
  border-color: rgba(232, 200, 122, 0.6);
  box-shadow: inset 0 0 90px rgba(232, 200, 122, 0.25), 0 0 60px rgba(232, 200, 122, 0.15);
}

.spotlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 244, 214, 0.35), rgba(255, 244, 214, 0) 60%);
  animation: sway 6s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% {
    transform: translateX(-4%);
  }
  50% {
    transform: translateX(4%);
  }
}

.final-card {
  width: min(760px, 96%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(16px, 3vmin, 32px);
  border-radius: 30px;
  background: rgba(29, 13, 22, 0.85);
  border: 1px solid rgba(232, 200, 122, 0.5);
  backdrop-filter: blur(8px);
  max-height: 94vh;
  overflow: auto;
}

.final-doll {
  height: clamp(120px, 26vh, 240px);
  aspect-ratio: 220 / 420;
}

.final-doll svg {
  width: 100%;
  height: 100%;
}

.jury {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jury-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(247, 234, 217, 0.07);
  font-size: clamp(13px, 1.8vmin, 17px);
}

.jury-row b {
  color: var(--gold);
  font-size: 1.15em;
}

.final-cup {
  font-size: clamp(18px, 2.8vmin, 26px);
  font-weight: 800;
  color: var(--gold);
}

.final-line {
  text-align: center;
  font-size: clamp(13px, 1.9vmin, 18px);
  opacity: 0.9;
}

/* ------------------------------------------------------------ звёзды, конфетти, тост */

.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  font-style: normal;
  color: rgba(247, 234, 217, 0.22);
  font-size: 1em;
}

.star.on {
  color: var(--gold);
}

.stars.tiny {
  font-size: clamp(10px, 1.4vmin, 13px);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}

.confetti-layer i {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation-name: fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(540deg);
  }
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 70;
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 16px;
  background: rgba(29, 13, 22, 0.94);
  border: 1px solid rgba(232, 200, 122, 0.5);
  font-size: clamp(13px, 1.8vmin, 17px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------ адаптив */

@media (orientation: portrait) {
  .hub .doors {
    grid-template-columns: repeat(2, 1fr);
  }

  .door {
    min-height: 108px;
  }

  .hub-bottom {
    flex-wrap: wrap;
  }

  .hub-bottom .pill {
    flex: 1 1 46%;
    min-height: 54px;
  }

  .ex-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(130px, 30vh) 1fr;
  }

  .station-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .station-doll {
    display: none;
  }

  .closet-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 26vh) 1fr;
  }

  .closet-preview svg {
    height: 100%;
  }

  .summary-card {
    flex-direction: column;
  }

  .summary-doll {
    height: clamp(90px, 18vh, 160px);
  }

  .summary-main .screen-title {
    text-align: center;
  }

  .summary-actions .btn {
    min-height: 64px;
  }

  .concert-steps {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
  }

  .style-card {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 8px 14px;
  }

  .style-doll {
    width: 84px;
    flex: 0 0 84px;
    height: 100%;
  }

  .ladder-name {
    min-width: 70px;
  }

  .choice-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 520px) {
  .logo {
    font-size: clamp(34px, 8vmin, 64px);
  }
  .splash-doll {
    height: 26vh;
  }
  .rhythm-pad {
    flex-basis: min(26vh, 150px);
  }
  .hub-bottom .pill {
    min-height: 48px;
  }
  .slot {
    min-height: 60px;
  }
}

/* ------------------------------------------------------------ версия 0.2 */

/* счётчик звёзд: «12 из 30» вместо голого числа */
.chip-of {
  opacity: 0.72;
  font-weight: 600;
}

.hub-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(247, 234, 217, 0.12);
  overflow: hidden;
  margin: -2px 0 2px;
}

.hub-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #e8c87a, #e7a6c4);
  transition: width 0.4s ease;
}

/* счётчик выбранных карточек: «Выбрано 1 из 3» */
.choice-count {
  align-self: flex-start;
  padding: 0 4px 2px;
  font-size: clamp(11px, 1.5vmin, 14px);
  opacity: 0.72;
}

.choice-count.full {
  color: var(--mint);
  opacity: 1;
}

/* хитбокс 72 px при прежней графике: кнопки «←» и цветные точки */
.icon-btn {
  position: relative;
}

.icon-btn::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 22px;
}

.color-dot {
  position: relative;
}

.color-dot::after {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
}

/* вопрос «Выйти из упражнения?» */
.exit-card {
  width: min(460px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(20px, 3vmin, 30px);
  border-radius: 26px;
  background: linear-gradient(180deg, #3d1a2c, #24101c);
  border: 1px solid rgba(232, 200, 122, 0.5);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.exit-title {
  font-size: clamp(19px, 2.8vmin, 26px);
  font-weight: 800;
}

.exit-sub {
  opacity: 0.78;
  font-size: clamp(13px, 1.8vmin, 16px);
}

/* промах на дуге видно: красная дуга и полоса */
.drag.off .drag-arc {
  stroke: rgba(239, 143, 143, 0.55);
}

.drag.off .drag-progress {
  stroke: var(--coral);
}

.jury-row i {
  font-style: normal;
  font-size: 0.85em;
  font-weight: 600;
  opacity: 0.6;
}

/* ------------------------------------------------------------ версия 0.3 */

/* кубки — кнопка: открывают награды зала */
.cup-chip {
  font-family: inherit;
  color: var(--gold);
  cursor: pointer;
  border-color: rgba(232, 200, 122, 0.45);
  background: rgba(232, 200, 122, 0.1);
}

.cup-chip:active {
  transform: translateY(1px);
}

.hall-decor {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: -2px 0 2px;
}

.decor-chip {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  opacity: 0.95;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.decor-chip svg {
  width: 100%;
  height: 100%;
  display: block;
}

.concert-banner.done {
  background: linear-gradient(180deg, #b9e6db, #6fbfae);
  color: #16352f;
  animation: none;
}

.ladder-foot small {
  display: block;
  margin-top: 2px;
  font-size: 0.78em;
  font-weight: 400;
  opacity: 0.66;
}

.final-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.season-card {
  width: min(460px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(20px, 3vmin, 30px);
  border-radius: 28px;
  background: linear-gradient(180deg, #3d1a2c, #24101c);
  border: 1px solid rgba(232, 200, 122, 0.5);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.season-card .btn {
  width: 100%;
}

.final-actions .btn {
  width: 100%;
  min-height: 64px;
}

/* награды зала */
.awards-sub {
  align-self: center;
  text-align: center;
  margin: 0 auto 4px;
  max-width: min(760px, 92%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(22, 10, 17, 0.72);
  border: 1px solid var(--line);
  font-size: clamp(12px, 1.8vmin, 16px);
  opacity: 0.92;
}

.awards-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.6vmin, 16px);
  align-content: center;
  overflow: auto;
  padding: 4px 2px 10px;
}

.award-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(58, 26, 42, 0.95), rgba(28, 13, 21, 0.94));
  border: 1px solid rgba(232, 200, 122, 0.28);
  min-height: 210px;
}

.award-card.owned {
  border-color: rgba(155, 209, 199, 0.6);
  background: linear-gradient(180deg, rgba(35, 58, 50, 0.9), rgba(20, 32, 28, 0.94));
}

.award-art {
  width: clamp(56px, 9vmin, 84px);
  height: clamp(56px, 9vmin, 84px);
  display: block;
}

.award-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.award-name {
  font-weight: 700;
  font-size: clamp(12px, 1.7vmin, 16px);
  text-align: center;
}

.award-price {
  font-size: clamp(11px, 1.5vmin, 14px);
  opacity: 0.7;
}

.award-buy {
  min-height: 52px;
  width: 100%;
  font-size: clamp(12px, 1.6vmin, 15px);
}

.award-buy:disabled {
  opacity: 0.45;
}

.award-owned {
  color: var(--mint);
  font-weight: 700;
  font-size: clamp(12px, 1.6vmin, 15px);
}

@media (max-width: 720px) {
  .awards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .award-card {
    min-height: 170px;
  }
}

/* ------------------------------------------------------------ версия 0.5 */

/* сохранение прогресса в файл — блок для родителей в дневнике */
.diary-parents {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(22, 10, 17, 0.72);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diary-parents-title {
  font-weight: 800;
  color: var(--gold);
  font-size: clamp(13px, 1.8vmin, 16px);
}

.diary-parents-text {
  font-size: clamp(11px, 1.5vmin, 14px);
  line-height: 1.3;
  opacity: 0.75;
}

.diary-parents-actions {
  display: flex;
  gap: 8px;
}

.diary-parents-actions .btn {
  flex: 1;
  min-height: 54px;
  font-size: clamp(12px, 1.6vmin, 15px);
}

/* ------------------------------------------------------------ версия 0.6 */

/* «Угадай композитора»: послушать и выбрать */
.listen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.listen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: clamp(64px, 10vh, 96px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(232, 200, 122, 0.2), rgba(232, 200, 122, 0.06));
  border: 1px solid rgba(232, 200, 122, 0.55);
  color: var(--gold);
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(16px, 2.4vmin, 22px);
}

.listen-btn:active {
  transform: translateY(2px);
}

.listen-btn.playing {
  animation: glow 1.2s ease-in-out infinite;
  border-color: rgba(232, 200, 122, 0.95);
}

.listen-note {
  font-size: 1.5em;
  line-height: 1;
}

.listen-card {
  min-height: clamp(58px, 9vh, 88px);
  font-size: clamp(15px, 2.2vmin, 20px);
}

/* ------------------------------------------------------------ версия 0.7 */

/* 10-й уровень: тупика больше нет — золотая отметка */
.slot.maxed {
  border-color: rgba(232, 200, 122, 0.6);
  background: linear-gradient(90deg, rgba(232, 200, 122, 0.14), rgba(247, 234, 217, 0.05));
}

.slot-max {
  font-style: normal;
  font-size: 0.78em;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.station-hint {
  text-align: center;
  margin: 2px 0 6px;
  font-size: clamp(11px, 1.5vmin, 14px);
  opacity: 0.62;
}

/* ------------------------------------------------------------ версия 0.8 */

/* «Творческая студия»: раскраска афиши на всю ширину */
.ex-body.full {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.ex-body.full .doll-stage {
  display: none;
}

.paint {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 3vmin, 40px);
  min-height: 0;
}

.paint-stage {
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.poster-svg {
  height: 100%;
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.poster-svg [data-region] {
  transition: color 0.18s ease;
  cursor: pointer;
}

.paint-side {
  width: min(320px, 34vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.paint-task {
  text-align: center;
  font-weight: 800;
  font-size: clamp(15px, 2.2vmin, 20px);
}

.paint-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.paint-dot {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid transparent;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.25);
  font-family: inherit;
}

.paint-dot::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

.paint-dot.on {
  border-color: var(--cream);
  transform: scale(1.08);
}

.paint-count {
  text-align: center;
  font-size: clamp(12px, 1.6vmin, 15px);
  opacity: 0.75;
}

.paint-done {
  width: 100%;
  min-height: 60px;
}

.paint-done:disabled {
  opacity: 0.45;
}

.paint-hint {
  text-align: center;
  font-size: clamp(11px, 1.5vmin, 14px);
  opacity: 0.6;
}

@media (max-width: 720px) {
  .paint {
    flex-direction: column;
    align-items: stretch;
  }

  .paint-stage {
    height: auto;
  }

  .paint-side {
    width: 100%;
  }

  .poster-svg {
    height: 42vh;
    max-height: 42vh;
    margin: 0 auto;
  }

  .paint-dot {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------ версия 0.9.3 */
/* зал славы: сцена с куклой и купленными украшениями */

.hall-scene {
  gap: 8px;
  background: #1b0d16;
}

.hall-scene .hall-bg::after {
  display: none;
}

/* затемнение под шапкой, чтобы текст не спорил с гирляндой */
.hall-scene::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(90px, 16vh, 150px);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 6, 11, 0.82), rgba(14, 6, 11, 0));
}

.hall-sub {
  display: block;
  margin-top: 2px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(11px, 1.7vmin, 15px);
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.82;
}

.hall-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.hall-badges {
  display: flex;
  gap: 10px;
}

.hall-badge {
  width: clamp(34px, 5.2vmin, 52px);
  height: clamp(34px, 5.2vmin, 52px);
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(58, 26, 42, 0.9), rgba(22, 10, 17, 0.9));
  border: 1px solid rgba(232, 200, 122, 0.22);
  opacity: 0.35;
  filter: grayscale(1);
}

.hall-badge.on {
  opacity: 1;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
  border-color: rgba(232, 200, 122, 0.55);
}

.hall-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hall-note {
  margin: 0;
  max-width: min(760px, 92%);
  text-align: center;
  font-size: clamp(12px, 1.7vmin, 16px);
  opacity: 0.92;
}

.hall-foot .btn {
  min-width: min(340px, 80vw);
}

/* полка украшений в зале стала кнопкой «Зал славы» */
button.hall-decor {
  align-self: center;
  border: 1px solid rgba(232, 200, 122, 0.3);
  background: rgba(22, 10, 17, 0.55);
  padding: 4px 14px 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

button.hall-decor:active {
  transform: translateY(1px);
}

.hall-decor-go {
  font-size: clamp(11px, 1.6vmin, 14px);
  color: #f0ce8b;
  opacity: 0.85;
  margin-left: 6px;
  white-space: nowrap;
}

.awards-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 12px 2px;
}

.awards-foot-note {
  font-size: clamp(12px, 1.8vmin, 16px);
  opacity: 0.85;
}

.awards-foot .btn {
  min-height: 54px;
  padding: 0 22px;
  font-size: clamp(14px, 1.9vmin, 18px);
}

@media (max-width: 720px) {
  .hall-badges {
    gap: 6px;
  }

  .hall-foot .btn {
    min-height: 56px;
  }
}

@media (max-height: 620px) {
  .hall-foot {
    gap: 6px;
  }
}

/* ------------------------------------------------------------ версия 0.9.4 */
/* награды школы: сертификат, промокод на мерч, билет другу */

.school {
  gap: 8px;
}

.school-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 2vh, 18px);
}

.school-grid {
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vmin, 18px);
  align-content: center;
  align-items: start;
  overflow: auto;
  padding: 4px 2px 10px;
}

.school-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 18px 16px;
  min-height: clamp(240px, 34vh, 360px);
  justify-content: center;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(58, 26, 42, 0.95), rgba(28, 13, 21, 0.94));
  border: 1px solid rgba(232, 200, 122, 0.28);
  text-align: center;
}

.school-card.locked {
  opacity: 0.78;
  border-style: dashed;
}

.school-icon {
  display: block;
  width: clamp(34px, 5vmin, 52px);
  height: clamp(34px, 5vmin, 52px);
}

.school-ico {
  width: 100%;
  height: 100%;
  display: block;
}

.school-title {
  font-weight: 800;
  font-size: clamp(14px, 2vmin, 19px);
}

.school-text {
  margin: 0;
  font-size: clamp(12px, 1.7vmin, 15px);
  opacity: 0.86;
  max-width: 34ch;
  min-height: 3.4em;
}

.school-code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: clamp(15px, 2.2vmin, 21px);
  letter-spacing: 0.12em;
  color: #f0ce8b;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(14, 6, 11, 0.5);
}

.school-card .btn {
  width: 100%;
  min-height: 54px;
  font-size: clamp(13px, 1.8vmin, 17px);
}

.school-card .btn:disabled {
  opacity: 0.45;
}

.code-big {
  font-family: Consolas, 'Courier New', monospace;
  font-size: clamp(26px, 5.2vmin, 46px);
  letter-spacing: 0.12em;
  color: #f0ce8b;
  padding: 8px 0 4px;
}

.code-card {
  max-width: min(520px, 92vw);
}

@media (max-width: 720px) {
  .school-body {
    justify-content: flex-start;
    overflow: auto;
  }

  .school-grid {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .school-card {
    padding: 12px 14px;
    gap: 6px;
    min-height: 0;
  }

  .school-text {
    min-height: 0;
  }

  .school-icon {
    width: 32px;
    height: 32px;
  }
}

/* ------------------------------------------------------------ версия 0.9.5 */
/* рождественский бал: карточка и арена «хоровода» */

.ny {
  gap: 8px;
}

.ny-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ny-card {
  align-self: center;
  max-width: min(780px, 94%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(16px, 3vmin, 30px);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(40, 26, 52, 0.95), rgba(18, 10, 24, 0.95));
  border: 1px solid rgba(160, 190, 240, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.ny-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(20px, 3vmin, 34px);
  color: #eaf1ff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.ny-text {
  margin: 0;
  font-size: clamp(13px, 1.9vmin, 17px);
  line-height: 1.45;
  opacity: 0.92;
  max-width: 56ch;
}

.ny-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ny-rule {
  font-size: clamp(12px, 1.7vmin, 15px);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(160, 190, 240, 0.18);
}

.ny-card .btn {
  min-width: min(360px, 80vw);
}

.ny-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.ny-stars {
  font-size: clamp(22px, 4vmin, 36px);
  letter-spacing: 0.1em;
}

.ny-game {
  flex: 1;
  min-height: 0;
  display: flex;
}

.round {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.round-hud {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.round-chip {
  font-size: clamp(12px, 1.8vmin, 16px);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(18, 10, 24, 0.72);
  border: 1px solid rgba(160, 190, 240, 0.25);
}

.round-arena {
  flex: 1;
  min-height: 0;
  display: flex;
  background: linear-gradient(180deg, #0f1830, #22304f 58%, #141c31);
  border-radius: 18px;
  overflow: hidden;
}

.round-svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.round-bump {
  animation: roundBump 0.22s ease;
}

@keyframes roundBump {
  50% {
    transform: translateX(5px);
  }
}

.round-hint {
  margin: 0;
  text-align: center;
  font-size: clamp(11px, 1.6vmin, 14px);
  opacity: 0.75;
}

@media (max-width: 720px) {
  .ny-card {
    padding: 14px 14px 16px;
    gap: 8px;
  }

  .round-hint {
    font-size: 11px;
  }
}

@media (max-height: 560px) {
  .round-hint {
    display: none;
  }
}

/* ------------------------------------------------------------ версия 0.9.6 */
/* раздел «Музыка»: несколько мелодий в одном упражнении */

.listen-step {
  display: block;
  margin-top: 4px;
  font-size: clamp(11px, 1.5vmin, 13px);
  letter-spacing: 0.06em;
  opacity: 0.6;
}

/* Соте: кукла подпрыгивает на каждый счёт */
.doll.hop {
  animation: dollHop 0.28s ease;
}

@keyframes dollHop {
  0% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-7%);
  }
  100% {
    transform: translateY(0);
  }
}

/* Карточка «это было»: название произведения крупно по центру */
.listen {
  position: relative;
}

.listen-learn[hidden] {
  display: none;
}

.listen-learn:not(.on) {
  pointer-events: none;
}

.listen-learn {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.4vmin, 28px);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 40%, #3a1a2a, #0e060b);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.listen-learn.on {
  opacity: 1;
}

.learn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vmin, 12px);
  max-width: 94%;
  text-align: center;
}

.learn-kicker {
  font-size: clamp(10px, 1.5vmin, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}

.learn-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(26px, 5.4vmin, 52px);
  line-height: 1.12;
  color: #f7e7c6;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.55);
}

.learn-sub {
  font-size: clamp(15px, 2.4vmin, 24px);
  color: var(--gold);
}

.learn-note {
  font-size: clamp(12px, 1.7vmin, 16px);
  opacity: 0.7;
  max-width: 52ch;
}

.listen-learn .btn {
  margin-top: clamp(6px, 1.6vmin, 16px);
  min-width: min(320px, 70vw);
}

@media (max-width: 720px) {
  .learn-title {
    font-size: clamp(22px, 7vw, 34px);
  }
}

/* ── гастроли: города-открытки ─────────────────────────────────────────── */

.hub-tour {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.tour-banner {
  background: linear-gradient(180deg, #d6e6ff, #8fb0e8);
  color: #1b2740;
  box-shadow: 0 8px 24px rgba(143, 176, 232, 0.28);
  animation: none;
}

.tours .tour-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vmin, 20px);
  align-content: center;
  padding: clamp(8px, 2vmin, 20px);
  min-height: 0;
}

.tour-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 10px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 15, 24, 0.9), rgba(20, 10, 16, 0.94));
  border: 2px solid var(--line);
  text-align: center;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tour-card .tour-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.tour-card .tour-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.tour-city {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(16px, 2.4vmin, 24px);
  font-weight: 700;
}

.tour-sub {
  font-size: clamp(11px, 1.6vmin, 14px);
  opacity: 0.72;
}

.tour-state {
  font-size: clamp(11px, 1.6vmin, 14px);
  opacity: 0.8;
}

.tour-card.next {
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(232, 200, 122, 0.18);
}

.tour-card.next .tour-state {
  color: var(--gold);
  opacity: 1;
  font-weight: 700;
}

.tour-card.done .tour-art {
  filter: saturate(0.75) brightness(0.85);
}

.tour-card.done .tour-state {
  color: var(--gold);
  opacity: 1;
}

.tour-card.locked .tour-art {
  filter: grayscale(0.55) brightness(0.55);
}

.tour-card.locked .tour-city,
.tour-card.locked .tour-sub {
  opacity: 0.55;
}

.tour-card:not(.locked):active {
  transform: scale(0.985);
}

.tour-foot {
  text-align: center;
  font-size: clamp(12px, 1.8vmin, 16px);
  opacity: 0.7;
  padding-bottom: 6px;
}

.tour-final {
  align-items: center;
  justify-content: center;
}

.tour-final-card .tour-postcard {
  width: min(400px, 62vw);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.tour-postcard svg {
  display: block;
  width: 100%;
  height: auto;
}

.tour-glow {
  box-shadow: inset 0 0 90px hsl(var(--tour-hue, 24) 60% 40% / 0.35);
}

@media (max-width: 720px) {
  .tours .tour-list {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .tour-card .tour-art {
    aspect-ratio: 21 / 9;
  }

  .tour-final-card .tour-postcard {
    width: min(280px, 76vw);
  }
}

/* ── полка открыток гастролей в зале славы ─────────────────────────────── */

.hall-postcards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.4vmin, 14px);
  flex-wrap: nowrap;
  padding: 6px clamp(8px, 1.4vmin, 12px);
  border-radius: 14px;
  background: rgba(22, 11, 18, 0.78);
  border: 1px solid rgba(232, 200, 122, 0.22);
  backdrop-filter: blur(6px);
}

.hall-postcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: clamp(88px, 11.2vmin, 124px);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: clamp(10px, 1.4vmin, 13px);
}

.hall-postcard .hp-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(232, 200, 122, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.hall-postcard .hp-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hall-postcard .hp-art.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-color: rgba(247, 234, 217, 0.22);
  box-shadow: none;
  background: rgba(247, 234, 217, 0.05);
  font-family: Georgia, serif;
  font-size: clamp(18px, 3vmin, 28px);
  color: rgba(247, 234, 217, 0.3);
}

.hall-postcard .hp-name {
  display: none;
}

.hall-postcard.on:active .hp-art {
  transform: scale(0.97);
}

.hp-count {
  font-size: clamp(10px, 1.4vmin, 13px);
  opacity: 0.6;
  align-self: center;
}

@media (max-width: 720px) {
  .hall-postcard {
    width: clamp(70px, 18vw, 88px);
  }

  .hall-postcards {
    gap: 8px;
    padding: 5px 10px;
  }

  .hp-count {
    display: none;
  }
}
/* ------------------------------------------------- 0.9.8: подсказки такта */

.rhythm {
  position: relative;
}

.rhythm-help-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(232, 200, 122, 0.5);
  background: rgba(28, 18, 24, 0.85);
  color: #E8C87A;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  z-index: 3;
}

.rhythm-mute {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(120, 30, 40, 0.75);
  border: 1px solid rgba(255, 160, 160, 0.35);
  white-space: nowrap;
}

.rhythm-pad {
  cursor: pointer;
  position: relative;
  outline-offset: 4px;
}

.pad-hand {
  font-size: clamp(22px, 4vmin, 34px);
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.pad-hint {
  font-size: clamp(11px, 1.7vmin, 15px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.62;
}

.rhythm-pad.beat {
  animation: padBeat 0.18s ease;
}

.rhythm-pad.beat-accent {
  animation: padBeat 0.22s ease;
  box-shadow: 0 0 0 2px rgba(232, 200, 122, 0.55), 0 0 38px rgba(232, 200, 122, 0.35);
}

@keyframes padBeat {
  0% { transform: scale(1); }
  45% { transform: scale(1.015); background-color: rgba(232, 200, 122, 0.06); }
  100% { transform: scale(1); }
}

.rhythm-help {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 8, 11, 0.82);
  backdrop-filter: blur(3px);
  border-radius: var(--r);
  z-index: 4;
}

.rhythm-help[hidden] {
  display: none;
}

.rhythm-help-in {
  width: min(560px, 92%);
  background: #241820;
  border: 1px solid rgba(232, 200, 122, 0.35);
  border-radius: 20px;
  padding: 18px 22px;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.rhythm-help-in h3 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: clamp(19px, 2.6vmin, 26px);
  color: #F3E6EA;
}

.rhythm-help-in ol {
  margin: 0 0 14px 18px;
  padding: 0;
  line-height: 1.45;
  font-size: clamp(13px, 1.9vmin, 17px);
  color: #EADDE2;
}

.rhythm-help-in li {
  margin-bottom: 6px;
}

.rhythm-help-in .btn {
  width: 100%;
}

/* Клавиатура: видно, на чём фокус */
button:focus-visible,
[role='button']:focus-visible,
.btn:focus-visible,
.door:focus-visible,
.slot:focus-visible,
.choice-card:focus-visible {
  outline: 3px solid #E8C87A;
  outline-offset: 3px;
}

.drag-cue {
  letter-spacing: 0.01em;
}

/* ---------------------------------------------- 0.9.9: студия-афиша */

.studio {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 14px;
  min-height: 0;
  padding: 4px 2px;
}

.studio-poster {
  border-radius: var(--r);
  overflow: hidden;
  background: #120b10;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 10px;
}

.studio-poster svg {
  height: 100%;
  max-height: 70vh;
  width: auto;
}

.studio-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.studio-brief {
  font-size: clamp(13px, 1.8vmin, 16px);
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(232, 200, 122, 0.09);
  border: 1px solid rgba(232, 200, 122, 0.28);
}

.studio-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-step {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.studio-label {
  font-size: clamp(12px, 1.7vmin, 15px);
  font-weight: 700;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 7px;
}

.studio-label i {
  font-style: normal;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: rgba(232, 200, 122, 0.18);
  color: #E8C87A;
}

.studio-opts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.studio-opt {
  flex: 1 1 30%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  font-size: clamp(12px, 1.7vmin, 15px);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

.studio-opt:hover {
  border-color: rgba(232, 200, 122, 0.5);
}

.studio-opt:active {
  transform: scale(0.985);
}

.studio-opt.on {
  background: rgba(232, 200, 122, 0.22);
  border-color: #E8C87A;
  box-shadow: 0 0 0 1px rgba(232, 200, 122, 0.35) inset;
}

.studio-post {
  width: 100%;
}

.studio-jury {
  border-radius: 14px;
  border: 1px solid rgba(232, 200, 122, 0.3);
  background: rgba(20, 12, 18, 0.9);
  padding: 12px 14px;
}

.jury-head {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: clamp(14px, 2vmin, 17px);
}

.jury-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: clamp(12px, 1.7vmin, 15px);
  line-height: 1.35;
}

.jury-list li.ok b {
  color: #9BD1C7;
}

.jury-list li.bad b {
  color: #EF8F8F;
}

.jury-actions {
  display: flex;
  gap: 8px;
}

.jury-actions .btn {
  flex: 1;
}

@media (max-width: 880px) {
  .studio {
    grid-template-columns: 1fr;
  }

  .studio-poster svg {
    max-height: 38vh;
  }
}
/* ------------------------------------------- кабинет со встроенной игрой */

/* Класс 1 — зал из «синтез 0». Рамка с шапкой, внутри — отдельная страница:
   зал рисует себя сам, оболочка не вмешивается в его вёрстку. */
.embed {
  padding: 0;
  background: #1b0d15;
}

.embed-head {
  flex: 0 0 auto;
  margin: 0;
  padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px
    max(10px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #2c1622, #1b0d15);
  border-bottom: 1px solid rgba(232, 200, 122, 0.25);
}

.embed-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* «Станок» в шапке зала: маленькая кнопка рядом с названием класса.
   В зале живут станции, а задания класса — на станке, и вход туда один. */
.embed-bench {
  flex: 0 0 auto;
  min-height: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: clamp(12px, 1.6vmin, 15px);
}

.embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Телефон лёжа: шесть дверей в ряд влезают только компактными. */
@media (max-height: 460px) and (orientation: landscape) {
  .hub .doors {
    align-content: start;
    gap: 6px;
    padding: 0 2px 4px;
  }

  .door {
    /* min-height у двери задан долей высоты экрана: на 264 px это 116 px,
       и карточка не влезала между шапкой и нижней строкой. */
    min-height: 0;
    padding: 5px 4px 6px;
    gap: 1px;
  }

  .door-art {
    width: min(40px, 12vmin);
    height: min(40px, 12vmin);
  }

  .door-title {
    font-size: 10px;
  }

  /* Шапка и полоса сезона тоже отдают высоту дверям. */
  .avatar.sm {
    width: 32px;
    height: 32px;
  }

  .hub-name {
    font-size: 14px;
  }

  .lesson-strip {
    padding: 4px 12px;
    font-size: 11px;
  }

  .door-stars {
    font-size: 10px;
  }

  .door-num {
    top: 2px;
    left: 6px;
    font-size: 12px;
  }

  /* Полоска прогресса на такой высоте упирается в звёзды: числа важнее. */
  .door-progress {
    display: none;
  }
}

/* Телефон лёжа: шапка кабинета тонкая, иначе от зала остаётся полоска. */
@media (max-height: 460px) and (orientation: landscape) {
  .embed-head {
    padding: 2px max(8px, env(safe-area-inset-right)) 2px max(8px, env(safe-area-inset-left));
  }

  .embed-head .ex-title {
    font-size: 14px;
  }

  .embed-head .icon-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .embed-head .ex-level {
    font-size: 12px;
  }
}

/* --------------------------------------------------------------- студия */

.studio-room-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vmin, 12px);
}

.studio-room-hint {
  margin: 0;
  font-size: clamp(12px, 1.6vmin, 15px);
  opacity: 0.75;
}

.poster-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 1.2vmin, 14px);
  align-content: center;
}

.poster-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(247, 234, 217, 0.06);
  border: 1px solid var(--line);
  text-align: center;
  min-height: 0;
  transition: transform 0.16s ease, background 0.16s ease;
}

.poster-card:active {
  background: rgba(247, 234, 217, 0.16);
  transform: scale(0.98);
}

.poster-art {
  display: block;
  width: 100%;
  aspect-ratio: 480 / 640;
  border-radius: 8px;
  overflow: hidden;
  background: #1b1218;
  box-shadow: 0 12px 24px -16px #000;
}

.poster-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.poster-name {
  font-size: clamp(11px, 1.5vmin, 14px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.studio-room-foot {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}
/* Три игры студии: афиши, бал и путешествие. Крупные карточки в ряд. */
.studio-games {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.6vmin, 18px);
  align-content: center;
}

.studio-game {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(247, 234, 217, 0.06);
  border: 1px solid var(--line);
  text-align: left;
  min-height: 0;
  transition: transform 0.16s ease, background 0.16s ease;
}

.studio-game:active {
  background: rgba(247, 234, 217, 0.16);
  transform: scale(0.98);
}

.studio-game-art {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 32%, #3a2b3a 0%, #1b1218 78%);
}

.studio-game-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Значок, а не обложка: снежинка и компас не должны занимать всю карточку. */
.studio-game-art.ico svg {
  width: 58%;
  height: 58%;
}

.studio-game-name {
  font-size: clamp(14px, 2vmin, 20px);
  font-weight: 800;
}

.studio-game-meta {
  font-size: clamp(11px, 1.5vmin, 13px);
  color: var(--gold);
  opacity: 0.85;
}

/* Заглушка: карточка видна, но не нажимается — «скоро». */
.studio-game.soon {
  opacity: 0.55;
}


@media (max-aspect-ratio: 1/1) {
  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Потеря гостя на балу: плашка «−1 гость», красный счётчик и вспышка.

   Зачем: столкновение с ёлкой раньше только пикало, и было непонятно, что
   из хоровода ушёл гость (D-064). */

.ny-loss {
  animation: nyLoss 1.3s ease-out forwards;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes nyLoss {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-44px) scale(1);
  }
}

.round-chip.lost {
  animation: chipLost 0.7s ease;
  border-color: #e8836f;
}

@keyframes chipLost {
  0% {
    background: rgba(126, 31, 43, 0.95);
    transform: scale(1.06);
  }
  40% {
    background: rgba(126, 31, 43, 0.75);
    transform: scale(1);
  }
  100% {
    background: rgba(18, 10, 24, 0.72);
  }
}

.round-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 18px;
  box-shadow: inset 0 0 90px 18px rgba(206, 60, 60, 0.75);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.round-flash.on {
  opacity: 1;
}

.round-arena {
  position: relative;
}

/* ------------------------------------------------------- эстрадный зал (класс 3) */

.pop-room {
  gap: clamp(6px, 1.2vh, 12px);
  background: radial-gradient(120% 80% at 50% 0%, #16230a 0%, #0b1305 45%, #05070b 100%);
}

.pop-hall {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: clamp(14px, 2vw, 22px);
  overflow: hidden;
  border: 1px solid rgba(200, 235, 130, 0.22);
  background: linear-gradient(180deg, #101a08, #080d04 60%, #05070a);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55), 0 18px 50px rgba(0, 0, 0, 0.35);
}

.pop-art { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* задник: тёмный бархат с холодным отсветом */
.pop-art::before {
  content: "";
  position: absolute;
  left: 13%; right: 13%; top: 8%; height: 56%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(210, 255, 140, 0.10), transparent 62%),
    linear-gradient(180deg, #0d1607, #091005 70%, #070b04);
  border-radius: 0 0 40% 40% / 0 0 14% 14%;
}

.pop-valance {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 8%;
  background: repeating-linear-gradient(90deg, #1d4a24 0 10px, #2a6330 10px 20px, #153a1b 20px 30px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), inset 0 -3px 0 rgba(230, 255, 150, 0.20);
  border-radius: 0 0 40% 40% / 0 0 30% 30%;
}

.pop-curtain {
  position: absolute;
  top: 0;
  height: 64%;
  width: 13%;
  background: repeating-linear-gradient(90deg, #17401d 0 12px, #2b6631 12px 22px, #0f2c14 22px 34px);
  box-shadow: inset -12px 0 26px rgba(0, 0, 0, 0.55);
}
.pop-curtain.l { left: 0; }
.pop-curtain.r { right: 0; box-shadow: inset 12px 0 26px rgba(0, 0, 0, 0.55); }
.pop-curtain.l::after, .pop-curtain.r::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(255, 235, 150, 0.8), rgba(255, 235, 150, 0.12));
}
.pop-curtain.l::after { right: 0; }
.pop-curtain.r::after { left: 0; }

/* софиты: три конуса света из-под падуги */
.pop-spot {
  position: absolute;
  top: 6%;
  width: 34%;
  height: 58%;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(230, 255, 150, 0.30), rgba(200, 255, 110, 0.04) 70%, transparent);
  filter: blur(6px);
}
.pop-spot.s1 { left: 2%; transform: rotate(-6deg); }
.pop-spot.s2 { left: 33%; background: linear-gradient(180deg, rgba(255, 240, 150, 0.28), rgba(255, 220, 90, 0.05) 72%, transparent); }
.pop-spot.s3 { right: 2%; transform: rotate(6deg); }

/* планшет сцены и рампа */
.pop-floor {
  position: absolute;
  left: 0; right: 0;
  top: 56%;
  height: 11%;
  background:
    linear-gradient(180deg, rgba(255, 226, 130, 0.20), rgba(120, 96, 30, 0.08) 45%, transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 64px);
}

.pop-foot {
  position: absolute;
  left: 4%; right: 4%;
  top: 64%;
  height: 6px;
  background: radial-gradient(circle, rgba(255, 248, 170, 0.95) 0 2px, transparent 3px) 0 0 / 26px 6px repeat-x;
  filter: drop-shadow(0 0 9px rgba(230, 255, 120, 0.9));
  opacity: 0.9;
}

.pop-sign {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 900;
  letter-spacing: 0.42em;
  font-size: clamp(16px, 3.2vw, 38px);
  color: #f4ffd0;
  text-shadow: 0 0 12px rgba(200, 255, 90, 0.9), 0 0 34px rgba(160, 255, 60, 0.55);
  opacity: 0.92;
  white-space: nowrap;
}

.pop-grid {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(10px, 2vh, 22px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(130px, 16vw, 200px), 1fr));
  gap: clamp(8px, 1.4vw, 14px);
}

.pop-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: clamp(8px, 1.4vh, 14px) clamp(10px, 1.4vw, 16px);
  border-radius: 14px;
  border: 1px solid rgba(200, 235, 130, 0.28);
  background: linear-gradient(180deg, rgba(14, 24, 8, 0.86), rgba(8, 14, 4, 0.92));
  color: #eef7d8;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.pop-card:hover, .pop-card:focus-visible {
  border-color: rgba(220, 255, 140, 0.7);
  box-shadow: 0 0 0 1px rgba(220, 255, 140, 0.25), 0 10px 26px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
  outline: none;
}
.pop-card-ico { color: #c8ff5a; font-size: 13px; opacity: 0.9; }
.pop-card-ball {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f2ffd0, #a8e63c 70%);
  box-shadow: 0 0 10px rgba(200, 255, 90, 0.55);
}
.pop-card-name { font-weight: 700; font-size: clamp(13px, 1.4vw, 16px); line-height: 1.15; }
.pop-card-meta { font-size: clamp(10px, 1vw, 12px); opacity: 0.7; }

.pop-game {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  border-color: rgba(255, 230, 90, 0.6);
  background: linear-gradient(90deg, rgba(64, 82, 14, 0.95), rgba(16, 22, 4, 0.95));
  position: relative;
  overflow: hidden;
}
.pop-game .pop-card-meta { margin-left: auto; opacity: 0.8; }
.pop-game .pop-card-name { font-size: clamp(15px, 1.7vw, 19px); }
.pop-game::after {
  content: "";
  position: absolute;
  top: -40%; right: -10%;
  width: 60%; height: 180%;
  background: radial-gradient(circle at 60% 40%, rgba(220, 255, 90, 0.22), transparent 60%);
  pointer-events: none;
}
.pop-ball {
  width: clamp(20px, 2.6vw, 30px);
  height: clamp(20px, 2.6vw, 30px);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fbffcf, #eaff5a 45%, #b8d400 100%);
  box-shadow: 0 0 18px rgba(220, 255, 80, 0.55);
  position: relative;
  margin-bottom: 2px;
}
.pop-ball::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border-left: 2px solid rgba(255, 255, 255, 0.95);
  border-right: 2px solid rgba(255, 255, 255, 0.95);
}

@media (max-width: 560px) {
  .pop-game { grid-column: span 1; }
  .pop-sign { letter-spacing: 0.2em; }
  .pop-curtain { width: 10%; }
}

/* рамка игры «Ритмбол» — в тон залу */
.game-room { background: radial-gradient(120% 80% at 50% 0%, #16230a, #0a1305 45%, #05070b); }
.game-room .embed-head { background: linear-gradient(180deg, rgba(26, 38, 10, 0.96), rgba(8, 12, 4, 0.92)); border-bottom: 1px solid rgba(200, 235, 130, 0.22); }

/* ---------------------------------------------------- меню «Сияние» (вход) */

/* Меню — титульный лист логотипа. Фон — та же акварельная бумага, что и вокруг
   надписи: розовые, голубые и бирюзовые разводы на белом. Логотип не лежит на
   плашке: белый фон картинки растворяется в бумаге через multiply, поэтому
   «квадрата» не видно, а сам знак читается как рисунок на листе. */

.menu-face {
  align-items: center;
  justify-content: center;
  background-color: #fbf9ff;
  background-image:
    radial-gradient(46% 42% at 14% 8%, rgba(255, 166, 214, 0.5), transparent 70%),
    radial-gradient(44% 40% at 88% 4%, rgba(146, 184, 255, 0.46), transparent 72%),
    radial-gradient(50% 44% at 76% 98%, rgba(140, 240, 246, 0.32), transparent 70%),
    radial-gradient(38% 34% at 8% 88%, rgba(196, 170, 255, 0.36), transparent 72%),
    radial-gradient(52% 46% at 50% 44%, rgba(255, 255, 255, 0.95), transparent 76%),
    linear-gradient(180deg, #fdfbff 0%, #f6f2ff 56%, #fbfbff 100%);
}

/* z-index снимаем намеренно: контекст наложения без своего фона отрезал бы
   логотип от бумаги, и вокруг картинки снова проступил бы белый прямоугольник. */
.screen.menu-face > .mf-inner {
  position: relative;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.1vh, 24px);
  width: 100%;
  max-width: 1100px;
  height: 100%;
  padding: clamp(10px, 2.6vmin, 26px) clamp(10px, 3vw, 24px);
}

.mf-mark {
  display: block;
  width: auto;
  height: auto;
  max-width: min(860px, 84vw);
  max-height: 44vh;
  mix-blend-mode: multiply;
}

/* Тонкая линейка с ромбом — как росчерк под надписью. */
.mf-rule {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  width: min(540px, 68vw);
}

.mf-rule i {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(43, 59, 214, 0),
    #7a2ee0 34%,
    #d83a9b 66%,
    rgba(34, 201, 221, 0)
  );
}

.mf-rule b {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #7a2ee0, #22c9dd);
  box-shadow: 0 0 10px rgba(122, 46, 224, 0.45);
}

.mf-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.6vh, 16px);
  width: 100%;
}

/* Главная кнопка — тот же градиент, что в надписи: синий → фиолетовый →
   маджента → циан. Белая внутренняя грань и мягкая цветная тень вместо
   золотой «пилюли» с чёрной подложкой. */
.mf-play {
  width: min(520px, 84vw);
  min-height: clamp(64px, 9vh, 88px);
  padding: 0 clamp(28px, 5vw, 54px);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(19px, 2.5vh, 26px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(100deg, #2b3bd6 0%, #7a2ee0 32%, #d83a9b 60%, #0f86ad 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 18px 34px -18px rgba(96, 36, 160, 0.72),
    0 3px 0 rgba(84, 30, 140, 0.28);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.mf-play:hover {
  filter: saturate(1.08) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 24px 40px -20px rgba(96, 36, 160, 0.8),
    0 3px 0 rgba(84, 30, 140, 0.26);
}

.mf-play:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 18px -12px rgba(96, 36, 160, 0.7);
}

.mf-play:focus-visible {
  outline: 3px solid #7a2ee0;
  outline-offset: 4px;
}

/* Второстепенные действия — без рамок и капсул: строчные иконки и капитель
   в тон подписи «ритм твоего цвета» из логотипа. */
.mf-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2px, 1.4vw, 18px);
}

.mf-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 clamp(8px, 1.2vw, 14px);
  border-radius: 14px;
  color: #3d2d6b;
  font-size: clamp(11px, 1.45vh, 14px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.16s ease, background 0.16s ease;
}

.mf-link svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: #6d3fbe;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.16s ease;
}

.mf-link:hover {
  color: #12093a;
  background: rgba(122, 46, 224, 0.07);
}

.mf-link:hover svg {
  stroke: #1e9fb4;
}

.mf-link:active {
  background: rgba(122, 46, 224, 0.13);
}

.mf-link:focus-visible {
  outline: 3px solid #7a2ee0;
  outline-offset: 2px;
}

.mf-foot {
  font-size: clamp(10px, 1.2vh, 12px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7a6c9a;
  text-align: center;
}

@media (max-height: 700px) {
  .mf-mark {
    max-height: 42vh;
  }

  .screen.menu-face > .mf-inner {
    gap: clamp(8px, 1.6vh, 16px);
  }

  .mf-play {
    min-height: 58px;
    font-size: clamp(17px, 2.3vh, 22px);
  }

  .mf-link {
    min-height: 48px;
  }
}

@media (max-width: 720px) {
  .mf-mark {
    max-width: 92vw;
    max-height: 32vh;
  }

  .mf-rule {
    width: 78vw;
  }

  .mf-play {
    width: 88vw;
    letter-spacing: 0.14em;
  }

  .mf-link {
    font-size: 12px;
    letter-spacing: 0.08em;
    padding: 0 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-face {
    animation: none;
  }
}

/* Финал рождественского бала: Дед Мороз идёт к хороводу, салют и подарки.
   Раньше финал был тёмной карточкой поверх зала — теперь всё происходит в
   самом зале: ребёнок видит, откуда вышел Дед Мороз и что лежит в подарке. */

.ny-santa {
  animation: nySantaIn 0.45s ease both;
}

@keyframes nySantaIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Салют: точка стартует из центра вспышки и улетает по своему вектору. */
.ny-spark2 {
  animation: nySparkOut 2s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes nySparkOut {
  0% { transform: translate(0, 0) scale(0.2); opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 0.85; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; }
}

/* Подарки: коробка выскакивает из-под земли, приседая на нижнем крае. */
.ny-gift {
  animation: nyGiftPop 0.55s cubic-bezier(0.2, 0.8, 0.3, 1.5) both;
  transform-box: fill-box;
  transform-origin: bottom center;
}

@keyframes nyGiftPop {
  0% { transform: scale(0.25); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* Реплика Деда Мороза: светлая плашка над головой, чтобы читалась на снегу. */
.ny-speech {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -100%);
  min-width: 150px;
  max-width: min(320px, 70vw);
  padding: 9px 16px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8e4, #ffe3a8);
  color: #5a2418;
  font-size: clamp(13px, 2.1vh, 20px);
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(201, 162, 76, 0.55) inset;
  pointer-events: none;
  animation: nySpeechFade 0.35s ease both;
}

/* Верхний баннер: без хвостика, по центру арены. */
.ny-speech.top {
  max-width: min(420px, 84%);
}

.ny-speech.top::after {
  display: none;
}

.ny-speech::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 3px;
  background: #ffe3a8;
  transform: rotate(45deg);
}

.ny-speech b {
  color: #b0303a;
  font-size: 1.08em;
}

.ny-speech .ny-speech-stars {
  display: block;
  font-size: 1.25em;
  letter-spacing: 0.06em;
  color: #c98f16;
  text-shadow: 0 1px 0 #fff3c4;
}

.ny-speech.prize {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 209, 102, 0.85) inset;
}

@keyframes nySpeechFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-height: 520px) {
  .ny-speech { font-size: 12px; padding: 6px 12px 7px; }
}
/* ------------------------------------------------------------ версия 1.15.0 */
/* Бал: меню из двенадцати уровней, кнопки поля и пауза. */

.round-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.round-top-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.round-btn {
  font: inherit;
  font-size: clamp(12px, 1.7vmin, 15px);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  color: #f7ead9;
  background: rgba(232, 200, 122, 0.12);
  border: 1px solid rgba(232, 200, 122, 0.42);
  cursor: pointer;
  white-space: nowrap;
}

.round-btn:hover {
  background: rgba(232, 200, 122, 0.22);
}

.round-btn:active {
  transform: translateY(1px);
}

.round-btn.pause {
  background: rgba(160, 190, 240, 0.12);
  border-color: rgba(160, 190, 240, 0.42);
}

.round-btn[hidden] {
  display: none;
}

.round-chip.level {
  border-color: rgba(232, 200, 122, 0.45);
}

.round-chip.level b {
  color: var(--gold);
}

/* Карточка паузы лежит поверх арены: таймер стоит, зал виден, Снегурочка ждёт. */
.round-pause-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: min(340px, 84%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(180deg, rgba(40, 26, 52, 0.97), rgba(18, 10, 24, 0.97));
  border: 1px solid rgba(160, 190, 240, 0.32);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.round-pause-card[hidden] {
  display: none;
}

.round-pause-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(20px, 3vmin, 30px);
  color: #eaf1ff;
}

.round-pause-text {
  margin: 0 0 4px;
  font-size: clamp(12px, 1.8vmin, 15px);
  opacity: 0.8;
}

.round-pause-card .btn {
  width: 100%;
}

.ny-body-levels {
  justify-content: flex-start;
  overflow: auto;
}

.ny-levels {
  align-self: center;
  margin: auto 0;
  width: min(1020px, 96%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 2px 0 10px;
}

.ny-levels-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.ny-levels-top .ny-text {
  max-width: 70ch;
}

.ny-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.ny-lvl {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 34px 10px 14px;
  border-radius: 14px;
  text-align: left;
  font: inherit;
  color: #eaf1ff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(52, 34, 66, 0.92), rgba(24, 14, 32, 0.92));
  border: 1px solid rgba(160, 190, 240, 0.22);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.ny-lvl:hover {
  border-color: rgba(232, 200, 122, 0.55);
}

.ny-lvl:active {
  transform: translateY(1px);
}

.ny-lvl.done {
  border-color: rgba(232, 200, 122, 0.5);
  background: linear-gradient(180deg, rgba(64, 44, 58, 0.95), rgba(30, 18, 30, 0.95));
}

.ny-lvl.locked {
  opacity: 0.55;
}

.ny-lvl-n {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(22px, 3vmin, 28px);
  line-height: 1;
  color: var(--gold);
}

.ny-lvl-name {
  font-size: clamp(12px, 1.6vmin, 14px);
  font-weight: 600;
}

.ny-lvl-goal {
  font-size: clamp(10px, 1.4vmin, 12px);
  opacity: 0.72;
}

.ny-lvl-mark {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 13px;
  line-height: 1;
}

.ny-lvl-play {
  font-style: normal;
  color: rgba(232, 200, 122, 0.85);
}

.ny-lvl-lock {
  font-style: normal;
  font-size: 13px;
}

.ny-levels-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
}

@media (max-width: 720px) {
  .round-top {
    flex-wrap: wrap;
  }

  /* Тесно: три плашки встают одной строкой, а имя уровня остаётся в шапке
     экрана — второй раз его не показываем. */
  .round-top-mid {
    order: 3;
    /* flex-basis 100% переносит плашки на свою строку: width здесь не работает,
       потому что у группы задан flex: 1. */
    flex: 1 0 100%;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }

  .round-top-mid .round-chip {
    font-size: 12px;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .round-lvl-name {
    display: none;
  }

  .ny-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  }
}

/* ------------------------------------------------------------ версия 1.15.1 */
/* Бал: проход за главной ёлкой без потери гостя, крупная полоса сверху
   и заметный счётчик времени. */

.round-top {
  gap: 10px;
}

.round-top-mid {
  gap: 10px;
}

.round-btn {
  font-size: clamp(14px, 2.3vmin, 19px);
  font-weight: 700;
  padding: 10px 20px;
}

.round-chip {
  font-size: clamp(14px, 2.1vmin, 18px);
  padding: 8px 16px;
}

.round-chip b {
  font-size: 1.2em;
}

/* Таймер — самое важное число на экране: нарисованные часы, крупная цифра
   и золотая рамка. Раньше он был одной из трёх одинаковых мелких плашек. */
.round-chip.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(232, 200, 122, 0.16);
  border-color: rgba(232, 200, 122, 0.55);
}

.round-chip.timer b {
  font-size: clamp(26px, 4.2vmin, 38px);
  line-height: 1;
  color: var(--gold);
}

.round-clock {
  width: clamp(18px, 2.8vmin, 26px);
  height: clamp(18px, 2.8vmin, 26px);
  opacity: 0.9;
}

.round-chip.timer.low {
  border-color: rgba(255, 142, 122, 0.75);
  background: rgba(126, 31, 43, 0.6);
  animation: timerLow 1s ease-in-out infinite;
}

.round-chip.timer.low b {
  color: #ffe4da;
}

@keyframes timerLow {
  50% {
    transform: scale(1.06);
  }
}

@media (max-width: 720px) {
  .round-btn {
    font-size: 15px;
    padding: 9px 16px;
  }

  /* На телефоне полоса не должна съедать арену: номер уровня уже есть в шапке
     экрана, поэтому его плашку прячем, а счёт и таймер остаются крупными. */
  .round-top-mid .round-chip.level {
    display: none;
  }

  .round-top-mid .round-chip {
    font-size: 14px;
    padding: 6px 12px;
  }

  .round-chip.timer {
    padding: 4px 14px;
  }

  .round-chip.timer b {
    font-size: 26px;
  }

  .round-clock {
    width: 18px;
    height: 18px;
  }
}


/* Снегурочка за главной ёлкой: ветки просветляются, чтобы её было видно. */
#nyScene .ny-tree-ghost {
  opacity: 0.32;
  transition: opacity 0.18s ease;
}

#nyLinks.ny-links-behind {
  opacity: 0.45;
  transition: opacity 0.18s ease;
}

#nyScene .ny-player-behind {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 12px rgba(180, 215, 255, 0.7));
}
