/* Трекер нагрузки — стили. Mobile-first (360–414 px), десктоп = более широкий
   контейнер (не отдельный дизайн). Тач-таргеты ≥ 44px, safe-area, тёмная тема,
   видимый фокус, prefers-reduced-motion. */

:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --text: #0f172a;
  --muted: #5b6b82;
  --border: #e2e8f0;

  --primary: #0ea5e9;
  --primary-strong: #0284c7;
  --success: #16a34a;
  --danger: #dc2626;

  --accent-run: #0ea5e9;
  --accent-rain: #6366f1;
  --accent-rest: #64748b;

  --block-A: #16a34a;
  --block-B: #f59e0b;
  --block-C: #8b5cf6;
  --block-D: #0ea5e9;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.06);

  --space: 16px;
  --tap: 44px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --appbar-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #131c30;
    --surface-2: #0f1728;
    --text: #e6eefb;
    --muted: #9fb0c9;
    --border: #263349;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.boot {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* ---------- App shell ---------- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg);
}

.appbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--appbar-h);
  padding: calc(8px + var(--safe-top)) calc(var(--space) + var(--safe-right)) 8px
    calc(var(--space) + var(--safe-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.appbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.appbar__logo {
  font-size: 22px;
}
.appbar__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 6px 12px 6px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.chip__avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent-rain));
  flex: none;
}
.chip__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: right;
  min-width: 0;
}
.chip__name {
  font-weight: 700;
  font-size: 13px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip__weight {
  font-size: 11px;
  color: var(--muted);
}

.main {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 calc(var(--space) + var(--safe-right)) 24px calc(var(--space) + var(--safe-left));
}

/* ---------- Bottom nav ---------- */
.tabbar {
  flex: none;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}
.tabbar__btn {
  flex: 1;
  min-height: var(--tap);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.tabbar__btn--active {
  color: var(--primary-strong);
}
.tabbar__icon {
  font-size: 20px;
  line-height: 1;
}
.tabbar__label {
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Today: sticky region ---------- */
.today__sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 calc(-1 * (var(--space) + var(--safe-right))) 0 calc(-1 * (var(--space) + var(--safe-left)));
  padding: 12px calc(var(--space) + var(--safe-right)) 12px calc(var(--space) + var(--safe-left));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.modes {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.modes__btn {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.modes__btn--active {
  color: #fff;
  background: var(--accent-rest);
}
.modes__btn[data-mode="run"].modes__btn--active {
  background: var(--accent-run);
}
.modes__btn[data-mode="rain"].modes__btn--active {
  background: var(--accent-rain);
}
.modes__btn[data-mode="rest"].modes__btn--active {
  background: var(--accent-rest);
}

/* ---------- Summary ---------- */
.summary {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.summary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.summary__totals {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.summary__total {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.summary__goal {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.summary__headright {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.summary__streak {
  font-size: 13px;
  font-weight: 800;
  color: var(--block-B);
  background: color-mix(in srgb, var(--block-B) 14%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.summary__hint {
  font-size: 11px;
  color: var(--muted);
}
.summary__bar {
  margin: 12px 0 12px;
  height: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.summary__fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.summary__fill--full {
  background: var(--success);
}
.summary__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.stat__label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.stat__row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat__value {
  font-size: 18px;
  font-weight: 800;
}
.stat__unit {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Today controls ---------- */
.today__controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.field__unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.field__input {
  min-height: var(--tap);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px; /* ≥16px — iOS не зумит при фокусе */
}
.field__input--sm {
  min-height: 40px;
  width: 84px;
  text-align: center;
}

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.switch__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.switch__title {
  font-weight: 700;
  font-size: 14px;
}
.switch__sub {
  font-size: 12px;
  color: var(--muted);
}
.switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__track {
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background-color 0.15s;
}
.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.switch__input:checked ~ .switch__track {
  background: var(--primary);
}
.switch__input:checked ~ .switch__track .switch__thumb {
  transform: translateX(20px);
}
.switch__input:focus-visible ~ .switch__track {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.mode-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* ---------- Slots ---------- */
.slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.slot--done {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
}
.slot__head {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.slot__time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  width: 44px;
  flex: none;
}
.slot__badge {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
}
.badge-A {
  background: var(--block-A);
}
.badge-B {
  background: var(--block-B);
}
.badge-C {
  background: var(--block-C);
}
.badge-D {
  background: var(--block-D);
}
.slot__title {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.slot__name {
  font-weight: 700;
  font-size: 15px;
}
.slot__sub {
  font-size: 12px;
  color: var(--muted);
}
.slot__kcal {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.slot__check {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.slot--done .slot__check {
  background: var(--success);
  border-color: var(--success);
}
.slot__chevron {
  flex: none;
  color: var(--muted);
  transition: transform 0.15s;
}
.slot--open .slot__chevron {
  transform: rotate(180deg);
}
.slot__body {
  padding: 0 12px 14px 12px;
  border-top: 1px solid var(--border);
}

.exlist {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.exlist__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.exlist__item:last-child {
  border-bottom: 0;
}
.exlist__name {
  font-size: 14px;
}
.exlist__reps {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* Кнопка запуска режима тренировки */
.startbtn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}
.startbtn:active {
  background: var(--primary-strong);
}
.startbtn__icon {
  font-size: 14px;
}
.startbtn__dur {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}

/* ---------- Полноэкранный плеер тренировки ---------- */
.body--player-open {
  overflow: hidden;
}
.player {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: calc(10px + var(--safe-top)) calc(var(--space) + var(--safe-right))
    calc(12px + var(--safe-bottom)) calc(var(--space) + var(--safe-left));
}
.player__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.player__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  min-width: 0;
}
.player__iconbtn {
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 17px;
  cursor: pointer;
  flex: none;
}
.player__segbar {
  display: flex;
  gap: 4px;
  margin-top: 12px;
}
.player__seg {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.player__seg--done {
  background: var(--success);
}
.player__seg--active::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  background: var(--primary);
}
.player__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 0;
}
.player__step {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.player__name {
  font-size: clamp(26px, 7.5vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.player__reps {
  font-size: 16px;
  color: var(--muted);
  font-weight: 600;
}
.player__time {
  font-variant-numeric: tabular-nums;
  font-size: clamp(72px, 24vw, 110px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 8px 0;
}
.player--paused .player__time {
  opacity: 0.4;
}
/* Отдых — спокойный янтарный акцент */
.player--rest {
  background: color-mix(in srgb, var(--block-B) 10%, var(--bg));
}
.player--rest .player__time {
  color: var(--block-B);
}
.player--rest .player__step {
  color: var(--block-B);
}
.player__next {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.player__bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.player__totalrow {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.player__total {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.player__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.player__ctl {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 22px;
  cursor: pointer;
}
.player__ctl--main {
  width: 84px;
  height: 84px;
  font-size: 30px;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.player__ctl--done {
  width: auto;
  padding: 0 40px;
  font-size: 18px;
  font-weight: 800;
}
.player--finished {
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.player__doneicon {
  font-size: 64px;
}

/* Done checkbox */
.donecheck {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  cursor: pointer;
  user-select: none;
}
.donecheck__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.donecheck__box {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
}
.donecheck__box::after {
  content: "✓";
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  opacity: 0;
}
.donecheck__input:checked ~ .donecheck__box {
  background: var(--success);
  border-color: var(--success);
}
.donecheck__input:checked ~ .donecheck__box::after {
  opacity: 1;
}
.donecheck__input:focus-visible ~ .donecheck__box {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.donecheck__label {
  font-weight: 700;
  font-size: 15px;
}

/* Rest card */
.restcard {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.restcard__icon {
  font-size: 40px;
}
.restcard__text {
  color: var(--muted);
  margin: 12px 0 0;
}

.disclaimer {
  margin: 18px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Views (history / profiles) ---------- */
.view {
  padding-top: 16px;
}
.view__title {
  margin: 4px 2px 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.empty {
  color: var(--muted);
  text-align: center;
  padding: 32px 0;
}

.weekcard {
  background: linear-gradient(135deg, var(--primary), var(--accent-rain));
  color: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.weekcard__label {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 600;
}
.weekcard__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}
.weekcard__value {
  font-size: 30px;
  font-weight: 800;
}
.weekcard__unit {
  font-size: 14px;
  opacity: 0.9;
}

/* Карточка веса */
.weightcard--metric {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.weightcard__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.weightcard__delta {
  font-size: 15px;
  font-weight: 800;
}
.weightcard__delta--down {
  color: var(--success);
}
.weightcard__delta--up {
  color: var(--danger);
}
.weightcard__spark {
  margin: 10px 0;
  min-height: 40px;
}
.spark {
  width: 100%;
  height: 56px;
  display: block;
}
.spark__line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.spark__dot {
  fill: var(--primary);
}
.weightcard__empty {
  margin: 6px 0;
  font-size: 13px;
  color: var(--muted);
}
.weightcard__row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.weightcard__hint {
  font-size: 12px;
  color: var(--muted);
}
.weightcard__form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.weightcard__val {
  display: flex;
  align-items: center;
  gap: 6px;
}
.field__input--date {
  min-height: 40px;
  width: auto;
  padding: 8px 10px;
  font-size: 15px;
}
.weightcard__unit {
  font-size: 12px;
  color: var(--muted);
}
.weightcard__btn {
  flex: none;
  padding: 0 16px;
  min-height: 40px;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.histrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.histrow--today {
  border-color: var(--primary);
}
.histrow__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.histrow__date {
  font-weight: 700;
  font-size: 14px;
}
.histrow__mode {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-rest);
}
.histrow__mode.mode-run {
  background: var(--accent-run);
}
.histrow__mode.mode-rain {
  background: var(--accent-rain);
}
.histrow__mode.mode-rest {
  background: var(--accent-rest);
}
.histrow__meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
}
.histrow__kcal {
  font-weight: 800;
  font-size: 15px;
}
.histrow__slots {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Profiles ---------- */
.profiles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profilecard {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.profilecard--active {
  border-color: var(--primary);
}
.profilecard__select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.profilecard__dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--border);
  flex: none;
}
.profilecard__select--active .profilecard__dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.profilecard__name {
  font-weight: 700;
  font-size: 16px;
}
.profilecard__weight {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.profilecard__unit {
  font-size: 12px;
  color: var(--muted);
}
.iconbtn {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 15px;
}
.iconbtn--danger {
  color: var(--danger);
}
.iconbtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.addform {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.addform .field {
  flex: 1 1 140px;
}
.addform .field--narrow {
  flex: 0 0 96px;
}
.btn {
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
  flex: 1 1 100%;
}
.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.datacard {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.datacard__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.datacard__hint {
  font-size: 12px;
  color: var(--muted);
}
.datacard__btns {
  display: flex;
  gap: 10px;
}
.datacard__btns .btn {
  flex: 1;
}

.note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

/* ---------- Desktop = просто шире контейнер ---------- */
@media (min-width: 620px) {
  .app {
    height: 100vh;
    height: 100dvh;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
