/* «Нам треба поговорити» — дизайн-мова Клубу Цукру (club.cukr.city):
   бежевий папір, чорний текст, червоне серце, теплі пастелі,
   Montserrat для заголовків, чорні pill-кнопки. */
:root {
  --beige: #fefbf4;
  --beige-deep: #f9f1df;
  --ink: #000;
  --ink-soft: #555049;
  --heart: #e8192c;
  --yellow: #ffebb9;
  --yellow-deep: #f1d28b;
  --peach: #fcc6bf;
  --green: #d9f0d0;
  --card: #fff;
  --line: rgba(0, 0, 0, 0.1);
  --shadow: 0 1px 2px rgba(20, 15, 0, 0.04), 0 12px 32px rgba(20, 15, 0, 0.07);
  --display: 'Montserrat', -apple-system, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r-card: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* hidden має перемагати будь-який display: із CSS-правил */
[hidden] { display: none !important; }

body {
  font-family: var(--sans);
  background: var(--beige);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
/* ледь помітне зерно паперу */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .admin { position: relative; z-index: 1; }

.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-transform: none;
}

a { color: var(--ink); }

.brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 700 0.85rem/1 var(--display);
  text-transform: uppercase; letter-spacing: 0.12em;
  background: var(--yellow);
  padding: 0.5rem 0.95rem; border-radius: 50px;
  margin-bottom: 1.4rem;
  transform: rotate(-1.5deg);
}
.brand::before { content: '❤️'; font-size: 0.9em; }

/* ---------- Кнопки: чорні pill, як у Клубу ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: none; cursor: pointer;
  font: 600 1rem var(--sans);
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--heart); transform: translateY(-1px); }
.btn-lg { padding: 1.05rem 2.4rem; font-size: 1.1rem; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  font: 600 0.95rem var(--sans);
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  transition: background 0.15s, transform 0.16s;
}
.btn-ghost:hover { background: var(--beige-deep); }
.btn-ghost:active { transform: scale(0.97); }

/* ---------- Головна: постер ---------- */
.home { display: flex; flex-direction: column; min-height: 100dvh; align-items: center; justify-content: center; padding: 3.5rem 1.4rem 3rem; gap: 3.5rem; }
.home-inner { max-width: 680px; }
.home-inner.center { text-align: center; }
/* поетапна поява хіро */
.hero-stagger > * { animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.2s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.28s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.36s; }
.hero-stagger > *:nth-child(6) { animation-delay: 0.44s; }
.hero-stagger > *:nth-child(7) { animation-delay: 0.52s; }

.reason { font-size: 1.2rem; line-height: 1.55; margin-bottom: 1rem; max-width: 58ch; }
.reason mark {
  background: linear-gradient(transparent 45%, var(--yellow-deep) 45%, var(--yellow-deep) 92%, transparent 92%);
  color: inherit; font-weight: 700; padding: 0 0.1em;
}
.meta-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.4rem 0 1.8rem; }
.meta-chip {
  font: 600 0.88rem var(--sans);
  background: var(--green); border-radius: 50px;
  padding: 0.42rem 0.95rem;
  white-space: nowrap;
}
.meta-chip:nth-child(2n) { background: var(--yellow); }
.meta-chip:nth-child(3n) { background: var(--peach); }
.closed-note { margin-top: 1rem; font-size: 0.9rem; color: var(--ink-soft); }
/* лічильник відвідувачів: окрема «таблетка», щоб не зливалась із сусідами */
.visit-proof {
  display: block; width: fit-content;
  font: 600 0.88rem var(--sans); color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); border-radius: 50px;
  padding: 0.45rem 1rem;
  margin: 1.4rem 0 0.4rem;
}
.home-inner.center .visit-proof { margin-inline: auto; }
.wall-head .visit-proof { margin: 0 0 1.2rem; }
.online-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #2e7d32; margin-right: 0.15rem;
  animation: online-pulse 2s ease-in-out infinite;
  flex: none;
}
@keyframes online-pulse { 50% { opacity: 0.4; } }

/* превʼю ідей на головній: рейка зі скрол-снапом на мобільному, грид на десктопі */
.home-ideas { width: 100%; max-width: 980px; }
.home-ideas h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); margin-bottom: 1rem; }
.idea-rail {
  display: grid; gap: 1rem;
  grid-auto-flow: column; grid-auto-columns: min(78vw, 320px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1rem;
  scrollbar-width: none;
}
.idea-rail::-webkit-scrollbar { display: none; }
.idea-rail > * { scroll-snap-align: start; }
@media (min-width: 760px) {
  .idea-rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
}
.idea-card.mini {
  display: block; text-decoration: none; color: var(--ink);
  padding: 1.2rem 1.2rem 1rem; margin-bottom: 0;
}
.idea-card.mini h3 { font-size: 1.05rem; }
.mini-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 0.7rem; }
.mini-votes { font: 700 0.85rem var(--sans); margin-left: auto; }
.idea-tag.demo { background: var(--ink); color: #fff; border-color: var(--ink); }
.idea-rail .idea-card:nth-child(1) { transform: rotate(-0.8deg); }
.idea-rail .idea-card:nth-child(2) { transform: rotate(0.6deg); }
.idea-rail .idea-card:nth-child(3) { transform: rotate(-0.4deg); }
.idea-rail .idea-card:hover { transform: translateY(-3px) rotate(0); }
/* ротація тез на головній: анімується лише вміст, картка і її нахил стабільні */
.idea-card.mini { min-height: 172px; display: flex; align-items: stretch; }
.mini-inner {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.7rem;
  width: 100%;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.mini-inner.swap-out { opacity: 0; transform: translateY(10px); }
.mini-inner.swap-in { animation: inner-in 0.4s ease; }
@keyframes inner-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
.mini-inner .mini-meta { margin-top: 0; }
.home h1 {
  font-size: clamp(2.9rem, 12vw, 5.4rem);
  margin-bottom: 1.4rem;
  position: relative;
}
.home h1::after {
  content: '❤️';
  display: inline-block;
  font-size: 0.5em;
  margin-left: 0.18em;
  transform: rotate(8deg) translateY(-0.35em);
  animation: heartbeat 2.4s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: rotate(8deg) translateY(-0.35em) scale(1); }
  8% { transform: rotate(8deg) translateY(-0.35em) scale(1.18); }
  16% { transform: rotate(8deg) translateY(-0.35em) scale(1); }
}
.lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1rem; max-width: 58ch; }
.home-inner.center .lede { margin-inline: auto; }
.wall-link { margin-top: 1.6rem; }
.wall-link a { color: var(--ink-soft); font-weight: 600; }
.thanks-mark { font-size: 3.2rem; margin-bottom: 1rem; animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.pin-form label { display: block; font: 600 0.95rem var(--sans); margin-bottom: 0.6rem; }
.pin-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.pin-row input {
  font: 800 1.5rem var(--display);
  letter-spacing: 0.45em; text-align: center; text-indent: 0.45em;
  width: 10rem; padding: 0.6rem 0.4rem;
  border: 2px solid var(--ink); border-radius: 50px;
  background: #fff; color: var(--ink);
}
.pin-row input:focus { outline: none; border-color: var(--heart); }
.pin-hint { color: var(--ink-soft); margin-top: 0.6rem; font-size: 0.88rem; }
.pin-error { color: var(--heart); margin-top: 0.7rem; font-size: 0.95rem; font-weight: 600; }

/* ---------- Опитування ---------- */
.survey { max-width: 660px; margin: 0 auto; padding: 1.25rem 1.4rem 4.5rem; }
.survey-top { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0 2.2rem; }
.survey-home { text-decoration: none; font-size: 1.35rem; line-height: 1; }
.progress { flex: 1; height: 8px; background: var(--beige-deep); border-radius: 50px; overflow: hidden; border: 1px solid var(--line); }
.progress-fill { height: 100%; width: 0; background: var(--ink); border-radius: 50px; transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.progress-label { font: 700 0.85rem var(--display); font-variant-numeric: tabular-nums; }

.step { animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* гігантський номер питання тлом */
.step-bg-num {
  position: absolute; top: -2.2rem; right: -0.5rem; z-index: -1;
  font: 800 clamp(9rem, 34vw, 15rem)/1 var(--display);
  color: transparent;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.07);
  user-select: none; pointer-events: none;
}
.q-text.q-long { font-size: clamp(1.25rem, 4.6vw, 1.7rem); line-height: 1.3; }

/* сегмент: три великі кнопки */
.step-segment { animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.segment-btns { display: grid; gap: 0.7rem; margin-top: 0.4rem; }
.segment-btn {
  display: flex; align-items: center; gap: 0.8rem;
  font: 700 1.1rem var(--display); letter-spacing: -0.01em;
  text-align: left; cursor: pointer;
  background: #fff; color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-card);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.15s, transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s;
}
.segment-btn:hover { border-color: var(--ink); }
.segment-btn:active { transform: scale(0.98); }
.segment-btn.is-active { border-color: var(--ink); background: var(--yellow); }
.segment-emoji { font-size: 1.5rem; }
.q-number {
  display: inline-block;
  font: 700 0.8rem var(--display);
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--peach); border-radius: 50px;
  padding: 0.35rem 0.85rem; margin-bottom: 1rem;
  transform: rotate(-1deg);
}
.q-text { font-size: clamp(1.6rem, 6vw, 2.3rem); margin-bottom: 1.6rem; }

textarea, input[type='text'], .field input {
  width: 100%;
  font: 1.05rem/1.55 var(--sans);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-card);
  padding: 1rem 1.1rem;
  transition: border-color 0.15s;
}
textarea:focus, .field input:focus { outline: none; border-color: var(--ink); }

/* поле відповіді + мікрофон у кутку (як у месенджері) */
.answer-box { display: grid; gap: 0.7rem; }
.input-wrap { position: relative; }
.input-wrap textarea { padding-right: 4.2rem; min-height: 9.5rem; display: block; }
.input-wrap.no-voice textarea { padding-right: 1.1rem; }
.rec-btn {
  position: absolute; right: 0.8rem; bottom: 0.8rem;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  background: var(--heart); color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(232, 25, 44, 0.35);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.rec-btn.is-starting { opacity: 0.6; }
.rec-btn.is-recording {
  background: var(--ink);
  transform: scale(1.12);
  animation: rec-pulse 1.6s ease-out infinite;
}
@keyframes rec-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 25, 44, 0.4); }
  100% { box-shadow: 0 0 0 18px rgba(232, 25, 44, 0); }
}
/* під час запису поверх текстового поля — хвиля і таймер */
.rec-live {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  background: #fff;
  border: 1.5px solid var(--heart);
  border-radius: var(--r-card);
  z-index: 1;
  padding-right: 4rem;
}
.rec-wave { max-width: min(240px, 50vw); }
.rec-timer { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; color: var(--heart); }
.rec-live-hint { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }
.rec-note { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
/* прикріплений войс */
.voice-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--green); border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 50px; padding: 0.45rem 0.5rem 0.45rem 1.1rem;
  justify-self: start;
}
.voice-chip-label { font: 600 0.92rem var(--sans); }
.voice-chip-dur { font: 700 0.92rem var(--display); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.voice-del {
  flex: none; width: 36px; height: 36px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  background: transparent; cursor: pointer;
  font-size: 0.95rem; line-height: 1;
}
.voice-del:hover { background: var(--peach); }
.voice-unavailable { color: var(--ink-soft); font-size: 0.95rem; text-align: center; }

/* FAB + bottom sheet для стікера на стіні */
.fab {
  position: fixed; right: 1.2rem; bottom: 1.4rem; z-index: 15;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: fab-nudge 5s ease-in-out 2s infinite; /* легенько підстрибує, щоб помітили */
}
@keyframes fab-nudge {
  0%, 24%, 100% { transform: translateY(0); }
  6% { transform: translateY(-9px) rotate(-2deg); }
  12% { transform: translateY(0); }
  18% { transform: translateY(-4px); }
}
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 18;
  background: rgba(20, 15, 0, 0.35);
}
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(560px, 100%);
  background: var(--beige); border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(20, 15, 0, 0.2);
  padding: 1.6rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 19;
  display: grid; gap: 0.8rem;
  animation: sheet-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheet-in { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet h3 { font-size: 1.35rem; }
.sheet-kind { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.sheet-kind.center-row { justify-content: center; margin-bottom: 0.7rem; }
.sheet-label { font: 600 0.9rem var(--sans); margin-top: 0.2rem; }
.sheet-pin {
  font: 700 1.2rem var(--display); letter-spacing: 0.4em; text-indent: 0.4em; text-align: center;
  width: 9rem; padding: 0.5rem; border: 2px solid var(--ink); border-radius: 50px; background: #fff;
}
.chat-cta {
  background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem; margin: 1.6rem 0 1.2rem;
  display: grid; gap: 0.9rem; justify-items: center;
  transform: rotate(-0.5deg);
}
.chat-cta p { font: 600 1.02rem var(--sans); max-width: 40ch; }
#addOwnBox { margin: 1.8rem 0 1.4rem; text-align: left; }
#addOwnBox .candidates-heading { margin-top: 0; }
#addOwnBox textarea { margin-top: 0.3rem; }

/* тост-підбадьорення */
.toast {
  position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  font: 600 0.95rem var(--sans);
  padding: 0.7rem 1.4rem; border-radius: 50px;
  box-shadow: var(--shadow);
  z-index: 20;
  white-space: nowrap; /* короткі фрази не переносимо — сердечко лишається в рядку */
  max-width: calc(100vw - 2rem);
  overflow: hidden; text-overflow: ellipsis;
  animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.toast.is-out { animation: toast-out 0.4s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 10px); } }

/* навігація кроку: десктоп — [Назад] ... [Пропустити] [Далі];
   мобільний — «Далі» на всю ширину зверху, під нею Назад | Пропустити */
.step-nav { display: flex; gap: 0.6rem; margin-top: 1.8rem; align-items: center; }
.step-nav .btn-ghost { padding: 0.8rem 1.4rem; }
.step-nav .nav-skip { margin-left: auto; }
@media (max-width: 560px) {
  .step-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .step-nav .nav-next, .step-nav #submitBtn { grid-column: 1 / -1; grid-row: 1; width: 100%; }
  .step-nav .nav-back { justify-self: start; }
  .step-nav .nav-skip { justify-self: end; margin-left: 0; }
}

.field { display: block; margin-bottom: 1.15rem; }
.field span { display: block; font: 600 0.95rem var(--sans); margin-bottom: 0.45rem; }
.consent {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-card); padding: 1rem 1.1rem; margin-bottom: 0.8rem;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.consent:has(input:checked) { border-color: var(--ink); background: var(--yellow); }
.consent input { margin-top: 0.25rem; accent-color: var(--ink); width: 1.15rem; height: 1.15rem; flex: none; }
.field-contact { animation: rise 0.3s ease; }
.submit-error { color: var(--heart); font-weight: 600; margin-top: 1rem; }

/* ---------- Стіна: мудборд зі стікерів ---------- */
.wall { max-width: 1120px; margin: 0 auto; padding: 2.8rem 1.4rem 5rem; }
.wall-head { margin-bottom: 2rem; }
.wall-head h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); margin-bottom: 0.7rem; }
.wall-head .lede { margin-bottom: 1.3rem; }
/* вкладки стани / ідеї — завжди в один рядок */
.kind-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.kind-tab {
  flex: 1 1 0; max-width: 240px;
  white-space: nowrap; text-align: center;
  border: 2px solid var(--ink); background: #fff; cursor: pointer;
  font: 700 1rem var(--display); letter-spacing: -0.01em;
  padding: 0.7rem 1rem; border-radius: 50px;
  transition: all 0.16s;
}
@media (max-width: 460px) {
  .kind-tab { font-size: 0.82rem; padding: 0.65rem 0.4rem; letter-spacing: -0.02em; }
}
.kind-tab.is-active { background: var(--ink); color: #fff; }
.kind-tab:not(.is-active):hover { background: var(--yellow); }

/* липка панель: перемикач стани/ідеї + сортування, з непрозорим тлом */
.wall-sticky {
  position: sticky; top: 0; z-index: 6;
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  background: var(--beige);
  padding: 0.6rem 0.5rem;
  margin: 0 -0.5rem 0.7rem;
  box-shadow: 0 6px 12px -8px rgba(20, 15, 0, 0.12);
}
.wall-sticky .kind-tabs { margin-bottom: 0; flex: 1 1 320px; }
.wall-controls {
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center;
  margin-bottom: 1.8rem;
}
.sort-tabs {
  display: inline-flex; background: #fff; border: 1px solid var(--line);
  border-radius: 50px; padding: 0.3rem; box-shadow: var(--shadow);
}
.sort-tab {
  border: none; background: transparent; cursor: pointer;
  font: 600 0.9rem var(--sans); color: var(--ink-soft);
  padding: 0.5rem 1.15rem; border-radius: 50px; transition: all 0.18s;
}
.sort-tab.is-active { background: var(--ink); color: #fff; }
.chip { cursor: pointer; transition: all 0.15s; }

/* Теги — тихі «хештеги», без рамок: не конкурують з рештою кнопок */
.tag-chips { display: flex; flex-wrap: wrap; gap: 0.1rem; align-items: center; }
.tag-chips .chip {
  border: none; background: transparent;
  font: 600 0.88rem var(--sans); color: var(--ink-soft);
  padding: 0.35rem 0.5rem; border-radius: 8px;
}
.tag-chips .chip:hover { color: var(--ink); }
.tag-chips .chip.is-active {
  color: var(--ink);
  background: linear-gradient(transparent 55%, var(--yellow-deep) 55%, var(--yellow-deep) 92%, transparent 92%);
}

/* Сегменти — «локаційна» пігулка в зеленій гамі, з пін-іконкою */
.segment-chips {
  display: inline-flex; align-items: center; gap: 0.1rem;
  background: var(--green); border-radius: 50px; padding: 0.28rem 0.35rem;
}
.segment-chips::before { content: '📍'; font-size: 0.9rem; padding: 0 0.25rem 0 0.5rem; }
.segment-chips .chip {
  border: none; background: transparent;
  font: 600 0.85rem var(--sans); color: rgba(0, 0, 0, 0.55);
  padding: 0.38rem 0.8rem; border-radius: 50px;
}
.segment-chips .chip:hover { color: var(--ink); }
.segment-chips .chip.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* чипси в адмінці (tag-picker) лишаються з рамкою */
.chip-check .chip, .tag-picker .chip { border: 1.5px solid var(--ink); background: #fff; }

.masonry { columns: 1; column-gap: 1.1rem; }
@media (min-width: 620px) { .masonry { columns: 2; } }
@media (min-width: 940px) { .masonry { columns: 3; } }

.idea-card {
  break-inside: avoid;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.4rem 1.2rem;
  margin-bottom: 1.1rem;
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}
.idea-card:hover { transform: translateY(-3px) rotate(0deg) !important; box-shadow: 0 4px 8px rgba(20,15,0,0.05), 0 18px 44px rgba(20,15,0,0.1); }
/* пастельні стікери з легким нахилом — id визначає відтінок */
.idea-card.tint-1 { background: var(--yellow); }
.idea-card.tint-2 { background: var(--peach); }
.idea-card.tint-3 { background: var(--green); }
.masonry .idea-card:nth-child(3n+1) { transform: rotate(-0.6deg); }
.masonry .idea-card:nth-child(3n+2) { transform: rotate(0.5deg); }
.masonry .idea-card:nth-child(4n+3) { transform: rotate(0.9deg); }
.idea-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 0.55rem; }
.idea-card .idea-desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.6rem; }
.idea-quote {
  font-style: italic;
  color: rgba(0, 0, 0, 0.65); font-size: 0.95rem;
  border-left: 3px solid var(--ink);
  padding-left: 0.85rem; margin: 0.75rem 0;
}
.idea-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.65rem 0 0.9rem; }
.idea-tag {
  font: 600 0.72rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.75); border: 1px solid var(--line);
  padding: 0.2rem 0.65rem; border-radius: 50px;
}
.idea-card:not(.tint-1):not(.tint-2):not(.tint-3) .idea-tag { background: var(--beige-deep); }
.vote-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid var(--ink); background: rgba(255, 255, 255, 0.6); cursor: pointer;
  font: 700 0.9rem var(--sans); color: var(--ink);
  padding: 0.5rem 1.1rem; border-radius: 50px;
  transition: all 0.16s;
}
.vote-btn:hover { background: #fff; }
.vote-btn:active { transform: scale(0.96); }
.vote-btn.is-voted { background: var(--ink); color: #fff; border-color: var(--ink); }
.vote-btn .heart { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.vote-btn.is-voted .heart { transform: scale(1.25); }
.vote-count { font-variant-numeric: tabular-nums; }
.wall-empty { font: 600 1.15rem var(--sans); color: var(--ink-soft); padding: 3.5rem 0; text-align: center; }

/* ---------- Затвердження ідей (подяка) ---------- */
#candidatesBox { margin: 1.6rem 0; text-align: left; }
.processing { display: flex; align-items: center; justify-content: center; gap: 0.6rem; color: var(--ink-soft); font-weight: 600; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--beige-deep); border-top-color: var(--heart);
  animation: spin 0.8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.candidates-heading { font-size: 1.6rem; margin: 1rem 0 0.4rem; text-align: center; }
.candidate { text-align: left; }
.candidate strong { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.candidate-body { display: grid; gap: 0.35rem; flex: 1; }
.candidate-kind { font: 700 0.72rem var(--sans); text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); }
.candidate-edit {
  font: 600 1rem/1.4 var(--sans); font-family: var(--display);
  border: none; border-bottom: 2px dashed rgba(0, 0, 0, 0.25);
  border-radius: 0; padding: 0.1rem 0; background: transparent;
  resize: none; width: 100%;
}
.candidate-edit:focus { outline: none; border-bottom-color: var(--heart); }
.candidate-matched { color: var(--heart); font-size: 0.85rem; font-weight: 600; }
.candidate-actions { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1.1rem; flex-wrap: wrap; }

/* фінальний екран */
.final-note { color: var(--ink-soft); margin-bottom: 1.1rem; }
.reveal-btn {
  display: block; border: none; background: none; cursor: pointer;
  font: 600 0.95rem var(--sans); color: var(--ink);
  text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 4px;
  padding: 0.4rem 0; margin: 0.4rem 0 0.8rem;
}
#identityFields { animation: rise 0.3s ease; }

/* ---------- Адмінка ---------- */
.page-admin { background: var(--beige-deep); }
.admin-nav {
  display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap;
  background: var(--ink); color: #fff; padding: 0.85rem 1.2rem;
  position: sticky; top: 0; z-index: 5;
}
.admin-brand { font: 700 0.95rem var(--display); margin-right: auto; color: #fff !important; text-decoration: none; }
.nav-sep { width: 1px; height: 1.1rem; background: rgba(255, 255, 255, 0.25); }
.badge-src { background: var(--yellow); }
.chart-card { padding: 1.4rem 1.5rem; }
.bar-label { font: 600 13px var(--sans); fill: var(--ink); }
.bar-value { font: 700 13px var(--display); fill: var(--ink); font-variant-numeric: tabular-nums; }
.src-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.src-table th, .src-table td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); }
.src-table th { font: 700 0.8rem var(--sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.src-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.src-table tr:last-child td { border-bottom: none; }
.admin-nav a { color: rgba(255, 255, 255, 0.75); text-decoration: none; font-size: 0.95rem; }
.admin-nav a.is-active, .admin-nav a:hover { color: #fff; }
.admin-main { max-width: 880px; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }
.admin-main h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-bottom: 1.4rem; }
.filters select { padding: 0.5rem 0.8rem; border-radius: 50px; border: 1.5px solid var(--ink); background: #fff; font: 600 0.9rem var(--sans); }
.a-card {
  background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem; margin-bottom: 1rem;
}
.a-card header { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.6rem; }
.badge { font: 600 0.75rem var(--sans); background: var(--beige-deep); padding: 0.18rem 0.65rem; border-radius: 50px; }
.badge-ok { background: var(--green); }
.badge-no { background: var(--peach); }
.muted { color: var(--ink-soft); font-size: 0.85rem; }
.q-ref { font-size: 0.85rem; color: var(--ink-soft); font-style: italic; margin-bottom: 0.4rem; }
.a-card blockquote {
  border-left: 3px solid var(--ink); padding-left: 0.85rem;
  margin: 0.5rem 0; white-space: pre-wrap;
}
.a-card blockquote.transcript { border-left-color: var(--heart); color: var(--ink-soft); }
.a-card audio { width: 100%; margin: 0.5rem 0; }
.make-idea summary { cursor: pointer; color: var(--heart); font-weight: 700; font-size: 0.95rem; margin-top: 0.5rem; }
.make-idea form { display: grid; gap: 0.7rem; padding: 0.9rem 0; }
.make-idea label { font: 600 0.9rem var(--sans); display: grid; gap: 0.3rem; }
.make-idea input, .make-idea textarea, .make-idea select { font: 1rem var(--sans); padding: 0.6rem 0.85rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; width: 100%; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; font-weight: 400; }
.chip-check { display: inline-flex; gap: 0.3rem; align-items: center; border: 1.5px solid var(--ink); border-radius: 50px; padding: 0.28rem 0.75rem; font: 600 0.85rem var(--sans); cursor: pointer; background: #fff; }
.chip-check:has(input:checked) { background: var(--yellow); }
.attach-form { border-top: 1px dashed var(--line); margin-top: 0.6rem; padding-top: 0.8rem; display: grid; gap: 0.5rem; }
.idea-edit { display: grid; gap: 0.6rem; margin: 0.6rem 0; }
.idea-edit input, .idea-edit textarea { font: 1rem var(--sans); padding: 0.55rem 0.85rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.7rem; }
.merge-form { display: inline-flex; gap: 0.4rem; align-items: center; }
.merge-form select { padding: 0.45rem 0.7rem; border-radius: 50px; border: 1.5px solid var(--ink); background: #fff; font: 600 0.85rem var(--sans); }
.llm-box { background: #fff; border-radius: var(--r-card); padding: 1rem 1.2rem; margin-bottom: 1.4rem; box-shadow: var(--shadow); }
.suggestion { border: 2px dashed var(--yellow-deep); background: var(--beige); border-radius: 14px; padding: 0.85rem 1rem; margin-top: 0.8rem; display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stats-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.q-group { margin-bottom: 1.4rem; }
.q-group > summary {
  cursor: pointer; font: 700 1.05rem var(--display); letter-spacing: -0.01em;
  padding: 0.8rem 1rem; background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  margin-bottom: 0.8rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
}
.q-group .a-card { margin-left: 0.8rem; }
.sub-h { font-family: var(--display); font-size: 1.15rem; margin: 0.5rem 0 0.8rem; }
.sep { border: none; border-top: 1.5px dashed var(--line); margin: 1.5rem 0; }
.inline-form { display: inline-block; margin: 0.3rem 0; }
.analysis-text { white-space: pre-wrap; }
.pending-cand { border: 2px dashed var(--yellow-deep); }
.a-card.is-test { opacity: 0.55; }
.test-toggle { margin-left: auto; }
/* картка людини: все проходження разом */
.person-card { border-left: 4px solid var(--yellow-deep); }
.person-card > header { padding-bottom: 0.5rem; border-bottom: 1.5px dashed var(--line); }
.person-card .spacer { flex: 1; }
.pa { padding: 0.7rem 0 0.4rem; border-bottom: 1px dashed rgba(0, 0, 0, 0.08); }
.pa:last-child { border-bottom: none; }
.pa .q-ref { margin-bottom: 0.25rem; }
.link-btn.danger { color: var(--heart); }
.view-row { display: flex; gap: 0.8rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.2rem; }
.view-row .sort-tab { text-decoration: none; display: inline-block; }
.filters-details summary {
  cursor: pointer; font: 600 0.9rem var(--sans); color: var(--ink-soft);
  padding: 0.55rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 50px;
}
.filters-details[open] summary { margin-bottom: 0.6rem; }
.make-idea summary { font-size: 0.85rem; }
.link-btn {
  border: none; background: none; cursor: pointer;
  font: 500 0.8rem var(--sans); color: var(--ink-soft);
  text-decoration: underline; text-decoration-style: dotted; padding: 0;
}
.link-btn:hover { color: var(--heart); }

/* без анімацій для тих, хто їх вимкнув */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- P.S.: дослідження — хіро, цитати, статистика, підтримка --- */
.research-badge {
  display: inline-block; border: 1.5px solid var(--ink); border-radius: 50px;
  background: var(--yellow); padding: 0.3rem 0.9rem;
}
.page-home .home { justify-content: flex-start; gap: 4rem; padding-top: 15vh; }
.page-home .home-inner { text-align: center; }
.page-home .home-inner .meta-chips { justify-content: center; }
.page-home .reason { margin-inline: auto; }
.page-home .home-inner .lede { margin-inline: auto; }
.page-home .visit-proof { margin-inline: auto; }

.quote-text { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.45; margin-bottom: 0.6rem; }
.quote-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.9rem; }
.quote-sign { color: var(--ink-soft); font-size: 0.88rem; font-style: italic; }

.stats-block, .how-block, .support-block { width: 100%; max-width: 980px; margin-inline: auto; }
.stats-block h2, .how-block h2, .support-block h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); margin-bottom: 1rem; }
.wall .stats-block, .wall .support-block { margin-bottom: 2rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; }
.stat-card {
  border: 1.5px solid var(--ink); border-radius: 16px; background: #fff;
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.2rem;
  box-shadow: 0 2px 0 rgba(20,15,0,0.08);
}
.stat-card strong { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; }
.stat-card.stat-pair strong { color: #2e7d32; }
.stat-card span { color: var(--ink-soft); font-size: 0.92rem; }
.stats-chips { margin-top: 0.8rem; color: var(--ink-soft); font-size: 0.95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.stats-live { margin-top: 0.7rem; font-size: 0.85rem; }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; }
.how-card {
  position: relative; border: 1.5px solid var(--ink); border-radius: 16px;
  background: #fff; padding: 1.1rem 1.2rem; box-shadow: 0 2px 0 rgba(20,15,0,0.08);
}
.how-card .how-num {
  position: absolute; top: 0.8rem; right: 1rem; font-family: var(--display);
  font-weight: 800; font-size: 1.6rem; color: rgba(20,15,0,0.12);
}
.how-card .how-emoji { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }
.how-card h3 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 0.3rem; }
.how-card p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.45; }

.support-block { border-top: 1px dashed rgba(20,15,0,0.25); padding-top: 2rem; }
.support-sub { color: var(--ink-soft); margin: -0.4rem 0 1rem; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.8rem; }
.support-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  border: 1.5px solid var(--ink); border-radius: 16px; background: var(--yellow);
  padding: 1.1rem 1.2rem; color: inherit; text-decoration: none;
  box-shadow: 0 2px 0 rgba(20,15,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.support-card:nth-child(2) { background: var(--peach); }
.support-card:nth-child(3) { background: var(--green); }
.support-card:hover { transform: translateY(-3px); box-shadow: 0 6px 0 rgba(20,15,0,0.1); }
.support-emoji { font-size: 1.5rem; }
.support-name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.support-contact { font-weight: 700; font-size: 1.15rem; }
.support-desc { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45; }

.scale-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.scale-btn {
  min-width: 52px; height: 52px; border: 1.5px solid var(--ink); border-radius: 14px;
  background: #fff; font: 700 1.1rem var(--sans); cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.scale-btn:hover { background: var(--yellow); }
.scale-btn:active { transform: scale(0.94); }
.scale-btn.is-active { background: var(--ink); color: #fff; }

.barrier-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.barrier-chips .chip-check { font-size: 0.95rem; padding: 0.45rem 0.95rem; }

.field small { display: block; margin-top: 0.3rem; }
