/* Mobile first: базовые стили — для телефона, ниже — расширение для больших экранов. */

:root {
  --bg: #FFF6EC;
  --card: #FFFFFF;
  --ink: #3B2A5A;
  --muted: #7A6A90;
  --accent: #FF7A45;
  --accent-dark: #E8622E;
  --green: #1E9E5A;
  --green-bg: #EAF8F0;
  --purple: #8C6CF0;
  --radius: 22px;
  --shadow: 0 4px 0 rgba(59, 42, 90, .08), 0 8px 24px rgba(59, 42, 90, .08);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 700 17px/1.35 Nunito, system-ui, -apple-system, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

button { font: inherit; color: inherit; }

/* ---------- Верхнее меню ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 246, 236, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
}

.topbar nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-width: 560px;
  margin: 0 auto;
  background: #FFE7D6;
  border-radius: 999px;
  padding: 5px;
}

.topbar a {
  text-align: center;
  padding: 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.topbar a.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Каркас ---------- */

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px 24px;
}

.hello h1 { font-size: 30px; font-weight: 900; margin: 10px 0 2px; }
.hello .date { margin: 0; color: var(--muted); font-size: 18px; }
.hello .date::first-letter { text-transform: uppercase; }

.done-count { margin: 8px 0 0; font-size: 17px; }
.done-count b { color: var(--green); font-weight: 900; }

.badge {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
}

/* Особый день (суббота — генеральная уборка) */

.special {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #8B6CFF, #FF6B9A);
  color: #fff;
  box-shadow: 0 8px 24px rgba(139, 108, 255, .35);
  animation: pop .5s ease-out;
}

.special-emoji { font-size: 44px; line-height: 1; }
.special b { display: block; font-size: 22px; font-weight: 900; }
.special small { display: block; font-size: 14px; opacity: .92; }

.special-block {
  margin-top: 26px;
  padding: 2px 12px 14px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(139, 108, 255, .16), rgba(255, 107, 154, .16));
  border: 2px dashed rgba(139, 108, 255, .45);
}

.special-block h2 { margin: 14px 4px 12px; color: #6A4FD0; }
.report-list .special-block { margin-top: 0; }
.special-block .report-list { margin-top: 0; }

.tag {
  align-self: flex-start;
  margin-bottom: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #EFE9FF;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

h2 { font-size: 21px; font-weight: 900; margin: 26px 0 12px; }

/* ---------- Статистика ---------- */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stat span { display: block; color: var(--muted); font-size: 14px; }
.stat b { font-size: 26px; font-weight: 900; }
.stat:first-child b { color: var(--green); }
.stat.wide { grid-column: 1 / -1; }
.stat.wide b { color: var(--accent-dark); }
.stat small { display: block; color: var(--muted); font-size: 13px; }

.balance { margin-bottom: 10px; font-size: 18px; }
.balance b { color: var(--accent-dark); font-weight: 900; font-size: 24px; }

.field-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.field-row .field { flex: 1; min-width: 0; }
.field-row .big-btn { width: auto; margin: 0; padding: 12px 16px; font-size: 16px; }

.progress {
  grid-column: 1 / -1;
  height: 14px;
  background: #FFE1CF;
  border-radius: 999px;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #FFB347, var(--accent));
  border-radius: inherit;
  transition: width .4s;
}

.cheer {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #FFE066, #FFB347);
  text-align: center;
  font-size: 19px;
  font-weight: 900;
  animation: pop .5s ease-out;
}

@keyframes pop { from { transform: scale(.85); opacity: 0; } }

/* ---------- Карточки дел ---------- */

.tasks { display: grid; gap: 14px; }

.task {
  padding: 14px;
  border: 3px solid transparent;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.task.partial { border-color: #FFD0B5; }
.task.done { border-color: #9BE0BA; background: var(--green-bg); }

.task-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}

.task .emoji { font-size: 34px; text-align: center; line-height: 1; }
.task .info { display: flex; flex-direction: column; min-width: 0; }
.task .name { font-size: 18px; font-weight: 800; }
.task .meta { font-size: 14px; color: var(--muted); }
.task.done .meta { color: var(--green); font-weight: 800; }

.task .price {
  padding: 6px 10px;
  border-radius: 12px;
  background: #FFF0E6;
  color: var(--accent-dark);
  font-weight: 900;
  white-space: nowrap;
}

/* Плитки фото: пустая — кнопка «📷 Кухня», заполненная — фото с подписью. */

.tiles { display: grid; gap: 8px; margin-top: 12px; }
.tiles.many { grid-template-columns: repeat(3, 1fr); }
.tiles.one { grid-template-columns: 1fr; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px dashed #FFB38F;
  border-radius: 16px;
  background: #FFF6F0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.tiles.one .tile { aspect-ratio: 4 / 1; flex-direction: row; gap: 8px; font-size: 16px; }
.tiles.one .tile.has { aspect-ratio: 2 / 1; }
.tile b { font-size: 26px; }
.tile:active { transform: scale(.97); }

.tile.has { border: 0; background: #000; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.tile.has span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  color: #fff;
  text-align: left;
}

.link-btn {
  margin-top: 10px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

/* ---------- Кнопки ---------- */

.big-btn, .btn-secondary {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 18px;
  border: 0;
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
}

.big-btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 0 var(--accent-dark), 0 10px 24px rgba(255, 122, 69, .35);
}

.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-dark); }
.big-btn:disabled { opacity: .6; }

.big-btn.sticky {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  margin-top: 28px;
}

.btn-secondary { background: #FFE7D6; color: var(--ink); }

.big-btn.sent-ok { background: var(--green); box-shadow: 0 5px 0 #157A45, 0 10px 24px rgba(30, 158, 90, .3); font-size: 17px; }
.big-btn.sent-again { background: var(--purple); box-shadow: 0 5px 0 #6A4FD0, 0 10px 24px rgba(140, 108, 240, .35); font-size: 17px; }

/* ---------- Отчёт ---------- */

.report-list { display: grid; gap: 14px; margin-top: 18px; }

.report-item {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.report-item.partial { background: #FFF1F1; }
.report-item .tile { cursor: default; }
.report-item small { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

.report-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.report-head b { font-size: 18px; }
.report-head em { font-style: normal; font-weight: 900; color: var(--green); font-size: 18px; white-space: nowrap; }
.report-item.partial .report-head em { color: #D64545; }

.not-done {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #FFE1E1;
  color: #B23434;
}

.big-btn.tg { background: #2AABEE; box-shadow: 0 5px 0 #1A8BC9, 0 10px 24px rgba(42, 171, 238, .35); }
.big-btn.tg:active { box-shadow: 0 2px 0 #1A8BC9; }
.btn-secondary:disabled { opacity: .5; }

.hint.left { text-align: left; }
.muted { color: var(--muted); }
.hint { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.total {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  text-align: center;
  font-size: 22px;
}

.total b { font-size: 28px; font-weight: 900; }

/* ---------- История ---------- */

.days { display: grid; gap: 10px; margin-top: 18px; }

.day {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.day-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
}

.day-actions {
  display: flex;
  border-top: 1px solid #F1E6F7;
}

.day-send {
  padding: 12px;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}

.day-send { flex: 1; background: #E3F4FD; color: #1A8BC9; }

.day-send:disabled { opacity: .6; }

.day b { display: block; }
.day b::first-letter { text-transform: uppercase; }
.day small { display: block; color: var(--muted); font-size: 14px; }
.sent {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.sent.yes { background: #E3F4FD; color: #1A8BC9; }
.sent.no { background: #FFF0E6; color: var(--accent-dark); }
.sent + .sent { margin-left: 4px; }
.sent.gen { background: #EFE9FF; color: var(--purple); margin-right: 4px; }

.day em { font-style: normal; font-weight: 900; color: var(--green); white-space: nowrap; }

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

/* Достижения */

.h2-note { color: var(--muted); font-size: 15px; font-weight: 800; }

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

.ach {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  border-radius: 18px;
  background: #F3EEF8;
  text-align: center;
  opacity: .7;
}

.ach.done { background: linear-gradient(135deg, #FFF3C4, #FFE0EC); box-shadow: var(--shadow); opacity: 1; }
.ach-emoji { font-size: 30px; line-height: 1.1; }
.ach b { font-size: 13px; line-height: 1.2; }
.ach small { color: var(--muted); font-size: 11px; line-height: 1.2; }

/* Месяцы в истории */

.months {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.month {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.month + .month { border-top: 1px solid #F1E6F7; }
.month b { display: block; }
.month small { color: var(--muted); font-size: 14px; }
.month em { font-style: normal; font-weight: 900; color: var(--green); font-size: 20px; white-space: nowrap; }

/* Срок сдачи */

.deadline {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #E3F4FD;
  color: #1A6F9E;
  font-weight: 800;
}

.deadline.late { background: #FFE1E1; color: #B23434; }

/* Серия дней */

.streak {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.streak-fire { font-size: 34px; line-height: 1; filter: grayscale(.6); }
.streak b { display: block; font-size: 18px; font-weight: 900; }
.streak small { display: block; color: var(--muted); font-size: 13px; }
.streak.hot { background: linear-gradient(135deg, #FFE7C2, #FFD0B5); }
.streak.hot .streak-fire { filter: none; animation: flame 1.2s ease-in-out infinite alternate; }

@keyframes flame { to { transform: scale(1.15) rotate(-6deg); } }

/* Бонус */

.bonus {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #FFE066, #FFB347);
  font-weight: 800;
  animation: pop .5s ease-out;
}

.bonus b { font-weight: 900; }
.bonus.minus { background: #FFE1E1; color: #B23434; }

/* Копилка */

.goal {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #FFF3C4, #FFE0EC);
  box-shadow: var(--shadow);
}

.goal-top { display: flex; align-items: center; gap: 12px; }
.goal-pig { font-size: 36px; line-height: 1; }
.goal-top span small { display: block; color: var(--muted); font-size: 13px; }
.goal-top span b { font-size: 18px; }
.goal-top em { margin-left: auto; font-style: normal; font-weight: 900; color: var(--green); font-size: 20px; text-align: right; white-space: nowrap; }
.goal-top em small { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.goal-bar { margin-top: 10px; background: rgba(255, 255, 255, .7); }
.goal-bar i { background: linear-gradient(90deg, #FF9AC1, #FF6B9A); }
.goal-left { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.goal.reached { background: linear-gradient(135deg, #C8F5D9, #FFF3C4); animation: pop .5s ease-out; }
.goal.reached .goal-bar i { background: var(--green); }

/* Недели в истории */

.week-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin: 18px 4px 0;
}

.week-head b { display: block; font-size: 20px; font-weight: 900; }
.week-head small { color: var(--muted); font-size: 14px; }

.week-head em {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.days { margin-top: 10px; }

.week-send {
  display: block;
  margin: 8px 0 0 auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #E3F4FD;
  color: #1A8BC9;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.week-total {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  row-gap: 4px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.week-total b { color: var(--green); font-weight: 900; }
.week-total .chev { grid-column: 2; grid-row: 1 / span 3; }

/* Миниатюры дня в истории */

.thumbs {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
  text-decoration: none;
}

.thumbs:empty { display: none; }

.thumbs img, .thumbs span {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: #EEE6F5;
}

.thumbs span {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.chev { color: var(--muted); font-size: 22px; margin-left: 2px; }

.report-item .tile.has { cursor: zoom-in; }

/* ---------- Просмотр фото ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #0F0819;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.viewer[hidden] { display: none; }

.viewer img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
}

.v-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.v-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; font-size: 20px; }
.v-prev { left: 10px; top: 50%; transform: translateY(-50%); font-size: 34px; }
.v-next { right: 10px; top: 50%; transform: translateY(-50%); font-size: 34px; }
.viewer.single .v-prev, .viewer.single .v-next { display: none; }

.v-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  color: #fff;
}

.v-bottom b { display: block; font-size: 17px; }
.v-bottom small { color: rgba(255, 255, 255, .6); font-size: 14px; }

/* ---------- Настройки ---------- */

.panel {
  margin-top: 18px;
  padding: 4px 16px 16px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.panel h2 { margin-top: 14px; }
.steps { padding-left: 20px; margin: 0 0 14px; }
.steps li { margin-bottom: 8px; }
.steps code { background: #FFF0E6; padding: 1px 6px; border-radius: 6px; }

.field {
  width: 100%;
  padding: 14px;
  border: 2px solid #FFD0B5;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
}

.settings-link {
  display: block;
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.del-days { display: grid; gap: 8px; }

.del-day {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #FFF6F0;
}

.del-day b { display: block; font-size: 15px; }
.del-day b::first-letter { text-transform: uppercase; }
.del-day small { color: var(--muted); font-size: 13px; }

.del-day button {
  flex: none;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #FFE1E1;
  color: #B23434;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

/* Проверка дел */

.task.rejected { border-color: #F3A5A5; background: #FFF1F1; }
.task.rejected .meta { color: #B23434; font-weight: 800; }
.reject-note { margin: 8px 0 0; color: #B23434; font-weight: 800; font-size: 14px; }
.ok-note { margin: 8px 0 0; color: var(--green); font-weight: 800; font-size: 14px; }

.review { padding: 12px 0; border-top: 1px solid #F1E6F7; }
.review-head b { display: block; }
.review-head small { color: var(--muted); font-size: 13px; }
.review-thumbs { padding: 8px 0 0; }
.review-thumbs button { padding: 0; border: 0; background: none; cursor: zoom-in; }
.review-thumbs img { width: 64px; height: 64px; }
.review-actions { display: flex; gap: 8px; margin-top: 10px; }
.review-actions button {
  flex: 1;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: #DDF5E7;
  color: var(--green);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.review-actions button.no { background: #FFE1E1; color: #B23434; }

/* Цены */

.prices { margin-bottom: 12px; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #F1E6F7; font-weight: 800; }
.price-row:first-child { border-top: 0; }

/* Редактор прайса */

.editor summary { list-style: none; cursor: pointer; }
.editor summary::-webkit-details-marker { display: none; }
.editor summary h2::after { content: ' ▾'; color: var(--muted); font-size: 16px; }
.editor[open] summary h2::after { content: ' ▴'; }
.editor h3 { margin: 18px 0 8px; font-size: 17px; }

.ed-row { padding: 12px 0; border-top: 1px solid #F1E6F7; }
.ed-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ed-price { white-space: nowrap; font-weight: 800; }
.ed-price input, .ed-bonus input {
  width: 64px;
  padding: 6px 8px;
  border: 2px solid #FFD0B5;
  border-radius: 10px;
  font: inherit;
  text-align: right;
}
.ed-photos { margin-top: 8px; padding: 10px 12px; font-size: 15px; }
.ed-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.ed-days button {
  padding: 7px 0;
  border: 0;
  border-radius: 10px;
  background: #F3EEF8;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.ed-days button.on { background: var(--purple); color: #fff; }
.ed-bonus { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0; font-weight: 800; }
.ed-bonus input { margin-left: auto; }
.hint.warn { color: #B23434; }

/* PIN-код */

.pin { margin: 28px auto 8px; max-width: 300px; }

.pin-dots { display: flex; justify-content: center; gap: 18px; margin-bottom: 28px; }

.pin-dots i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--purple);
  transition: background .15s;
}

.pin-dots i.on { background: var(--purple); }
.pin.wrong .pin-dots { animation: shake .4s; }
.pin.wrong .pin-dots i { border-color: #D64545; }

@keyframes shake {
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

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

.pin-pad button {
  aspect-ratio: 1.3;
  border: 0;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
}

.pin-pad button:active { transform: scale(.95); background: #F1ECFF; }

/* ---------- Конфетти ---------- */

.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }

.confetti i {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  font-style: normal;
  animation: confetti-fall linear forwards;
}

.confetti i.emoji { width: auto; height: auto; font-size: 22px; background: none; }

@keyframes confetti-fall {
  to { transform: translate(var(--drift), 105vh) rotate(var(--spin)); opacity: .9; }
}

/* ---------- Обновление ---------- */

.update-link { display: block; width: 100%; margin-top: 24px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.update-link + .settings-link { margin-top: 10px; }

.update-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  top: calc(64px + env(safe-area-inset-top));
  z-index: 30;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: var(--purple);
  color: #fff;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(140, 108, 240, .4);
  cursor: pointer;
  animation: pop .4s ease-out;
}

/* ---------- Уведомление ---------- */

.toast {
  position: fixed;
  left: 50%;
  top: calc(70px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.toast[hidden] { display: none; }

/* ---------- Большие экраны ---------- */

@media (min-width: 720px) {
  .hello h1 { font-size: 36px; }
}
