@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Rubik:wght@600;700;800&display=swap');

:root {
  --night-deep: #061214;
  --night: #0c1f24;
  --night-card: #10272b;
  --night-card-alt: #0a1b1d;
  --forest: #1a4235;
  --forest-light: #2d614e;
  --moss: #6fa35a;
  --danger: #e06c65;
  --amber: #f4b860;
  --amber-bright: #ffc978;
  --amber-glow: rgba(244, 184, 96, 0.35);
  --cream: #fbf1d6;
  --cream-soft: #ebdcc0;
  --text-secondary: #9cbdb1;
  --text-muted: #6f8f83;
  --card-border: rgba(244, 184, 96, 0.16);
  --card-border-hover: rgba(244, 184, 96, 0.75);
  --shadow-card: 0 16px 36px -10px rgba(2, 8, 9, 0.65);
  --font-heading: 'Rubik', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --ease: 0.25s cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font: 17px/1.6 var(--font-body);
  background:
    linear-gradient(180deg, rgba(6, 18, 20, 0.72), rgba(6, 18, 20, 0.86)),
    url('/assets/img/bg-forest.png') center / cover fixed no-repeat,
    var(--night-deep);
}

a {
  color: var(--amber-bright);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 2px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 42px 20px 48px;
}

.wrap.wide {
  max-width: 1220px;
}

/* Атмосфера ночного леса: мерцающие звёзды, светлячки и дыхание леса */
.stars,
.fireflies,
.forest-mist {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff4cc;
  box-shadow: 0 0 6px 1px rgba(255, 244, 204, 0.45);
  opacity: 0.15;
  animation: twinkle 4.5s ease-in-out infinite;
}

.stars i:nth-child(1) { left: 12%; top: 7%; animation-duration: 3.8s; animation-delay: 0.2s; }
.stars i:nth-child(2) { left: 21%; top: 14%; width: 3px; height: 3px; animation-duration: 5.2s; animation-delay: 1.4s; }
.stars i:nth-child(3) { left: 31%; top: 5%; animation-duration: 4.1s; animation-delay: 2.7s; }
.stars i:nth-child(4) { left: 39%; top: 11%; animation-duration: 6.0s; animation-delay: 0.9s; }
.stars i:nth-child(5) { left: 46%; top: 4%; width: 3px; height: 3px; animation-duration: 4.8s; animation-delay: 3.3s; }
.stars i:nth-child(6) { left: 53%; top: 16%; animation-duration: 5.5s; animation-delay: 1.1s; }
.stars i:nth-child(7) { left: 61%; top: 8%; animation-duration: 3.9s; animation-delay: 2.2s; }
.stars i:nth-child(8) { left: 69%; top: 13%; width: 3px; height: 3px; animation-duration: 6.4s; animation-delay: 0.5s; }
.stars i:nth-child(9) { left: 77%; top: 6%; animation-duration: 4.6s; animation-delay: 3.8s; }
.stars i:nth-child(10) { left: 85%; top: 12%; animation-duration: 5.1s; animation-delay: 1.9s; }
.stars i:nth-child(11) { left: 91%; top: 9%; animation-duration: 4.2s; animation-delay: 2.9s; }
.stars i:nth-child(12) { left: 17%; top: 26%; animation-duration: 5.8s; animation-delay: 0.7s; }
.stars i:nth-child(13) { left: 34%; top: 22%; animation-duration: 4.4s; animation-delay: 3.1s; }
.stars i:nth-child(14) { left: 58%; top: 24%; animation-duration: 6.2s; animation-delay: 1.7s; }
.stars i:nth-child(15) { left: 74%; top: 28%; animation-duration: 4.9s; animation-delay: 2.4s; }
.stars i:nth-child(16) { left: 88%; top: 25%; animation-duration: 5.7s; animation-delay: 0.4s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.9); }
  50% { opacity: 0.9; transform: scale(1.25); }
}

.fireflies i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 11px 3px var(--amber-glow);
  opacity: 0;
  animation: fireflyDrift 8s ease-in-out infinite;
}

.fireflies i:nth-child(1) { left: 8%; top: 22%; animation-duration: 7.4s; animation-delay: 0s; }
.fireflies i:nth-child(2) { left: 86%; top: 18%; animation-duration: 8.6s; animation-delay: 1.6s; }
.fireflies i:nth-child(3) { left: 16%; top: 68%; animation-duration: 9.2s; animation-delay: 3.1s; }
.fireflies i:nth-child(4) { left: 92%; top: 58%; animation-duration: 7.8s; animation-delay: 4.4s; }
.fireflies i:nth-child(5) { left: 48%; top: 86%; animation-duration: 8.8s; animation-delay: 2.3s; }
.fireflies i:nth-child(6) { left: 70%; top: 38%; animation-duration: 9.6s; animation-delay: 5.6s; }
.fireflies i:nth-child(7) { left: 5%; top: 46%; animation-duration: 7.6s; animation-delay: 6.2s; }
.fireflies i:nth-child(8) { left: 26%; top: 82%; width: 4px; height: 4px; animation-duration: 8.4s; animation-delay: 1.1s; }
.fireflies i:nth-child(9) { left: 62%; top: 74%; animation-duration: 9.0s; animation-delay: 3.9s; }
.fireflies i:nth-child(10) { left: 79%; top: 80%; width: 4px; height: 4px; animation-duration: 7.9s; animation-delay: 5.1s; }
.fireflies i:nth-child(11) { left: 37%; top: 30%; width: 4px; height: 4px; animation-duration: 8.2s; animation-delay: 2.6s; }
.fireflies i:nth-child(12) { left: 94%; top: 34%; animation-duration: 9.4s; animation-delay: 0.8s; }

@keyframes fireflyDrift {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.8); }
  35% { opacity: 0.85; transform: translate(10px, -12px) scale(1.1); }
  70% { opacity: 0.45; transform: translate(-8px, -24px) scale(0.95); }
}

.forest-mist {
  background: radial-gradient(85% 36% at 50% 106%, rgba(45, 97, 78, 0.34), transparent 72%);
  animation: mistBreath 16s ease-in-out infinite;
}

@keyframes mistBreath {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(-6px); }
}

header {
  text-align: center;
  margin-bottom: 28px;
}

.logo-owl {
  display: inline-block;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(244, 184, 96, 0.4), 0 16px 44px -6px rgba(244, 184, 96, 0.42);
}

.logo-badge {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 20px;
  font: 800 32px/1 var(--font-heading);
  background: radial-gradient(circle at 35% 30%, var(--forest-light), var(--forest));
  box-shadow: 0 0 0 1px var(--card-border), 0 12px 40px -6px rgba(244, 184, 96, 0.35);
  color: var(--amber-bright);
}

h1 {
  font: 800 clamp(30px, 5vw, 46px)/1.12 var(--font-heading);
  margin: 14px 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font: 700 14px/1 var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin: 32px 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--card-border), transparent);
}

h3 {
  font: 700 22px/1.25 var(--font-heading);
  margin: 0 0 8px;
}

.tagline {
  font-size: 18px;
  color: var(--cream-soft);
  margin: 0 0 8px;
}

.note {
  font-size: 14px;
  color: var(--text-secondary);
}

.card {
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: 22px;
  background:
    url('/assets/img/card-backdrop.png') right bottom / 230px auto no-repeat,
    linear-gradient(160deg, rgba(16, 39, 43, 0.88), rgba(10, 27, 29, 0.94));
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 0 0 1px rgba(244, 184, 96, 0.08), var(--shadow-card);
  transition: border-color var(--ease);
}

.card:hover {
  border-color: rgba(244, 184, 96, 0.35);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid-host {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type='text'],
input[type='password'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(6, 18, 20, 0.85);
  color: var(--cream);
  font: 600 15px/1.4 var(--font-body);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font: 800 15px/1.2 var(--font-body);
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: var(--amber);
  color: var(--night-deep);
}

.btn.primary:hover:not(:disabled) {
  background: var(--amber-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px var(--amber-glow);
}

.btn.ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--card-border);
}

.btn.ghost:hover:not(:disabled) {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
}

.btn.danger {
  background: rgba(224, 108, 101, 0.16);
  color: #ff9c96;
  border-color: rgba(224, 108, 101, 0.4);
}

.btn.moss {
  background: rgba(111, 163, 90, 0.22);
  color: #b9e6a8;
  border-color: rgba(111, 163, 90, 0.45);
}

.btn.sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(45, 97, 78, 0.25);
  border: 1px solid rgba(111, 163, 90, 0.3);
}

.chip.amber {
  color: var(--amber-bright);
  background: rgba(244, 184, 96, 0.14);
  border-color: rgba(244, 184, 96, 0.35);
}

.chip.danger {
  color: #ff9c96;
  background: rgba(224, 108, 101, 0.14);
  border-color: rgba(224, 108, 101, 0.35);
}

code {
  font: 600 0.92em ui-monospace, Consolas, monospace;
  color: var(--amber-bright);
  background: rgba(244, 184, 96, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
}

.vu-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 8px;
}

.vu-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--moss), var(--amber-bright));
  transition: width 0.08s linear;
}

.round-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(6, 18, 20, 0.55);
  border: 1px solid var(--card-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.round-item:hover {
  border-color: rgba(244, 184, 96, 0.45);
}

.round-item.active {
  border-color: var(--amber-bright);
  background: rgba(244, 184, 96, 0.1);
}

.hidden {
  display: none !important;
}

/* Сцена для OBS 1920x1080 */
body.stage-body {
  overflow: hidden;
  background:
    url('/assets/img/stage-bg-obs.png') center / cover no-repeat,
    var(--night-deep);
}

body.transparent-bg {
  background: transparent !important;
  background-image: none !important;
}

.audio-unlock {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--night-deep);
  font: 800 15px/1.2 var(--font-body);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.92) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.stage-wrap {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  padding: 36px 52px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stage-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stage-brand .logo-badge {
  width: 64px;
  height: 64px;
  font-size: 26px;
}

.stage-brand .logo-owl {
  width: 72px;
  height: 72px;
  animation: owlHalo 5s ease-in-out infinite;
}

@keyframes owlHalo {
  0%, 100% { box-shadow: 0 0 0 1px rgba(244, 184, 96, 0.38), 0 10px 30px -4px rgba(244, 184, 96, 0.32); }
  50% { box-shadow: 0 0 0 2px rgba(255, 201, 120, 0.65), 0 14px 40px 0 rgba(244, 184, 96, 0.55); }
}

.stage-title {
  font: 800 34px/1 var(--font-heading);
  letter-spacing: 0.02em;
}

.stage-center {
  display: grid;
  place-items: center;
  text-align: center;
}

.stage-card {
  position: relative;
  width: min(1160px, 100%);
  padding: 36px 44px;
  border-radius: 28px;
  background:
    url('/assets/img/card-backdrop.png') right bottom / 340px auto no-repeat,
    linear-gradient(160deg, rgba(16, 39, 43, 0.86), rgba(10, 27, 29, 0.92));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 184, 96, 0.32);
  box-shadow: inset 0 0 0 1px rgba(244, 184, 96, 0.12), 0 24px 60px -12px rgba(2, 8, 9, 0.82);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.stage-card.playing {
  border-color: rgba(255, 201, 120, 0.8);
  box-shadow: 0 0 42px -4px rgba(244, 184, 96, 0.38), 0 24px 60px -12px rgba(2, 8, 9, 0.85);
}

.stage-card::before,
.stage-card::after {
  content: '✦';
  position: absolute;
  font-size: 16px;
  color: rgba(244, 184, 96, 0.5);
  pointer-events: none;
}

.stage-card::before {
  top: 14px;
  left: 18px;
}

.stage-card::after {
  bottom: 14px;
  right: 18px;
}

/* Живой ночной лес на сцене OBS */
.moonbeams,
.oak-sway-layer,
.falling-leaves,
.forest-mist-2,
.shooting-star-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.moonbeam {
  position: absolute;
  top: -15%;
  width: 240px;
  height: 130%;
  background: linear-gradient(180deg, rgba(244, 184, 96, 0.13), rgba(156, 189, 177, 0.04) 55%, transparent 90%);
  transform-origin: top center;
  filter: blur(18px);
  animation: rayShimmer 14s ease-in-out infinite;
}

.moonbeam:nth-child(1) { left: 18%; transform: rotate(16deg); animation-duration: 13s; }
.moonbeam:nth-child(2) { left: 48%; width: 320px; transform: rotate(12deg); animation-duration: 16s; animation-delay: 2.5s; }
.moonbeam:nth-child(3) { left: 74%; transform: rotate(8deg); animation-duration: 12s; animation-delay: 5s; }

@keyframes rayShimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.78; }
}

.oak-sway-left,
.oak-sway-right {
  position: absolute;
  top: -8px;
  width: 320px;
  opacity: 0.72;
}

.oak-sway-left {
  left: -18px;
  transform-origin: top left;
  animation: branchSway 9s ease-in-out infinite;
}

.oak-sway-right {
  right: -18px;
  transform-origin: top right;
  animation: branchSwayRight 10.5s ease-in-out infinite;
}

@keyframes branchSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(3.5deg); }
}

@keyframes branchSwayRight {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-3.5deg); }
}

.falling-leaves .leaf {
  position: absolute;
  top: -48px;
  left: var(--x, 20%);
  width: var(--sz, 22px);
  height: var(--sz, 22px);
  opacity: 0;
  color: var(--color, rgba(244, 184, 96, 0.72));
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  animation: leafFloat var(--dur, 16s) linear var(--d, 0s) infinite;
}

@keyframes leafFloat {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  10% { opacity: 0.88; }
  25% { transform: translate(calc(var(--dx, 220) * 0.25px + 26px), 26vh) rotate(calc(var(--rot, 320deg) * 0.25)); }
  50% { transform: translate(calc(var(--dx, 220) * 0.55px - 18px), 54vh) rotate(calc(var(--rot, 320deg) * 0.55)); }
  75% { transform: translate(calc(var(--dx, 220) * 0.82px + 30px), 80vh) rotate(calc(var(--rot, 320deg) * 0.8)); }
  92% { opacity: 0.7; }
  100% { opacity: 0; transform: translate(calc(var(--dx, 220) * 1px), 108vh) rotate(var(--rot, 320deg)); }
}

.shooting-star {
  position: absolute;
  top: 10%;
  left: 72%;
  width: 110px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 244, 204, 0.9), transparent);
  border-radius: 999px;
  opacity: 0;
  transform: rotate(-22deg);
  animation: shootStar 14s ease-out infinite;
}

@keyframes shootStar {
  0%, 82% { opacity: 0; transform: translate(0, 0) rotate(-22deg); }
  85% { opacity: 0.95; }
  92% { opacity: 0; transform: translate(-340px, 140px) rotate(-22deg); }
  100% { opacity: 0; }
}

.forest-mist-2 {
  background: radial-gradient(70% 26% at 35% 102%, rgba(26, 66, 53, 0.45), transparent 70%),
              radial-gradient(65% 24% at 75% 104%, rgba(244, 184, 96, 0.08), transparent 72%);
  animation: mistDrift 22s ease-in-out infinite;
}

@keyframes mistDrift {
  0%, 100% { opacity: 0.45; transform: translateX(-18px); }
  50% { opacity: 0.85; transform: translateX(18px); }
}

/* Развивающиеся линии ветра (stroke-dashoffset с завитком на конце, как на tree.css) */
.wind-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

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

.wind-wisp {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 34 200;
  stroke-dashoffset: 34;
  opacity: 0;
  animation: windTrace var(--dur, 8s) ease-in-out var(--d, 0s) infinite;
}

@keyframes windTrace {
  0% { stroke-dashoffset: 34; opacity: 0; }
  12% { opacity: var(--op, 0.44); }
  56% { opacity: calc(var(--op, 0.44) * 0.75); }
  78% { stroke-dashoffset: -100; opacity: 0; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}

/* Живой многослойный туман снизу экрана */
.fog-layer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.fog-bank {
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 220%;
  height: 100%;
  filter: blur(24px);
}

.fog-bank.fog-1 {
  background:
    radial-gradient(24% 62% at 15% 84%, rgba(156, 189, 177, 0.16), transparent 72%),
    radial-gradient(28% 58% at 45% 88%, rgba(45, 97, 78, 0.42), transparent 74%),
    radial-gradient(26% 64% at 78% 82%, rgba(156, 189, 177, 0.14), transparent 72%);
  animation: fogDriftA 24s ease-in-out infinite;
}

.fog-bank.fog-2 {
  background:
    radial-gradient(26% 56% at 25% 90%, rgba(26, 66, 53, 0.48), transparent 74%),
    radial-gradient(30% 62% at 62% 85%, rgba(122, 226, 194, 0.11), transparent 74%),
    radial-gradient(24% 58% at 88% 92%, rgba(244, 184, 96, 0.08), transparent 72%);
  animation: fogDriftB 34s ease-in-out infinite;
}

.fog-bank.fog-3 {
  bottom: -16%;
  background:
    radial-gradient(32% 68% at 30% 94%, rgba(156, 189, 177, 0.18), transparent 76%),
    radial-gradient(34% 64% at 72% 92%, rgba(45, 97, 78, 0.44), transparent 76%);
  animation: fogDriftA 46s ease-in-out infinite reverse;
}

@keyframes fogDriftA {
  0%, 100% { transform: translateX(0%) translateY(0px); opacity: 0.72; }
  50% { transform: translateX(-46%) translateY(-10px); opacity: 0.96; }
}

@keyframes fogDriftB {
  0%, 100% { transform: translateX(-42%) translateY(4px); opacity: 0.65; }
  50% { transform: translateX(0%) translateY(-8px); opacity: 0.92; }
}

.fireflies i.ff-teal {
  background: #7ae2c2;
  box-shadow: 0 0 11px 3px rgba(122, 226, 194, 0.42);
}

.fireflies i.ff-wind {
  left: var(--x, 20%);
  top: var(--y, 50%);
  width: var(--sz, 5px);
  height: var(--sz, 5px);
  animation: fireflyWind var(--dur, 9.5s) ease-in-out var(--d, 0s) infinite;
}

@keyframes fireflyWind {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.8); }
  22% { opacity: 0.92; transform: translate(16px, -10px) scale(1.1); }
  52% { opacity: 0.75; transform: translate(calc(var(--wx, 120) * 0.55px), calc(var(--wy, -45) * 0.45px)) scale(1.0); }
  78% { opacity: 0.35; transform: translate(calc(var(--wx, 120) * 1px), calc(var(--wy, -45) * 1px)) scale(0.85); }
}

.fireflies i:nth-child(13) { left: 19%; top: 44%; animation-duration: 8.1s; animation-delay: 1.5s; }
.fireflies i:nth-child(14) { left: 54%; top: 21%; animation-duration: 9.5s; animation-delay: 4.1s; }
.fireflies i:nth-child(15) { left: 73%; top: 62%; animation-duration: 7.7s; animation-delay: 2.8s; }
.fireflies i:nth-child(16) { left: 32%; top: 76%; width: 4px; height: 4px; animation-duration: 8.9s; animation-delay: 6.0s; }
.fireflies i:nth-child(17) { left: 84%; top: 48%; animation-duration: 9.1s; animation-delay: 0.5s; }
.fireflies i:nth-child(18) { left: 11%; top: 88%; width: 4px; height: 4px; animation-duration: 8.3s; animation-delay: 3.6s; }

.wave-canvas {
  width: 100%;
  height: 140px;
  border-radius: 16px;
  background: rgba(6, 18, 20, 0.72);
  border: 1px solid var(--card-border);
  margin: 20px 0;
}

.reveal-box {
  margin-top: 18px;
  padding: 20px 26px;
  border-radius: 20px;
  background:
    url('/assets/img/card-backdrop.png') right bottom / 210px auto no-repeat,
    linear-gradient(145deg, rgba(244, 184, 96, 0.16), rgba(16, 39, 43, 0.72));
  border: 1px solid var(--amber);
  animation: popIn 0.35s var(--ease) both;
}

.reveal-song {
  font: 800 36px/1.2 var(--font-heading);
  color: var(--amber-bright);
}

.reveal-author {
  font-size: 20px;
  color: var(--cream);
  margin-top: 6px;
}

.scoreboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.score-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--night-card), var(--night-card-alt));
  border: 1px solid var(--card-border);
  font: 700 20px/1 var(--font-heading);
}

.score-val {
  color: var(--amber-bright);
  font-size: 26px;
}

/* Подсказки, пошаговый мастер и режимы */
.hint-box {
  padding: 11px 15px;
  margin: 10px 0 14px;
  border-radius: 12px;
  border-left: 3px solid var(--amber);
  background: rgba(244, 184, 96, 0.07);
  color: var(--cream-soft);
  font-size: 14px;
  line-height: 1.5;
}

.hint-box strong {
  color: var(--cream);
}

.now-banner {
  padding: 18px 22px;
  margin-bottom: 18px;
  border-radius: 20px;
  background:
    url('/assets/img/card-backdrop.png') right bottom / 230px auto no-repeat,
    linear-gradient(135deg, rgba(244, 184, 96, 0.15), rgba(26, 66, 53, 0.48));
  border: 1px solid rgba(244, 184, 96, 0.45);
  box-shadow: inset 0 0 0 1px rgba(244, 184, 96, 0.12), 0 12px 32px -12px rgba(244, 184, 96, 0.25);
}

.now-banner-label {
  font: 700 12px/1 var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber-bright);
  margin-bottom: 6px;
}

.now-banner-title {
  font: 700 19px/1.35 var(--font-heading);
  color: var(--cream);
  margin: 0 0 12px;
}

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.step-pill {
  flex: 1 1 130px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(6, 18, 20, 0.55);
  border: 1px solid var(--card-border);
  text-align: center;
}

.step-pill.done {
  color: #b9e6a8;
  border-color: rgba(111, 163, 90, 0.45);
  background: rgba(111, 163, 90, 0.14);
}

.step-pill.active {
  color: var(--amber-bright);
  border-color: var(--amber-bright);
  background: rgba(244, 184, 96, 0.14);
}

.mode-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  background: rgba(6, 18, 20, 0.8);
  border: 1px solid var(--card-border);
  gap: 4px;
}

.mode-tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: 700 14px/1.2 var(--font-body);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.mode-tab.active {
  background: var(--amber);
  color: var(--night-deep);
}

.classic-highlight {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(244, 184, 96, 0.35);
  background: rgba(244, 184, 96, 0.06);
  margin: 12px 0;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.toc a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--cream-soft);
  background: rgba(16, 39, 43, 0.85);
  border: 1px solid var(--card-border);
  transition: border-color var(--ease), transform var(--ease);
}

.toc a:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}

.guide-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--cream-soft);
}

.guide-list li {
  margin: 6px 0;
}

/* Неброский, деликатный футер в стиле Совиного уголка */
.site-credit {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(244, 184, 96, 0.1);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.site-credit .owl-mark {
  color: var(--amber);
  opacity: 0.8;
  margin-right: 6px;
}

.credit-owl {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  vertical-align: -3px;
  margin-right: 6px;
  opacity: 0.92;
}

.site-credit a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dotted rgba(156, 189, 177, 0.45);
  transition: color var(--ease), border-color var(--ease);
}

.site-credit a:hover {
  color: var(--amber-bright);
  border-bottom-color: var(--amber-bright);
}

@media (max-width: 860px) {
  .grid-2,
  .grid-host {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars,
  .fireflies,
  .forest-mist,
  .forest-mist-2,
  .moonbeams,
  .falling-leaves,
  .shooting-star-layer,
  .oak-sway-layer,
  .wind-layer,
  .fog-layer {
    display: none;
  }
  .stage-brand .logo-owl {
    animation: none;
  }
  .btn,
  .card,
  .round-item {
    transition: none;
  }
}
