:root {
  --bg1: #f7fbf6; --bg2: #e6f4e4; --surface: rgba(255,255,255,.82); --surface2: #eef7ec;
  --text: #1d3b25; --muted: #5f7d66; --accent: #3fa45b; --accent2: #8fd19e; --soft: #dff1e2;
  --border: rgba(63,164,91,.16); --shadow: rgba(40,110,60,.12); --onAccent: #fff;
  --good: #2fb36b; --bad: #ef5d6c; --warn: #f2a33a;
  --r-xl: 32px; --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
[data-mode="dark"] { --good: #4ade80; --bad: #fb7185; --warn: #fbbf24; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg1), var(--bg2)) fixed;
  transition: background .8s var(--ease), color .5s;
  -webkit-font-smoothing: antialiased;
}
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--accent); }

/* ---------- Каркас ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; font-weight: 900; font-size: 21px; letter-spacing: -.3px; }
.logo-ico {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); box-shadow: 0 8px 18px -8px var(--accent);
}
.logo-ico svg { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.logo b { color: var(--accent); }
.nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 999px; font-weight: 700; color: var(--muted);
  transition: background .3s var(--ease), color .3s, transform .3s var(--spring);
}
.nav-btn .ico { font-size: 20px; width: 26px; text-align: center; transition: transform .4s var(--spring); }
.nav-btn:hover { background: var(--soft); color: var(--text); }
.nav-btn:hover .ico { transform: scale(1.2) rotate(-8deg); }
.nav-btn.active { background: var(--accent); color: var(--onAccent); box-shadow: 0 8px 22px -8px var(--accent); }
.nav-btn .badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.side .spacer { flex: 1; }
.points-pill {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); font-weight: 800; box-shadow: 0 10px 30px -14px var(--shadow);
}
.points-pill .gem { font-size: 20px; display: inline-block; animation: float 3s ease-in-out infinite; }
.points-pill.bump { animation: bump .6s var(--spring); }

main { padding: 28px 32px 120px; max-width: 1080px; width: 100%; min-width: 0; }
body { overflow-x: hidden; }
.view { animation: viewIn .55s var(--ease) both; }

/* ---------- Типографика ---------- */
h1 { font-size: 30px; margin: 0 0 6px; font-weight: 900; letter-spacing: -.5px; }
h2 { font-size: 21px; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 17px; margin: 0 0 8px; font-weight: 800; }
.sub { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Карточки ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 22px; box-shadow: 0 18px 40px -24px var(--shadow);
  overflow: hidden;
}
.stagger > * { animation: popIn .6s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; }

.blob {
  position: absolute; width: 180px; height: 180px; right: -50px; top: -60px; background: var(--accent2); opacity: .22;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: morph 9s ease-in-out infinite; pointer-events: none;
}
.blob.b2 { left: -60px; bottom: -80px; right: auto; top: auto; background: var(--accent); opacity: .12; animation-duration: 12s; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font-weight: 800; background: var(--accent); color: var(--onAccent); box-shadow: 0 10px 24px -10px var(--accent);
  transition: transform .35s var(--spring), box-shadow .3s, filter .3s; position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.05); }
.btn:active { transform: scale(.96); }
.btn.ghost { background: var(--soft); color: var(--text); box-shadow: none; }
.btn.line { background: transparent; color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }
.btn.danger { background: var(--bad); color: #fff; box-shadow: none; }
.btn.sm { padding: 8px 15px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); animation: ripple .6s ease-out; pointer-events: none; }

/* ---------- Сегодня ---------- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.ring { width: 130px; height: 130px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bgc { stroke: var(--soft); }
.ring .fgc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 26px; line-height: 1; }
.ring .lbl small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.stat { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface2); }
.stat b { display: block; font-size: 26px; font-weight: 900; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.task {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface2);
  transition: transform .35s var(--spring), background .3s; cursor: pointer; text-align: left; width: 100%;
}
.task:hover { transform: translateX(6px); background: var(--soft); }
.task .dot { width: 44px; height: 44px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 21px; background: var(--surface); }
.task .t { flex: 1; min-width: 0; }
.task .t b { display: block; font-weight: 800; }
.task .t span { color: var(--muted); font-size: 13px; }
.task.overdue .dot { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--soft); color: var(--text); }
.chip.good { background: color-mix(in srgb, var(--good) 20%, transparent); }
.chip.bad { background: color-mix(in srgb, var(--bad) 20%, transparent); }
.chip.ai { background: linear-gradient(90deg, color-mix(in srgb, var(--accent2) 30%, transparent), color-mix(in srgb, #b78cf0 28%, transparent)); }
.linkbtn { color: var(--muted); font-weight: 700; font-size: 13.5px; text-decoration: underline dotted; padding: 0; }
.linkbtn:hover { color: var(--bad); }
.chip.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty .big { font-size: 46px; display: block; animation: float 3.5s ease-in-out infinite; }

/* ---------- Темы ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.search {
  flex: 1; min-width: 200px; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  outline: none; transition: box-shadow .3s;
}
.search:focus { box-shadow: 0 0 0 4px var(--soft); }
.filters-wrap { position: relative; margin-bottom: 14px; }
.filters {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; cursor: grab; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent 100%);
}
.filters::-webkit-scrollbar { display: none; }
.filters.dragging { cursor: grabbing; scroll-snap-type: none; }
.filters.dragging button { pointer-events: none; }
.filters button { scroll-snap-align: center; }
.filters-wrap.can-l .filters { --fl: 44px; }
.filters-wrap.can-r .filters { --fr: 44px; }
.farr {
  position: absolute; top: 4px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); font-size: 22px; font-weight: 900; line-height: 1; color: var(--accent);
  box-shadow: 0 6px 16px -8px var(--shadow); opacity: 0; pointer-events: none; transform: scale(.7); transition: opacity .3s, transform .4s var(--spring);
}
.farr.l { left: -4px; } .farr.r { right: -4px; }
.filters-wrap.can-l .farr.l, .filters-wrap.can-r .farr.r { opacity: 1; pointer-events: auto; transform: none; }
.farr:hover { transform: scale(1.1) !important; }
.filters button { white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 14px; transition: all .3s var(--spring); }
.filters button.on { background: var(--accent); color: var(--onAccent); transform: scale(1.05); }
.sec-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; }
.sec-head h2 { margin: 0; }
.bar { flex: 1; height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; max-width: 220px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1s var(--ease); }
.topic {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
  text-align: left; transition: transform .4s var(--spring), box-shadow .3s; width: 100%;
}
.topic:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 18px 34px -18px var(--shadow); }
.topic .tt { font-weight: 800; line-height: 1.3; }
.topic .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.stages { display: flex; gap: 4px; }
.stages i { width: 9px; height: 9px; border-radius: 50%; background: var(--soft); transition: background .4s, transform .4s var(--spring); }
.stages i.on { background: var(--accent); transform: scale(1.15); }

/* ---------- Конспект ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); margin-bottom: 14px; padding: 8px 14px; border-radius: 999px; transition: background .3s; }
.back:hover { background: var(--soft); }
.note { margin-top: 14px; }
.note h3 { display: flex; align-items: center; gap: 10px; }
.note h3 .n { width: 30px; height: 30px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--onAccent); font-size: 14px; flex: none; }
.note ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
.note li { margin: 4px 0; }
.note li::marker { color: var(--accent); }
.note.hidden ul { display: none; }
.note.hidden { cursor: pointer; }
.note.hidden::after { content: 'Сначала вспомни сам, потом нажми, чтобы проверить'; display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.note.reveal ul { animation: popIn .5s var(--spring); }
.traps { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.traps li::marker { content: '✗  '; }
.source { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }

/* ---------- Тест ---------- */
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quiz-top .bar { max-width: none; height: 12px; }
.q-text { font-size: 19px; font-weight: 800; line-height: 1.4; margin: 6px 0 18px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface2);
  border: 2px solid transparent; font-weight: 600; transition: transform .3s var(--spring), border-color .3s, background .3s;
}
.opt:hover { transform: scale(1.015); border-color: var(--border); }
.opt .k { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface); font-weight: 800; font-size: 14px; }
.opt.sel { border-color: var(--accent); background: var(--soft); }
.opt.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 18%, var(--surface)); animation: pulse .5s var(--spring); }
.opt.no { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, var(--surface)); animation: shake .45s; }
.opt.locked { pointer-events: none; }
.explain { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--soft); line-height: 1.5; animation: popIn .45s var(--spring); }
.result-emoji { font-size: 70px; display: block; text-align: center; animation: float 3s ease-in-out infinite; }
.big-num { font-size: 54px; font-weight: 900; text-align: center; line-height: 1; }

/* ---------- План ---------- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { padding: 10px 6px; border-radius: var(--r-md); background: var(--surface2); text-align: center; font-weight: 800; transition: transform .3s var(--spring); }
.day:hover { transform: translateY(-3px); }
.day small { display: block; color: var(--muted); font-weight: 700; font-size: 11.5px; }
.day .c { font-size: 20px; margin-top: 4px; }
.day.today { background: var(--accent); color: var(--onAccent); }
.day.today small { color: inherit; opacity: .85; }
.day.has .c::after { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); margin: 3px auto 0; }
.method li { margin: 8px 0; line-height: 1.5; }
.ladder { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ladder span { padding: 8px 14px; border-radius: 999px; background: var(--soft); font-weight: 800; animation: popIn .6s var(--spring) both; animation-delay: calc(var(--i) * 90ms); }

/* ---------- Магазин ---------- */
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.th-card { padding: 0; display: flex; flex-direction: column; transition: transform .45s var(--spring); }
.th-card:hover { transform: translateY(-6px) scale(1.01); }
.th-prev { height: 130px; position: relative; overflow: hidden; display: grid; place-items: center; }
.th-prev .em { font-size: 52px; animation: float 3.2s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0,0,0,.2)); position: relative; z-index: 1; }
.th-prev i { position: absolute; border-radius: 50%; opacity: .55; animation: drift 6s ease-in-out infinite; }
.th-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.th-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }
.price { font-weight: 900; }

/* ---------- Профиль ---------- */
.field { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.field:last-child { border-bottom: 0; }
.field label { font-weight: 700; }
.field input[type="time"], .field input[type="date"], .field select { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); }
.switch { width: 54px; height: 31px; border-radius: 99px; background: var(--soft); position: relative; transition: background .3s; flex: none; }
.switch::after { content: ''; position: absolute; left: 4px; top: 4px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .4s var(--spring); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(23px); }

/* ---------- Модалки и тосты ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10,20,15,.35); backdrop-filter: blur(6px); animation: fade .3s; }
.modal { max-width: 440px; width: 100%; animation: popIn .5s var(--spring); }
.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { padding: 13px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 30px -12px var(--shadow); font-weight: 800; backdrop-filter: blur(12px); animation: toastIn .55s var(--spring); }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
.float-pts { position: fixed; z-index: 70; font-weight: 900; font-size: 22px; color: var(--accent); pointer-events: none; animation: rise 1.3s var(--ease) forwards; text-shadow: 0 2px 10px var(--surface); }
#confetti { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.theme-wipe { position: fixed; z-index: 45; border-radius: 50%; pointer-events: none; animation: wipe .9s var(--ease) forwards; }

/* ---------- Фото в конспекте ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.ph { margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface2); }
.ph img { display: block; width: 100%; height: 180px; object-fit: cover; cursor: zoom-in; transition: transform .4s var(--ease); }
.ph img:hover { transform: scale(1.04); }
.ph figcaption { padding: 8px 12px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.note.hidden .photos { display: none; }
.zoomed { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-md); }

/* ---------- Редактор конспекта ---------- */
.erow { display: flex; align-items: center; gap: 8px; }
.erow .n { width: 30px; height: 30px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--onAccent); font-weight: 800; font-size: 14px; flex: none; }
.ehead, .ecap, .etext {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface2);
  outline: none; transition: box-shadow .3s; font-size: 15px;
}
.ehead { font-weight: 800; flex: 1; min-width: 0; }
.etext { display: block; margin-top: 10px; resize: vertical; line-height: 1.55; font-family: inherit; }
.ehead:focus, .ecap:focus, .etext:focus { box-shadow: 0 0 0 4px var(--soft); }
.eicon { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--soft); font-weight: 800; transition: transform .3s var(--spring); }
.eicon:hover { transform: scale(1.1); }
.eicon:disabled { opacity: .3; pointer-events: none; }
.eicon.del:hover { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.ephotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.ephotos:empty { display: none; }
.ephoto { position: relative; display: flex; flex-direction: column; gap: 6px; }
.ephoto img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--r-sm); }
.ephoto .ecap { padding: 7px 10px; font-size: 13px; }
.ephoto .eicon { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; }

/* ---------- Профиль Telegram ---------- */
.ava {
  position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: var(--onAccent); font-size: 13px;
}
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava.lg { width: 72px; height: 72px; font-size: 30px; box-shadow: 0 0 0 4px var(--soft), 0 12px 26px -10px var(--shadow); animation: popIn .7s var(--spring); }
.me-card { display: flex; align-items: center; gap: 18px; }

/* ---------- Анимации ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0) scale(1); }
  33% { border-radius: 63% 37% 45% 55% / 55% 62% 38% 45%; transform: rotate(40deg) scale(1.08); }
  66% { border-radius: 38% 62% 35% 65% / 62% 38% 62% 38%; transform: rotate(-30deg) scale(.95); }
}
@keyframes viewIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes rise { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-80px) scale(1.4); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -14px); } }
@keyframes wipe { from { transform: scale(0); opacity: .9; } to { transform: scale(1); opacity: 0; } }

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

/* ---------- Мобильная версия ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 40; top: auto; bottom: 10px; left: 10px; right: 10px; height: auto; padding: 8px; flex-direction: row;
    justify-content: space-around; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 14px 40px -14px var(--shadow);
  }
  .side .logo, .side .spacer, .side .points-pill { display: none; }
  .nav-btn { flex-direction: column; gap: 2px; padding: 8px 10px; font-size: 11px; }
  .nav-btn .badge { position: absolute; margin: 0 0 0 22px; font-size: 10px; padding: 0 6px; }
  .nav-btn { position: relative; }
  main { padding: 18px 16px 120px; }
  .toasts { left: 16px; right: 16px; bottom: 100px; align-items: center; }
  .mobile-top { display: flex !important; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .days { gap: 5px; } .day { padding: 8px 2px; }
  h1 { font-size: 25px; }
}
.mobile-top { display: none; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mobile-top .logo { display: flex; padding: 0; font-size: 18px; }
.mobile-top .logo-ico { width: 32px; height: 32px; border-radius: 11px; }
.mobile-top .points-pill { padding: 8px 14px; }
