/* Кусь — дневник питания. Duolingo-подобная «пухлая» эстетика: плоский цвет, 3D-кнопки с нижней кромкой. */
:root {
  --feather: #58cc02;       /* основной зелёный */
  --feather-edge: #46a302;
  --macaw: #1cb0f6;         /* белки */
  --macaw-edge: #1899d6;
  --bee: #ffc800;           /* жиры */
  --bee-edge: #e5b400;
  --beetle: #ce82ff;        /* углеводы */
  --fox: #ff9600;           /* серия */
  --fox-edge: #e08500;
  --cardinal: #ff4b4b;      /* перебор */
  --cardinal-edge: #ea2b2b;
  --ice: #84d8ff;

  --paper: #fbfaf7;         /* фон */
  --card: #ffffff;
  --eel: #3c3c3c;           /* текст */
  --wolf: #777777;          /* вторичный */
  --hare: #afafaf;          /* третичный */
  --swan: #e5e5e5;          /* границы */
  --polar: #f2f2ef;         /* заливка полей */
  --feather-soft: #d7ffb8;
  --shadow-sheet: 0 -2px 0 rgba(0,0,0,.04);

  --r-s: 12px; --r-m: 16px; --r-l: 22px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
.dark {
  --paper: #131f24;
  --card: #18272e;
  --eel: #f1f7fb;
  --wolf: #c9d6de;
  --hare: #93a8b3;
  --swan: #37464f;
  --polar: #202f36;
  --feather-soft: #2b4214;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--paper); color: var(--eel); }
body {
  font-family: "Nunito", system-ui, sans-serif; font-weight: 700; font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--wolf); }
.faint { color: var(--hare); }
.hidden { display: none !important; }

#app { min-height: 100vh; padding-bottom: calc(76px + var(--safe-b)); }
#view { padding: 0 16px 24px; max-width: 560px; margin: 0 auto; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--paper);
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; max-width: 560px; margin: 0 auto;
  border-bottom: 2px solid var(--swan);
}
.stat-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 10px;
  font-weight: 900; font-size: 16px; background: none; border: 0;
}
.stat-pill:active { background: var(--polar); }
.stat-pill.fire { color: var(--fox); }
.stat-pill.fire.off { color: var(--hare); filter: grayscale(1); }
.stat-pill.ice { color: var(--macaw); }
.stat-pill.coin { color: var(--bee-edge); }
.topbar .spacer { flex: 1; }
.lvl-chip {
  font-weight: 900; font-size: 13px; padding: 4px 10px; border-radius: 999px;
  background: var(--feather-soft); color: var(--feather-edge);
}

/* ---------------- tab bar ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card);
  border-top: 2px solid var(--swan); display: flex; justify-content: space-around;
  padding: 6px 8px calc(6px + var(--safe-b));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none;
  border: 2px solid transparent; border-radius: var(--r-s); padding: 4px 0; font-size: 11px; color: var(--hare);
  font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
}
.tab-ico { font-size: 22px; line-height: 1; filter: grayscale(1) opacity(.7); transition: transform 160ms var(--ease-out); }
.tab.is-active { color: var(--macaw); border-color: var(--ice); background: rgba(28,176,246,.08); }
.tab.is-active .tab-ico { filter: none; transform: translateY(-1px); }

/* ---------------- cards ---------------- */
.card {
  background: var(--card); border: 2px solid var(--swan); border-radius: var(--r-l);
  padding: 16px; margin-top: 16px;
}
.card-title { font-size: 17px; font-weight: 900; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card-title .aside { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--hare); }
.section-label {
  font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--hare);
  margin: 24px 4px 8px;
}

/* ---------------- 3D buttons ---------------- */
.btn {
  --bg: var(--feather); --edge: var(--feather-edge); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-m); border: 0;
  background: var(--bg); color: var(--fg); box-shadow: 0 4px 0 var(--edge);
  font-weight: 900; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  transition: transform 100ms var(--ease-out), box-shadow 100ms var(--ease-out);
  margin-bottom: 4px;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn:disabled { --bg: var(--swan); --edge: var(--swan); --fg: var(--hare); transform: none; cursor: default; }
.btn:focus-visible, .ghost:focus-visible, .chip:focus-visible { outline: 3px solid var(--ice); outline-offset: 2px; }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 17px; border-radius: 18px; }
.btn.blue { --bg: var(--macaw); --edge: var(--macaw-edge); }
.btn.orange { --bg: var(--fox); --edge: var(--fox-edge); }
.btn.red { --bg: var(--cardinal); --edge: var(--cardinal-edge); }
.btn.white { --bg: var(--card); --edge: var(--swan); --fg: var(--macaw); border: 2px solid var(--swan); }
.btn.white.danger { --fg: var(--cardinal); }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px;
  background: var(--card); border: 2px solid var(--swan); border-bottom-width: 4px; border-radius: var(--r-m);
  font-weight: 900; font-size: 14px; color: var(--wolf);
  transition: transform 100ms var(--ease-out);
}
.ghost:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row > * { flex: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  border: 2px solid var(--swan); background: var(--card); font-weight: 800; font-size: 13px; color: var(--wolf);
  white-space: nowrap;
}
.chip:active { transform: scale(.97); }
.chip.on { border-color: var(--macaw); color: var(--macaw); background: rgba(28,176,246,.08); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
.chips.scroll::-webkit-scrollbar { display: none; }

/* ---------------- home ---------------- */
.daynav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.daynav .ghost { min-height: 36px; width: 44px; padding: 0; }
.daynav .ghost:disabled { opacity: .35; }
.daynav-title { font-size: 20px; font-weight: 900; }

.mascot-row { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; }
.mascot { width: 76px; height: 70px; flex: none; }
.mascot svg { width: 100%; height: 100%; display: block; }
.idle { animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 50% { transform: scaleY(1.035) translateY(-1px); } }
.bubble {
  position: relative; flex: 1; background: var(--card); border: 2px solid var(--swan); border-radius: var(--r-m);
  padding: 10px 14px; font-size: 14px; margin-bottom: 16px; text-wrap: pretty;
}
.bubble::before {
  content: ""; position: absolute; left: -9px; bottom: 14px; width: 14px; height: 14px; background: var(--card);
  border-left: 2px solid var(--swan); border-bottom: 2px solid var(--swan); transform: rotate(45deg);
}

.hero { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.ring { position: relative; width: 144px; height: 144px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.ring .track { stroke: var(--polar); }
.ring .val { transition: stroke-dashoffset 700ms var(--ease-out), stroke 300ms; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-big { font-size: 32px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.ring-sub { font-size: 12px; font-weight: 800; color: var(--hare); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.ring-of { font-size: 12px; color: var(--wolf); margin-top: 2px; }

.macros { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.macro-top { display: flex; justify-content: space-between; font-size: 13px; }
.macro-top b { font-weight: 900; }
.bar { height: 12px; border-radius: 999px; background: var(--polar); overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; border-radius: 999px; width: 0; transition: width 700ms var(--ease-out); position: relative; }
.bar > i::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.bar.p > i { background: var(--macaw); }
.bar.f > i { background: var(--bee); }
.bar.c > i { background: var(--beetle); }
.bar.over > i { background: var(--cardinal); }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.actions .btn.big { grid-column: 1 / -1; }

.recent { margin-top: 12px; }

.quest { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.quest + .quest { border-top: 2px solid var(--polar); }
.quest-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--polar); flex: none; }
.quest.done .quest-ico { background: var(--feather-soft); }
.quest-name { flex: 1; font-size: 14px; }
.quest.done .quest-name { color: var(--hare); text-decoration: line-through; text-decoration-thickness: 2px; }
.quest-xp { font-weight: 900; color: var(--bee-edge); font-size: 13px; }
.quest.done .quest-xp { color: var(--feather); }

.mgroup-head { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 4px 8px; }
.mgroup-head h3 { margin: 0; font-size: 17px; font-weight: 900; }
.mgroup-head span { font-size: 14px; color: var(--wolf); }
.meal {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 2px solid var(--swan); border-bottom-width: 4px; border-radius: var(--r-m);
  padding: 10px; margin-bottom: 8px; transition: transform 100ms var(--ease-out);
}
.meal:active { transform: translateY(2px); }
.thumb { width: 52px; height: 52px; border-radius: 12px; flex: none; background: var(--polar) center/cover; display: grid; place-items: center; font-size: 24px; outline: 1px solid rgba(0,0,0,.06); outline-offset: -1px; }
.meal-main { flex: 1; min-width: 0; }
.meal-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal-meta { font-size: 12px; color: var(--wolf); margin-top: 2px; }
.meal-kcal { font-weight: 900; font-size: 17px; text-align: right; }
.meal-kcal small { display: block; font-size: 11px; color: var(--hare); font-weight: 800; }
.meal-add {
  width: 100%; border: 2px dashed var(--swan); background: none; border-radius: var(--r-m); padding: 12px;
  color: var(--hare); font-weight: 800; margin-bottom: 8px;
}
.meal-add:active { background: var(--polar); }

/* ---------------- sheets ---------------- */
.backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4); opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; overflow-y: auto;
  background: var(--paper); border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform 280ms var(--ease-out); max-width: 560px; margin: 0 auto;
  overscroll-behavior: contain;
}
.sheet.show { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--swan); margin: 4px auto 12px; }
.sheet h2 { font-size: 22px; font-weight: 900; margin: 4px 0 12px; line-height: 1.2; text-wrap: balance; }
.sheet-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-l); display: block; background: var(--polar); outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }

.title-input {
  width: 100%; border: 0; background: none; font-size: 22px; font-weight: 900; padding: 4px 0; margin: 12px 0 4px;
  border-bottom: 2px dashed transparent; border-radius: 0;
}
.title-input:focus { outline: none; border-bottom-color: var(--swan); }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 4px; }
.seg button {
  border: 2px solid var(--swan); border-bottom-width: 4px; border-radius: 12px; background: var(--card);
  padding: 6px 0 4px; font-size: 11px; font-weight: 800; color: var(--wolf); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.seg button span { font-size: 18px; }
.seg button.on { border-color: var(--macaw); color: var(--macaw); background: rgba(28,176,246,.08); }

.totals { display: flex; align-items: flex-end; gap: 14px; margin: 16px 0 8px; }
.totals-kcal { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.totals-kcal small { font-size: 16px; color: var(--wolf); margin-left: 4px; letter-spacing: 0; }
.mchips { display: flex; gap: 6px; margin-bottom: 4px; }
.mchip { font-size: 13px; font-weight: 900; padding: 3px 8px; border-radius: 8px; }
.mchip.p { color: var(--macaw-edge); background: rgba(28,176,246,.12); }
.mchip.f { color: #b88a00; background: rgba(255,200,0,.18); }
.mchip.c { color: #a45fd6; background: rgba(206,130,255,.16); }
.dark .mchip.f { color: var(--bee); }
.dark .mchip.c { color: var(--beetle); }
.conf { font-size: 13px; color: var(--wolf); margin-top: 6px; }

.note {
  display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-m); padding: 12px; margin: 12px 0;
  background: rgba(28,176,246,.08); border: 2px solid rgba(28,176,246,.25); font-size: 14px;
}
.note.q { background: rgba(255,150,0,.08); border-color: rgba(255,150,0,.3); }
.note .ico { font-size: 20px; line-height: 1.2; }

.items { margin-top: 8px; }
.item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 2px solid var(--polar); }
.item:first-child { border-top: 0; }
.item-name { flex: 1; min-width: 0; font-size: 14px; }
.item-name small { display: block; color: var(--wolf); font-size: 12px; font-weight: 700; }
.stepper { display: flex; align-items: center; background: var(--polar); border-radius: 12px; }
.stepper button { width: 34px; height: 34px; border: 0; background: none; font-size: 18px; font-weight: 900; color: var(--macaw); border-radius: 12px; }
.stepper button:active { background: var(--swan); }
.stepper input { width: 50px; text-align: center; border: 0; background: none; font-weight: 900; font-size: 14px; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper input:focus { outline: none; }
.item-kcal { width: 52px; text-align: right; font-weight: 900; font-size: 14px; }
.item-del { width: 28px; height: 28px; border: 0; background: none; color: var(--hare); font-size: 16px; border-radius: 8px; }

.field {
  width: 100%; border: 2px solid var(--swan); background: var(--polar); border-radius: var(--r-m);
  padding: 12px 14px; font-weight: 700; font-size: 15px; resize: none;
}
.field:focus { outline: none; border-color: var(--macaw); background: var(--card); }
.field-label { font-size: 13px; font-weight: 900; color: var(--wolf); margin: 16px 2px 6px; display: block; }
.ask { display: flex; gap: 8px; margin-top: 8px; }
.ask .field { flex: 1; }
.ask .btn { min-height: 48px; padding: 0 14px; }

.previews { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.previews img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r-m); flex: none; }
.previews img:only-child { width: 100%; height: auto; aspect-ratio: 4/3; }

/* ---------------- loader ---------------- */
.loader {
  position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px; text-align: center;
}
.loader .mascot { width: 150px; height: 138px; }
.loader .mascot svg { animation: sniff 1.1s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes sniff { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-3px); } }
.loader-text { font-size: 20px; font-weight: 900; margin-top: 16px; min-height: 56px; text-wrap: balance; }
.loader-bar { width: 220px; height: 16px; border-radius: 999px; background: var(--polar); overflow: hidden; margin-top: 8px; }
.loader-bar i { display: block; height: 100%; width: 5%; background: var(--feather); border-radius: 999px; transition: width 800ms linear; }

/* ---------------- celebration ---------------- */
.celebrate {
  position: fixed; inset: 0; z-index: 70; background: var(--paper); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 24px calc(24px + var(--safe-b)); text-align: center; overflow: hidden;
}
.celebrate .big-emoji { font-size: 96px; line-height: 1; animation: pop 500ms var(--ease-out) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.celebrate h2 { font-size: 28px; font-weight: 900; margin: 20px 0 6px; color: var(--fox); }
.celebrate p { color: var(--wolf); margin: 0 0 8px; font-size: 16px; }
.celebrate .list { margin: 12px 0 28px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.celebrate .list span { font-weight: 800; }
.celebrate .btn { width: 100%; max-width: 360px; }
.confetti { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------------- toast ---------------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(86px + var(--safe-b)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; background: var(--eel); color: var(--paper); padding: 10px 16px; border-radius: 14px; font-weight: 800;
  font-size: 14px; max-width: calc(100% - 32px); display: flex; gap: 12px; align-items: center;
  animation: toast-in 220ms var(--ease-out) both;
}
.toast.xp { background: var(--bee); color: #5c4400; }
.toast button { background: none; border: 0; color: var(--ice); font-weight: 900; text-transform: uppercase; font-size: 13px; padding: 4px; }
@keyframes toast-in { from { transform: translateY(12px) scale(.96); opacity: 0; } }

/* ---------------- stats ---------------- */
.seg2 { display: inline-flex; background: var(--polar); border-radius: 12px; padding: 3px; }
.seg2 button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--wolf); }
.seg2 button.on { background: var(--card); color: var(--eel); box-shadow: 0 1px 0 var(--swan); }
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: inherit; font-weight: 800; fill: var(--hare); font-size: 10px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kpi { background: var(--polar); border-radius: 14px; padding: 10px; }
.kpi b { display: block; font-size: 20px; font-weight: 900; }
.kpi span { font-size: 12px; color: var(--wolf); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .wd { font-size: 11px; color: var(--hare); text-align: center; font-weight: 900; }
.cal .d { aspect-ratio: 1; border-radius: 10px; background: var(--polar); display: grid; place-items: center; font-size: 12px; color: var(--hare); font-weight: 800; }
.cal .d.logged { background: var(--fox); color: #fff; }
.cal .d.norm { background: var(--feather); color: #fff; }
.cal .d.today { outline: 3px solid var(--macaw); outline-offset: 1px; }
.cal .d.future { opacity: .35; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--wolf); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.weight-now { display: flex; align-items: baseline; gap: 8px; }
.weight-now b { font-size: 32px; font-weight: 900; }
.delta { font-weight: 900; font-size: 14px; }
.delta.down { color: var(--feather); } .delta.up { color: var(--fox); }

/* ---------------- duel ---------------- */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.vs-name { font-weight: 900; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-xp { font-size: 26px; font-weight: 900; }
.vs-mid { font-size: 22px; font-weight: 900; color: var(--cardinal); }
.avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #fff; position: relative; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.avatar .crown { position: absolute; top: -18px; font-size: 24px; }
.tug { height: 18px; border-radius: 999px; overflow: hidden; display: flex; margin: 18px 0 6px; background: var(--polar); }
.tug i { display: block; height: 100%; transition: width 700ms var(--ease-out); }
.cmp { width: 100%; border-collapse: collapse; margin-top: 8px; }
.cmp td { padding: 10px 4px; border-top: 2px solid var(--polar); font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; }
.cmp td.lbl { color: var(--wolf); font-weight: 800; font-size: 13px; }
.cmp td.win { color: var(--feather); }

/* ---------------- profile ---------------- */
.me-head { display: flex; gap: 14px; align-items: center; }
.me-head .avatar { width: 64px; height: 64px; margin: 0; font-size: 26px; }
.me-name { font-size: 22px; font-weight: 900; }
.xpbar { height: 16px; border-radius: 999px; background: var(--polar); overflow: hidden; margin-top: 10px; }
.xpbar i { display: block; height: 100%; background: var(--bee); border-radius: 999px; }
.path { display: flex; gap: 10px; overflow-x: auto; padding: 16px 16px 8px; margin: 0 -16px; scrollbar-width: none; }
.path::-webkit-scrollbar { display: none; }
.node { flex: none; width: 76px; text-align: center; font-size: 11px; color: var(--hare); font-weight: 800; }
.node i { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%; font-size: 24px; font-style: normal; background: var(--polar); box-shadow: 0 4px 0 var(--swan); filter: grayscale(1); opacity: .6; }
.node.done i { background: var(--bee); box-shadow: 0 4px 0 var(--bee-edge); filter: none; opacity: 1; }
.node.cur i { background: var(--feather); box-shadow: 0 4px 0 var(--feather-edge); filter: none; opacity: 1; outline: 4px solid var(--feather-soft); }
.node.cur { color: var(--eel); }
.achs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach { text-align: center; padding: 10px 4px; border-radius: var(--r-m); background: var(--polar); border: 0; }
.ach i { font-style: normal; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 6px; font-size: 26px; background: var(--card); }
.ach b { display: block; font-size: 12px; font-weight: 900; line-height: 1.2; }
.ach.locked i { filter: grayscale(1); opacity: .35; }
.ach.locked b { color: var(--hare); }
.mem { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 2px solid var(--polar); font-size: 14px; }
.mem:first-child { border-top: 0; }
.mem span { flex: 1; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 2px solid var(--polar); }
.row:first-child { border-top: 0; padding-top: 0; }
.row .lbl { flex: 1; }
.row .lbl small { display: block; color: var(--hare); font-size: 12px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--swan); border-radius: 999px; transition: background-color 160ms var(--ease-out); }
.switch i::after { content: ""; position: absolute; width: 24px; height: 24px; top: 4px; left: 4px; background: #fff; border-radius: 50%; transition: transform 160ms var(--ease-out); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.switch input:checked + i { background: var(--feather); }
.switch input:checked + i::after { transform: translateX(20px); }
.norm-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 8px; }
.norm-grid label { font-size: 12px; color: var(--wolf); font-weight: 900; }
.norm-grid .field { padding: 10px; text-align: center; font-weight: 900; }
.select { appearance: none; background: var(--polar); border: 2px solid var(--swan); border-radius: 12px; padding: 8px 12px; font-weight: 800; }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt { text-align: left; padding: 14px; border-radius: var(--r-m); border: 2px solid var(--swan); border-bottom-width: 4px; background: var(--card); font-weight: 800; }
.opt.on { border-color: var(--macaw); background: rgba(28,176,246,.08); color: var(--macaw); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.skeleton { background: var(--polar); border-radius: var(--r-l); height: 160px; margin-top: 16px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.empty { text-align: center; padding: 20px 8px; color: var(--wolf); }
.empty .mascot { margin: 0 auto 8px; }
.fade-in { animation: fade 220ms var(--ease-out) both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

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