/* Mobile-first: одна карточка на экран, крупный текст, большие кнопки. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(160deg, #2b1d3a 0%, #4a2c5e 60%, #6b3a6e 100%);
  background-attachment: fixed;
  color: #f4eef7;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
button { touch-action: manipulation; }

#app { width: 100%; max-width: 520px; display: flex; flex-direction: column; flex: 1; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

h1 { font-size: clamp(28px, 8vw, 34px); text-align: center; margin-top: 8vh; }
h2 { font-size: 18px; }
.lead, .muted { color: rgba(244, 238, 247, 0.65); }
.lead { text-align: center; font-size: 17px; line-height: 1.5; }
.center { text-align: center; }
#landing p { line-height: 1.55; font-size: 16px; text-align: center; }
#landing .link-row a { text-align: left; }
#landing { justify-content: center; gap: 18px; }
#landing h1 { margin-top: 0; }

/* header / footer */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; padding-top: 4px; }

/* buttons */
.btn {
  font: inherit; font-weight: 600; color: #f4eef7; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 16px; padding: 12px 18px; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: #f4eef7; color: #2b1d3a; border-color: transparent; }
.btn.primary:disabled { opacity: .35; cursor: default; }
.btn.small { padding: 9px 14px; font-size: 14px; min-height: 42px; border-radius: 14px; }
.btn.small b { margin-left: 5px; }
.btn.wide { width: 100%; min-height: 58px; font-size: 18px; }
.btn.link { background: none; border: none; color: rgba(244, 238, 247, .55); padding: 8px 0; font-weight: 500; font-size: 14px; }

/* card fills the screen and sits in the middle */
.card {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px; padding: 26px 20px; display: flex; flex-direction: column; gap: 18px;
  margin: auto 0; backdrop-filter: blur(10px);
}
.question { font-size: clamp(22px, 6.2vw, 28px); line-height: 1.3; font-weight: 600; }
.note { font-size: 14px; line-height: 1.45; color: #ffd9a8; background: rgba(255, 190, 100, .12); border-radius: 14px; padding: 12px 14px; }

.positions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pos {
  font: inherit; font-size: 17px; font-weight: 600; min-height: 62px; padding: 12px 8px; border-radius: 16px; cursor: pointer;
  color: #f4eef7; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .14);
  transition: background .15s, border-color .15s;
}
.pos.active { background: rgba(255, 255, 255, .18); border-color: #f4eef7; }
.pos[data-pos="yes"].active { background: rgba(120, 220, 160, .25); border-color: #8ee6b0; }
.pos[data-pos="curious"].active { background: rgba(255, 210, 120, .25); border-color: #ffd27a; }
.pos[data-pos="foryou"].active { background: rgba(160, 180, 255, .25); border-color: #b4c2ff; }
.pos[data-pos="no"].active { background: rgba(255, 130, 130, .22); border-color: #ff9a9a; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips-title { width: 100%; font-size: 14px; color: rgba(244, 238, 247, .6); }
.chip {
  font: inherit; font-size: 15px; padding: 11px 15px; border-radius: 999px; cursor: pointer;
  color: #f4eef7; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
}
.chip.active { background: #f4eef7; color: #2b1d3a; border-color: transparent; }

.partner-hint { font-size: 14px; color: rgba(244, 238, 247, .55); text-align: center; }
.mine { font-size: 17px; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%; margin: 8px auto;
  border: 3px solid rgba(255, 255, 255, .15); border-top-color: #f4eef7; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.verdict { font-size: clamp(26px, 7.5vw, 32px); font-weight: 700; }
.verdict.ok { color: #8ee6b0; }
.verdict.miss { color: rgba(244, 238, 247, .7); }
.answers { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; align-items: baseline; font-size: 17px; }
.who { width: 48px; flex: none; font-size: 14px; color: rgba(244, 238, 247, .55); }

.link-row { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.08); border-radius: 14px; padding: 14px; }
.link-row a { color: #f4eef7; word-break: break-all; font-size: 15px; }

.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.mq { font-size: 15px; line-height: 1.4; color: rgba(244, 238, 247, .75); }
#matches { overflow-y: auto; }
#matches-list { display: flex; flex-direction: column; gap: 10px; }
.match { background: rgba(255, 255, 255, .08); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.match .label { font-size: 17px; color: #f4eef7; font-weight: 600; }
.match .row { font-size: 15px; }
.match .yes { color: #8ee6b0; }
.match .curious { color: #ffd27a; }
.match .foryou { color: #b4c2ff; }

/* десктоп: карточка не растягивается на весь экран */
@media (min-width: 700px) and (min-height: 700px) {
  .card { margin: 24px 0; }
}

/* серии */
.series-label { font-size: 13px; }
.series-setting { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(244, 238, 247, .65); }
.series-setting select {
  font: inherit; font-size: 15px; color: #f4eef7; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 6px 8px;
}
.reveal-list { display: flex; flex-direction: column; gap: 10px; }
.reveal-list .match { background: rgba(255, 255, 255, .06); }
