:root {
  color-scheme: light dark;
  --bg: var(--tg-theme-secondary-bg-color, #eef3ef);
  --surface: var(--tg-theme-bg-color, #ffffff);
  --surface-raised: var(--tg-theme-section-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #17211b);
  --muted: var(--tg-theme-hint-color, #708078);
  --link: var(--tg-theme-link-color, #23895b);
  --button: var(--tg-theme-button-color, #268b5a);
  --button-text: var(--tg-theme-button-text-color, #ffffff);
  --separator: var(--tg-theme-section-separator-color, rgba(24, 54, 38, 0.11));
  --accent: #3aa66c;
  --accent-strong: #187348;
  --accent-soft: rgba(58, 166, 108, 0.14);
  --warn: #d46b38;
  --warn-soft: rgba(212, 107, 56, 0.13);
  --danger: #d64e57;
  --danger-soft: rgba(214, 78, 87, 0.12);
  --shadow: 0 7px 26px rgba(12, 39, 25, 0.08);
  --radius-xl: 24px;
  --radius-lg: 19px;
  --radius-md: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

html[data-persona="firstov"] {
  --accent: #64748b;
  --accent-strong: #435268;
  --accent-soft: rgba(100, 116, 139, 0.15);
  --button: #53637a;
}

html[data-persona="nakonechny"] {
  --accent: #d66b38;
  --accent-strong: #a84325;
  --accent-soft: rgba(214, 107, 56, 0.15);
  --button: #b84d2d;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% -5%, rgba(94, 201, 132, 0.16), transparent 33%),
    var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  -webkit-user-select: none;
  user-select: none;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(58, 166, 108, 0.32);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(66px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--separator);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand__avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px 14px 14px 5px;
  object-fit: cover;
  object-position: center;
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(24, 115, 72, 0.22);
}

.brand__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sync {
  max-width: min(72vw, 440px);
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync.is-stale {
  color: var(--warn);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 9px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.icon-button:active {
  background: var(--accent-soft);
  transform: scale(0.95);
}

.icon-button svg,
.search svg,
.tab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-loading svg {
  animation: spin 0.75s linear infinite;
}

.main {
  padding: 14px 14px calc(94px + var(--safe-bottom));
}

.page {
  animation: page-in 0.2s ease-out;
}

.page > * + * {
  margin-top: 12px;
}

.card,
.state-card {
  border: 1px solid var(--separator);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.state-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: max(18vh, 80px);
  padding: 20px;
}

.state-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 17px;
}

.state-card p {
  margin: 0;
  color: var(--muted);
}

.state-card__body {
  min-width: 0;
}

.state-card__symbol {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 22px;
  font-weight: 900;
}

.state-card .button {
  margin-top: 14px;
}

.spinner {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.victim-card {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  padding: 22px;
  color: #effff4;
  background:
    radial-gradient(circle at 86% 13%, rgba(203, 255, 218, 0.24), transparent 25%),
    linear-gradient(145deg, #173f2b, #246b45 67%, #328f5b);
  border-color: rgba(255, 255, 255, 0.08);
}

.victim-card::after {
  position: absolute;
  right: -28px;
  bottom: -66px;
  width: 168px;
  height: 168px;
  border: 24px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  content: "";
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.victim-card .eyebrow {
  color: rgba(238, 255, 244, 0.68);
}

.victim-card h1 {
  position: relative;
  z-index: 1;
  margin: 12px 0 7px;
  font-size: clamp(27px, 8vw, 39px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.victim-card p {
  position: relative;
  z-index: 1;
  max-width: 88%;
  margin: 0;
  color: rgba(240, 255, 246, 0.82);
  font-size: 15px;
}

.date-chip {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 18px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(243, 255, 247, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.section-card {
  padding: 18px;
}

.section-heading,
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2,
.page-title h1,
.sheet__header h2 {
  margin: 3px 0 0;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.page-title {
  padding: 6px 2px 2px;
}

.page-title h1 {
  font-size: 29px;
}

.section-heading__meta,
.result-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-count {
  display: grid;
  min-width: 31px;
  height: 31px;
  padding: 0 9px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.bingo {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.bingo__cell {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 98px;
  align-items: center;
  justify-content: center;
  padding: 13px 9px;
  overflow: hidden;
  border: 1px solid rgba(33, 112, 70, 0.13);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--accent-soft);
  cursor: pointer;
  font-size: clamp(11px, 3vw, 14px);
  font-weight: 750;
  line-height: 1.16;
  text-align: center;
  word-break: break-word;
  transition: transform 0.13s ease, background 0.18s ease, color 0.18s ease;
}

.bingo__cell:nth-child(8),
.bingo__cell:nth-child(9) {
  background: var(--warn-soft);
  border-color: rgba(212, 107, 56, 0.14);
}

.bingo__cell::before {
  position: absolute;
  top: 7px;
  left: 8px;
  color: var(--muted);
  content: attr(data-number);
  font-size: 10px;
  font-weight: 800;
  opacity: 0.68;
}

.bingo__cell:active {
  transform: scale(0.96);
}

.bingo__cell.is-marked {
  color: #effff4;
  background: linear-gradient(145deg, #248453, #37aa6c);
  border-color: transparent;
  box-shadow: 0 5px 13px rgba(26, 128, 78, 0.23);
}

.bingo__cell.is-marked::before {
  color: rgba(255, 255, 255, 0.78);
}

.bingo__cell.is-marked::after {
  position: absolute;
  top: 7px;
  right: 8px;
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.bingo.is-pending .bingo__cell {
  pointer-events: none;
}

.bingo.is-pending .bingo__cell:not(.is-pending) {
  opacity: 0.57;
}

.bingo__cell.is-pending::after {
  animation: pulse 0.75s ease-in-out infinite alternate;
}

.hint {
  margin: 11px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-inline {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.count-card {
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.count-card__value {
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.count-card__label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.count-card--alive .count-card__value {
  color: var(--accent-strong);
}

.count-card--left .count-card__value {
  color: var(--warn);
}

.unknown-count {
  margin: 7px 4px 0 !important;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.chip,
.badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}

.badge {
  padding: 4px 8px;
  font-size: 10px;
}

.badge--muted {
  color: var(--muted);
  background: var(--bg);
}

.badge--left {
  color: var(--warn);
  background: var(--warn-soft);
}

.button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 13px;
  color: var(--button-text);
  background: var(--button);
  cursor: pointer;
  font-weight: 760;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.button--compact {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12px;
}

.button--ghost {
  color: var(--link);
  background: var(--accent-soft);
}

.button--wide {
  width: 100%;
}

.search {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--separator);
  border-radius: 15px;
  background: var(--surface-raised);
}

.search svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.search--small {
  height: 43px;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin-right: -14px;
  padding-right: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--separator);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-raised);
  cursor: pointer;
  font-size: 12px;
  font-weight: 730;
}

.filter.is-active {
  border-color: transparent;
  color: #f1fff6;
  background: var(--accent-strong);
}

.people-list,
.game-list,
.quote-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.persona-heading {
  margin-top: 4px;
}

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

.persona-card {
  display: grid;
  min-width: 0;
  gap: 7px;
  justify-items: center;
  padding: 10px 7px 11px;
  border: 1px solid var(--separator);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface-raised);
  cursor: pointer;
  text-align: center;
}

.persona-card:active {
  transform: scale(0.97);
}

.persona-card:disabled {
  cursor: default;
  opacity: 0.55;
}

.persona-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.persona-card__avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
  background: var(--bg);
}

.persona-card__name {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-card__description {
  display: -webkit-box;
  min-height: 30px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.persona-warning {
  margin: 9px 3px 18px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.person-card,
.game-card,
.quote-card {
  width: 100%;
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: 0 3px 13px rgba(10, 36, 23, 0.045);
}

.person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.person-card:active,
.game-card:active {
  transform: scale(0.992);
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 15px;
  color: #f2fff6;
  background: linear-gradient(145deg, #3aa66c, #1c754a);
  font-weight: 850;
}

.avatar--new {
  color: #57301c;
  background: linear-gradient(145deg, #ffd6a8, #e6a96e);
}

.person-card__body {
  min-width: 0;
  flex: 1;
}

.person-card__name {
  display: block;
  overflow: hidden;
  font-weight: 790;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card__meta,
.game-card__meta,
.quote-card__meta,
.active-game p {
  display: block;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card__chevron {
  color: var(--muted);
  font-size: 22px;
  font-weight: 300;
}

.empty-page {
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-page span {
  font-size: 25px;
}

.empty-page p {
  margin: 8px 0 0;
}

.empty-page--small {
  padding: 24px 14px;
}

.section-heading--outside {
  margin: 22px 2px 10px !important;
}

.active-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
}

.active-game > div {
  min-width: 0;
}

.status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 3px solid var(--surface-raised);
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 2px rgba(112, 128, 120, 0.2);
}

.status-dot.is-live {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  animation: live 1.2s ease-in-out infinite alternate;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}

.game-card__icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border-radius: 13px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 16px;
  font-weight: 900;
}

.game-card__body {
  min-width: 0;
  flex: 1;
}

.game-card__name {
  display: block;
  font-weight: 780;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 29px;
  flex: 0 0 48px;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch__track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(112, 128, 120, 0.28);
  cursor: pointer;
  transition: background 0.18s ease;
}

.switch__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 0.18s ease;
}

.switch input:checked + .switch__track {
  background: var(--button);
}

.switch input:checked + .switch__track::after {
  transform: translateX(19px);
}

.switch input:focus-visible + .switch__track {
  outline: 3px solid rgba(58, 166, 108, 0.28);
  outline-offset: 2px;
}

.switch input:disabled + .switch__track {
  cursor: default;
  opacity: 0.5;
}

.quote-heading {
  margin-top: 26px !important;
}

.quote-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 13px 13px 15px;
}

.quote-card__body {
  min-width: 0;
  flex: 1;
}

.quote-card__text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 13px;
  line-height: 1.35;
}

.quote-card.is-disabled {
  opacity: 0.6;
}

.quote-card .switch {
  margin-top: 2px;
  transform: scale(0.9);
  transform-origin: top right;
}

.tabbar {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: min(100%, 680px);
  min-height: calc(67px + var(--safe-bottom));
  margin: 0 auto;
  padding: 7px 10px calc(7px + var(--safe-bottom));
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  border-top: 1px solid var(--separator);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
}

.tab {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 7px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}

.tab svg {
  width: 23px;
  height: 23px;
}

.tab.is-active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.sheet-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(5, 17, 10, 0.44);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade-in 0.18s ease-out;
}

.sheet {
  position: relative;
  width: min(100%, 680px);
  max-height: min(84vh, 720px);
  padding-bottom: var(--safe-bottom);
  overflow: hidden;
  border: 1px solid var(--separator);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.18);
  animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.sheet__grab {
  width: 38px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 99px;
  background: var(--separator);
}

.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px 12px 19px;
  border-bottom: 1px solid var(--separator);
}

.sheet__header h2 {
  margin: 0;
}

.sheet__content {
  max-height: calc(min(84vh, 720px) - 66px - var(--safe-bottom));
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-name {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.detail-profile {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.detail-row {
  padding: 12px;
  border-radius: 13px;
  background: var(--bg);
}

.detail-row span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span,
.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.field input[type="text"],
.field input[type="time"],
.field input[type="number"],
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--separator);
  border-radius: 13px;
  outline: 0;
  color: var(--text);
  background: var(--bg);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
}

.form-row__copy {
  min-width: 0;
}

.form-row__copy strong {
  display: block;
}

.form-row__copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekday {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--separator);
  border-radius: 10px;
  color: var(--muted);
  background: var(--bg);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.weekday.is-selected {
  color: var(--button-text);
  background: var(--button);
  border-color: transparent;
}

.form-error {
  margin: -5px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 16px;
  bottom: calc(82px + var(--safe-bottom));
  left: 16px;
  width: fit-content;
  max-width: min(calc(100% - 32px), 520px);
  margin: 0 auto;
  padding: 11px 14px;
  border-radius: 13px;
  color: #f7fff9;
  background: rgba(19, 42, 28, 0.94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  animation: toast-in 0.18s ease-out;
}

.toast.is-error {
  background: rgba(124, 34, 41, 0.96);
}

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

@keyframes pulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@keyframes live {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 560px) {
  .main {
    padding-right: 20px;
    padding-left: 20px;
  }

  .bingo__cell {
    min-height: 116px;
    font-size: 15px;
  }

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

@media (max-width: 350px) {
  .main {
    padding-right: 9px;
    padding-left: 9px;
  }

  .victim-card,
  .section-card {
    padding: 15px;
  }

  .bingo {
    gap: 5px;
  }

  .bingo__cell {
    min-height: 86px;
    padding: 14px 5px 8px;
    border-radius: 11px;
    font-size: 10px;
  }

  .count-card__value {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.detail-section-title { margin: 20px 0 8px; font-size: 16px; }
.detail-facts { padding-left: 20px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-facts li + li { margin-top: 8px; }
