:root {
  --bg-start: #f4efe6;
  --bg-end: #dce8f2;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(39, 61, 82, 0.12);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text-main: #1d2a36;
  --text-muted: #566779;
  --accent: #db7c26;
  --accent-deep: #bc5c15;
  --accent-soft: rgba(219, 124, 38, 0.14);
  --shadow: 0 24px 60px rgba(34, 52, 70, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 30%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

.page::before,
.page::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(12px);
}

.page::before {
  top: 6%;
  right: 8%;
  width: 180px;
  height: 180px;
  background: rgba(255, 210, 156, 0.28);
}

.page::after {
  bottom: 8%;
  left: 6%;
  width: 220px;
  height: 220px;
  background: rgba(153, 192, 225, 0.22);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.trainer {
  position: relative;
  width: min(100%, 820px);
  display: grid;
  gap: 24px;
  padding: 40px 32px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.trainer__intro {
  display: grid;
  gap: 12px;
}

.trainer__eyebrow {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.trainer__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 0.95;
}

.trainer__text {
  margin: 0;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.mode-switch__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(39, 61, 82, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.mode-switch__option:hover {
  transform: translateY(-1px);
  border-color: rgba(39, 61, 82, 0.22);
}

.mode-switch__option:has(input:checked) {
  border-color: rgba(219, 124, 38, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), var(--accent-soft));
  box-shadow: 0 10px 24px rgba(219, 124, 38, 0.12);
}

.mode-switch__option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.card-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 247, 236, 0.95), rgba(235, 243, 250, 0.92));
  border: 1px solid rgba(39, 61, 82, 0.08);
}

.card-panel__label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-panel__display {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px;
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(39, 61, 82, 0.06);
  text-align: center;
  font-size: clamp(1.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

.card-panel__status {
  min-height: 1.4em;
  margin: 0;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
}

.session-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.session-panel__item,
.passed-panel {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(39, 61, 82, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.session-panel__label,
.passed-panel__label {
  display: block;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.session-panel__value {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 800;
  color: var(--text-main);
}

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

.button {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
.mode-switch__option:has(input:focus-visible) {
  outline: 3px solid rgba(29, 42, 54, 0.18);
  outline-offset: 3px;
}

.button--primary {
  color: #fffaf3;
  background: linear-gradient(135deg, var(--accent-deep), #f29c38);
  box-shadow: 0 14px 30px rgba(217, 111, 33, 0.28);
}

.button--secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(39, 61, 82, 0.14);
}

.button--secondary:hover {
  background: rgba(255, 255, 255, 1);
}

.button--ghost {
  color: var(--text-main);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(39, 61, 82, 0.16);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.55);
}

.passed-panel {
  display: grid;
  gap: 14px;
}

.passed-panel__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.passed-panel__chip,
.passed-panel__empty {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(39, 61, 82, 0.12);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.passed-panel__empty {
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 860px) {
  .trainer {
    gap: 20px;
    padding: 32px 24px;
  }

  .trainer__title {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px;
  }

  .trainer {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .mode-switch,
  .actions,
  .session-panel {
    grid-template-columns: 1fr;
  }

  .card-panel__display {
    min-height: 180px;
    padding: 16px;
  }

  .button {
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
