/* Прокачка дня — дизайн-система: лёгкие розовые тона, круглые формы, игровые полоски */
/* Шрифты лежат на этом же сервере — ничего не грузится со стороны.
   Файлы обновляются скриптом tools/fetch-fonts.sh */

/* Comfortaa — cyrillic */
@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/comfortaa-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Comfortaa — latin */
@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/comfortaa-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* JetBrains Mono — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Nunito — cyrillic */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Nunito — latin */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
  --bg:#FFF6F9; --surface:#FFFFFF; --surface-2:#FDEBF1; --line:#F7DBE4;
  --text:#3F2733; --muted:#9C7B88; --faint:#C9AEB8;
  --accent:#E4699A; --accent-deep:#C94E82; --accent-ink:#FFFFFF; --accent-soft:#FCE1EB;
  --grad:linear-gradient(90deg,#F7A8C6 0%,#E4699A 60%,#D4569A 100%);
  --grad-soft:linear-gradient(135deg,#FDEBF1 0%,#FCE1EB 100%);
  --gold:#C68A2E; --gold-soft:#FBEED3;
  --mint:#4FAE8E; --mint-soft:#DFF2EA;
  --night:#8C79C6; --night-soft:#EDE8FA;
  --clay:#C2554A; --clay-soft:#F9DEDA;
  --shadow:0 1px 2px rgba(196,120,150,.10), 0 12px 28px -16px rgba(196,120,150,.45);
  --shadow-lg:0 2px 6px rgba(196,120,150,.12), 0 28px 60px -30px rgba(196,120,150,.6);
  --r:14px; --r-lg:20px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#1A1116; --surface:#241820; --surface-2:#31212B; --line:#3E2B36;
    --text:#F7E8EE; --muted:#B99DA9; --faint:#7E626F;
    --accent:#F08CB2; --accent-deep:#F5A8C6; --accent-ink:#2A0F1B; --accent-soft:#3A222C;
    --grad:linear-gradient(90deg,#F5A8C6 0%,#F08CB2 60%,#DE74A6 100%);
    --grad-soft:linear-gradient(135deg,#2C1C25 0%,#3A222C 100%);
    --gold:#E8BC63; --gold-soft:#3A2E16;
    --mint:#77C9AC; --mint-soft:#1D3129;
    --night:#B7A6EA; --night-soft:#282039;
    --clay:#E89A8E; --clay-soft:#3E2420;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 28px -16px rgba(0,0,0,.7);
    --shadow-lg:0 2px 6px rgba(0,0,0,.5), 0 28px 60px -30px rgba(0,0,0,.9);
  }
}
:root[data-theme="dark"]{
  --bg:#1A1116; --surface:#241820; --surface-2:#31212B; --line:#3E2B36;
  --text:#F7E8EE; --muted:#B99DA9; --faint:#7E626F;
  --accent:#F08CB2; --accent-deep:#F5A8C6; --accent-ink:#2A0F1B; --accent-soft:#3A222C;
  --grad:linear-gradient(90deg,#F5A8C6 0%,#F08CB2 60%,#DE74A6 100%);
  --grad-soft:linear-gradient(135deg,#2C1C25 0%,#3A222C 100%);
  --gold:#E8BC63; --gold-soft:#3A2E16;
  --mint:#77C9AC; --mint-soft:#1D3129;
  --night:#B7A6EA; --night-soft:#282039;
  --clay:#E89A8E; --clay-soft:#3E2420;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 28px -16px rgba(0,0,0,.7);
  --shadow-lg:0 2px 6px rgba(0,0,0,.5), 0 28px 60px -30px rgba(0,0,0,.9);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:"Nunito","Helvetica Neue",Arial,sans-serif; font-size:15px; line-height:1.5;
  -webkit-font-smoothing:antialiased; overflow-wrap:break-word;
}
h1,h2,h3{margin:0; text-wrap:balance; font-family:"Comfortaa","Nunito",sans-serif; font-weight:700}
p{margin:0}
a{color:var(--accent-deep)}
button,input,select,textarea{font:inherit; color:inherit}
button{cursor:pointer; background:none; border:none; padding:0; text-align:inherit}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:8px}
.mono{font-family:"JetBrains Mono",ui-monospace,monospace; font-variant-numeric:tabular-nums}
[hidden]{display:none !important}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}

/* ═════════ лендинг ═════════ */
.land{max-width:1060px; margin:0 auto; padding:0 20px 60px}
.land-nav{display:flex; align-items:center; gap:12px; padding:22px 0}
.logo{display:flex; align-items:center; gap:9px; font-family:"Comfortaa",sans-serif; font-weight:700; font-size:17px}
.logo .gem{width:22px; height:22px; background:var(--grad); clip-path:polygon(50% 0,100% 38%,50% 100%,0 38%)}
.land-nav .spacer{margin-left:auto}
.hero-land{display:grid; grid-template-columns:1.05fr .95fr; gap:44px; align-items:center; padding:34px 0 20px}
.hero-copy h1{font-size:clamp(32px,5.2vw,50px); line-height:1.08; letter-spacing:-.02em}
.hero-copy h1 em{font-style:normal; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent}
.hero-copy .lead{font-size:clamp(16px,2vw,18.5px); color:var(--muted); margin-top:16px; max-width:36em; font-weight:600}
.hero-points{display:flex; flex-wrap:wrap; gap:8px; margin-top:20px}
.hero-points span{background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:7px 14px; font-size:13.5px; font-weight:700}
.spheres{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top:48px}
.sphere{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:18px}
.sphere .si{width:40px; height:40px; border-radius:13px; background:var(--grad-soft); display:grid; place-items:center; font-size:20px}
.sphere h3{font-size:16px; margin-top:12px}
.sphere p{font-size:13.5px; color:var(--muted); margin-top:5px; font-weight:600}
.demo{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:18px; box-shadow:var(--shadow-lg)}
.demo-title{font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); font-weight:800}
.land-foot{margin-top:56px; padding-top:22px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; display:flex; gap:14px; flex-wrap:wrap}

/* карточка входа */
.auth{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:22px; box-shadow:var(--shadow-lg)}
.auth h2{font-size:20px}
.auth .sub{font-size:13.5px; color:var(--muted); margin-top:5px; font-weight:600}
.auth-tabs{display:flex; gap:4px; background:var(--surface-2); padding:4px; border-radius:12px; margin:16px 0 14px}
.auth-tabs button{flex:1; padding:9px; border-radius:9px; font-weight:700; font-size:14px; color:var(--muted)}
.auth-tabs button[aria-selected="true"]{background:var(--surface); color:var(--accent-deep); box-shadow:var(--shadow)}
.field{display:block; margin-bottom:12px}
.field span{display:block; font-size:12.5px; font-weight:700; color:var(--muted); margin-bottom:5px}
.field input{
  width:100%; background:var(--bg); border:1.5px solid var(--line); border-radius:11px;
  padding:11px 13px; font-size:16px;
}
.field textarea{
  width:100%; background:var(--bg); border:1.5px solid var(--line); border-radius:11px;
  padding:11px 13px; font-size:15px; font-family:inherit; resize:vertical; line-height:1.45;
}
.field input:focus,.field textarea:focus{outline:none; border-color:var(--accent)}
.mood{font-size:22px; line-height:1}
.note-card{padding:13px 17px; border-bottom:1px solid var(--line)}
.note-card:last-child{border-bottom:none}
.note-card .nh{display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted); font-weight:700}
.note-card p{margin-top:6px; font-size:14px; white-space:pre-wrap}
.delta{font-family:"JetBrains Mono",monospace; font-size:12px; font-weight:500}
.delta.up{color:var(--mint)} .delta.down{color:var(--clay)} .delta.same{color:var(--faint)}
.msg{font-size:13.5px; font-weight:700; padding:9px 12px; border-radius:10px; margin-bottom:12px}
.msg.err{background:var(--clay-soft); color:var(--clay)}
.msg.ok{background:var(--mint-soft); color:var(--mint)}
.hint{font-size:12.5px; color:var(--muted); margin-top:10px; font-weight:600}

/* ═════════ кнопки ═════════ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:11px 18px; border-radius:12px; background:var(--accent); color:var(--accent-ink);
  font-weight:800; font-size:15px; min-height:44px;
}
.btn:hover{filter:brightness(1.07)}
.btn:disabled{opacity:.6; cursor:default; filter:none}
.btn.wide{width:100%}
.btn.ghost{background:var(--surface-2); color:var(--text)}
.btn.ghost:hover{background:var(--accent-soft); color:var(--accent-deep); filter:none}
.btn.line{background:transparent; border:1.5px solid var(--line); color:var(--text)}
.btn.line:hover{border-color:var(--accent); color:var(--accent-deep); filter:none}
.btn.sm{padding:8px 13px; font-size:13.5px; min-height:36px; border-radius:10px}
.mini{font-size:12.5px; font-weight:800; padding:7px 12px; border-radius:10px; background:var(--surface-2); color:var(--text); min-height:34px}
.mini:hover{background:var(--accent-soft); color:var(--accent-deep)}
.mini.go{background:var(--accent); color:var(--accent-ink)}
.mini.go:hover{background:var(--accent); color:var(--accent-ink); filter:brightness(1.07)}
.icon-btn{
  width:38px; height:38px; border-radius:12px; border:1px solid var(--line); background:var(--surface);
  display:grid; place-items:center; color:var(--muted); font-size:15px; flex:0 0 auto;
}
.icon-btn:hover{color:var(--accent); border-color:var(--accent)}

/* ═════════ каркас приложения ═════════ */
.app{max-width:960px; margin:0 auto; padding:0 16px calc(88px + env(safe-area-inset-bottom))}
.top{position:sticky; top:0; z-index:30; background:var(--bg); padding:16px 0 10px}
.top-row{display:flex; align-items:center; gap:12px}
.dateline{flex:1 1 auto; min-width:0}
.dow{font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--accent); font-weight:800}
.dateline h1{font-size:clamp(20px,4vw,26px); letter-spacing:-.01em; margin-top:1px}
.sync{font-size:11px; font-weight:800; color:var(--faint); font-family:"JetBrains Mono",monospace; white-space:nowrap}
.sync.on{color:var(--mint)} .sync.wait{color:var(--gold)} .sync.off{color:var(--clay)}

.tabs{display:flex; gap:4px; margin:12px 0 16px; overflow-x:auto; padding-bottom:3px; scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{padding:9px 16px; border-radius:999px; font-size:14px; font-weight:700; color:var(--muted); white-space:nowrap; min-height:40px}
.tab:hover{color:var(--accent)}
.tab[aria-selected="true"]{background:var(--grad); color:#fff; box-shadow:var(--shadow)}
.tab .ti{display:none}

/* нижняя панель — только на телефоне */
.bottom{
  position:fixed; left:0; right:0; bottom:0; z-index:40; display:none;
  background:color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter:blur(14px); border-top:1px solid var(--line);
  padding:6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-in{display:flex; max-width:560px; margin:0 auto}
.bnav{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:6px 2px; color:var(--muted); font-size:10.5px; font-weight:800; border-radius:12px; min-height:52px;
}
.bnav i{font-style:normal; font-size:19px; line-height:1.15}
.bnav[aria-selected="true"]{color:var(--accent-deep)}
.bnav[aria-selected="true"] i{transform:translateY(-1px)}

/* ═════════ карточки ═════════ */
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r); margin-bottom:14px; overflow:hidden}
.card-head{display:flex; align-items:center; gap:10px; padding:14px 17px 12px}
.card-head + .card-body,.card-head + .list,.card-head + .grid-wrap,.card-head + .quests{border-top:1px solid var(--line)}
.card-head h2{font-size:14px; font-weight:700}
.card-head .count{margin-left:auto; font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--faint)}
.card-body{padding:15px 17px}
.empty{padding:26px 18px; color:var(--muted); font-size:14px; text-align:center; font-weight:600}
.empty b{display:block; color:var(--text); font-weight:800; margin-bottom:4px; font-size:15px}

/* ═════════ герой-уровень ═════════ */
.hero{background:var(--grad); color:#fff; padding:20px; border-radius:var(--r); margin-bottom:14px; box-shadow:var(--shadow); position:relative; overflow:hidden}
.hero::before{content:""; position:absolute; width:230px; height:230px; border-radius:50%; background:rgba(255,255,255,.13); top:-125px; right:-65px}
.hero-top{display:flex; align-items:center; gap:14px; position:relative}
.gem-big{width:34px; height:34px; flex:0 0 auto; background:rgba(255,255,255,.92); clip-path:polygon(50% 0,100% 38%,50% 100%,0 38%); animation:float 3.6s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@media (prefers-reduced-motion:reduce){.gem-big{animation:none}}
.hero-lvl{font-family:"Comfortaa",sans-serif; font-size:26px; font-weight:700; line-height:1.1}
.hero-lvl small{display:block; font-family:"Nunito",sans-serif; font-size:11.5px; font-weight:800; opacity:.86; letter-spacing:.1em; text-transform:uppercase}
.hero-xp{margin-left:auto; text-align:right; font-family:"JetBrains Mono",monospace; font-size:12.5px; opacity:.95}
.hero-track{height:9px; background:rgba(255,255,255,.28); border-radius:6px; margin-top:14px; overflow:hidden}
.hero-fill{height:100%; background:#fff; border-radius:6px; transition:width .6s cubic-bezier(.2,.8,.2,1)}
.hero-note{margin-top:10px; font-size:12.5px; opacity:.94; display:flex; gap:14px; flex-wrap:wrap; position:relative; font-weight:700}

/* ═════════ навыки ═════════ */
.skill{padding:14px 17px; border-bottom:1px solid var(--line)}
.skill:last-child{border-bottom:none}
.skill-top{display:flex; align-items:center; gap:11px}
.sicon{width:38px; height:38px; flex:0 0 auto; border-radius:12px; background:var(--accent-soft); display:grid; place-items:center; font-size:19px}
.sname{flex:1 1 auto; min-width:0}
.sname b{display:block; font-size:15px; font-weight:800}
.sname span{font-size:11.5px; color:var(--muted); font-family:"JetBrains Mono",monospace}
.slvl{font-family:"Comfortaa",sans-serif; font-weight:700; font-size:13px; color:var(--accent-deep); background:var(--accent-soft); padding:5px 11px; border-radius:999px; white-space:nowrap}
.slvl.max{color:var(--gold); background:var(--gold-soft)}
.pips{display:flex; gap:3px; margin-top:10px}
.pip{flex:1; height:9px; border-radius:3px; background:var(--surface-2); overflow:hidden}
.pip i{display:block; height:100%; background:var(--grad); border-radius:3px; transition:width .5s ease}
.srow2{display:flex; align-items:center; gap:7px; margin-top:10px; flex-wrap:wrap}
.srow2 .note{font-size:11.5px; color:var(--muted); margin-right:auto; font-weight:700}

/* ═════════ таймер ═════════ */
.timer{display:flex; align-items:center; gap:13px; padding:15px 17px; background:var(--accent-soft); flex-wrap:wrap}
.timer-name{flex:1 1 110px; font-weight:800; color:var(--accent-deep)}
.timer-name small{display:block; font-weight:700; font-size:11.5px; color:var(--muted)}
.timer-clock{font-family:"JetBrains Mono",monospace; font-size:27px; font-weight:500; color:var(--accent-deep)}
.pulse{width:8px; height:8px; border-radius:50%; background:var(--accent); animation:pulse 2s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.2}}
@media (prefers-reduced-motion:reduce){.pulse{animation:none}}

/* ═════════ списки ═════════ */
.list{display:flex; flex-direction:column}
.row{display:flex; align-items:center; gap:11px; padding:12px 17px; border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:none}
.row:hover .del{opacity:1}
.check{width:22px; height:22px; flex:0 0 auto; border-radius:7px; border:2px solid var(--faint); display:grid; place-items:center; transition:background .14s, border-color .14s, transform .14s}
.check svg{opacity:0; stroke:#fff; stroke-width:2.8; fill:none; stroke-linecap:round; stroke-linejoin:round}
.check[aria-checked="true"]{background:var(--accent); border-color:var(--accent); transform:scale(1.05)}
.check[aria-checked="true"] svg{opacity:1}
.check:hover{border-color:var(--accent)}
.label{flex:1 1 auto; min-width:0}
.label[contenteditable]:focus{outline:none; box-shadow:inset 0 -1.5px 0 var(--accent)}
.row.done .label{color:var(--faint); text-decoration:line-through}
.chip{font-size:11px; padding:3px 8px; border-radius:7px; background:var(--surface-2); color:var(--muted); font-weight:800; white-space:nowrap; flex:0 0 auto}
.chip.past{background:var(--clay-soft); color:var(--clay)}
.chip.now{background:var(--accent-soft); color:var(--accent-deep)}
.chip.star{background:var(--gold-soft); color:var(--gold)}
.chip.mint{background:var(--mint-soft); color:var(--mint)}
.chip.night{background:var(--night-soft); color:var(--night)}
.del{opacity:0; color:var(--faint); font-size:20px; line-height:1; padding:2px 7px; border-radius:8px; flex:0 0 auto; transition:opacity .12s; min-height:30px}
.del:hover{color:var(--clay); background:var(--surface-2)}
@media (hover:none){.del{opacity:.55}}

/* ═════════ формы ═════════ */
.add{display:flex; gap:8px; padding:13px 17px; flex-wrap:wrap; border-bottom:1px solid var(--line)}
.add:last-child{border-bottom:none}
.add input,.add select{background:var(--bg); border:1.5px solid var(--line); border-radius:11px; padding:10px 12px; font-size:15px; min-width:0; min-height:42px}
.add input[type="text"]{flex:1 1 180px}
.add input:focus,.add select:focus{outline:none; border-color:var(--accent)}
.add label.inline{display:flex; align-items:center; gap:7px; font-size:13.5px; font-weight:700; color:var(--muted); padding:0 4px}
.add input[type="checkbox"]{width:18px; height:18px; min-height:18px; accent-color:var(--accent)}
.seg{display:flex; gap:3px; margin-left:auto; flex-wrap:wrap}
.seg button{font-size:12.5px; padding:6px 11px; border-radius:9px; color:var(--muted); font-weight:800; min-height:34px}
.seg button[aria-pressed="true"]{background:var(--accent-soft); color:var(--accent-deep)}

/* ═════════ задания дня ═════════ */
.quests{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:10px; padding:14px 17px}
.quest{border:1.5px solid var(--line); border-radius:12px; padding:12px 13px; background:var(--bg)}
.quest.done{border-color:var(--mint); background:var(--mint-soft)}
.q-top{display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:700}
.q-xp{margin-left:auto; font-size:11px; font-weight:800; color:var(--gold); background:var(--gold-soft); padding:2px 7px; border-radius:6px}
.quest.done .q-xp{color:var(--mint); background:transparent}
.q-track{height:6px; background:var(--surface-2); border-radius:4px; margin-top:9px; overflow:hidden}
.q-fill{height:100%; background:var(--grad); border-radius:4px; transition:width .4s ease}
.quest.done .q-fill{background:var(--mint)}
.q-num{font-family:"JetBrains Mono",monospace; font-size:11px; color:var(--muted); margin-top:5px; display:block}

/* ═════════ сон ═════════ */
.sleep-now{display:flex; gap:10px; padding:15px 17px; flex-wrap:wrap; align-items:center; background:var(--night-soft)}
.sleep-now .big{font-family:"Comfortaa",sans-serif; font-size:26px; font-weight:700; color:var(--night); line-height:1.1}
.sleep-now .big small{display:block; font-family:"Nunito",sans-serif; font-size:11.5px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.1em}
.sleep-now .spacer{margin-left:auto}
.sleep-bars{display:flex; align-items:flex-end; gap:6px; height:118px; padding:16px 17px 0}
.sb-col{flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:5px; height:100%}
.sb{width:100%; max-width:34px; border-radius:6px; background:var(--night); min-height:4px; opacity:.9}
.sb.short{background:var(--clay)} .sb.good{background:var(--mint)} .sb.none{background:var(--surface-2)}
.sb-val{font-family:"JetBrains Mono",monospace; font-size:10.5px; color:var(--muted); height:14px}
.sleep-legend{display:flex; gap:14px; padding:10px 17px 15px; font-size:11.5px; color:var(--muted); font-weight:700; flex-wrap:wrap}
.sleep-legend i{display:inline-block; width:9px; height:9px; border-radius:3px; margin-right:5px}

/* ═════════ дом ═════════ */
.chore{display:flex; align-items:center; gap:12px; padding:13px 17px; border-bottom:1px solid var(--line)}
.chore:last-child{border-bottom:none}
.chore:hover .del{opacity:1}
.chore-ic{width:38px; height:38px; border-radius:12px; display:grid; place-items:center; font-size:19px; background:var(--surface-2); flex:0 0 auto}
.chore.due .chore-ic{background:var(--clay-soft)}
.chore.soon .chore-ic{background:var(--gold-soft)}
.chore.ok .chore-ic{background:var(--mint-soft)}
.chore-txt{flex:1 1 auto; min-width:0}
.chore-txt b{display:block; font-size:15px; font-weight:800}
.chore-txt span{font-size:12px; color:var(--muted); font-weight:700}
.chore.due .chore-txt span{color:var(--clay)}

/* ═════════ деньги ═════════ */
.money-top{display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:1px; background:var(--line)}
.mt{background:var(--surface); padding:15px 16px}
.mt b{display:block; font-family:"Comfortaa",sans-serif; font-size:21px; font-weight:700; line-height:1.2}
.mt span{font-size:12px; color:var(--muted); font-weight:700}
.mt.in b{color:var(--mint)} .mt.out b{color:var(--clay)}
.tx{display:flex; align-items:center; gap:11px; padding:11px 17px; border-bottom:1px solid var(--line)}
.tx:last-child{border-bottom:none}
.tx:hover .del{opacity:1}
.tx-cat{flex:1 1 auto; min-width:0}
.tx-cat b{display:block; font-size:14.5px; font-weight:700}
.tx-cat span{font-size:11.5px; color:var(--muted); font-weight:700}
.tx-sum{font-family:"JetBrains Mono",monospace; font-weight:500; font-size:14.5px; white-space:nowrap}
.tx-sum.in{color:var(--mint)} .tx-sum.out{color:var(--text)}
.goal{padding:15px 17px}
.goal-top{display:flex; align-items:baseline; gap:9px; font-size:14.5px; font-weight:800}
.goal-top span{margin-left:auto; font-family:"JetBrains Mono",monospace; font-size:12.5px; color:var(--muted); font-weight:500}

/* ═════════ общие полоски и графики ═════════ */
.track{height:8px; background:var(--surface-2); border-radius:5px; overflow:hidden}
.fill{height:100%; background:var(--grad); border-radius:5px; transition:width .45s ease}
.fill.mint{background:var(--mint)} .fill.clay{background:var(--clay)} .fill.night{background:var(--night)}
.summary{display:grid; grid-template-columns:repeat(auto-fit,minmax(122px,1fr)); gap:1px; background:var(--line)}
.sum{background:var(--surface); padding:15px 16px}
.sum b{display:block; font-family:"Comfortaa",sans-serif; font-size:22px; font-weight:700; line-height:1.2}
.sum span{font-size:12px; color:var(--muted); font-weight:700}
.bars{display:flex; align-items:flex-end; gap:7px; height:120px; padding:16px 17px 0}
.bar-col{flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:5px; height:100%}
.bar{width:100%; max-width:42px; background:var(--grad); border-radius:6px 6px 3px 3px; min-height:4px}
.bar.muted{background:var(--surface-2)}
.bar-val{font-family:"JetBrains Mono",monospace; font-size:10.5px; color:var(--muted); height:14px}
.bar-lab{font-size:11px; color:var(--faint); padding:8px 17px 16px; display:flex; gap:7px; font-weight:800}
.bar-lab span{flex:1; text-align:center}
.bar-lab span.now{color:var(--accent)}
.hbars{padding:15px 17px; display:flex; flex-direction:column; gap:12px}
.hbar-top{display:flex; align-items:baseline; gap:8px; font-size:13.5px; font-weight:700}
.hbar-top b{margin-left:auto; font-family:"JetBrains Mono",monospace; font-weight:500; font-size:12px; color:var(--muted)}

/* сетка привычек */
.grid-wrap{overflow-x:auto; padding:8px 17px 16px; -webkit-overflow-scrolling:touch}
.hgrid{border-collapse:separate; border-spacing:0; width:100%; min-width:380px}
.hgrid th{font-size:10px; font-weight:800; color:var(--faint); text-transform:uppercase; padding:0 0 8px; text-align:center; width:28px}
.hgrid th.tc{color:var(--accent)}
.hgrid th:first-child{text-align:left; width:auto}
.hgrid td{padding:3px 0; vertical-align:middle}
.hgrid td:first-child{padding-right:12px; min-width:130px}
.hname{display:flex; align-items:center; gap:7px}
.dot{width:23px; height:23px; margin:0 auto; border-radius:7px; display:block; background:var(--surface-2)}
.dot:hover{box-shadow:inset 0 0 0 2px var(--accent)}
.dot.on{background:var(--grad)}
.dot.today{box-shadow:0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent)}
.hstat{font-family:"JetBrains Mono",monospace; font-size:11.5px; color:var(--muted); text-align:right; padding-left:12px !important; white-space:nowrap}
.hstat b{color:var(--gold); font-weight:500}

/* календарь активности и достижения */
.heat{display:grid; grid-template-columns:repeat(7,1fr); gap:5px; padding:15px 17px; max-width:340px}
.hc{aspect-ratio:1; border-radius:7px; background:var(--surface-2)}
.hc[data-l="1"]{background:#FBD4E2} .hc[data-l="2"]{background:#F5A9C6} .hc[data-l="3"]{background:#E4699A}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .hc[data-l="1"]{background:#4A2735}
  :root:not([data-theme="light"]) .hc[data-l="2"]{background:#8C4467}
  :root:not([data-theme="light"]) .hc[data-l="3"]{background:#E4699A}
}
:root[data-theme="dark"] .hc[data-l="1"]{background:#4A2735}
:root[data-theme="dark"] .hc[data-l="2"]{background:#8C4467}
:root[data-theme="dark"] .hc[data-l="3"]{background:#E4699A}
.hc.today{box-shadow:0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent)}
.ach{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:9px; padding:15px 17px}
.a{border:1.5px solid var(--line); border-radius:12px; padding:12px; background:var(--bg); opacity:.5}
.a.on{opacity:1; border-color:var(--gold); background:var(--gold-soft)}
.a .ai{font-size:20px; line-height:1}
.a b{display:block; font-size:13px; font-weight:800; margin-top:6px}
.a span{display:block; font-size:11.5px; color:var(--muted); line-height:1.35; margin-top:2px; font-weight:600}

.opt{display:flex; align-items:center; gap:10px; padding:8px 2px; font-size:14px; font-weight:600; cursor:pointer}
.opt input{width:19px; height:19px; accent-color:var(--accent); flex:0 0 auto}
.opt span{flex:1 1 auto}

.days{display:flex; gap:6px; flex-wrap:wrap}
.day{
  width:44px; height:44px; border-radius:13px; border:1.5px solid var(--line); background:var(--bg);
  font-weight:800; font-size:13px; color:var(--muted); display:grid; place-items:center;
}
.day:hover{border-color:var(--accent); color:var(--accent-deep)}
.day[aria-pressed="true"]{background:var(--accent); border-color:var(--accent); color:var(--accent-ink)}
.gear{
  flex:0 0 auto; font-size:13px; color:var(--faint); padding:4px 7px; border-radius:8px; min-height:30px;
}
.gear:hover{color:var(--accent-deep); background:var(--accent-soft)}
.row.off .label,.chore.off .chore-txt b{color:var(--faint)}

/* ═════════ модалка, тост ═════════ */
dialog{border:1px solid var(--line); border-radius:var(--r-lg); background:var(--surface); color:var(--text); padding:0; max-width:540px; width:calc(100% - 28px); box-shadow:var(--shadow-lg)}
dialog::backdrop{background:rgba(63,39,51,.45)}
.dlg-head{padding:17px 19px 13px; border-bottom:1px solid var(--line)}
.dlg-head h2{font-size:17px}
.dlg-body{padding:17px 19px; display:flex; flex-direction:column; gap:13px; max-height:60vh; overflow-y:auto}
.dlg-body p{font-size:13.5px; color:var(--muted); font-weight:600}
.dlg-body textarea{width:100%; height:130px; background:var(--bg); border:1.5px solid var(--line); border-radius:11px; padding:11px; font-family:"JetBrains Mono",monospace; font-size:11.5px; resize:vertical}
.dlg-foot{display:flex; gap:8px; padding:0 19px 19px; flex-wrap:wrap}
.toast{
  position:fixed; left:50%; bottom:calc(78px + env(safe-area-inset-bottom)); transform:translateX(-50%);
  background:var(--text); color:var(--bg); padding:12px 20px; border-radius:999px; font-size:14px;
  font-weight:800; z-index:60; opacity:0; pointer-events:none; transition:opacity .25s, transform .25s;
  text-align:center; max-width:calc(100vw - 32px);
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(-6px)}
.toast.party{background:var(--grad); color:#fff; box-shadow:var(--shadow-lg)}

/* ═════════ адаптив ═════════ */
@media (max-width:860px){
  .hero-land{grid-template-columns:1fr; gap:28px; padding-top:18px}
}
@media (max-width:720px){
  .app{padding:0 12px calc(84px + env(safe-area-inset-bottom))}
  .tabs{display:none}
  .bottom{display:block}
  .quests{grid-template-columns:1fr}
  .card-head{padding:13px 15px 11px}
  .row,.chore,.tx{padding-left:15px; padding-right:15px}
  .add{padding:12px 15px}
  .skill{padding:13px 15px}
  .land{padding:0 16px 48px}
  .summary,.money-top{grid-template-columns:1fr 1fr}
  /* строка дела по дому должна помещаться в одну строку */
  .chore{gap:9px}
  .chore-ic{width:34px; height:34px; font-size:17px; border-radius:11px}
  .chore-txt b{font-size:14px}
  .chore-txt span{font-size:11px}
  .chore .mini{padding:7px 10px; font-size:12px}
  .chore .gear{padding:4px 3px}
  .chore .del{padding:2px 4px}
}
@media (max-width:400px){
  .bnav{font-size:9.5px}
  .bnav i{font-size:18px}
}
