/* Телефон участника: устройство как в iOS, цвета и заголовки как на сайте ТШБ. */
:root {
  --bg: #07070f;
  --panel: #14141f;
  --raise: #232334;
  --accent: #ff2d95;
  --accent-fill: #e0157d; /* розовый для кнопок с белым текстом: контраст не ниже 4.5:1 */
  --accent2: #00dcff;
  --violet: #8f5cff;
  --yellow: #ffc83d;
  --text: #ffffff;
  --label2: rgba(235, 235, 245, 0.64);
  --label3: rgba(235, 235, 245, 0.56);
  --sep: #2e2e44;
  --seg: #232334;
  --red: #ff6b8b;
  --display: 'Oswald', 'Inter', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(520px 420px at 100% -6%, rgba(255, 45, 149, 0.2), transparent 70%), var(--bg); /* taste-skill-ignore: фирменное свечение ТШБ */
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-size: 17px; line-height: 1.35; letter-spacing: -0.02em;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
/* заголовки и названия команд: узкий жирный шрифт заглавными, как на сайте ТШБ */
.hero h1, .large-title, .team-title, .ok-title, .card h2, .crit-title span, .who-name, .section-title {
  font-family: var(--display); text-transform: uppercase; font-weight: 700; letter-spacing: 0;
}
.pink { color: var(--accent); }
input { caret-color: var(--accent); }

#app {
  max-width: 520px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
}
body.has-bar #app { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.view.center { min-height: 70vh; display: grid; place-items: center; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--raise); border-top-color: var(--label2);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.conn {
  position: fixed; color: #fff; left: 50%; top: calc(10px + env(safe-area-inset-top)); z-index: 50; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: var(--accent-fill); font-size: 15px; font-weight: 600;
}

/* заголовки */
.brand-mini { font-size: 15px; font-weight: 600; color: var(--label2); white-space: nowrap; }
.hero { margin: 28px 4px 24px; }
.hero h1, .large-title { font-size: 44px; line-height: 1; }
.hero h1 { margin-top: 6px; }
.large-title { margin: 6px 4px 16px; }
.sub { margin-top: 10px; color: var(--label2); font-size: 17px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 4px 14px; min-height: 22px; }
.who { font-size: 15px; font-weight: 600; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who b { color: var(--text); font-weight: 600; }
.muted { color: var(--label2); }
.footnote { margin: 14px 8px 0; font-size: 13px; color: var(--label3); line-height: 1.38; letter-spacing: -0.01em; }

/* ввод кода: крупно, разрядкой, как код из СМС */
.code-field { display: block; background: var(--panel); border-radius: 16px; padding: 14px 16px 16px; }
.code-field span { display: block; font-size: 14px; font-weight: 600; color: var(--label2); }
.code-field input {
  display: block; width: 100%; margin-top: 8px; padding: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 34px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.code-field input::placeholder { color: var(--label3); font-size: 20px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.code-field:focus-within { box-shadow: 0 0 0 2px var(--accent); }

.btn-primary {
  display: block; width: 100%; height: 56px; margin-top: 16px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--accent-fill); color: #fff;
  font: inherit; font-size: 17px; font-weight: 650; letter-spacing: -0.02em;
  transition: background-color 0.15s, color 0.15s, transform 0.4s var(--spring-pop);
}
.btn-primary:active:not(:disabled) { transform: scale(0.96); background: #c8106d; }
.btn-primary:disabled { background: var(--raise); color: var(--label3); }
.btn-primary.secondary { background: var(--raise); color: var(--text); }
.btn-primary:focus-visible, .score:focus-visible, .btn-plain:focus-visible, .team-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-plain {
  display: block; width: 100%; min-height: 48px; margin-top: 8px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--accent);
}
.btn-plain.small { font-size: 14px; color: var(--label3); min-height: 44px; }
.foot { margin-top: 28px; }

.error {
  margin-top: 12px; padding: 12px 16px; border-radius: 12px;
  background: #3a1322; color: #ffb3c8; font-size: 15px; font-weight: 600;
}

/* подтверждение «это вы?» */
.who-card { text-align: left; padding: 22px 20px; }
.who-name { font-size: 34px; line-height: 1.05; word-break: break-word; }
.who-team { margin-top: 8px; font-size: 18px; font-weight: 600; color: var(--accent2); }

/* карточки состояний */
.card { background: var(--panel); border-radius: 18px; padding: 26px 20px 24px; text-align: center; }
.card + .card, .card + .block, .block + .card, .block + .block { margin-top: 14px; }
.card h2 { font-size: 26px; line-height: 1.05; margin: 12px 0 8px; }
.card p { font-size: 16px; }
.icon { display: grid; place-items: center; margin: 0 auto; }
.icon svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.pink { color: var(--accent); }
.icon.cyan { color: var(--accent2); }
.icon.violet { color: var(--violet); }

/* строка «день и статус» */
.day-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 4px 14px; }
.day-name { font-family: var(--display); text-transform: uppercase; font-size: 22px; font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--raise); font-size: 13px; font-weight: 650; white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--label3); }
.chip.live i { background: var(--accent2); }
.chip.finish i { background: var(--yellow); }
.chip.closed i { background: var(--label3); }

/* баннер о пропущенных голосованиях */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; margin-bottom: 14px; background: #2e2208; color: #ffe2a3; font-size: 15px; font-weight: 600; line-height: 1.35; }
.notice svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice.pink { background: #3a0f28; color: #ffc2df; }

/* напоминание от администратора: сверху поверх всего */
.remind {
  position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); z-index: 60; max-width: 496px; margin: 0 auto;
  display: flex; gap: 12px; align-items: center; padding: 14px 14px 14px 18px; border-radius: 16px;
  background: var(--accent-fill); color: #fff; font-weight: 650; font-size: 15px; line-height: 1.3;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: dropIn 0.6s var(--spring-pop);
}
.remind span { flex: 1; }
.remind button { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, 0.22); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-24px) scale(0.96); } }

/* форма оценки */
.vote-head { padding: 4px 4px 2px; }
.vote-head .label { font-size: 15px; font-weight: 600; color: var(--label2); }
.team-title { font-size: 40px; line-height: 1; margin: 6px 0 4px; word-break: break-word; }
.legend { display: flex; gap: 14px; margin: 10px 4px 2px; font-size: 13px; font-weight: 600; color: var(--label2); flex-wrap: wrap; }
.legend b { color: var(--text); font-weight: 700; }

.crit { background: var(--panel); border-radius: 18px; padding: 16px 14px 14px; margin-top: 12px; transition: box-shadow 0.4s var(--ease-out); }
.crit-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 22px; padding: 0 4px; }
.icon.crit-check { margin: 0; opacity: 0; transform: scale(0.4) rotate(-20deg); transition: opacity 0.2s, transform 0.55s var(--spring-pop); }
.icon.crit-check svg { width: 24px; height: 24px; stroke-width: 2.6; }
.crit.done .crit-check { opacity: 1; transform: none; }

/* три крупные кнопки 1 · 2 · 3, выбранная подсвечена цветом критерия и переезжает с пружинкой */
.scores {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  margin-top: 14px; padding: 3px; border-radius: 14px; background: var(--seg);
}
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 12px) / 3);
  border-radius: 11px; background: var(--c-fill); opacity: 0;
  transform: translateX(calc(var(--i, 0) * (100% + 3px)));
  transition: transform 0.5s var(--spring-pop), opacity 0.15s;
}
.scores.has .seg-thumb { opacity: 1; }
.score {
  position: relative; z-index: 1;
  height: 64px; border: 0; border-radius: 11px; cursor: pointer; touch-action: manipulation;
  background: transparent; color: var(--text);
  font: inherit; display: grid; place-items: center; align-content: center; gap: 1px;
  transition: color 0.2s, transform 0.35s var(--spring-pop);
}
.score b { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score small { font-size: 12px; font-weight: 600; color: var(--label2); transition: color 0.2s; }
.score:active { transform: scale(0.92); }
.score.on { color: var(--c-ink); }
.score.on small { color: var(--c-ink); opacity: 0.85; }

.crit.c-pink { --c-fill: #e0157d; --c-ink: #fff; --c-glow: rgba(255, 45, 149, 0.7); --c-check: var(--accent); }
.crit.c-cyan { --c-fill: #00dcff; --c-ink: #002a33; --c-glow: rgba(0, 220, 255, 0.7); --c-check: var(--accent2); }
.crit.c-violet { --c-fill: #8f5cff; --c-ink: #fff; --c-glow: rgba(143, 92, 255, 0.75); --c-check: var(--violet); }
.crit.c-yellow { --c-fill: #ffc83d; --c-ink: #2b1d00; --c-glow: rgba(255, 200, 61, 0.7); --c-check: var(--yellow); }
.crit-check { color: var(--c-check); }
/* заполненный критерий подсвечивается неоном своего цвета, как карточки на сайте ТШБ */
.crit.done { box-shadow: 0 0 0 1.5px var(--c-glow), 0 0 26px color-mix(in srgb, var(--c-glow) 30%, transparent); } /* taste-skill-ignore: неон критерия */

/* единственная «плавающая» панель — с размытием, как нижняя панель в iOS */
.submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 20, 0.86);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); /* taste-skill-ignore: единственная липкая панель */
}
.submit-bar .btn-primary { max-width: 488px; margin: 0 auto; }
.submit-bar .btn-plain { max-width: 488px; margin: 2px auto 0; min-height: 40px; }
.sending-note { max-width: 488px; margin: 8px auto 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--yellow); }

/* голос принят */
.accepted { text-align: center; padding-top: 18px; }
.icon.check { width: 84px; height: 84px; border-radius: 50%; background: var(--accent-fill); color: #fff; animation: arrive 0.75s var(--spring-pop); }
.icon.check svg { width: 48px; height: 48px; stroke-width: 2.6; }
@keyframes arrive { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.ok-title { margin-top: 18px; font-size: 38px; line-height: 1.02; }
.ok-name { margin-top: 8px; font-size: 17px; }
.group { background: var(--panel); border-radius: 16px; overflow: hidden; }
.group.list { margin-top: 20px; text-align: left; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; position: relative; }
.list-row + .list-row::before { content: ''; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--sep); } /* taste-skill-ignore: разделитель строк списка, как в «Настройках» iOS */
.list-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.accepted .footnote { text-align: center; }

/* прогресс дня */
.block { margin-top: 22px; }
.section-title { font-size: 20px; margin: 0 4px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section-title small { font-family: 'Inter', sans-serif; text-transform: none; font-size: 14px; font-weight: 600; color: var(--label2); letter-spacing: -0.01em; }
.progress { height: 8px; border-radius: 999px; background: var(--raise); overflow: hidden; margin: 0 4px 14px; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e0157d, #ff2d95); transition: width 0.6s var(--spring-soft); } /* taste-skill-ignore: фирменный розовый градиент */
.team-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; position: relative;
  border: 0; background: transparent; color: var(--text); font: inherit; text-align: left;
}
.team-row + .team-row::before { content: ''; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--sep); } /* taste-skill-ignore: разделитель строк списка */
button.team-row { cursor: pointer; }
button.team-row:active { background: var(--raise); }
.team-row .tn { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.pill { flex: none; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--raise); color: var(--label2); white-space: nowrap; }
.pill.ok { background: rgba(0, 220, 255, 0.14); color: var(--accent2); }
.pill.miss { background: var(--accent-fill); color: #fff; }
.pill.now { background: rgba(255, 200, 61, 0.16); color: var(--yellow); }
.pill.own { background: transparent; color: var(--label3); padding-right: 0; }
.chev { flex: none; width: 9px; height: 15px; fill: none; stroke: var(--label3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* смена состояния: карточка мягко поднимается */
.card, .accepted, .vote-form { animation: riseIn 0.6s var(--spring-soft); }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  .icon.check, .card, .accepted, .vote-form, .remind { animation: fadeIn 0.2s; }
  @keyframes fadeIn { from { opacity: 0; } }
  .score, .btn-primary, .icon.crit-check { transition-property: background-color, color, opacity; }
  .seg-thumb { transition: opacity 0.15s; }
  .spinner { animation-duration: 1.6s; }
}

/* своя команда: подпись второй строкой, счётчик обязательных голосований крупно */
.team-row .tn small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--label3); }
.team-row.own .tn { color: var(--label2); }
.counter { margin: 0 4px 10px; font-size: 16px; font-weight: 600; color: var(--label2); }
.counter b { color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
.counter span { white-space: nowrap; }
/* после проверки критиком: незаполненная форма — подсказка, а не «сломанная» кнопка */
.submit-bar .btn-primary:disabled { background: transparent; color: var(--label2); box-shadow: inset 0 0 0 1.5px var(--sep); }
.vote-head .label-row { display: flex; justify-content: space-between; gap: 10px; }
/* узкие телефоны (320 px): день с датой в одну строку, плашка статуса переносится вниз */
.day-line { flex-wrap: wrap; row-gap: 8px; }
.day-name { white-space: nowrap; }
