/* ============================================================
   Внутренний совет — тёмная сцена для девяти голосов
   ============================================================ */

:root {
  --bg: #07070a;
  --bg-soft: #0b0b11;
  --panel: rgba(17, 17, 24, 0.78);
  --panel-solid: #111118;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f1efe8;
  --muted: #9b99a5;
  --muted-2: #6d6b78;
  --acid: #d8ff3e;
  --acid-dim: rgba(216, 255, 62, 0.4);
  --acid-soft: rgba(216, 255, 62, 0.09);
  --danger: #ff7264;
  --radius: 24px;
  --max: 1240px;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;

  --v-fear: #d96c5f;
  --v-intellect: #7aa7ff;
  --v-laziness: #9aa0ad;
  --v-ambition: #e2b15a;
  --v-anxiety: #b98ad6;
  --v-curiosity: #58d6c9;
  --v-common: #88c47a;
  --v-anger: #ff5d6c;
  --v-creativity: #f3a6c8;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--acid);
  color: #08080a;
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--acid);
  color: #08080a;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- фон ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -20%, rgba(255, 255, 255, 0.045), transparent 60%),
    var(--bg);
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

.ambient__glow--one {
  top: -220px;
  left: -160px;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(216, 255, 62, 0.11), transparent 68%);
}

.ambient__glow--two {
  top: 100px;
  right: -220px;
  width: 760px;
  height: 760px;
  background: radial-gradient(circle, rgba(122, 88, 255, 0.13), transparent 68%);
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 20%, transparent 78%);
}

.ambient__noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* ---------- шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 10, 0.72);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--acid-dim);
  border-radius: 12px;
  color: var(--acid);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.04em;
  box-shadow:
    inset 0 0 18px rgba(216, 255, 62, 0.06),
    0 0 0 4px rgba(216, 255, 62, 0.025);
}

.brand__name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.brand__sub {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.limit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.limit__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(216, 255, 62, 0.65);
}

.limit.is-empty {
  border-color: rgba(255, 114, 100, 0.25);
  color: #c9a09b;
}

.limit.is-empty .limit__dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 114, 100, 0.5);
}

.topbar__donate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d8d, #ff8a3d);
  font-family: inherit;
  cursor: pointer;
  color: #1b0b13;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    0 8px 26px rgba(255, 77, 141, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.topbar__donate:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 12px 30px rgba(255, 77, 141, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- основная сетка ---------- */

.main {
  flex: 1 0 auto;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  gap: 64px;
  align-items: start;
  padding: 86px 0 70px;
}

.hero__intro {
  padding-top: 10px;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--acid);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow__line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--acid), transparent);
}

.hero__title {
  margin: 0 0 28px;
  font-size: clamp(52px, 7.4vw, 104px);
  font-weight: 520;
  line-height: 0.92;
  letter-spacing: -0.058em;
}

.hero__title em {
  color: var(--acid);
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  text-shadow: 0 0 60px rgba(216, 255, 62, 0.16);
}

.hero__lede {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 18.5px;
  line-height: 1.62;
}

.voices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 520px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.voices li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.voices__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #888);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent, #888) 55%, transparent);
}

.voices__avatar {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #0d0d14;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.025);
}

/* ---------- ввод ---------- */

.hero__console {
  animation: rise 0.7s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.composer {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(22, 22, 31, 0.9), rgba(11, 11, 17, 0.93));
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.composer:focus-within {
  border-color: rgba(216, 255, 62, 0.38);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.55),
    0 0 0 4px rgba(216, 255, 62, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.composer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}

.composer__head label {
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.composer__hint {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 164px;
  margin: 8px 0 0;
  padding: 16px 2px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font-size: 21.5px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  caret-color: var(--acid);
}

.composer textarea::placeholder {
  color: #5d5b67;
  opacity: 1;
}

.disclaimer {
  margin: 0 2px 14px;
  padding: 10px 12px;
  border-left: 2px solid rgba(255, 114, 100, 0.5);
  background: rgba(255, 114, 100, 0.045);
  color: #a99a9a;
  font-size: 10.5px;
  line-height: 1.5;
}

.composer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.counter {
  color: var(--muted-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.counter.is-near {
  color: var(--danger);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn--primary {
  padding: 16px 24px;
  border-radius: 13px;
  background: var(--acid);
  color: #08080a;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 8px 26px rgba(216, 255, 62, 0.13);
}

.btn--primary:hover {
  transform: translateY(-1px);
  background: #e3ff68;
  box-shadow: 0 12px 34px rgba(216, 255, 62, 0.22);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.btn__spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(8, 8, 10, 0.28);
  border-top-color: #08080a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn__spinner {
  display: inline-block;
}

.btn.is-loading .btn__label {
  opacity: 0.62;
}

.btn--ghost {
  padding: 12px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.btn--ghost:hover {
  border-color: var(--acid-dim);
  color: var(--acid);
}

.btn--voice {
  padding: 12px 17px;
  border: 1px solid rgba(216, 255, 62, 0.34);
  border-radius: 11px;
  background: var(--acid-soft);
  color: var(--acid);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.btn--voice:hover {
  border-color: var(--acid);
  background: rgba(216, 255, 62, 0.16);
  transform: translateY(-1px);
}

.btn--voice.is-speaking {
  background: var(--acid);
  border-color: var(--acid);
  color: #08080a;
  box-shadow: 0 0 28px rgba(216, 255, 62, 0.18);
}

.voice-icon {
  font-size: 9px;
  line-height: 1;
}

.btn--donate {
  padding: 16px 24px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ff4d8d 0%, #ff8a3d 58%, #ffd45e 100%);
  color: #1b0b13;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow:
    0 12px 36px rgba(255, 77, 141, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--donate:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 18px 44px rgba(255, 77, 141, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--wide {
  width: 100%;
  padding: 17px 22px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.examples__label {
  margin-right: 2px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.chip:hover {
  border-color: rgba(216, 255, 62, 0.35);
  background: var(--acid-soft);
  color: var(--text);
}

.status {
  min-height: 20px;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status.is-error {
  color: var(--danger);
}

.status.is-success {
  color: var(--acid);
}

/* ---------- загрузка ---------- */

.loading {
  padding: 10px 0 86px;
  animation: rise 0.45s ease both;
}

.loading__head {
  margin-bottom: 26px;
}

.loading__head .eyebrow {
  margin-bottom: 12px;
}

.loading__head h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 520;
  letter-spacing: -0.04em;
}

.loading__head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.loading__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.loading__card {
  height: 182px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(
    110deg,
    #0d0d14 30%,
    #161622 50%,
    #0d0d14 70%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

.loading__card:nth-child(2n) {
  animation-delay: 0.12s;
}

.loading__card:nth-child(3n) {
  animation-delay: 0.24s;
}

/* ---------- результат ---------- */

.result {
  padding: 6px 0 90px;
  scroll-margin-top: 96px;
  animation: rise 0.5s ease both;
}

.result__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

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

.voice-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.voice-status.is-error {
  color: var(--danger);
}

.voice-status.is-success {
  color: var(--acid);
}

.result__head .eyebrow {
  margin-bottom: 10px;
}

.result__head h2 {
  margin: 0;
  font-size: clamp(38px, 4.8vw, 62px);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.verdict {
  position: relative;
  margin: 30px 0 30px;
  padding: 26px 32px 26px 36px;
  border-left: 2px solid var(--acid);
  background: linear-gradient(90deg, rgba(216, 255, 62, 0.075), transparent 72%);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.7vw, 36px);
  font-style: italic;
  line-height: 1.36;
  letter-spacing: -0.015em;
}

.verdict::before {
  content: "“";
  position: absolute;
  top: -26px;
  left: 12px;
  color: var(--acid);
  font-family: var(--font-serif);
  font-size: 86px;
  font-style: normal;
  line-height: 1;
  opacity: 0.16;
  pointer-events: none;
}

.members {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.member {
  --accent: #9aa0ad;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 205px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 20, 29, 0.92), rgba(10, 10, 16, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  animation: card-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.member::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 78%);
  opacity: 0.85;
}

.member::after {
  content: attr(data-index);
  position: absolute;
  top: 18px;
  right: 18px;
  color: rgba(255, 255, 255, 0.16);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.member__speak {
  position: absolute;
  top: 15px;
  right: 38px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.58;
  transition:
    opacity 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.member__speak::before {
  content: "▶";
  font-size: 9px;
  line-height: 1;
  transform: translateX(1px);
}

.member__speak:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}

.member.is-speaking {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
    0 0 40px color-mix(in srgb, var(--accent) 10%, transparent);
}

.member.is-speaking .member__speak {
  background: var(--accent);
  border-color: var(--accent);
  color: #08080a;
  opacity: 1;
}

.member.is-speaking .member__speak::before {
  content: "■";
  font-size: 8px;
  transform: none;
}

.member.is-speaking .member__glyph {
  animation: voice-pulse 1.5s ease-out infinite;
}

.member:nth-child(1) {
  animation-delay: 0ms;
}
.member:nth-child(2) {
  animation-delay: 55ms;
}
.member:nth-child(3) {
  animation-delay: 110ms;
}
.member:nth-child(4) {
  animation-delay: 165ms;
}
.member:nth-child(5) {
  animation-delay: 220ms;
}
.member:nth-child(6) {
  animation-delay: 275ms;
}
.member:nth-child(7) {
  animation-delay: 330ms;
}
.member:nth-child(8) {
  animation-delay: 385ms;
}
.member:nth-child(9) {
  animation-delay: 440ms;
}

.member:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.member__head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 52px;
}

.member__avatar {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 50%;
  background: #0d0d14;
  object-fit: cover;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
}

.member__glyph {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
}

.member__name {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.member__role {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.member__line {
  margin: 0;
  color: #d1cfd7;
  font-size: 16px;
  line-height: 1.58;
}

.result__note {
  margin: 26px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

/* ---------- цвета голосов ---------- */

[data-voice="fear"],
.member[data-id="fear"] {
  --accent: var(--v-fear);
}

[data-voice="intellect"],
.member[data-id="intellect"] {
  --accent: var(--v-intellect);
}

[data-voice="laziness"],
.member[data-id="laziness"] {
  --accent: var(--v-laziness);
}

[data-voice="ambition"],
.member[data-id="ambition"] {
  --accent: var(--v-ambition);
}

[data-voice="anxiety"],
.member[data-id="anxiety"] {
  --accent: var(--v-anxiety);
}

[data-voice="curiosity"],
.member[data-id="curiosity"] {
  --accent: var(--v-curiosity);
}

[data-voice="common_sense"],
.member[data-id="common_sense"] {
  --accent: var(--v-common);
}

[data-voice="anger"],
.member[data-id="anger"] {
  --accent: var(--v-anger);
}

[data-voice="creativity"],
.member[data-id="creativity"] {
  --accent: var(--v-creativity);
}

/* ---------- поделиться ---------- */

.share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin: 10px 0 84px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 77, 141, 0.09), transparent 55%),
    linear-gradient(180deg, rgba(20, 20, 29, 0.82), rgba(10, 10, 16, 0.92));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.share__copy {
  min-width: 0;
}

.share__copy .eyebrow {
  margin-bottom: 10px;
}

.share__copy h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 520;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.share__copy p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.share__action {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.btn--share {
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: var(--text);
  color: #08080a;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.btn--share:hover {
  background: var(--acid);
  border-color: var(--acid);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(216, 255, 62, 0.16);
}

.btn--share.is-copied {
  background: var(--acid);
  border-color: var(--acid);
}

.share__icon {
  font-size: 16px;
  line-height: 1;
}

.share__status {
  min-height: 16px;
  margin: 0;
  color: var(--acid);
  font-size: 11px;
  text-align: right;
}

.share__status.is-error {
  color: var(--danger);
}

.copy-fallback {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- оферта ---------- */

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 0 90px;
}

.legal h1 {
  margin: 0 0 10px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.legal__date {
  margin: 0 0 30px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal h2 {
  margin: 34px 0 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.legal ul {
  margin: 10px 0;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--acid);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 255, 62, 0.3);
}

.legal a:hover {
  border-color: var(--acid);
}

.legal__note {
  margin-top: 36px;
  padding: 16px 18px;
  border-left: 2px solid var(--danger);
  background: rgba(255, 114, 100, 0.06);
  color: #c9b6b6 !important;
  font-size: 12px !important;
}

.legal__back {
  color: var(--acid);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 255, 62, 0.35);
  padding-bottom: 2px;
}

/* ---------- подвал ---------- */

.footer {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 26px 24px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer__left,
.footer__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--acid);
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: -0.04em;
}

.footer a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--acid);
  border-color: var(--acid-dim);
}

.footer__donate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 0 !important;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d8d, #ff8a3d);
  color: #1b0b13 !important;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 77, 141, 0.22);
}

.footer__donate:hover {
  filter: brightness(1.06);
  border-color: transparent;
}

.footer__offer {
  border-bottom: 1px solid transparent;
}

.footer__offer:hover {
  color: var(--acid);
  border-color: var(--acid-dim);
}

/* ---------- модальное окно ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 7, 0.8);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: fade-in 0.25s ease both;
}

.modal__card {
  position: relative;
  width: min(470px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(216, 255, 62, 0.06), transparent 60%),
    #101016;
  box-shadow:
    0 50px 140px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modal-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.modal__card .eyebrow {
  margin-bottom: 14px;
  font-size: 9px;
}

.modal__card h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 520;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.modal__text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.modal__voices {
  display: flex;
  gap: 6px;
  margin: 22px 0;
}

.modal__voices span {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: var(--accent, #888);
  opacity: 0.75;
}

.packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 14px;
}

.package {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 14px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.package:hover {
  transform: translateY(-2px);
  border-color: var(--acid-dim);
  background: var(--acid-soft);
}

.package:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.package--best {
  border-color: rgba(216, 255, 62, 0.55);
  background: rgba(216, 255, 62, 0.06);
  box-shadow: 0 0 24px rgba(216, 255, 62, 0.06);
}

.package__badge {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--acid);
  color: #08080a;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.package__price {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}

.package__tokens {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-status {
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--acid);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.payment-status.is-error {
  color: var(--danger);
}

.offer-link {
  display: block;
  width: fit-content;
  margin: 12px auto 0;
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.offer-link:hover {
  color: var(--acid);
  border-color: var(--acid-dim);
}

.modal__fine {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.modal__later {
  display: block;
  margin: 18px auto 0;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid var(--line-strong);
}

.modal__later:hover {
  color: var(--text);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 300;
  padding: 16px 20px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  background: #1a0f10;
  color: #ffd9d4;
  font-size: 13px;
  text-align: center;
}

/* ---------- анимации ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes voice-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 38%, transparent);
  }
  55% {
    box-shadow: 0 0 0 8px transparent;
  }
}

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

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 64px;
  }

  .hero__intro {
    max-width: 720px;
  }

  .hero__lede {
    max-width: 560px;
  }

  .hero__title {
    font-size: clamp(56px, 10vw, 92px);
  }
}

@media (max-width: 780px) {
  .topbar {
    padding: 14px 20px;
  }

  .brand__sub {
    display: none;
  }

  .brand__name {
    font-size: 11.5px;
  }

  .limit {
    padding: 7px 10px;
    font-size: 9.5px;
  }

  .topbar__donate {
    display: none;
  }

  .main {
    padding: 0 18px;
  }

  .hero {
    padding: 48px 0 54px;
  }

  .hero__title {
    font-size: clamp(46px, 14vw, 74px);
  }

  .hero__lede {
    font-size: 17px;
  }

  .composer {
    padding: 16px;
    border-radius: 22px;
  }

  .composer textarea {
    min-height: 148px;
    font-size: 19.5px;
  }

  .disclaimer {
    padding: 9px 10px;
    font-size: 10px;
  }

  .packages {
    gap: 6px;
  }

  .package {
    min-height: 86px;
    padding: 12px 5px;
  }

  .package__price {
    font-size: 19px;
  }

  .package__tokens {
    font-size: 9px;
  }

  .composer__foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }

  .btn--primary {
    width: 100%;
  }

  .counter {
    text-align: right;
  }

  .members,
  .loading__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member__line {
    font-size: 16.5px;
  }

  .member__name {
    font-size: 16px;
  }

  .member__role {
    font-size: 9.5px;
  }

  .member__speak {
    opacity: 0.78;
  }

  .result__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .result__actions {
    width: 100%;
  }

  .result__actions .btn {
    flex: 1 1 auto;
  }

  .voice-status {
    text-align: left;
  }

  .chip {
    font-size: 12.5px;
  }

  .verdict {
    padding: 22px 20px 22px 24px;
  }

  .legal {
    padding: 42px 0 60px;
  }

  .legal h2 {
    font-size: 20px;
  }

  .legal p,
  .legal li {
    font-size: 15px;
  }

  .share {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 56px;
    padding: 24px;
  }

  .share__action {
    width: 100%;
    align-items: stretch;
  }

  .btn--share {
    width: 100%;
  }

  .share__status {
    text-align: center;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 18px 28px;
  }
}

@media (max-width: 560px) {
  .members,
  .loading__grid {
    grid-template-columns: 1fr;
  }

  .member {
    min-height: 0;
  }

  .verdict {
    font-size: 23px;
  }

  .result__actions .btn {
    padding-right: 12px;
    padding-left: 12px;
  }

  .voices {
    gap: 9px 13px;
    margin-top: 26px;
  }

  .hero__title {
    letter-spacing: -0.05em;
  }

  .modal__card {
    padding: 28px 22px;
  }

  .examples__label {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
