/* Облик «Леденцы» (выбран владельцем 01.10): шрифт Unbounded для заголовков и чисел, цветные кнопки, пять вкладок с значками,
   разделы-списки. Подключается последним и перекрывает прежние правила. Правило: после любой правки смотреть ДЕНЬ и НОЧЬ и прогнать dev/contrast-audit.js */
@font-face{font-family:Disp;src:url(fonts/unbounded-latin-wght-normal.woff2) format("woff2");font-weight:200 900;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122;font-display:swap}
@font-face{font-family:Disp;src:url(fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2");font-weight:200 900;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;font-display:swap}
:root{--serif:Disp,Onest,system-ui,sans-serif}
body{--mute:#655B80;--atx:#9A4F0A}
body[data-sky=night]{--mute:#A3A9D2;--atx:#FFB547}

/* заголовки: без наклона, чуть меньше (Unbounded широкий) */
.hello,.zzw,summary,.ptitle,.sheet h2,.zp,.s-head h1,.ob-card h1,.morning h3,.plan-what,.hp-head h1,.rt-card h2,.ec-sheet h2,.bars div{font-style:normal;font-weight:500}
.ptitle{font-size:24px}.sheet h2{font-size:21px}.s-head h1{font-size:23px}.ob-card h1{font-size:24px}.hp-head h1{font-size:21px;line-height:1.15}.morning h3{font-size:17px}.plan-what{font-size:15px}.hello{font-size:15px}.rt-card h2{font-size:26px}.ec-sheet h2{font-size:22px}summary{font-size:15px}
.mid strong{font-family:var(--serif);font-size:25px;font-weight:600;letter-spacing:-.02em}
.next .v{font-family:var(--serif);font-size:23px;font-weight:600;letter-spacing:-.02em}
.nightscr .clock{font-family:var(--serif);font-weight:300}

/* шапка */
.head .gear{width:44px;height:44px}

/* ===== Сегодня: порядок «кольцо → действия → окно сна → остальное» ===== */
[data-screen=today]:not([hidden]){display:flex;flex-direction:column}
[data-screen=today]>*{order:20}
[data-screen=today]>#notif-banner{order:1}[data-screen=today]>.hello{order:2}[data-screen=today]>.dial{order:3}[data-screen=today]>.cutout{order:3}
[data-screen=today]>.acts{order:4}[data-screen=today]>.more{order:5}[data-screen=today]>.more.care{order:6}
[data-screen=today]>#morning,[data-screen=today]>#first-hint{order:7}[data-screen=today]>.card.next{order:8}
.dial{width:min(62vw,236px);margin:4px auto 2px}
[data-screen=today]>.hello{margin-top:0}
.card.next[data-why]{cursor:pointer;position:relative}.card.next[data-why]::after{content:'?';position:absolute;top:10px;right:12px;width:22px;height:22px;border-radius:50%;border:1px solid currentColor;opacity:.55;font-size:12px;line-height:20px;text-align:center}
.card.next .conf{padding-right:18px;margin-top:14px}
.card{border-radius:28px;box-shadow:0 10px 24px -16px rgba(80,50,140,.35),inset 0 1px 0 rgba(255,255,255,.7)}
body[data-sky=night] .card{box-shadow:0 10px 24px -16px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.08)}

/* тонкая полоса уведомлений вместо большой карточки */
.card.notice{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 14px;margin:2px 0 6px;border-radius:99px}
.card.notice .nb-ic{width:22px;height:22px;flex:none}.card.notice .nb-tx{flex:1;min-width:0}.card.notice .nb-tx b{font-size:13px;font-weight:600}.card.notice .nb-tx p{display:none}
.card.notice .nb-acts{display:flex;gap:6px;flex:none}.card.notice .nb-acts .primary{height:36px;padding:0 14px;font-size:13px;border-radius:99px;min-height:0}
.card.notice .nb-acts .ghost{font-size:0;width:36px;height:36px;padding:0;min-height:0;border-radius:50%}.card.notice .nb-acts .ghost::before{content:"✕";font-size:13px}

/* три главные кнопки и сетка остальных записей */
.acts{margin:10px 0 8px;gap:10px}
.acts button{border:0;border-radius:28px;min-height:84px;box-shadow:0 10px 20px -12px rgba(80,50,140,.5),inset 0 2px 0 rgba(255,255,255,.7)}
.acts button.main{background:linear-gradient(180deg,#FFC66B,#F29A3C);color:#3A2406}
.acts button:nth-child(2){background:linear-gradient(180deg,#FFE0D2,#FFBFA6);color:#5A2410}
.acts button:nth-child(3){background:linear-gradient(180deg,#D9F4E7,#A9E3C8);color:#0F4A32}
body[data-sky=night] .acts button:nth-child(2){background:linear-gradient(180deg,#7A4640,#5E322F);color:#FFE6DD}
body[data-sky=night] .acts button:nth-child(3){background:linear-gradient(180deg,#2B6E58,#1F5645);color:#DDF7EC}
.more{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 8px}
.more button{flex-direction:column;justify-content:center;gap:5px;min-height:64px;padding:8px 4px;border:0;border-radius:20px;font-size:13px;line-height:1.15;text-align:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 6px 14px -10px rgba(80,50,140,.5)}
.more svg{width:22px;height:22px}
.more button:nth-child(1){background:#FFE9C7}.more button:nth-child(2){background:#E3E0FB}.more button:nth-child(3){background:#D9F4E7}
.more.care{margin-top:0}.more.care button:nth-child(1){background:#FFD9E2;color:#8F2C45}.more.care button:nth-child(2){background:#FFF0B8}.more.care button:nth-child(3){background:#D6ECFB}
body[data-sky=night] .more button{color:var(--ink);box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}
body[data-sky=night] .more button:nth-child(1){background:#4A3B22}body[data-sky=night] .more button:nth-child(2){background:#35316B}body[data-sky=night] .more button:nth-child(3){background:#1F4A3F}
body[data-sky=night] .more.care button:nth-child(1){background:#5A2F47;color:#FFC4D3}body[data-sky=night] .more.care button:nth-child(2){background:#4D4520}body[data-sky=night] .more.care button:nth-child(3){background:#1F4560}

/* ===== нижняя панель: пять вкладок со значками ===== */
.tabbar{display:flex;gap:2px;width:min(448px,calc(100% - 20px));padding:6px;border-radius:30px;justify-content:space-between}
.tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:7px 2px;min-height:52px;border-radius:24px;font-size:11px;font-weight:600;color:#5A5073}
.tabbar button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tabbar button[aria-current=page]{background:linear-gradient(180deg,var(--acc2),var(--acc));color:var(--acc-ink)}
body[data-sky=night] .tabbar button{color:var(--mute)}body[data-sky=night] .tabbar button[aria-current=page]{color:var(--acc-ink)}
body[data-active=night] .tabbar button{color:#8D93B8}body[data-active=night] .tabbar button[aria-current=page]{background:#4A3512;color:#F0BE70}

/* ===== разделы-списки ===== */
.hhero{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:16px;margin:2px 0 4px;border-radius:26px;background:linear-gradient(135deg,rgba(255,196,107,.55),rgba(255,255,255,.55));border:1px solid rgba(242,154,60,.4);box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
body[data-sky=night] .hhero{background:linear-gradient(135deg,rgba(255,170,70,.28),rgba(38,43,94,.62));border-color:rgba(255,181,71,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.hlist{background:var(--card);border:1px solid var(--line);border-radius:26px;overflow:hidden;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 10px 24px -18px rgba(80,50,140,.4)}
.hrow{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:12px 16px;min-height:64px;border-bottom:1px solid var(--line)}.hrow:last-child{border-bottom:0}.hrow:active{background:rgba(120,100,170,.08)}
.hhero .ti,.hrow .ti{flex:none;width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:var(--tint,#EFE9FB);color:var(--tink,#7A5CC8)}
.hhero .ti{width:48px;height:48px;background:rgba(255,255,255,.7)}
.hhero .ti svg,.hrow .ti svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hhero .tt,.hrow .tt{flex:1;min-width:0}.hhero .tt b,.hrow .tt b{display:block;font-size:15.5px;font-weight:700;letter-spacing:-.01em}.hhero .tt small,.hrow .tt small{display:block;margin-top:2px;font-size:12.5px;line-height:1.35;color:var(--mute)}
.hhero .tt small{color:var(--ink);opacity:.82}
.hrow .chev{color:var(--mute);font-size:20px}
[data-tone=a]{--tint:#FFE6C7;--tink:#9A5214}[data-tone=b]{--tint:#FFDDE0;--tink:#B03A4F}[data-tone=c]{--tint:#D9F0E2;--tink:#1F7A4D}[data-tone=d]{--tint:#DCE8FF;--tink:#2F5BB0}[data-tone=e]{--tint:#F8E3D3;--tink:#9A4C16}[data-tone=f]{--tint:#E9DFFB;--tink:#5E40B0}
body[data-sky=night] .hrow[data-tone],body[data-sky=night] .hhero[data-tone]{--tint:rgba(255,255,255,.1);--tink:#FFD08A}
.hp-group{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--mute);margin:18px 4px 8px;font-weight:600}
.hp-sub{color:var(--mute)}

/* экран «Ночь»: тусклый, но читаемый (контраст не ниже 4,5) */
body[data-active=night]{--ink:#C9B58A;--mute:#8D93B8}
.nightscr .hint,.pair button{color:#8D93B8}.pair button{color:#A3A9D2}.nightscr .clock{color:#9A8250}.bigmoon small{color:#B0893F}
.gshint{font-size:12px;max-width:300px;margin:6px auto 0}

/* исправления по проверке контраста */
.lane .lb.nap{background:linear-gradient(160deg,#7C68CC,#5C48A8);color:#fff}
.lane .lb.nap.done{background:linear-gradient(160deg,#D6CEF3,#B9AEE6);color:#2B2150;opacity:1}
.plan-head button{color:var(--ink)}
.s-nsOn{color:#1F7A55}.s-nsBlocked,.s-nsNo,.s-nsIos{color:#A64F12}.s-btn.danger{color:#B8283F}
body[data-sky=night] .s-nsOn{color:#6FD3A8}body[data-sky=night] .s-nsBlocked,body[data-sky=night] .s-nsNo,body[data-sky=night] .s-nsIos{color:#FFB070}body[data-sky=night] .s-btn.danger{color:#FF8C9E}
.nightscr .hint,.gshint,.bigmoon small{opacity:1}
.bk-page small,.bk-n,.bk-foot,.bk-brand,.bk-quiet,.bk-grid span,.bk-kicker,.bk-list small{color:#655B80}
.lane .lb.nap{background:linear-gradient(160deg,#6F5BC0,#4F3C9A)}.lane .lb.nap small{opacity:1}
.bigmoon small{color:#E3BE70}
.bk-page .bk-foot,.bk-page .bk-grid span,.bk-page .bk-grid div span{color:#655B80!important}

/* ===== живая вкладочная панель: активная раскрывается в «таблетку» с подписью, остальные — круглые значки (идея 21st.dev «Expanding Tabs») ===== */
.tabbar{gap:4px;padding:6px}
.tabbar button{flex:0 0 46px;height:46px;min-height:46px;padding:0;border-radius:23px;flex-direction:row;gap:8px;overflow:hidden;transition:flex-basis .5s cubic-bezier(.34,1.4,.64,1),background-color .3s,color .3s}
.tabbar button span{display:block;max-width:0;opacity:0;white-space:nowrap;overflow:hidden;transition:max-width .5s cubic-bezier(.34,1.4,.64,1),opacity .25s;font-size:13px;font-weight:700}
.tabbar button[aria-current=page]{flex:1 1 auto;padding:0 14px}
.tabbar button[aria-current=page] span{max-width:96px;opacity:1}
.tabbar button:active{transform:scale(.94)}

/* ===== мягкие нажатия ===== */
.acts button,.more button,.hrow,.hhero,.hlist button,.card.next[data-why],.chip,.hp-act,.primary,.gear{transition:transform .22s cubic-bezier(.34,1.56,.64,1),box-shadow .2s,background-color .2s}
.acts button:active,.more button:active,.hhero:active,.chip:active,.hp-act:active,.primary:active,.gear:active{transform:scale(.95)}
.hrow:active{transform:scale(.985)}
.card.next[data-why]:active{transform:scale(.985)}
@keyframes rollIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.rolled{animation:rollIn .45s cubic-bezier(.2,.8,.2,1)}

/* ===== иллюстрация в шапке раздела ===== */
.hp-title{position:relative;min-height:104px;padding-right:112px}
.hub-art{position:absolute;right:-2px;top:-8px;height:104px;width:auto;max-width:112px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 10px 14px rgba(80,50,140,.25))}
@media (prefers-reduced-motion:no-preference){.hub-art{animation:bob 6s ease-in-out infinite}}

/* ===== тёплые пустые экраны ===== */
.hp-empty{text-align:center;color:var(--mute);padding:6px 10px 14px}
.hp-empty::before{content:"";display:block;width:92px;height:92px;margin:0 auto 6px;background:url(scenes/sun_asleep_poster.webp) center/contain no-repeat;opacity:.95}
body[data-sky=night] .hp-empty::before{background-image:url(scenes/moon_asleep_poster.webp)}

@media (prefers-reduced-motion:reduce){.tabbar button,.tabbar button span,.acts button,.more button,.hrow,.hhero,.rolled{transition:none!important;animation:none!important}}

/* ===== выравнивание главного экрана: одна сетка и один ритм отступов ===== */
[data-screen=today]>*{margin:0 0 12px!important}
[data-screen=today]>.hello{margin-bottom:6px!important}
[data-screen=today]>.dial{margin-bottom:14px!important}
[data-screen=today]>.acts,[data-screen=today]>.more{margin-bottom:10px!important}
.acts,.more{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.acts button{min-height:88px}
.more button{min-height:68px}
.hello{min-height:0}
.card.notice .nb-tx b{white-space:nowrap;font-size:12.5px}.card.notice .nb-acts .primary{padding:0 12px;font-size:12.5px}
.sky{top:10%;width:31%}
[data-screen=today]>.dial,[data-screen=today]>.cutout{margin-left:auto!important;margin-right:auto!important}
.card.notice .nb-tx b{white-space:normal;line-height:1.15;display:block}
.hp-head h1{color:var(--ink)}
/* ночные главные карточки: без «грязного» коричневого */
body[data-sky=night] .hhero{background:linear-gradient(135deg,rgba(255,181,71,.2),rgba(52,58,128,.7));border-color:rgba(255,181,71,.28)}
body[data-sky=night] .hhero .ti{background:rgba(255,255,255,.14);color:#FFD08A}

/* плашка примера (?demo=1): над нижним меню, не мешает кнопкам */
.demo-bar{position:fixed;left:12px;right:12px;top:calc(env(safe-area-inset-top,0px) + 8px);z-index:60;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 14px;border-radius:99px;font:600 12.5px/1.3 var(--sans,system-ui);color:#EEF0FF;background:rgba(33,29,76,.92);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 10px 24px -12px rgba(20,10,60,.7)}
.demo-bar a{flex:none;padding:8px 14px;border-radius:99px;background:linear-gradient(180deg,#FFC66B,#F29A3C);color:#3A2406;text-decoration:none;font-weight:700}
