/* ============================================================
   1. МОДАЛКА РЕКОРДЕРА
   ============================================================ */
html.idea-recorder-open,
body.idea-recorder-open { overflow: hidden; }
body.idea-recorder-open { touch-action: none; }

.idea-recorder-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 12000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 5, 12, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  overscroll-behavior: contain;
}
.idea-recorder-modal[hidden] { display: none !important; }
.idea-recorder-modal.is-open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.idea-recorder-frame {
  position: relative;
  width: min(100%, 760px);
  max-height: min(94dvh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.idea-recorder-modal.is-open .idea-recorder-frame { transform: none; }

.idea-recorder-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(0, 220, 230, 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(0, 220, 230, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(20, 27, 40, 0.98), rgba(7, 11, 21, 0.985));
  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 0 60px rgba(0, 183, 194, 0.06);
  padding: clamp(1.1rem, 3vw, 1.7rem);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  word-break: normal;
}
.idea-recorder-shell::-webkit-scrollbar { width: 7px; }
.idea-recorder-shell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.idea-recorder-head {
  text-align: left;
  padding: 0 2.4rem 0 0;
  margin-bottom: 0.4rem;
}
.idea-recorder-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(127, 246, 247, 0.72);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}
.idea-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--highlight, #00b7c2);
  box-shadow: 0 0 0 4px rgba(0, 183, 194, 0.1);
  animation: ideaLive 1.7s ease-in-out infinite;
}
@keyframes ideaLive {
  50% { opacity: 0.42; transform: scale(0.75); }
}
.idea-recorder-head h2 {
  margin: 0.55rem 0 0;
  color: #fff;
  font: 700 clamp(1.4rem, 3.4vw, 2.1rem)/1.05 Georgia, serif;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* ============================================================
   2. ПОДСКАЗКИ (кнопка «?»)
   ============================================================ */
.idea-hint-btn {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(99, 237, 241, 0.45);
  background: rgba(0, 197, 207, 0.08);
  color: rgba(127, 246, 247, 0.9);
  font: 800 0.7rem/1 system-ui;
  cursor: pointer;
  padding: 0;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.idea-hint-btn:hover {
  border-color: rgba(99, 237, 241, 0.9);
  background: rgba(0, 197, 207, 0.2);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 197, 207, 0.35);
  transform: scale(1.08);
}
.idea-hint-btn:active { transform: scale(0.94); }
.idea-hint-btn--sm { width: 16px; height: 16px; min-width: 16px; font-size: 0.58rem; }

/* ============================================================
   3. ШАГИ
   ============================================================ */
.idea-step {
  position: relative;
  margin: 0.85rem 0;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
  transition: border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}
.idea-step.is-active {
  border-color: rgba(99, 237, 241, 0.42);
  background: linear-gradient(145deg, rgba(0, 197, 207, 0.06), rgba(255, 255, 255, 0.012));
  box-shadow:
    0 0 0 1px rgba(99, 237, 241, 0.12),
    0 10px 30px rgba(0, 183, 194, 0.08);
}
.idea-step.is-done { border-color: rgba(99, 237, 241, 0.24); }

.idea-step__head {
  display: grid;
  grid-template-columns: 28px 1fr 24px;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.idea-step__num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(99, 237, 241, 0.35);
  background: rgba(0, 197, 207, 0.08);
  color: #bffcff;
  font: 800 0.82rem/1 system-ui, sans-serif;
  transition: all 0.22s ease;
}
.idea-step.is-active .idea-step__num {
  border-color: rgba(99, 237, 241, 0.7);
  background: rgba(0, 197, 207, 0.18);
  box-shadow: 0 0 14px rgba(0, 197, 207, 0.35);
}
.idea-step.is-done .idea-step__num {
  background: rgba(0, 197, 207, 0.22);
  border-color: rgba(99, 237, 241, 0.55);
  color: #dffeff;
}
.idea-step__head-text {
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
}
.idea-step__title {
  font: 700 clamp(0.92rem, 1.55vw, 1.02rem)/1.25 Georgia, serif;
  color: #fff;
  letter-spacing: -0.01em;
}
.idea-step__body { position: relative; }

/* ============================================================
   4. МЕТРОНОМ / BPM / TAP
   ============================================================ */
.idea-tempo-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: 0 auto 0.3rem;
  padding: 0.2rem 0;
}
.idea-tempo-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0.15rem;
}
.idea-tempo-row .idea-bpm-field { justify-self: start; }
.idea-tempo-row .idea-tap-circle { justify-self: center; }
.idea-tempo-row .metro-toggle { justify-self: end; }

.idea-tap-circle {
  position: relative;
  width: 100px;
  height: 100px;
  min-width: 100px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  isolation: isolate;
  background: radial-gradient(circle at 50% 50%, rgba(0, 220, 230, 0.06), transparent 68%);
}
.idea-tap-circle::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 220, 230, 0.18);
  animation: softRingPulse 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes softRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.45; border-color: rgba(0, 220, 230, 0.18); }
  50% { transform: scale(1.06); opacity: 0.85; border-color: rgba(0, 220, 230, 0.35); }
}
.idea-tap-circle:active { transform: scale(0.96); }

.tap-inner {
  position: relative;
  z-index: 2;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(0, 220, 230, 0.4);
  background:
    radial-gradient(circle at 35% 30%, rgba(0, 220, 230, 0.32), rgba(0, 220, 230, 0.06) 55%, rgba(255, 255, 255, 0.02) 70%),
    linear-gradient(145deg, rgba(0, 197, 207, 0.08), rgba(0, 0, 0, 0.2));
  color: #eaffff;
  font-size: 1.55rem;
  box-shadow:
    0 0 0 1px rgba(0, 220, 230, 0.1),
    0 8px 24px rgba(0, 183, 194, 0.25),
    0 0 40px rgba(0, 197, 207, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.38s ease, background 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}
.tap-inner__mic {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 6px rgba(0, 220, 230, 0.5));
}
.tap-inner__rec-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff4757;
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  box-shadow: 0 0 16px rgba(255, 71, 87, 0.9);
}

.idea-tap-circle.tap-hit .tap-inner {
  transform: scale(1.05);
  box-shadow:
    0 0 0 8px rgba(0, 197, 207, 0.14),
    0 12px 30px rgba(0, 183, 194, 0.35),
    0 0 60px rgba(0, 220, 230, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -8px 20px rgba(0, 0, 0, 0.2);
  background:
    radial-gradient(circle at 35% 30%, rgba(0, 220, 230, 0.5), rgba(0, 220, 230, 0.1) 55%, rgba(255, 255, 255, 0.03) 70%),
    linear-gradient(145deg, rgba(0, 197, 207, 0.14), rgba(0, 0, 0, 0.2));
}
.idea-tap-circle.tap-hit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border-radius: 50%;
  border: 2px solid rgba(0, 220, 230, 0.65);
  animation: tapRipple 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  pointer-events: none;
}
@keyframes tapRipple {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}

.idea-tap-circle.beat-pulse .tap-inner {
  transform: scale(1.035);
  box-shadow:
    0 0 0 5px rgba(0, 197, 207, 0.1),
    0 12px 30px rgba(0, 183, 194, 0.45),
    0 0 60px rgba(0, 220, 230, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -8px 20px rgba(0, 0, 0, 0.2);
}
.idea-tap-circle.beat-pulse::before {
  border-color: rgba(0, 220, 230, 0.85);
  transform: scale(1.08);
}

.idea-tap-circle.is-recording .tap-inner {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 71, 87, 0.5), rgba(255, 71, 87, 0.12) 55%, rgba(0, 0, 0, 0.3) 75%),
    linear-gradient(145deg, rgba(255, 71, 87, 0.14), rgba(0, 0, 0, 0.3));
  border-color: rgba(255, 71, 87, 0.65);
  box-shadow:
    0 0 0 1px rgba(255, 71, 87, 0.2),
    0 8px 24px rgba(255, 71, 87, 0.4),
    0 0 50px rgba(255, 71, 87, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -8px 20px rgba(0, 0, 0, 0.3);
}
.idea-tap-circle.is-recording .tap-inner__mic {
  opacity: 0;
  transform: scale(0.5);
}
.idea-tap-circle.is-recording .tap-inner__rec-dot {
  opacity: 1;
  transform: scale(1);
}
.idea-tap-circle.is-recording::before {
  border-color: rgba(255, 71, 87, 0.45);
  opacity: 0.6;
}
.idea-tap-circle.is-recording { pointer-events: none; }
.idea-tap-circle.is-recording.beat-pulse .tap-inner {
  transform: scale(1.08);
  box-shadow:
    0 0 0 8px rgba(255, 71, 87, 0.15),
    0 12px 34px rgba(255, 71, 87, 0.55),
    0 0 70px rgba(255, 71, 87, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -8px 20px rgba(0, 0, 0, 0.3);
}
.idea-tap-circle.is-recording.beat-pulse .tap-inner__rec-dot {
  transform: scale(1.35);
  box-shadow: 0 0 26px rgba(255, 71, 87, 1);
}

.idea-tap-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-align: center;
  max-width: 460px;
  padding: 0 0.5rem;
}
.idea-tap-hint strong {
  color: rgba(127, 246, 247, 0.95);
  font-weight: 700;
}

.idea-bpm-field {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  width: auto;
  min-width: 64px;
}
.idea-bpm-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 700 1.15rem/1.1 'Courier New', monospace;
  text-align: center;
  -moz-appearance: textfield;
  padding: 0;
}
.idea-bpm-field input::-webkit-outer-spin-button,
.idea-bpm-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.idea-bpm-field span {
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
}
.idea-bpm-field:focus-within {
  border-color: rgba(0, 220, 230, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 183, 194, 0.06);
}

.metro-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
  min-height: 38px;
  width: auto;
}
.metro-toggle:hover:not(:disabled) {
  border-color: rgba(0, 220, 230, 0.3);
  color: #fff;
}
.metro-toggle:disabled { cursor: not-allowed; opacity: 0.85; }
.metro-toggle .metro-icon { font-size: 1.05rem; line-height: 1; transition: opacity 0.2s; }
.metro-toggle.is-off { opacity: 0.55; }
.metro-toggle.is-off .metro-icon { position: relative; }
.metro-toggle.is-off .metro-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1px), #ff6b6b calc(50% - 1px), #ff6b6b calc(50% + 1px), transparent calc(50% + 1px));
  border-radius: 4px;
  pointer-events: none;
}
.metro-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(127, 246, 247, 0.35);
  transition: background 0.12s, box-shadow 0.12s, transform 0.12s;
}
.metro-light.flash {
  background: #e6ffff;
  box-shadow: 0 0 16px rgba(0, 220, 230, 1);
  transform: scale(1.4);
}
.metro-toggle.is-locked-for-recording {
  border-color: rgba(99, 237, 241, 0.55);
  background: rgba(0, 197, 207, 0.14);
  color: #dffeff;
}

.idea-bpm-range {
  width: min(100%, 560px);
  margin: 0.5rem auto 0.15rem;
  display: block;
  accent-color: var(--highlight, #00b7c2);
  cursor: pointer;
  height: 22px;
}
.idea-bpm-scale {
  display: flex;
  justify-content: space-between;
  max-width: 560px;
  margin: 0 auto 0.7rem;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.58rem;
  font-family: 'Courier New', monospace;
  padding: 0 2px;
}
.idea-bpm-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  max-width: 600px;
  margin: 0 auto 0.1rem;
}
.idea-bpm-preset {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.5rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: all 0.18s;
}
.idea-bpm-preset .preset-emoji { font-size: 1.15rem; line-height: 1; }
.idea-bpm-preset .preset-bpm { font: 700 0.72rem/1 'Courier New', monospace; color: #fff; }
.idea-bpm-preset .preset-label {
  font-size: 0.5rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.38);
}
.idea-bpm-preset:hover,
.idea-bpm-preset.is-active {
  transform: translateY(-1px);
  border-color: rgba(0, 220, 230, 0.4);
  background: rgba(0, 183, 194, 0.1);
  box-shadow: 0 7px 18px rgba(0, 183, 194, 0.1);
}
.idea-bpm-preset.is-active .preset-bpm { color: #8ef5f5; }

/* ============================================================
   5. ЗАПИСЬ / ВОСПРОИЗВЕДЕНИЕ
   ============================================================ */
.idea-live-stage { position: relative; margin: 0; min-height: 0; }

.idea-record-controls {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin: 0.7rem 0 0;
  flex-wrap: nowrap;
}

.idea-rec-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.2rem;
  border-radius: 14px;
  cursor: pointer;
  font: 700 0.74rem/1 system-ui;
  letter-spacing: 0.02em;
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    color 0.28s ease,
    padding 0.28s ease,
    border-radius 0.28s ease,
    flex 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.72);
  flex: 0 0 auto;
  width: auto;
}
.idea-rec-button:hover:not(:disabled) {
  border-color: rgba(0, 220, 230, 0.3);
  color: #fff;
}
.idea-rec-button:disabled { opacity: 0.32; cursor: not-allowed; }

.idea-rec-button--record {
  order: 0;
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 71, 87, 0.45);
  background: linear-gradient(145deg, #3a1119, #1a0a10);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 71, 87, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 0.72rem 1.35rem;
  gap: 0.55rem;
}
.idea-rec-button--record:hover:not(:disabled) {
  background: linear-gradient(145deg, #4a1620, #220d14);
  box-shadow: 0 10px 28px rgba(255, 71, 87, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 71, 87, 0.7);
}
.idea-rec-button--record .rec-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  min-width: 9px;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.9), 0 0 4px rgba(255, 71, 87, 1);
  font-size: 0;
  color: transparent;
  line-height: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  flex: 0 0 auto;
}
.idea-rec-button--record .rec-label {
  display: inline-block;
  transition: opacity 0.28s ease, width 0.28s ease;
}
.idea-rec-button--record .rec-visual {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  width: auto;
  pointer-events: none;
  z-index: 1;
}
.idea-rec-timer {
  display: none;
  font: 700 0.82rem/1 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.06em;
  min-width: 48px;
  text-align: center;
  flex: 0 0 auto;
}

.idea-rec-button--stop {
  order: 1;
  border-color: transparent;
  background: linear-gradient(145deg, #ff4757, #d63248);
  color: #fff;
  display: none;
  padding: 0.72rem 1rem;
  gap: 0.45rem;
  box-shadow: 0 8px 22px rgba(255, 71, 87, 0.3);
  font-weight: 800;
}
.idea-rec-button--stop:hover:not(:disabled) {
  background: linear-gradient(145deg, #ff5566, #e03a4d);
  box-shadow: 0 10px 28px rgba(255, 71, 87, 0.42);
}

.idea-record-controls.is-recording .idea-rec-button--record {
  flex: 1 1 auto;
  padding: 0.72rem 1rem;
  border-radius: 14px 0 0 14px;
  border-color: rgba(255, 71, 87, 0.6);
  background: linear-gradient(145deg, #3a1119, #1a0a10);
  box-shadow: 0 12px 32px rgba(255, 71, 87, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  justify-content: flex-start;
  gap: 0.55rem;
}
.idea-record-controls.is-recording .idea-rec-button--record .rec-label {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.idea-record-controls.is-recording .idea-rec-button--record .rec-visual {
  display: block;
  height: 36px;
}
.idea-record-controls.is-recording .idea-rec-timer { display: inline-block; }
.idea-record-controls.is-recording .idea-rec-button--record.beat-pulse .rec-dot {
  transform: scale(1.5);
  box-shadow: 0 0 22px rgba(255, 71, 87, 1), 0 0 6px rgba(255, 71, 87, 1);
}
.idea-record-controls.is-recording .idea-rec-button--stop {
  display: inline-flex;
  border-radius: 0 14px 14px 0;
}
@media (min-width: 481px) {
  .idea-record-controls.is-recording .idea-rec-button--stop { margin-left: -1px; }
}

.idea-rec-player {
  order: 0;
  width: 100%;
  display: none;
  margin-top: 0.5rem;
}
.idea-live-stage.is-recorded .idea-rec-player { display: block; }
.idea-live-stage.is-recorded .idea-rec-button--record { display: none; }
.idea-live-stage.is-recorded .idea-rec-button--stop { display: none; }
.idea-live-stage.is-recorded .idea-record-controls { display: block; }

.idea-record-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.idea-record-actions[hidden] { display: none; }

.idea-rec-action {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  font: 700 0.74rem/1 system-ui;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 46px;
  white-space: nowrap;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, transform 0.18s ease;
}
.idea-rec-action--reset {
  border: 1px solid rgba(255, 158, 94, 0.55);
  background: linear-gradient(135deg, rgba(255, 158, 94, 0.16), rgba(255, 255, 255, 0.02));
  color: #ffd4a8;
}
.idea-rec-action--reset:hover:not(:disabled) {
  border-color: rgba(255, 158, 94, 0.9);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 158, 94, 0.28), rgba(255, 255, 255, 0.04));
  box-shadow: 0 12px 30px rgba(255, 158, 94, 0.16);
}
.idea-rec-action--save {
  border: 1px solid rgba(76, 205, 118, 0.55);
  background: linear-gradient(135deg, rgba(76, 205, 118, 0.22), rgba(255, 255, 255, 0.04));
  color: #d6ffe4;
  box-shadow: 0 10px 26px rgba(76, 205, 118, 0.12);
}
.idea-rec-action--save:hover:not(:disabled) {
  border-color: rgba(76, 205, 118, 0.9);
  color: #fff;
  box-shadow: 0 14px 34px rgba(76, 205, 118, 0.22);
}
.idea-rec-action:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   6. ПЛЕЕР В ОДНУ СТРОКУ (.remiz-player)
   ============================================================ */
.remiz-player {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100% !important;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(0, 220, 230, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 197, 207, 0.1), rgba(10, 15, 25, 0.9));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  align-items: stretch;
  gap: 0;
}
.remiz-player__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}
.remiz-player__btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 220, 230, 0.55);
  background: radial-gradient(circle at 35% 30%, rgba(0, 220, 230, 0.28), rgba(0, 0, 0, 0.4));
  color: #eaffff;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 197, 207, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.remiz-player__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 26px rgba(0, 197, 207, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.remiz-player__btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.remiz-player__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}
.remiz-player__btn .rmz-play-icon,
.remiz-player__btn .rmz-pause-icon {
  display: block;
  width: 18px;
  height: 18px;
}
.remiz-player__btn .rmz-play-icon { fill: currentColor; }
.remiz-player__btn .rmz-pause-icon { fill: currentColor; }

.remiz-player__time {
  font: 700 0.68rem/1 'Courier New', monospace;
  color: rgba(224, 236, 240, 0.78);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
}
.remiz-player__time--cur { text-align: right; }
.remiz-player__time--total { text-align: left; }

.remiz-player__bar {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.remiz-player__track {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  pointer-events: none;
}
.remiz-player__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #00dce6, #63edf1);
  box-shadow: 0 0 10px rgba(0, 220, 230, 0.5);
  transition: width 0.1s linear;
}
.remiz-player.is-playing .remiz-player__btn {
  animation: playerPulse 1.2s ease-in-out infinite;
}
@keyframes playerPulse {
  50% { box-shadow: 0 0 22px rgba(0, 220, 230, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
}

.remiz-player__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #eafcff;
  text-align: left;
  padding: 0 2px 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

@media (max-width: 480px) {
  .remiz-player { padding: 0.45rem 0.6rem; }
  .remiz-player__btn { width: 34px; height: 34px; min-width: 34px; }
  .remiz-player__btn svg { width: 15px; height: 15px; }
  .remiz-player__time { font-size: 0.62rem; min-width: 38px; }
  .remiz-player__row { gap: 0.5rem; }
}

.idea-card-audio {
  margin-top: 0.4rem;
  position: relative;
  z-index: 1;
  width: 100%;
}
.idea-card-audio .remiz-player {
  display: flex;
  width: 100%;
  max-width: 100% !important;
}
.idea-rec-player .remiz-player {
  width: 100%;
  max-width: 100% !important;
}

/* ============================================================
   7. ФОРМА ДАННЫХ / ЗАГРУЗКА
   ============================================================ */
.idea-data-block {
  margin: 1rem 0 0.35rem;
  padding: 0.95rem 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008));
  transition: border-color 0.28s ease, background 0.28s ease;
}
.idea-data-block.is-ready {
  border-color: rgba(99, 237, 241, 0.32);
  background: linear-gradient(145deg, rgba(0, 197, 207, 0.05), rgba(255, 255, 255, 0.01));
}
@keyframes dataBlockFlash {
  0% { box-shadow: 0 0 0 0 rgba(99, 237, 241, 0), 0 0 0 rgba(0, 197, 207, 0); }
  40% { box-shadow: 0 0 0 6px rgba(99, 237, 241, 0.18), 0 0 40px rgba(0, 197, 207, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(99, 237, 241, 0), 0 0 0 rgba(0, 197, 207, 0); }
}
.idea-data-block.is-highlighted {
  border-color: rgba(99, 237, 241, 0.55);
  background:
    radial-gradient(circle at 50% 0, rgba(0, 220, 230, 0.1), transparent 60%),
    linear-gradient(145deg, rgba(0, 197, 207, 0.08), rgba(255, 255, 255, 0.015));
  animation: dataBlockFlash 1.8s ease-out 1;
  transition: border-color 0.5s ease, background 0.5s ease;
}
.idea-data-block.is-highlighted .idea-form__field input:not(:disabled) {
  border-color: rgba(99, 237, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 197, 207, 0.1), inset 0 0 0 1px rgba(99, 237, 241, 0.12);
  background: rgba(0, 197, 207, 0.04);
  transition: border-color 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
}
.idea-data-block.is-highlighted .idea-form__field input:not(:disabled)::placeholder {
  color: rgba(180, 250, 255, 0.45);
}
.idea-data-block.is-highlighted .idea-form__label {
  color: rgba(127, 246, 247, 0.85);
  transition: color 0.5s ease;
}

.idea-data-block__head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.7rem;
}
.idea-data-block__kicker {
  font: 800 0.55rem/1 system-ui;
  letter-spacing: 0.16em;
  color: rgba(127, 246, 247, 0.65);
  text-transform: uppercase;
}
.idea-data-block__hint {
  font: 400 0.68rem/1.45 system-ui;
  color: rgba(255, 255, 255, 0.45);
}

.idea-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.idea-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.idea-form__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-height: 20px;
}
.idea-form__label {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}
.idea-form__label:hover { color: rgba(127, 246, 247, 0.9); }
.idea-form__field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  padding: 0.6rem 0.7rem;
  font: 400 0.74rem/1.35 system-ui;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.22s ease;
}
.idea-form__field input:focus {
  border-color: rgba(0, 220, 230, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 183, 194, 0.06);
}
.idea-form__field input::placeholder { color: rgba(255, 255, 255, 0.24); }
.idea-form__field input:disabled { opacity: 0.42; cursor: not-allowed; }

.idea-ref-warning {
  display: flex;
  gap: 0.6rem;
  margin: 0.7rem 0 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(0, 197, 207, 0.04), rgba(255, 255, 255, 0.014));
}
.idea-ref-warning-icon {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--highlight, #00b7c2);
  background: rgba(0, 183, 194, 0.08);
  font-size: 0.75rem;
}
.idea-ref-warning p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.62rem;
  line-height: 1.5;
}

.idea-upload {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}
.idea-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.2rem;
  border: 1px solid rgba(0, 220, 230, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 183, 194, 0.14), rgba(255, 255, 255, 0.025));
  color: rgba(230, 252, 252, 0.9);
  cursor: pointer;
  font: 700 0.72rem/1 system-ui;
  transition: all 0.25s ease;
  min-height: 46px;
  width: auto;
  flex: 0 0 auto;
}
.idea-upload-button:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(0, 230, 240, 0.65);
  box-shadow: 0 12px 30px rgba(0, 183, 194, 0.16);
}
.idea-upload-button:disabled { opacity: 0.34; cursor: not-allowed; }
.idea-upload-button.is-uploading { cursor: wait; opacity: 0.7; }

/* ============================================================
   8. TOOLTIP
   ============================================================ */
.idea-tooltip {
  position: fixed;
  z-index: 10060;
  max-width: 260px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(99, 237, 241, 0.28);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(15, 22, 36, 0.94), rgba(8, 12, 22, 0.97));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 183, 194, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.96);
  transform-origin: 50% 0%;
  will-change: transform, opacity;
}
.idea-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}
.idea-tooltip__arrow {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(15, 22, 36, 0.94);
  border-left: 1px solid rgba(99, 237, 241, 0.28);
  border-top: 1px solid rgba(99, 237, 241, 0.28);
  left: var(--arrow-x, 50%);
  margin-left: -4px;
}
.idea-tooltip[data-arrow="bottom"] .idea-tooltip__arrow {
  bottom: -5px;
  transform: rotate(225deg);
}
.idea-tooltip[data-arrow="top"] .idea-tooltip__arrow {
  top: -5px;
  transform: rotate(45deg);
}
.idea-tooltip__body {
  position: relative;
  font: 400 0.7rem/1.5 system-ui;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
}
.idea-tooltip__body strong {
  display: block;
  color: #eaffff;
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 0.76rem;
}
.idea-tooltip__body em {
  color: rgba(127, 246, 247, 0.9);
  font-style: normal;
}
.idea-tooltip__body p { margin: 0.3rem 0 0; }
.idea-tooltip__body p:first-child { margin-top: 0; }

/* ============================================================
   9. РЕЗУЛЬТАТ — МОДАЛКА
   ============================================================ */
.idea-result-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 10100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 5, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.idea-result-modal[hidden] { display: none !important; }
.idea-result-modal.is-open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.idea-result-shell {
  position: relative;
  width: min(100%, 580px);
  max-height: min(92dvh, 820px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(99, 237, 241, 0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(0, 220, 230, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(20, 27, 40, 0.98), rgba(7, 11, 21, 0.985));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 1.4rem 1.4rem 1.5rem;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  word-break: normal;
  overflow-wrap: anywhere;
}
.idea-result-modal.is-open .idea-result-shell { transform: none; }

.idea-result-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(127, 246, 247, 0.72);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  padding: 0 2rem;
}
.idea-result-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--highlight, #00b7c2);
  box-shadow: 0 0 8px rgba(0, 197, 207, 0.8);
}
.idea-result-title {
  margin: 0.5rem 0 1rem;
  color: #fff;
  font: 700 clamp(1.3rem, 3vw, 1.75rem)/1.1 Georgia, serif;
  letter-spacing: -0.03em;
  padding: 0 2rem;
}
.idea-result-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}
.idea-result-copy-row input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.76);
  padding: 0.6rem 0.7rem;
  font: 0.68rem/1.2 'Courier New', monospace;
}
.idea-result-copy-row button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.68);
  padding: 0.55rem 0.8rem;
  font-size: 0.64rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.idea-result-copy-row button:hover {
  border-color: rgba(0, 220, 230, 0.3);
  color: #fff;
}
.idea-result-copy-row button.copied {
  border-color: rgba(0, 220, 230, 0.4);
  color: #caffff;
}
.idea-result-share-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.6rem 0 0.45rem;
  text-transform: uppercase;
}
.idea-result-share-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.idea-result-share {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.idea-result-share a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 80px;
  min-height: 40px;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.64rem;
  text-decoration: none;
  transition: all 0.2s;
}
.idea-result-share a svg { width: 15px; height: 15px; }
.idea-result-share a:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 220, 230, 0.32);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.idea-card-preview {
  position: relative;
  padding: 1.05rem 1.05rem 0.95rem;
  border: 1px solid rgba(99, 237, 241, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(0, 220, 230, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(0, 197, 207, 0.06), rgba(255, 255, 255, 0.018));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.idea-card-preview::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 0 0, rgba(0, 235, 240, 0.22), transparent 72%);
  pointer-events: none;
  border-radius: 16px 0 0 0;
}
.idea-card-preview__head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.7rem;
  position: relative;
  z-index: 1;
}
.idea-card-preview__title {
  font: 700 1rem/1.1 Georgia, serif;
  color: #fff;
  letter-spacing: -0.02em;
}
.idea-card-preview__badge {
  font: 700 0.5rem/1 'Courier New', monospace;
  letter-spacing: 0.14em;
  color: rgba(166, 243, 245, 0.55);
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(99, 237, 241, 0.22);
  border-radius: 999px;
  background: rgba(0, 197, 207, 0.05);
  white-space: nowrap;
}
.idea-card-preview__date {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}
.idea-card-preview__date::before {
  content: "🗓";
  font-size: 0.78rem;
  filter: saturate(0.6);
}
.idea-card-preview__body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 1;
}
.idea-card-cell {
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.idea-card-cell__label {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.idea-card-cell__value {
  font: 700 0.8rem/1.1 'Courier New', monospace;
  color: #fff;
}
.idea-card-cell__value small {
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  margin-left: 0.15rem;
}
.idea-card-preview__rows {
  display: grid;
  gap: 0.3rem;
  position: relative;
  z-index: 1;
  margin-bottom: 0.6rem;
}
.idea-card-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.idea-card-row:first-child { border-top: 0; }
.idea-card-row__label {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 800;
  padding-top: 0.15rem;
}
.idea-card-row__value {
  min-width: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: normal;
}
.idea-card-row__value a {
  color: var(--rmz-cyan, #63edf1);
  text-decoration: underline;
  text-decoration-color: rgba(99, 237, 241, 0.3);
  text-underline-offset: 3px;
  word-break: break-all;
}
.idea-card-audio {
  margin-top: 0.4rem;
  position: relative;
  z-index: 1;
  width: 100%;
}
.idea-card-audio .remiz-player {
  display: flex;
  width: 100%;
  max-width: 100% !important;
}

/* ============================================================
   10. TOAST (fallback)
   ============================================================ */
.idea-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  z-index: 10070;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  font: 600 0.82rem/1.4 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: calc(100vw - 40px);
  background: linear-gradient(135deg, rgba(0, 197, 207, 0.95), rgba(15, 76, 117, 0.95));
  color: #eaffff;
  border: 1px solid rgba(127, 246, 247, 0.55);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(0, 197, 207, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.idea-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.idea-toast[data-mode="error"] {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(140, 20, 35, 0.95));
  border-color: rgba(255, 120, 140, 0.6);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(220, 53, 69, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #ffe6ea;
}
.idea-toast[data-mode="success"] {
  background: linear-gradient(135deg, rgba(34, 177, 101, 0.95), rgba(20, 110, 65, 0.95));
  border-color: rgba(120, 240, 170, 0.6);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(34, 177, 101, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #e6fff0;
}

/* ============================================================
   11. МОБИЛЬНЫЙ АДАПТИВ
   ============================================================ */
@media (max-width: 700px) {
  .idea-recorder-modal {
    padding: 8px;
    align-items: flex-end;
  }
  .idea-recorder-frame {
    max-height: 96dvh;
    border-radius: 24px 24px 16px 16px;
  }
  .idea-recorder-shell {
    max-height: 96dvh;
    border-radius: 24px 24px 16px 16px;
    padding: 1rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  }
  .idea-recorder-head {
    padding: 0 2rem 0 0;
    margin-bottom: 0.2rem;
  }
  .idea-recorder-head h2 { font-size: 1.4rem; }

  .idea-step {
    padding: 0.75rem 0.85rem 0.9rem;
    border-radius: 14px;
    margin: 0.7rem 0;
  }
  .idea-step__head {
    grid-template-columns: 26px 1fr 22px;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
  }
  .idea-step__num { width: 26px; height: 26px; min-width: 26px; font-size: 0.76rem; }
  .idea-step__title { font-size: 0.9rem; }

  .idea-tempo-panel { gap: 0.45rem; margin: 0.05rem auto 0.25rem; }
  .idea-tempo-row { gap: 0.35rem; padding: 0; }
  .idea-tap-circle { width: 92px; height: 92px; min-width: 92px; }
  .tap-inner { width: 68px; height: 68px; font-size: 1.35rem; }
  .idea-tap-hint { font-size: 0.65rem; line-height: 1.4; }
  .metro-toggle { padding: 0.48rem 0.65rem; font-size: 0.66rem; min-height: 36px; }
  .metro-toggle .metro-icon { font-size: 0.95rem; }
  .idea-bpm-field { padding: 0.42rem 0.6rem; min-width: 58px; }
  .idea-bpm-field input { font-size: 1.05rem; }
  .idea-bpm-field span { font-size: 0.46rem; }
  .idea-bpm-scale { font-size: 0.52rem; }
  .idea-bpm-presets { gap: 0.3rem; }
  .idea-bpm-preset { min-height: 56px; padding: 0.42rem 0.25rem; }
  .idea-bpm-preset .preset-emoji { font-size: 1rem; }
  .idea-bpm-preset .preset-bpm { font-size: 0.64rem; }
  .idea-bpm-preset .preset-label { font-size: 0.44rem; }

  .idea-rec-button { min-height: 46px; padding: 0.66rem 0.9rem; font-size: 0.7rem; }
  .idea-rec-button--record { padding: 0.66rem 1.05rem; }
  .idea-record-controls.is-recording .idea-rec-button--record { padding: 0.66rem 0.8rem; gap: 0.5rem; }
  .idea-rec-timer { font-size: 0.76rem; min-width: 44px; }
  .idea-rec-player { width: 100%; }

  .idea-data-block { padding: 0.8rem 0.85rem 0.9rem; border-radius: 14px; }
  .idea-form { grid-template-columns: 1fr; gap: 0.45rem; }
  .idea-upload-button { width: 100%; justify-content: center; }

  .idea-tooltip { max-width: 220px; padding: 0.55rem 0.65rem; }
  .idea-tooltip__body { font-size: 0.66rem; line-height: 1.45; }
  .idea-tooltip__body strong { font-size: 0.72rem; }

  .idea-result-shell { padding: 1.2rem 1.1rem 1.3rem; border-radius: 20px; }

  .idea-toast {
    bottom: calc(20px + env(safe-area-inset-bottom));
    padding: 0.7rem 1rem;
    font-size: 0.78rem;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .idea-recorder-head h2 { font-size: 1.25rem; }
  .idea-step__title { font-size: 0.86rem; }
  .idea-tempo-row { gap: 0.3rem; }
  .idea-tap-circle { width: 84px; height: 84px; min-width: 84px; }
  .tap-inner { width: 62px; height: 62px; font-size: 1.25rem; }
  .idea-bpm-field { padding: 0.38rem 0.5rem; min-width: 52px; }
  .idea-bpm-field input { font-size: 0.98rem; }
  .idea-bpm-field span { font-size: 0.42rem; letter-spacing: 0.1em; }
  .metro-toggle { padding: 0.42rem 0.55rem; font-size: 0.6rem; min-height: 34px; }
  .metro-toggle .metro-text { display: none; }
  .metro-toggle .metro-icon { font-size: 0.9rem; }
  .idea-tap-hint { font-size: 0.62rem; }

  .idea-bpm-presets { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.22rem; }
  .idea-bpm-preset { min-height: 52px; padding: 0.35rem 0.1rem; }
  .idea-bpm-preset .preset-emoji { font-size: 0.88rem; }
  .idea-bpm-preset .preset-bpm { font-size: 0.56rem; }
  .idea-bpm-preset .preset-label { display: none; }

  .idea-record-controls { flex-wrap: wrap; justify-content: center; row-gap: 0.55rem; }
  .idea-record-controls.is-recording { gap: 0.55rem; }
  .idea-record-controls.is-recording .idea-rec-button--record {
    order: 0;
    flex: 1 1 100%;
    border-radius: 14px;
    padding: 0.7rem 1rem;
  }
  .idea-record-controls.is-recording .idea-rec-button--stop {
    order: 2;
    flex: 0 0 auto;
    display: inline-flex;
    justify-content: center;
    border-radius: 14px;
    margin: 0.15rem auto 0;
    min-width: 160px;
    max-width: 220px;
    min-height: 44px;
    padding: 0.7rem 1.4rem;
    gap: 0.5rem;
  }
  .idea-record-controls.is-recording .idea-rec-button--stop .stop-label { display: inline; }
  .idea-rec-player { order: 0; flex: 1 1 100%; }

  .idea-rec-timer { font-size: 0.72rem; min-width: 40px; }
}

@media (max-width: 390px) {
  .idea-recorder-head h2 { font-size: 1.2rem; }
  .idea-step { padding: 0.72rem 0.75rem 0.8rem; }
  .idea-tap-circle { width: 78px; height: 78px; min-width: 78px; }
  .tap-inner { width: 58px; height: 58px; font-size: 1.15rem; }
  .idea-bpm-preset .preset-bpm { font-size: 0.52rem; }
  .idea-form__field input { font-size: 0.7rem; padding: 0.55rem 0.6rem; }
}

/* ============================================================
   12. ПРЕДПОЧТЕНИЯ / FALLBACK
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .idea-live-dot,
  .remiz-player.is-playing .remiz-player__btn,
  .idea-tap-circle::before {
    animation: none !important;
  }
  .idea-toast { transition: opacity 0.01ms; }
}

@supports not (backdrop-filter: blur(10px)) {
  .idea-recorder-modal { background: rgba(2, 5, 12, 0.96) !important; }
  .idea-recorder-shell { background: linear-gradient(145deg, #141b28, #070b15) !important; }
  .idea-tooltip { background: linear-gradient(145deg, #0f1624, #080c16) !important; }
  .idea-result-modal { background: rgba(2, 5, 12, 0.96) !important; }
  .idea-result-shell { background: linear-gradient(145deg, #141b28, #070b15) !important; }
}

/* ============================================================
   v5-PATCH — PLAY/PAUSE ИКОНКИ В ПЛЕЕРЕ
   ============================================================ */
.remiz-player__btn .rmz-play-icon,
.remiz-player__btn .rmz-pause-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  display: block !important;
  flex-shrink: 0 !important;
  fill: currentColor !important;
}
.remiz-player__btn .rmz-play-icon[style*="display:none"],
.remiz-player__btn .rmz-play-icon[style*="display: none"],
.remiz-player__btn .rmz-pause-icon[style*="display:none"],
.remiz-player__btn .rmz-pause-icon[style*="display: none"] {
  display: none !important;
}
@media(max-width:480px){
  .remiz-player__btn .rmz-play-icon,
  .remiz-player__btn .rmz-pause-icon {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
  }
}