:root {
  --bg: #0b1220;
  --card: #111a2e;
  --text: #e9eefc;
  --muted: #a8b3d6;
  --ok: #1fc77a;
  --bad: #ff4d4d;
  --pri: #4c7dff;
  --r: 16px;
}

* {
  box-sizing: border-box
}

html {
  height: 100%;
  background-color: #0b1220;
  /* Цвет темы для статус-бара iOS */
}

body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 30% 0%, #122045, var(--bg));
  color: var(--text);
  overflow-x: hidden;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px env(safe-area-inset-bottom);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 18, 32, .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  margin: 0 -16px 20px;
}

.title {
  color: var(--text);
}

.screen {
  padding: 10px 2px
}

.card {
  background: color-mix(in oklab, var(--card) 92%, black 12%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .45);
  margin-bottom: 20px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.task {
  display: flex;
  gap: 14px;
  margin: 20px 0 24px;
  align-items: center;
  min-height: 60px;
}

.taskText {
  font-size: 20px;
  line-height: 1.35;
  flex: 1;
  color: var(--text);
  transition: opacity 0.3s ease;
}

.taskText.hidden {
  color: var(--muted);
  font-style: italic;
  font-size: 17px;
  opacity: 0.7;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 20px;
}

.answer {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .2);
  color: var(--text);
  padding: 0 16px;
  font-size: 20px;
}

.full {
  width: 100%;
}

.btnCol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

button {
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 650;
  transition: filter 0.2s;
  font-size: 16px;
}

button:active {
  filter: brightness(0.85);
}

.primary {
  background: var(--pri);
  border: 1px solid rgba(255, 255, 255, .12);
  color: white
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--text)
}

.mini-btn {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 8px;
}

.muted {
  color: var(--muted)
}

.small {
  font-size: 13px
}

.feedback {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted)
}

.anim {
  height: 54px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center
}

.pulseOk {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(31, 199, 122, .55);
  animation: ok 520ms ease-out 1;
}

@keyframes ok {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(31, 199, 122, .55)
  }

  100% {
    transform: scale(1.2);
    box-shadow: 0 0 0 18px rgba(31, 199, 122, 0)
  }
}

.shakeBad {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--bad);
  animation: bad 420ms ease-in-out 1;
}

@keyframes bad {

  0%,
  100% {
    transform: translateX(0)
  }

  20% {
    transform: translateX(-10px)
  }

  40% {
    transform: translateX(10px)
  }

  60% {
    transform: translateX(-7px)
  }

  80% {
    transform: translateX(7px)
  }
}

.statGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.stat {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .12)
}

.stat .k {
  font-size: 12px;
  color: var(--muted)
}

.stat .v {
  font-size: 22px;
  margin-top: 4px;
  font-weight: 750
}

.icon_fix_1 {
  display: block;
  margin-left: -7px;
}

.results {
  margin-top: 8px;
}
.reset-wrap {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.link-btn {
  background: none !important;
  border: none !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  text-decoration: underline;
  cursor: pointer;
  opacity: 0.5;
  height: auto !important;
  padding: 8px !important;
  font-weight: normal !important;
}

.link-btn:active {
  opacity: 1;
}
