
  *{box-sizing:border-box;margin:0;padding:0;}
  :root{
    --bg:#0B0C0E; --panel:#141619; --panel2:#191C21; --line:#272B31; --line2:#363B43;
    --text:#F3F5F7; --muted:#98A0AA; --lime:#C9F45C; --lime2:#B7E63F; --ink:#0D0F11;
    --green:#5FD08C; --red:#FF6E60; --r:16px;
    --limesoft:rgba(201,244,92,.12);
  }
  html,body{height:100%;}
  body{
    background:var(--bg); color:var(--text);
    font-family:'Inter','SF Pro Display',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
    font-size:15px; line-height:1.5; -webkit-font-smoothing:antialiased;
  }
  a{color:inherit;text-decoration:none;}
  button{font:inherit;color:inherit;background:none;border:none;cursor:pointer;}
  input,select{font:inherit;color:inherit;}
  ::selection{background:var(--lime);color:var(--ink);}
  .mono{font-variant-numeric:tabular-nums;}

  /* ---------- auth (скользящая карточка вход/регистрация) ---------- */
  .auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px 20px;
    background:var(--bg);}
  .authwrap{position:relative;width:100%;max-width:760px;}
  @keyframes cardIn{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:none;}}
  .brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.14em;font-size:14px;}
  .dot{width:10px;height:10px;border-radius:50%;background:var(--lime);box-shadow:0 0 16px rgba(201,244,92,.7);}
  .form{margin-top:20px;display:grid;gap:14px;}

  /* статичная карточка (шаг 2 — онбординг) */
  .authcard{width:100%;max-width:400px;margin:0 auto;position:relative;z-index:2;background:var(--panel);
    border:1px solid var(--line);border-radius:24px;padding:52px 30px 30px;
    box-shadow:0 24px 48px -18px rgba(0,0,0,.55);
    animation:cardIn .4s ease-out;}
  .authcard h2{font-size:27px;letter-spacing:-.02em;margin-top:26px;font-weight:750;}
  .authcard .sub{color:var(--muted);margin-top:8px;font-size:14px;}

  /* шаг 1 — скользящая двухпанельная карточка «вход / регистрация» */
  .authslide{position:relative;width:100%;background:var(--panel);border:1px solid var(--line);
    border-radius:24px;overflow:hidden;box-shadow:0 24px 48px -18px rgba(0,0,0,.55);
    animation:cardIn .4s ease-out;}
  .aslide-brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.14em;
    font-size:13px;padding:26px 30px 0;}
  .aslide-body{position:relative;width:100%;height:500px;margin-top:6px;}

  .aforms{position:absolute;inset:0;}
  .aform{position:absolute;top:0;left:0;height:100%;width:50%;padding:44px 46px 30px;
    background:var(--panel);
    display:flex;flex-direction:column;overflow-y:auto;
    transition:transform .6s ease-in-out,opacity .6s ease-in-out;}
  .aform h2{font-size:25px;letter-spacing:-.02em;font-weight:750;}
  .aform .sub{color:var(--muted);margin-top:6px;font-size:13.5px;}
  .aform .form{flex:1;display:flex;flex-direction:column;gap:14px;}
  .aform .form>.btn.wide{margin-top:auto;}
  .aform-signin{z-index:2;}
  .aform-signup{opacity:0;z-index:1;}
  .authslide.signup-active .aform-signin{transform:translateX(100%);}
  .authslide.signup-active .aform-signup{transform:translateX(100%);opacity:1;z-index:5;animation:aformShow .6s;}
  @keyframes aformShow{0%,49.99%{opacity:0;z-index:1;}50%,100%{opacity:1;z-index:5;}}

  .aoverlay-container{position:absolute;top:0;left:50%;width:50%;height:100%;overflow:hidden;
    transition:transform .6s ease-in-out;z-index:100;}
  .authslide.signup-active .aoverlay-container{transform:translateX(-100%);}
  .aoverlay{position:relative;left:-100%;height:100%;width:200%;background:var(--lime);
    transform:translateX(0);transition:transform .6s ease-in-out;}
  .authslide.signup-active .aoverlay{transform:translateX(50%);}
  .aoverlay-panel{position:absolute;top:0;height:100%;width:50%;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:14px;padding:0 46px;text-align:center;
    color:var(--ink);transform:translateX(0);transition:transform .6s ease-in-out;}
  .aoverlay-panel h2{font-size:25px;font-weight:800;}
  .aoverlay-panel p{font-size:13.5px;line-height:1.55;opacity:.82;}
  .aoverlay-panel .btn.ghost{border:1.5px solid var(--ink);color:var(--ink);background:transparent;}
  .aoverlay-panel .btn.ghost:hover{background:var(--ink);color:var(--lime);border-color:var(--ink);}
  .aoverlay-left{left:0;transform:translateX(-20%);}
  .authslide.signup-active .aoverlay-left{transform:translateX(0);}
  .aoverlay-right{left:50%;transform:translateX(0);}
  .authslide.signup-active .aoverlay-right{transform:translateX(20%);}

  .aswitch.mobile-only{display:none;}

  @media (max-width:700px){
    .authwrap{max-width:400px;}
    .aslide-body{height:auto;}
    .aforms{position:relative;inset:auto;}
    .aform{position:relative;width:100%;padding:10px 6px 6px;transition:none;}
    .aform-signin{display:flex;}
    .aform-signup{display:none;opacity:1;z-index:1;}
    .authslide.signup-active .aform-signin{display:none;transform:none;}
    .authslide.signup-active .aform-signup{display:flex;transform:none;}
    .aoverlay-container{display:none;}
    .aswitch.mobile-only{display:block;text-align:center;margin-top:14px;font-size:13px;color:var(--muted);}
    .aswitch.mobile-only a{color:var(--lime);font-weight:700;}
  }

  .switch{display:flex;gap:4px;background:var(--panel);border:1px solid var(--line);
    border-radius:12px;padding:4px;margin-top:24px;}
  .switch button{flex:1;padding:10px 12px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted);transition:.15s;}
  .switch button.on{background:var(--lime);color:var(--ink);}
  .switch button:not(.on):hover{color:var(--text);}
  .field label{display:block;font-size:12.5px;color:var(--muted);margin-bottom:7px;letter-spacing:.01em;}
  .field input,.field select{width:100%;height:46px;padding:0 14px;background:#0F1113;
    border:1px solid var(--line);border-radius:12px;transition:.15s;}
  .field input:hover,.field select:hover{border-color:var(--line2);}
  .field input:focus,.field select:focus{outline:none;border-color:var(--lime);box-shadow:0 0 0 3px rgba(201,244,92,.13);}
  .field select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
    background-position:calc(100% - 19px) 21px, calc(100% - 14px) 21px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;}
  .row2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 22px;
    background:var(--lime);color:var(--ink);border-radius:12px;font-weight:700;font-size:15px;transition:.15s;}
  .btn:hover{background:var(--lime2);transform:translateY(-1px);}
  .btn:active{transform:none;}
  .btn.wide{width:100%;}
  .btn.ghost{background:transparent;color:var(--text);border:1px solid var(--line2);}
  .btn.ghost:hover{background:var(--panel2);border-color:#454B54;}
  .btn.sm{height:40px;padding:0 16px;font-size:14px;border-radius:10px;}
  .err{color:var(--red);font-size:13px;min-height:18px;}
  .foot{color:var(--muted);font-size:12.5px;margin-top:18px;line-height:1.5;}

  /* декоративная гантеля над карточкой */
  .mascot{position:absolute;top:-34px;left:0;right:0;display:flex;justify-content:center;z-index:3;
    pointer-events:none;--mx:0px;--mr:0deg;}
  .mascot svg{width:120px;height:auto;overflow:visible;
    transform:translateX(var(--mx)) rotate(var(--mr));
    transition:transform .5s cubic-bezier(.2,.7,.2,1);}
  .db-bar{fill:var(--lime);}
  .db-collar{fill:var(--ink);opacity:.35;}
  .db-plate{fill:var(--panel2);stroke:var(--line2);stroke-width:1.5;}
  .db-plate-sm{fill:var(--panel2);stroke:var(--line2);}

  .field.ic .inputwrap{position:relative;display:flex;align-items:center;}
  .field.ic .inputwrap input{padding-left:42px;padding-right:40px;}
  .field.ic .ic-l{position:absolute;left:14px;width:17px;height:17px;stroke:var(--muted);fill:none;
    stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;transition:.15s;}
  .field.ic .inputwrap:focus-within .ic-l{stroke:var(--lime);}
  .ic-r{position:absolute;right:12px;width:30px;height:30px;display:grid;place-items:center;border-radius:8px;color:var(--muted);}
  .ic-r:hover{color:var(--text);background:var(--panel2);}
  .ic-r svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}

  /* ---------- app shell ---------- */
  .shell{display:grid;grid-template-columns:250px 1fr;min-height:100vh;}
  .side{border-right:1px solid var(--line);background:#0E1012;padding:26px 18px 20px;
    display:flex;flex-direction:column;gap:26px;position:sticky;top:0;height:100vh;}
  .nav{display:flex;flex-direction:column;gap:4px;}
  .navbtn{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:11px;
    color:var(--muted);font-size:14.5px;font-weight:600;transition:.14s;text-align:left;width:100%;}
  .navbtn svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
  .navbtn:hover{background:var(--panel);color:var(--text);}
  .navbtn.on{background:var(--limesoft);color:var(--lime);}
  .sidefoot{margin-top:auto;border-top:1px solid var(--line);padding-top:16px;}
  .me{display:flex;align-items:center;gap:11px;}
  .ava{width:38px;height:38px;border-radius:11px;background:var(--lime);color:var(--ink);
    display:grid;place-items:center;font-weight:800;font-size:16px;flex:none;}
  .me b{display:block;font-size:14px;font-weight:650;}
  .me span{display:block;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;max-width:140px;white-space:nowrap;}
  .logout{margin-top:12px;width:100%;text-align:left;font-size:13px;color:var(--muted);padding:9px 12px;border-radius:10px;}
  .logout:hover{background:var(--panel);color:var(--red);}
  .main{padding:38px 40px 64px;max-width:1060px;width:100%;}
  .tab{display:none;}
  .tab.on{display:block;animation:fade .22s ease;}
  @keyframes fade{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
  .phead{margin-bottom:26px;}
  .phead h1{font-size:30px;letter-spacing:-.02em;font-weight:750;}
  .phead p{color:var(--muted);margin-top:8px;max-width:640px;}
  .tabbar{display:none;}

  /* ---------- shared blocks ---------- */
  .card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:22px;}
  .card.pad0{padding:0;overflow:hidden;}
  .grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start;}
  .kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}
  .kpi{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px 16px 14px;}
  .kpi b{display:block;font-size:24px;font-weight:750;letter-spacing:-.01em;}
  .kpi span{display:block;font-size:12px;color:var(--muted);margin-top:4px;text-transform:uppercase;letter-spacing:.06em;}
  .kpi.good b{color:var(--green);} .kpi.bad b{color:var(--red);}
  .seg{display:flex;gap:4px;background:#0F1113;border:1px solid var(--line);border-radius:12px;padding:4px;}
  .seg button{flex:1;padding:9px 10px;border-radius:9px;font-size:13.5px;font-weight:600;color:var(--muted);transition:.14s;}
  .seg button.on{background:var(--lime);color:var(--ink);}
  .seg button:not(.on):hover{color:var(--text);background:var(--panel2);}
  .chips{display:flex;gap:8px;flex-wrap:wrap;}
  .chip{border:1px solid var(--line);background:var(--panel);border-radius:999px;padding:8px 15px;
    font-size:13.5px;font-weight:600;color:var(--muted);transition:.14s;}
  .chip:hover{color:var(--text);border-color:var(--line2);}
  .chip.on{background:var(--lime);border-color:var(--lime);color:var(--ink);}
  .hint{background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-size:13.5px;color:#C3CAD2;}
  .hint b{color:var(--lime);}
  .empty{border:1px dashed #33383F;border-radius:14px;padding:26px;text-align:center;color:var(--muted);font-size:14px;}

  /* ---------- norm ---------- */
  #normCard{position:relative;overflow:hidden;}
  .pulseline{position:absolute;top:14px;right:18px;width:140px;height:26px;opacity:.55;pointer-events:none;}
  .pulseline polyline{fill:none;stroke:var(--lime);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
    stroke-dasharray:620; stroke-dashoffset:620; animation:pulsedraw 3.2s linear infinite;}
  @keyframes pulsedraw{0%{stroke-dashoffset:620;}60%{stroke-dashoffset:0;}100%{stroke-dashoffset:0;opacity:0;}}
  .normbig{display:flex;align-items:baseline;gap:12px;position:relative;z-index:1;}
  .normbig b{font-size:46px;font-weight:800;letter-spacing:-.03em;color:var(--lime);}
  .normbig span{color:var(--muted);font-size:14px;}
  .macros{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px;}
  .macro{background:#0F1113;border:1px solid var(--line);border-radius:13px;padding:13px 14px;transition:border-color .5s ease,transform .5s ease,box-shadow .5s ease;}
  .macro.pop{animation:macropop 1.1s cubic-bezier(.22,.85,.32,1);}
  @keyframes macropop{0%{transform:scale(1);border-color:var(--line);box-shadow:0 0 0 0 rgba(201,244,92,0);}30%{transform:scale(1.015);border-color:var(--lime);box-shadow:0 0 0 3px rgba(201,244,92,.10);}100%{transform:scale(1);border-color:var(--line);box-shadow:0 0 0 0 rgba(201,244,92,0);}}
  .macro b{display:block;font-size:20px;font-weight:750;transition:opacity .25s ease;}
  .macro span{font-size:12px;color:var(--muted);}
  .bar{height:8px;border-radius:99px;background:#0F1113;overflow:hidden;margin-top:10px;display:flex;}
  .bar i{display:block;height:100%;transition:width .7s cubic-bezier(.22,.85,.32,1);}
  .split{margin-top:18px;display:grid;gap:8px;}
  .splitrow{display:flex;justify-content:space-between;align-items:center;padding:11px 14px;
    background:#0F1113;border:1px solid var(--line);border-radius:12px;font-size:14px;
    transition:background .18s,transform .18s;}
  .splitrow:hover{background:var(--panel2);transform:translateX(2px);}
  .splitrow span{color:var(--muted);}
  .splitrow b{font-weight:650;}

  /* ---------- recipes: subtabs ---------- */
  .rsub{max-width:320px;margin-bottom:20px;}
  #viewAll,#viewDay{animation:fade .22s ease;}

  .daycard{background:linear-gradient(135deg,var(--panel) 0%,var(--panel2) 100%);
    border:1px solid var(--line);border-radius:18px;padding:20px 22px;margin-bottom:18px;}
  .daycard-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;}
  .daycard-head b{display:block;font-size:16px;font-weight:700;}
  .daycard-head span{display:block;color:var(--muted);font-size:13px;margin-top:4px;max-width:420px;}
  .dice{display:inline-block;animation:dicespin 2.6s linear infinite;}
  @keyframes dicespin{0%,80%{transform:rotate(0);}90%{transform:rotate(180deg);}100%{transform:rotate(360deg);}}

  /* ---------- recipes ---------- */
  .rgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
  .rcard{background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden;
    display:flex;flex-direction:column;transition:border-color .18s,transform .18s,box-shadow .18s;
    opacity:0;transform:translateY(14px);animation:rcardin .5s cubic-bezier(.22,.85,.32,1) forwards;
    animation-delay:var(--d,0s);}
  @keyframes rcardin{to{opacity:1;transform:translateY(0);}}
  .rcard:hover{border-color:var(--line2);transform:translateY(-4px);box-shadow:0 14px 30px rgba(0,0,0,.28);}
  .rphoto{position:relative;aspect-ratio:16/10;background:#0F1113;overflow:hidden;}
  .rphoto img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease;}
  .rcard:hover .rphoto img{transform:scale(1.06);}
  .rph-ph{width:100%;height:100%;display:grid;place-items:center;font-size:34px;
    background:linear-gradient(135deg,#171a1e,#1d2126);}
  .rphoto::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 55%,rgba(0,0,0,.55) 100%);}
  .rphoto::before{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;
    background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.16) 50%,transparent 60%);
    background-size:250% 250%;background-position:120% 0;opacity:0;transition:opacity .25s ease;}
  .rcard:hover .rphoto::before{opacity:1;animation:rshine 1.1s ease forwards;}
  @keyframes rshine{from{background-position:120% 0;}to{background-position:-20% 0;}}
  .rtag{position:absolute;right:10px;top:10px;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;
    color:var(--lime);background:rgba(11,12,14,.78);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(6px);
    border-radius:999px;padding:6px 10px;white-space:nowrap;font-weight:700;
    animation:rtagpop .5s cubic-bezier(.22,.85,.32,1) forwards;animation-delay:calc(var(--d,0s) + .2s);opacity:0;transform:scale(.85);}
  @keyframes rtagpop{to{opacity:1;transform:scale(1);}}
  .rbody{padding:16px 16px 18px;display:flex;flex-direction:column;gap:10px;flex:1;}
  .rtop{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
  .rcard h3{font-size:16px;font-weight:680;line-height:1.3;}
  .tag{font-size:10.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--lime);
    background:var(--limesoft);border-radius:999px;padding:5px 9px;white-space:nowrap;font-weight:700;}
  .rmeta{font-size:12.5px;color:var(--muted);}
  .kb{display:flex;gap:6px;flex-wrap:wrap;}
  .kb span{font-size:12px;padding:5px 9px;border-radius:8px;background:#0F1113;border:1px solid var(--line);color:#C9D0D8;}
  .rfoot{margin-top:auto;display:flex;gap:8px;align-items:center;padding-top:4px;}
  .stars{color:#F2C14E;font-size:13px;letter-spacing:1px;}
  .stars i{color:#3A3F46;font-style:normal;}
  .linkbtn{color:var(--lime);font-weight:650;font-size:13.5px;}
  .linkbtn:hover{text-decoration:underline;}

  /* ---------- day ---------- */
  .slots{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}
  .slot{background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;
    opacity:0;transform:translateY(14px);animation:rcardin .45s cubic-bezier(.22,.85,.32,1) forwards;
    animation-delay:var(--d,0s);transition:border-color .18s,transform .18s;}
  .slot:hover{border-color:var(--line2);transform:translateY(-3px);}
  .slot-photo{aspect-ratio:16/10;background:#0F1113;overflow:hidden;}
  .slot-photo img{width:100%;height:100%;object-fit:cover;display:block;}
  .slot-photo .rph-ph{font-size:26px;}
  .slot-body{padding:14px 16px 16px;}
  .slot i{font-style:normal;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--lime);}
  .slot b{display:block;margin:8px 0 6px;font-size:15px;font-weight:650;line-height:1.3;}
  .slot em{font-style:normal;font-size:12.5px;color:var(--muted);}

  /* ---------- weight ---------- */
  .chartbox{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;}
  canvas{width:100%;height:230px;display:block;}
  .wform{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;}
  .wform .field{flex:1;min-width:150px;}
  .wlist{display:grid;gap:8px;}
  .witem{display:flex;align-items:center;gap:12px;padding:13px 16px;background:var(--panel);
    border:1px solid var(--line);border-radius:12px;font-size:14px;}
  .witem b{width:86px;font-weight:650;}
  .witem span{color:var(--muted);}
  .witem .d{margin-left:auto;font-size:13px;}
  .d.down{color:var(--green);} .d.up{color:var(--red);}
  .del{color:#6C737C;font-size:12.5px;}
  .del:hover{color:var(--red);}

  /* ---------- exercises ---------- */
  .egrid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
  .ecard{background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden;
    display:flex;flex-direction:column;transition:.16s;}
  .ecard:hover{border-color:var(--line2);transform:translateY(-2px);}
  .ephoto{position:relative;aspect-ratio:16/10;background:#0F1113;}
  .ephoto img{width:100%;height:100%;object-fit:cover;display:block;}
  .ephoto b{position:absolute;left:12px;top:12px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;
    background:rgba(11,12,14,.72);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(6px);
    color:var(--lime);border-radius:999px;padding:6px 10px;font-weight:700;}
  .ebody{padding:16px 16px 18px;display:flex;flex-direction:column;gap:10px;flex:1;}
  .ebody h3{font-size:16px;font-weight:680;line-height:1.3;}
  .muscles{display:flex;gap:6px;flex-wrap:wrap;}
  .m1{font-size:12px;padding:5px 10px;border-radius:999px;background:var(--limesoft);color:var(--lime);font-weight:650;}
  .m2{font-size:12px;padding:5px 10px;border-radius:999px;background:#0F1113;border:1px solid var(--line);color:#AEB6BF;}
  .esets{font-size:13px;color:var(--muted);}
  .ecard .linkbtn{margin-top:auto;text-align:left;}

  /* ---------- history ---------- */
  .hlist{display:grid;gap:8px;}
  .hitem{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--panel);
    border:1px solid var(--line);border-radius:12px;}
  .hitem b{font-size:14.5px;font-weight:650;}
  .hitem .meta{font-size:12.5px;color:var(--muted);margin-top:3px;}
  .hitem .right{margin-left:auto;display:flex;align-items:center;gap:14px;}

  /* ---------- modal / toast ---------- */
  .modal{position:fixed;inset:0;background:rgba(6,7,9,.72);backdrop-filter:blur(6px);
    display:none;align-items:center;justify-content:center;padding:24px;z-index:60;}
  .modal.on{display:flex;}
  .sheet{background:var(--panel);border:1px solid var(--line2);border-radius:20px;width:100%;max-width:560px;
    max-height:88vh;overflow:auto;animation:pop .18s ease;}
  .sheet.wide{max-width:720px;}
  @keyframes pop{from{opacity:0;transform:translateY(10px) scale(.985);}to{opacity:1;transform:none;}}
  .sheethead{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:22px 22px 0;}
  .sheethead h3{font-size:20px;font-weight:720;letter-spacing:-.01em;}
  .x{font-size:22px;line-height:1;color:var(--muted);padding:2px 6px;border-radius:8px;}
  .x:hover{color:var(--text);background:var(--panel2);}
  .sheetbody{padding:16px 22px 22px;display:grid;gap:14px;}
  .sheetbody img{width:100%;border-radius:14px;display:block;}
  .steps{display:grid;gap:9px;counter-reset:s;}
  .step{display:flex;gap:11px;font-size:14px;color:#DDE2E8;}
  .step i{font-style:normal;width:22px;height:22px;flex:none;border-radius:7px;background:var(--limesoft);
    color:var(--lime);display:grid;place-items:center;font-size:12px;font-weight:750;}
  .starpick{display:flex;gap:6px;}
  .starpick button{font-size:26px;color:#3A3F46;line-height:1;transition:.12s;}
  .starpick button.on{color:#F2C14E;}
  .starpick button:hover{transform:scale(1.12);}
  .toast{position:fixed;left:50%;bottom:30px;transform:translate(-50%,20px);background:var(--lime);color:var(--ink);
    padding:12px 20px;border-radius:999px;font-weight:700;font-size:14px;opacity:0;pointer-events:none;transition:.22s;z-index:80;}
  .toast.on{opacity:1;transform:translate(-50%,0);}

  /* ---------- responsive ---------- */
  @media (max-width:1080px){
    .rgrid,.egrid{grid-template-columns:repeat(2,1fr);}
    .slots{grid-template-columns:repeat(2,1fr);}
  }
  @media (max-width:900px){
    .shell{grid-template-columns:1fr;}
    .side{display:none;}
    .main{padding:24px 18px 100px;}
    .grid2{grid-template-columns:1fr;}
    .kpis{grid-template-columns:repeat(2,1fr);}
    .phead h1{font-size:24px;}
    .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;
      background:rgba(14,16,18,.95);backdrop-filter:blur(12px);border-top:1px solid var(--line);
      padding:8px 6px calc(8px + env(safe-area-inset-bottom));}
    .tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;
      color:var(--muted);font-size:10px;font-weight:600;padding:6px 2px;border-radius:10px;}
    .tabbar svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
    .tabbar button.on{color:var(--lime);}
    .mtop{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;
      border-bottom:1px solid var(--line);position:sticky;top:0;background:rgba(11,12,14,.92);backdrop-filter:blur(10px);z-index:40;}
  }
  @media (min-width:901px){ .mtop{display:none;} }
  @media (max-width:560px){
    .rgrid,.egrid,.slots{grid-template-columns:1fr;}
    .macros{grid-template-columns:1fr;}
    .authtext h1{font-size:30px;}
    .row2{grid-template-columns:1fr;}
  }

  /* ================= АНАТОМИЧЕСКАЯ ПОДСВЕТКА МЫШЦ ================= */
  .ephoto::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
    background:linear-gradient(180deg,rgba(0,0,0,0) 42%,rgba(0,0,0,.62) 100%);}
  .ephoto .mtag{position:absolute;left:10px;bottom:10px;z-index:3;display:inline-flex;align-items:center;gap:7px;
    background:rgba(255,64,52,.94);color:#fff;font-size:12px;font-weight:800;line-height:1;
    padding:7px 10px;border-radius:10px;box-shadow:0 8px 20px rgba(255,64,52,.35);
    max-width:calc(100% - 104px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ephoto .mtag i.dot{width:7px;height:7px;border-radius:50%;background:#fff;flex:0 0 auto;
    box-shadow:0 0 0 3px rgba(255,255,255,.28);animation:mpulse 1.6s ease-in-out infinite;}
  @keyframes mpulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:.4;transform:scale(.7);}}
  .ephoto .bmap{position:absolute;right:9px;bottom:9px;z-index:3;width:66px;height:92px;padding:5px;
    border-radius:12px;background:rgba(8,9,11,.74);border:1px solid rgba(255,255,255,.10);
    backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;}
  .ephoto .bmap svg{width:100%;height:100%;display:block;}

  .body-fig{fill:#181B20;stroke:#2C333B;stroke-width:1;}
  .ms{fill:#2A3038;stroke:#3B434D;stroke-width:.8;}
  .ms.alt{fill:#8C3A31;stroke:#A9483D;}
  .ms.on{fill:#FF4A3D;stroke:#FF9186;stroke-width:1;}
  .bmap .ms.on{filter:drop-shadow(0 0 5px rgba(255,74,61,.85));}

  .muscles .m1{background:rgba(255,74,61,.14);color:#FF8F84;border:1px solid rgba(255,74,61,.38);}

  #emBody .ephoto{position:relative;aspect-ratio:16/10;border-radius:14px;overflow:hidden;background:#0F1113;margin-bottom:12px;}
  #emBody .ephoto img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0;}
  .anat{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px;}
  .anat .acard{background:var(--panel2);border:1px solid var(--line);border-radius:14px;padding:10px 6px 8px;text-align:center;}
  .anat .acard svg{width:100%;max-width:132px;height:200px;}
  .anat .acard span{display:block;font-size:10px;color:var(--muted);letter-spacing:.7px;text-transform:uppercase;margin-top:4px;}
  .mlegend{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 0 12px;font-size:12px;color:var(--muted);line-height:1.5;}
  .mlegend span{display:inline-flex;align-items:center;}
  .mlegend i{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:6px;flex:0 0 auto;}
  .mlegend .l1 i{background:#FF4A3D;box-shadow:0 0 8px rgba(255,74,61,.6);}
  .mlegend .l2 i{background:#8C3A31;}
  @media (max-width:560px){
    .ephoto .bmap{width:54px;height:76px;}
    .ephoto .mtag{font-size:11px;padding:6px 8px;max-width:calc(100% - 82px);}
    .anat .acard svg{height:170px;}
  }

  /* ================= ЕДИНЫЕ ПРОПОРЦИИ ФОТО ЕДЫ ================= */
  #rmBody > img{aspect-ratio:4/3;object-fit:cover;height:auto;background:#0F1113;}
  .rsub{max-width:560px;}
  .kb span.pw{background:var(--limesoft);border-color:rgba(201,244,92,.35);color:var(--lime);font-weight:650;}
  #shakeGrid .rphoto img{object-position:50% 45%;}

  /* ---------- избранное (сердечко на карточке) ---------- */
  .favbtn{position:absolute;left:10px;top:10px;z-index:3;width:34px;height:34px;border-radius:999px;display:grid;place-items:center;
    background:rgba(11,12,14,.72);border:1px solid rgba(255,255,255,.14);color:#fff;transition:transform .18s,background .18s,color .18s;}
  .favbtn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round;transition:fill .18s;}
  .favbtn:hover{transform:scale(1.08);background:rgba(11,12,14,.9);}
  .favbtn.on{color:#FF6E60;}
  .favbtn.on svg{fill:currentColor;animation:heartpop .35s cubic-bezier(.22,.85,.32,1);}
  @keyframes heartpop{0%{transform:scale(.6);}60%{transform:scale(1.2);}100%{transform:scale(1);}}

  /* ================= КНОПКА ПРОФИЛЯ (левый нижний угол) ================= */
  .side{padding-bottom:96px;}
  .side .sidefoot .me{display:none;}
  .pfab{position:fixed;left:18px;bottom:18px;z-index:55;width:214px;display:flex;align-items:center;gap:10px;
    padding:8px 10px 8px 8px;background:var(--panel);border:1px solid var(--line2);border-radius:16px;text-align:left;
    box-shadow:0 12px 30px -10px rgba(0,0,0,.6);transition:transform .18s,border-color .18s,background .18s;}
  .pfab:hover{transform:translateY(-2px);border-color:var(--lime);background:var(--panel2);}
  .pfab:focus-visible{outline:2px solid var(--lime);outline-offset:3px;}
  .pfab .ava{width:38px;height:38px;}
  .pfab-txt{min-width:0;flex:1;}
  .pfab-txt b{display:block;font-size:13.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pfab-txt span{display:block;font-size:11.5px;color:var(--muted);white-space:nowrap;}
  .pfab-fire{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:750;color:#FFB547;
    background:rgba(255,154,46,.12);border-radius:999px;padding:4px 8px 4px 6px;}
  .pfab-fire svg{width:14px;height:14px;fill:#FF9A2E;stroke:#FFB547;stroke-width:1.2;}

  /* ================= ПАНЕЛЬ ПРОФИЛЯ ================= */
  html.noscroll,html.noscroll body{overflow:hidden;}
  .pdrawer{position:fixed;inset:0;z-index:58;visibility:hidden;pointer-events:none;transition:visibility 0s linear .32s;}
  .pdrawer.on{visibility:visible;pointer-events:auto;transition:none;}
  .pd-back{position:absolute;inset:0;background:rgba(6,7,9,.66);opacity:0;transition:opacity .32s ease;}
  .pdrawer.on .pd-back{opacity:1;}
  .pd-panel{position:absolute;top:0;left:0;bottom:0;width:min(520px,100vw);background:var(--bg);border-right:1px solid var(--line2);
    overflow-y:auto;overscroll-behavior:contain;transform:translateX(-102%);transition:transform .34s cubic-bezier(.22,.85,.32,1);
    box-shadow:24px 0 60px -20px rgba(0,0,0,.7);will-change:transform;}
  .pdrawer.on .pd-panel{transform:none;}
  .pd-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;
    padding:18px 20px;background:rgba(11,12,14,.94);border-bottom:1px solid var(--line);}
  .pd-head .ava{width:44px;height:44px;font-size:18px;border-radius:13px;}
  .pd-head .me b{font-size:16px;}
  .pd-head .me span{max-width:300px;}
  .pd-body{padding:18px 20px 40px;display:grid;gap:22px;}
  .pd-sec h4{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:10px;
    display:flex;align-items:center;gap:8px;}
  .pd-sec h4 small{font-size:11px;color:var(--lime);background:var(--limesoft);border-radius:999px;padding:2px 8px;letter-spacing:0;}
  .pd-kpis{grid-template-columns:repeat(3,1fr);gap:8px;}
  .pd-kpis .kpi{padding:12px;}
  .pd-kpis .kpi b{font-size:20px;}
  .pd-kpis .kpi b small{font-size:12px;color:var(--muted);font-weight:600;}
  .pd-kpis .kpi span{font-size:10.5px;}

  /* стрик */
  .stk{background:linear-gradient(135deg,rgba(255,154,46,.10),var(--panel) 60%);border:1px solid var(--line);border-radius:16px;padding:16px;}
  .stk-main{display:flex;align-items:center;gap:14px;}
  .stk-fire{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:rgba(255,154,46,.14);flex:none;}
  .stk-fire svg{width:30px;height:30px;fill:#FF9A2E;stroke:#FFC46B;stroke-width:1.1;animation:flame 2.4s ease-in-out infinite;transform-origin:50% 90%;}
  @keyframes flame{0%,100%{transform:scale(1) rotate(0);}50%{transform:scale(1.07) rotate(-3deg);}}
  .stk-main b{display:block;font-size:20px;font-weight:750;letter-spacing:-.01em;}
  .stk-main span{display:block;font-size:12.5px;color:var(--muted);margin-top:2px;}
  .stk-week{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-top:14px;}
  .stk-day{display:flex;flex-direction:column;align-items:center;gap:5px;}
  .stk-day i{width:100%;max-width:38px;aspect-ratio:1;border-radius:10px;background:#0F1113;border:1px solid var(--line);display:grid;place-items:center;}
  .stk-day.on i{background:rgba(255,154,46,.16);border-color:rgba(255,154,46,.45);}
  .stk-day.today i{box-shadow:0 0 0 2px var(--lime);}
  .stk-day i svg{width:16px;height:16px;fill:#FF9A2E;}
  .stk-day span{font-size:10.5px;color:var(--muted);text-transform:uppercase;}
  .stk-note{margin-top:12px;font-size:12px;color:var(--muted);}

  /* мини-карточки рецептов */
  .pgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;}
  .pgrid .empty{grid-column:1/-1;padding:18px;font-size:13px;}
  .pmini{display:flex;align-items:center;gap:10px;padding:7px;background:var(--panel);border:1px solid var(--line);border-radius:12px;
    text-align:left;transition:border-color .16s,transform .16s;min-width:0;}
  .pmini:hover{border-color:var(--line2);transform:translateY(-1px);}
  .pmini-ph{width:52px;height:52px;border-radius:9px;overflow:hidden;flex:none;background:#0F1113;}
  .pmini-ph img{width:100%;height:100%;object-fit:cover;display:block;}
  .pmini-ph .rph-ph{font-size:20px;}
  .pmini-t{min-width:0;}
  .pmini-t b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12.5px;font-weight:650;line-height:1.3;}
  .pmini-t em{display:flex;align-items:center;gap:5px;font-style:normal;font-size:11.5px;color:var(--muted);margin-top:3px;}
  .pheart{display:inline-grid;color:#FF6E60;}
  .pheart svg{width:12px;height:12px;fill:currentColor;}
  .pmini .stars{font-size:11px;}

  /* достижения */
  .pd-achbar{margin:0 0 12px;height:6px;}
  .pd-cats{margin-bottom:12px;gap:6px;}
  .pd-cats .chip{padding:6px 11px;font-size:12px;}
  .pd-cats .chip small{opacity:.7;font-size:11px;margin-left:2px;}
  .achgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
  .ach{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 10px 11px;display:flex;flex-direction:column;
    align-items:center;text-align:center;gap:5px;contain:layout paint;transition:border-color .16s;}
  .ach.ok{border-color:rgba(201,244,92,.35);background:linear-gradient(180deg,rgba(201,244,92,.07),var(--panel) 70%);}
  .ach-ic{position:relative;width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:var(--limesoft);margin-bottom:2px;}
  .ach-ic svg{width:22px;height:22px;fill:none;stroke:var(--lime);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
  .ach b{font-size:12.5px;font-weight:700;line-height:1.25;}
  .ach p{font-size:11px;color:var(--muted);line-height:1.35;flex:1;}
  .ach-st{font-size:10px;letter-spacing:.06em;text-transform:uppercase;font-weight:700;color:var(--lime);}
  .ach-pg{width:100%;height:4px;border-radius:99px;background:#0F1113;overflow:hidden;margin-top:2px;}
  .ach-pg i{display:block;height:100%;background:var(--line2);}
  .ach.lock .ach-ic{background:#0F1113;border:1px solid var(--line);}
  .ach.lock .ach-ic svg{stroke:#5A616B;}
  .ach.lock b{color:#8A929C;}
  .ach.lock p{color:#6C737C;}
  .ach.lock .ach-st{color:#6C737C;}
  .ach-lock{position:absolute;right:-5px;bottom:-5px;width:20px;height:20px;border-radius:7px;background:var(--panel2);
    border:1px solid var(--line2);display:grid;place-items:center;}
  .ach-lock svg{width:11px;height:11px;stroke:#98A0AA;stroke-width:2;}

  /* модалки поверх панели профиля */
  .modal{z-index:62;}

  @media (max-width:900px){
    .pfab{left:12px;bottom:calc(74px + env(safe-area-inset-bottom));width:auto;padding:5px;gap:0;border-radius:15px;}
    .pfab-txt{display:none;}
    .pfab .ava{width:40px;height:40px;}
    .pfab-fire{position:absolute;right:-8px;top:-8px;padding:2px 6px 2px 4px;font-size:11px;background:#1E1A14;border:1px solid rgba(255,154,46,.4);}
    .pfab-fire svg{width:11px;height:11px;}
    .main{padding-bottom:150px;}
  }
  @media (max-width:560px){
    .rsub{max-width:none;}
    .rsub button{font-size:12px;padding:9px 6px;}
    .pd-body{padding:16px 14px 40px;}
    .pd-head{padding:14px;}
    .pd-kpis{grid-template-columns:repeat(2,1fr);}
    .pgrid{grid-template-columns:1fr;}
    .achgrid{grid-template-columns:repeat(2,1fr);}
  }
  @media (prefers-reduced-motion:reduce){
    .pd-panel,.pd-back{transition:none;}
    .stk-fire svg{animation:none;}
  }
  @media (max-width:900px){
    .toast{bottom:calc(132px + env(safe-area-inset-bottom));max-width:calc(100vw - 40px);text-align:center;}
  }

  /* ================= АККОРДЕОНЫ ПРОФИЛЯ ================= */
  .acc{background:var(--panel);border:1px solid var(--line);border-radius:16px;overflow:hidden;transition:border-color .2s;}
  .acc.open{border-color:var(--line2);}
  .acc-h{width:100%;display:flex;align-items:center;gap:12px;padding:13px 14px;text-align:left;transition:background .16s;}
  .acc-h:hover{background:var(--panel2);}
  .acc-h:focus-visible{outline:2px solid var(--lime);outline-offset:-2px;border-radius:16px;}
  .acc-ic{width:36px;height:36px;border-radius:11px;background:var(--limesoft);display:grid;place-items:center;flex:none;}
  .acc-ic svg{width:18px;height:18px;fill:none;stroke:var(--lime);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .acc-t{flex:1;min-width:0;}
  .acc-t b{display:block;font-size:14.5px;font-weight:680;}
  .acc-t small{display:block;font-size:12px;color:var(--muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .acc-chev svg{width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s cubic-bezier(.22,.85,.32,1);display:block;}
  .acc.open .acc-chev svg{transform:rotate(180deg);}
  .acc-b{display:grid;grid-template-rows:0fr;transition:grid-template-rows .32s cubic-bezier(.22,.85,.32,1);}
  .acc.open .acc-b{grid-template-rows:1fr;}
  .acc-in{min-height:0;overflow:hidden;padding:0 14px;transition:padding .32s;}
  .acc.open .acc-in{padding:2px 14px 14px;}
  .acc .chartbox{padding:12px;}
  .acc canvas{height:200px;}
  .pd-wform .field{min-width:120px;}
  .acc .hitem,.acc .witem{background:#0F1113;}
  .stk-go{display:inline-block;margin-top:10px;}

  /* ================= ДНЕВНИК ================= */
  .dhead{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;}
  .dcard{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:16px;margin-bottom:12px;
    animation:rcardin .45s cubic-bezier(.22,.85,.32,1) both;}
  .dcard-h{display:flex;align-items:center;gap:12px;}
  .dcard-ic{width:40px;height:40px;border-radius:12px;background:var(--limesoft);display:grid;place-items:center;flex:none;}
  .dcard-ic svg{width:20px;height:20px;fill:none;stroke:var(--lime);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .dcard-ic.water{background:rgba(76,141,255,.14);}
  .dcard-ic.water svg{stroke:#6FA5FF;}
  .dcard-t{flex:1;min-width:0;}
  .dcard-t b{display:block;font-size:16px;font-weight:700;}
  .dcard-t span{display:block;font-size:12.5px;color:var(--muted);margin-top:1px;}
  .dplus{width:40px;height:40px;border-radius:13px;background:var(--lime);color:var(--ink);display:grid;place-items:center;flex:none;
    transition:transform .2s cubic-bezier(.22,.85,.32,1),background .15s;box-shadow:0 6px 18px -6px rgba(201,244,92,.55);}
  .dplus svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;transition:transform .25s;}
  .dplus:hover{background:var(--lime2);transform:scale(1.06);}
  .dplus:hover svg{transform:rotate(90deg);}
  .dplus:active{transform:scale(.94);}

  /* неделя + стрик */
  .dweekcard{display:flex;gap:14px;align-items:stretch;}
  .dstreak{display:flex;align-items:center;gap:10px;padding:10px 14px 10px 10px;border-radius:16px;background:#0F1113;border:1px solid var(--line);flex:none;}
  .dstreak-fire{width:44px;height:44px;border-radius:13px;background:#171A1E;display:grid;place-items:center;}
  .dstreak-fire svg{width:26px;height:26px;fill:#3A3F46;stroke:#4A5059;stroke-width:1;transition:fill .4s;}
  .dstreak.hot{background:linear-gradient(135deg,rgba(255,154,46,.16),#0F1113 70%);border-color:rgba(255,154,46,.35);}
  .dstreak.hot .dstreak-fire{background:rgba(255,154,46,.14);}
  .dstreak.hot .dstreak-fire svg{fill:#FF9A2E;stroke:#FFC46B;animation:flame 2.4s ease-in-out infinite;transform-origin:50% 90%;}
  .dstreak b{display:block;font-size:26px;font-weight:800;line-height:1;letter-spacing:-.02em;}
  .dstreak.hot b{color:#FFB547;}
  .dstreak span{display:block;font-size:12px;color:var(--text);margin-top:3px;}
  .dstreak small{display:block;font-size:11px;color:var(--muted);}
  .dweek-wrap{flex:1;min-width:0;}
  .dweek-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
  .dweek-top b{font-size:14px;font-weight:700;}
  .dnav{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;color:var(--muted);}
  .dnav:hover{background:var(--panel2);color:var(--text);}
  .dnav svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}
  .dweek{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
  .wday{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 0 8px;border-radius:13px;
    background:#0F1113;border:1px solid var(--line);transition:background .18s,border-color .18s,transform .18s;}
  .wday:hover{transform:translateY(-2px);border-color:var(--line2);}
  .wd-n{font-size:10.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;}
  .wday b{font-size:15px;font-weight:700;}
  .wd-bar{width:5px;height:18px;border-radius:9px;background:#1B1F24;display:flex;align-items:flex-end;overflow:hidden;}
  .wd-bar em{display:block;width:100%;background:var(--lime);border-radius:9px;transition:height .5s cubic-bezier(.22,.85,.32,1);}
  .wd-fire{position:absolute;top:-6px;right:-4px;width:17px;height:17px;border-radius:50%;background:#1E1A14;border:1px solid rgba(255,154,46,.45);
    display:none;place-items:center;}
  .wd-fire svg{width:10px;height:10px;fill:#FF9A2E;}
  .wday.logged .wd-fire{display:grid;animation:rtagpop .35s cubic-bezier(.22,.85,.32,1);}
  .wday.today{border-color:rgba(201,244,92,.45);}
  .wday.sel{background:var(--lime);border-color:var(--lime);color:var(--ink);}
  .wday.sel .wd-n{color:rgba(13,15,17,.65);}
  .wday.sel .wd-bar{background:rgba(13,15,17,.18);}
  .wday.sel .wd-bar em{background:var(--ink);}
  .wday.future{opacity:.55;}

  /* кольцо калорий */
  .dsum{display:flex;gap:20px;align-items:center;}
  .dring{position:relative;width:150px;height:150px;flex:none;}
  .dring svg{width:100%;height:100%;transform:rotate(-90deg);}
  .dring-bg{fill:none;stroke:#1B1F24;stroke-width:11;}
  .dring-fg{fill:none;stroke:var(--lime);stroke-width:11;stroke-linecap:round;transition:stroke-dashoffset .9s cubic-bezier(.22,.85,.32,1),stroke .3s;
    filter:drop-shadow(0 0 6px rgba(201,244,92,.35));}
  .dring.over .dring-fg{stroke:var(--red);filter:drop-shadow(0 0 6px rgba(255,110,96,.4));}
  .dring-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
  .dring-c b{font-size:30px;font-weight:800;letter-spacing:-.02em;line-height:1;}
  .dring-c span{font-size:11.5px;color:var(--muted);margin-top:4px;}
  .dsum-r{flex:1;min-width:0;}
  .dline1{font-size:15px;color:var(--muted);}
  .dline1 b{color:var(--text);font-weight:750;}
  .dline2{font-size:14px;color:var(--muted);margin-top:3px;}
  .dline2 b{color:var(--lime);}
  .dline2 .over,.dline2 .over b{color:var(--red);}
  .dmacros{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px;}
  .dmac-h{display:flex;justify-content:space-between;align-items:baseline;gap:6px;font-size:12px;color:var(--muted);}
  .dmac-h b{color:var(--text);font-size:14px;font-weight:700;white-space:nowrap;}
  .dmac-h small{color:var(--muted);font-weight:500;font-size:11px;}
  .dmac-bar{display:block;height:7px;border-radius:9px;background:#1B1F24;overflow:hidden;margin-top:6px;}
  .dmac-bar em{display:block;height:100%;border-radius:9px;transition:width .8s cubic-bezier(.22,.85,.32,1);}
  .dmac-l{display:block;font-size:10.5px;color:var(--muted);margin-top:4px;}

  /* приёмы пищи */
  .dmeals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px;}
  .dcard,.dcard-t,.ditem,.ditem-t,.dsum-r,.dweek-wrap{min-width:0;}
  .dmeals .dcard{margin-bottom:0;}
  .dmeal:nth-child(2){animation-delay:.04s;} .dmeal:nth-child(3){animation-delay:.08s;} .dmeal:nth-child(4){animation-delay:.12s;}
  .dlist{display:grid;gap:6px;margin-top:12px;}
  .ditem{display:flex;align-items:center;gap:10px;padding:9px 8px 9px 12px;border-radius:12px;background:#0F1113;border:1px solid var(--line);
    animation:ditemin .3s cubic-bezier(.22,.85,.32,1);transition:opacity .22s,transform .22s;}
  @keyframes ditemin{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
  .ditem.flash{animation:ditemin .3s cubic-bezier(.22,.85,.32,1),dflash 1.4s ease;}
  @keyframes dflash{0%,30%{border-color:var(--lime);box-shadow:0 0 0 3px rgba(201,244,92,.12);}100%{border-color:var(--line);box-shadow:none;}}
  .ditem.out{opacity:0;transform:translateX(18px);}
  .ditem-t{flex:1;min-width:0;}
  .ditem-t b{display:block;font-size:13.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ditem-t b small{font-weight:500;color:var(--muted);font-size:11.5px;}
  .ditem-t>span{display:block;font-size:11.5px;color:var(--muted);margin-top:1px;}
  .ditem-k{font-size:15px;font-weight:750;white-space:nowrap;}
  .ditem-k small{font-size:11px;color:var(--muted);font-weight:500;}
  .ditem-x,.ditem-e{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#6C737C;flex:none;}
  .ditem-x:hover{color:var(--red);background:rgba(255,110,96,.1);}
  .ditem-e:hover{color:var(--lime);background:var(--limesoft);}
  .ditem-x svg,.ditem-e svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}

  /* тренировка */
  .dprog{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 12px;border-radius:12px;border:1px solid var(--line2);
    color:var(--text);font-size:13px;font-weight:650;transition:border-color .15s,background .15s;}
  .dprog:hover{border-color:var(--lime);background:var(--panel2);}
  .dprog svg{width:16px;height:16px;fill:none;stroke:var(--lime);stroke-width:2;stroke-linecap:round;}
  .wsets{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px;}
  .wsets span{font-size:11.5px;padding:3px 8px;border-radius:7px;background:var(--limesoft);color:var(--lime);font-weight:650;}
  .dbw{display:flex;align-items:center;gap:12px;margin-top:12px;padding-top:12px;border-top:1px dashed var(--line2);flex-wrap:wrap;}
  .dbw-l span{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}
  .dbw-l b{display:block;font-size:15px;font-weight:700;margin-top:1px;}
  .dspark{width:110px;height:36px;border-radius:9px;padding:3px;transition:background .15s;}
  .dspark:hover{background:var(--panel2);}
  .dspark svg{width:100%;height:100%;display:block;overflow:visible;}
  .sp-line{fill:none;stroke:var(--lime);stroke-width:2;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke;}
  .sp-fill{fill:rgba(201,244,92,.12);}
  .sp-dot{fill:var(--lime);}
  .sp-empty{stroke:#2A3038;stroke-width:2;stroke-dasharray:4 4;fill:none;}
  .dbw-f{display:flex;gap:8px;margin-left:auto;}
  .dbw-f input{width:96px;height:40px;padding:0 12px;background:#0F1113;border:1px solid var(--line);border-radius:10px;}
  .dbw-f input:focus{outline:none;border-color:var(--lime);}

  /* вода */
  .dwater-v{font-size:13px;color:var(--muted);white-space:nowrap;}
  .dwater-v b{font-size:20px;color:#8DB8FF;font-weight:800;}
  .dwater-bar{position:relative;height:10px;border-radius:9px;background:#1B1F24;overflow:hidden;margin-top:14px;}
  .dwater-bar i{position:absolute;inset:0 auto 0 0;display:block;border-radius:9px;
    background:linear-gradient(90deg,#3E7BF0,#6FA5FF,#3E7BF0);background-size:200% 100%;animation:wflow 2.5s linear infinite;
    transition:width .6s cubic-bezier(.22,.85,.32,1);}
  @keyframes wflow{from{background-position:0 0;}to{background-position:-200% 0;}}
  .dwater.done .dwater-bar i{background:linear-gradient(90deg,#5FD08C,#8BE3A9,#5FD08C);background-size:200% 100%;}
  .dwater-row{display:flex;align-items:center;gap:10px;margin-top:12px;}
  .glasses{flex:1;display:flex;flex-wrap:wrap;gap:6px;}
  .glass{width:26px;height:34px;position:relative;border:2px solid #2E3540;border-top:none;border-radius:0 0 8px 8px;
    clip-path:polygon(0 0,100% 0,88% 100%,12% 100%);background:#0F1113;overflow:hidden;transition:transform .15s,border-color .2s;}
  .glass:hover{transform:translateY(-2px);border-color:#4C8DFF;}
  .glass i{position:absolute;left:0;right:0;bottom:0;height:0;background:linear-gradient(180deg,#6FA5FF,#3E7BF0);transition:height .35s cubic-bezier(.22,.85,.32,1);}
  .glass.on i{height:85%;}
  .glass.on{border-color:#4C8DFF;}
  .wbtn{min-width:40px;height:40px;padding:0 10px;border-radius:12px;border:1px solid var(--line2);font-size:18px;font-weight:700;color:var(--text);
    transition:background .15s,border-color .15s,transform .15s;}
  .wbtn:hover{background:var(--panel2);}
  .wbtn:active{transform:scale(.94);}
  .wbtn.plus{background:rgba(76,141,255,.16);border-color:rgba(76,141,255,.45);color:#8DB8FF;font-size:14px;}

  /* ================= МОДАЛКА ЕДЫ ================= */
  .fsheet{max-width:640px;}
  .fmealseg button{font-size:12.5px;padding:8px 6px;}
  .ftabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:14px;}
  .ftabs button{display:flex;align-items:center;justify-content:center;gap:7px;padding:11px 8px;border-radius:12px;border:1px solid var(--line);
    background:#0F1113;font-size:13px;font-weight:650;color:var(--muted);transition:.15s;}
  .ftabs button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .ftabs button:hover{color:var(--text);border-color:var(--line2);}
  .ftabs button.on{background:var(--limesoft);border-color:rgba(201,244,92,.45);color:var(--lime);}
  .fpane{animation:fade .2s ease;}
  .fsearch{position:relative;}
  .fsearch svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round;}
  .fsearch input{width:100%;height:48px;padding:0 14px 0 42px;background:#0F1113;border:1px solid var(--line);border-radius:14px;font-size:15px;}
  .fsearch input:focus{outline:none;border-color:var(--lime);box-shadow:0 0 0 3px rgba(201,244,92,.13);}
  .fres-list{display:grid;gap:5px;margin-top:10px;max-height:320px;overflow-y:auto;}
  .fres{display:flex;align-items:center;gap:10px;text-align:left;padding:10px 12px;border-radius:12px;background:#0F1113;border:1px solid var(--line);
    transition:border-color .14s,background .14s;animation:ditemin .2s ease both;}
  .fres:hover,.fres:focus-visible{border-color:var(--lime);background:var(--panel2);outline:none;}
  .fres-t{flex:1;min-width:0;}
  .fres-t b{display:block;font-size:14px;font-weight:650;}
  .fres-t b mark{background:none;color:var(--lime);}
  .fres-t small{display:block;font-size:11.5px;color:var(--muted);margin-top:2px;}
  .fres-k{text-align:right;flex:none;}
  .fres-k b{display:block;font-size:16px;font-weight:750;}
  .fres-k small{font-size:10.5px;color:var(--muted);}
  .fhint{font-size:13px;color:var(--muted);padding:10px 2px;}
  .fhint.small{padding:6px 2px 0;font-size:12.5px;}
  .fhint.warn{color:#FFB547;}
  .fsub{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:10px 0 2px;font-weight:700;}
  .foff{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;flex-wrap:wrap;}
  .foff .btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;}
  .spin{display:inline-block;width:13px;height:13px;border:2px solid var(--line2);border-top-color:var(--lime);border-radius:50%;
    animation:spin .7s linear infinite;vertical-align:-2px;margin-right:4px;}
  @keyframes spin{to{transform:rotate(360deg);}}

  /* сканер */
  .bcbox{position:relative;aspect-ratio:4/3;max-height:340px;width:100%;border-radius:16px;overflow:hidden;background:#07080A;border:1px solid var(--line);}
  .bcbox video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s;}
  .bcbox.live video{opacity:1;}
  .bcframe{position:absolute;left:12%;right:12%;top:30%;bottom:30%;opacity:.35;transition:opacity .3s;}
  .bcbox.live .bcframe{opacity:1;}
  .bcframe i{position:absolute;width:26px;height:26px;border:3px solid var(--lime);}
  .bcframe i:nth-child(1){left:0;top:0;border-right:0;border-bottom:0;border-radius:8px 0 0 0;}
  .bcframe i:nth-child(2){right:0;top:0;border-left:0;border-bottom:0;border-radius:0 8px 0 0;}
  .bcframe i:nth-child(3){left:0;bottom:0;border-right:0;border-top:0;border-radius:0 0 0 8px;}
  .bcframe i:nth-child(4){right:0;bottom:0;border-left:0;border-top:0;border-radius:0 0 8px 0;}
  .bcline{position:absolute;left:4%;right:4%;height:2px;background:var(--red);box-shadow:0 0 12px rgba(255,74,61,.9);top:50%;display:none;}
  .bcbox.live .bcline{display:block;animation:bcscan 1.8s ease-in-out infinite;}
  @keyframes bcscan{0%,100%{top:8%;}50%{top:92%;}}
  .bcidle{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--muted);text-align:center;padding:20px;font-size:12.5px;}
  .bcidle svg{width:46px;height:46px;fill:none;stroke:#3A3F46;stroke-width:1.6;stroke-linecap:round;}
  .bcbox.live .bcidle{display:none;}
  .bcbtns{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;}
  .bcbtns .btn{flex:1;min-width:140px;}
  .bcbtns .bi{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;}
  .bcfile{cursor:pointer;}
  .bcstatus{font-size:13px;color:var(--muted);margin-top:10px;min-height:20px;}
  .bcstatus.ok{color:var(--green);} .bcstatus.warn{color:#FFB547;}
  .bcmanual{display:flex;gap:8px;margin-top:10px;}
  .bcmanual input{flex:1;height:40px;padding:0 12px;background:#0F1113;border:1px solid var(--line);border-radius:10px;letter-spacing:.08em;font-variant-numeric:tabular-nums;}
  .bcmanual input:focus{outline:none;border-color:var(--lime);}

  /* фото + ИИ */
  .aidrop{position:relative;display:block;aspect-ratio:4/3;max-height:320px;width:100%;border-radius:16px;overflow:hidden;cursor:pointer;
    background:#0F1113;border:2px dashed var(--line2);transition:border-color .2s;margin-bottom:10px;}
  .aidrop:hover{border-color:var(--lime);}
  .aidrop img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:none;}
  .aidrop.has{border-style:solid;}
  .aidrop.has img{display:block;}
  .aidrop.has .aidrop-ph{display:none;}
  .aidrop-ph{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:20px;}
  .aidrop-ph svg{width:40px;height:40px;fill:none;stroke:var(--lime);stroke-width:1.6;margin-bottom:4px;}
  .aidrop-ph b{font-size:15px;}
  .aidrop-ph small{font-size:12px;color:var(--muted);max-width:260px;}
  .aiscan{position:absolute;inset:0;display:none;background:linear-gradient(180deg,transparent 0%,rgba(201,244,92,.28) 50%,transparent 100%);background-size:100% 40%;background-repeat:no-repeat;}
  .aidrop.scan .aiscan{display:block;animation:aiscan 1.4s ease-in-out infinite;}
  @keyframes aiscan{0%{background-position:0 -40%;}100%{background-position:0 140%;}}
  .ai-dish{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:12px 0 8px;}
  .ai-dish b{font-size:16px;} .ai-dish span{font-size:12px;color:var(--muted);}
  .ai-row{display:flex;align-items:center;gap:8px;padding:8px;border-radius:12px;background:#0F1113;border:1px solid var(--line);margin-bottom:6px;}
  .ai-n{flex:1;min-width:0;height:36px;padding:0 10px;background:transparent;border:1px solid transparent;border-radius:8px;font-weight:650;}
  .ai-n:focus,.ai-g input:focus{outline:none;border-color:var(--lime);}
  .ai-g{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);}
  .ai-g input{width:64px;height:36px;padding:0 8px;background:var(--panel2);border:1px solid var(--line);border-radius:8px;}
  .ai-k{font-size:13px;font-weight:700;text-align:right;min-width:92px;}
  .ai-k small{font-weight:500;color:var(--muted);font-size:10.5px;}
  .ai-tot{font-size:14px;margin:10px 0;color:var(--muted);} .ai-tot b{color:var(--lime);}
  .aicfg{margin-top:12px;border:1px solid var(--line);border-radius:12px;background:#0F1113;}
  .aicfg summary{cursor:pointer;padding:11px 14px;font-size:13px;font-weight:650;color:var(--muted);list-style:none;}
  .aicfg summary::-webkit-details-marker{display:none;}
  .aicfg.need summary span{color:#FFB547;}
  .aicfg-b{padding:0 14px 14px;display:grid;gap:10px;}
  .row3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}

  /* порция */
  .fportion{display:grid;gap:14px;animation:fade .22s ease;}
  .fportion h4{font-size:19px;font-weight:720;}
  .fp-amount{display:flex;align-items:center;gap:10px;justify-content:center;}
  .fp-amount label{display:flex;align-items:baseline;gap:6px;background:#0F1113;border:1px solid var(--line);border-radius:14px;padding:6px 16px;}
  .fp-amount input{width:100px;height:44px;background:none;border:none;font-size:28px;font-weight:800;text-align:center;}
  .fp-amount input:focus{outline:none;}
  .fp-amount span{color:var(--muted);font-size:14px;}
  .fportion .chips{justify-content:center;}
  .fp-res{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
  .fpk{background:#0F1113;border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center;}
  .fpk b{display:block;font-size:20px;font-weight:800;}
  .fpk:first-child b{color:var(--lime);}
  .fpk span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;}

  /* тренировка — модалка */
  .wolast{font-size:12.5px;color:var(--muted);min-height:0;}
  .wolast b{color:var(--lime);}
  .sethead{display:flex;justify-content:space-between;font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:700;}
  .sets{display:grid;gap:6px;}
  .setrow{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 10px;border-radius:12px;background:#0F1113;border:1px solid var(--line);}
  .setrow.new{animation:ditemin .25s ease;}
  .set-n{width:24px;height:24px;border-radius:7px;background:var(--limesoft);color:var(--lime);display:grid;place-items:center;font-size:12px;font-weight:750;flex:none;}
  .setrow label{flex:1;display:flex;align-items:center;gap:6px;}
  .setrow input{width:100%;min-width:0;height:38px;padding:0 10px;background:var(--panel2);border:1px solid var(--line);border-radius:9px;font-weight:700;font-size:15px;}
  .setrow input:focus{outline:none;border-color:var(--lime);}
  .setrow small{font-size:11.5px;color:var(--muted);}
  .set-x{color:var(--muted);}
  .set-del{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;color:#6C737C;flex:none;}
  .set-del:hover{color:var(--red);background:rgba(255,110,96,.1);}
  .set-del svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;}
  .progchart{height:240px;}
  .prog-kpis{grid-template-columns:repeat(3,1fr);}
  .chk{display:flex;align-items:center;gap:9px;font-size:14px;cursor:pointer;}
  .chk input{width:18px;height:18px;accent-color:var(--lime);}

  @media (max-width:900px){
    .dmeals{grid-template-columns:minmax(0,1fr);}
  }
  @media (max-width:700px){
    .dweekcard{flex-direction:column;}
    .dstreak{justify-content:flex-start;}
    .dsum{flex-direction:column;align-items:stretch;gap:14px;}
    .dring{margin:0 auto;width:140px;height:140px;}
    .dsum-r{text-align:center;}
    .dmacros{text-align:left;}
    .dprog span{display:none;}
    .dprog{width:40px;padding:0;justify-content:center;}
    .fp-res{grid-template-columns:repeat(2,1fr);}
    .ftabs button{flex-direction:column;gap:4px;font-size:12px;}
  }
  @media (max-width:560px){
    .dmacros{grid-template-columns:1fr;gap:8px;}
    .dbw-f{margin-left:0;width:100%;}
    .dbw-f input{flex:1;}
    .row3{grid-template-columns:1fr 1fr 1fr;gap:6px;}
    .prog-kpis{grid-template-columns:repeat(3,1fr);}
    .prog-kpis .kpi b{font-size:18px;}
    .glass{width:22px;height:30px;}
    .modal{padding:10px;align-items:flex-end;}
    .sheet{max-height:92vh;border-radius:20px 20px 16px 16px;}
  }
  .fp-amount input::-webkit-outer-spin-button,.fp-amount input::-webkit-inner-spin-button,
  .setrow input::-webkit-outer-spin-button,.setrow input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
  .fp-amount input,.setrow input{-moz-appearance:textfield;appearance:textfield;}

  /* ---------- поиск по рецептам и упражнениям ---------- */
  .gsearch{position:relative;max-width:560px;margin-bottom:14px;}
  .gsearch svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round;pointer-events:none;}
  .gsearch input{width:100%;height:46px;padding:0 110px 0 42px;background:var(--panel);border:1px solid var(--line);border-radius:14px;font-size:15px;transition:border-color .15s,box-shadow .15s;}
  .gsearch input:hover{border-color:var(--line2);}
  .gsearch input:focus{outline:none;border-color:var(--lime);box-shadow:0 0 0 3px rgba(201,244,92,.13);}
  .gsearch input:focus + .gsearch-n, .gsearch input:not(:placeholder-shown) ~ .gsearch-n{color:var(--lime);}
  .gsearch-n{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--muted);pointer-events:none;white-space:nowrap;}
  .gsearch input::-webkit-search-cancel-button{margin-right:4px;}
  .empty .linkbtn{margin-left:6px;}

  /* ---------- готовый день ---------- */
  .slot em strong{color:var(--lime);font-weight:700;}
  .slot em.slot-m{display:block;margin-top:4px;font-size:11.5px;}
  .kpi b small{font-size:12px;color:var(--muted);font-weight:600;}
  .kpi.good b small{color:var(--muted);}
  @media (max-width:560px){ .gsearch input{padding-right:96px;} }

  /* ---------- без случайного выделения на цифрах, счётчиках и кнопках ---------- */
  button,.btn,.chip,.seg,.navbtn,.tabbar,
  .normbig,.macro,.macros,.bar,.splitrow,
  .dring,.dmacros,.dstreak,.dweek,.wday,.glasses,.dwater-v,.dwater-row,
  .kpi,.kpis,.fpk,.fp-res,.stk,.stk-week,.pfab,.acc-h,
  .rtag,.ephoto,.rphoto,.stars,.starpick,.slot em{
    -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
  }
  .normbig b,.dring-c b,.macro b,.kpi b{cursor:default;}
  /* поля ввода по-прежнему можно выделять */
  input,textarea,select{-webkit-user-select:text;user-select:text;}
  button,.chip,.wday,.glass,.dplus{-webkit-tap-highlight-color:transparent;}

  /* ================= ВСПЛЫВАЮЩИЕ ЦИТАТЫ ================= */
  /* подложка не перехватывает клики — страница под ней работает как обычно */
  .qt-root{position:fixed;right:20px;bottom:20px;z-index:57;width:min(400px,calc(100vw - 40px));pointer-events:none;
    display:flex;flex-direction:column;align-items:flex-end;}
  .qt{pointer-events:auto;position:relative;display:flex;gap:12px;width:100%;padding:16px 44px 18px 16px;overflow:hidden;
    background:rgba(20,22,25,.96);border:1px solid var(--line2);border-radius:18px;backdrop-filter:blur(10px);
    box-shadow:0 18px 44px -14px rgba(0,0,0,.75);
    opacity:0;transform:translateY(26px) scale(.98);
    transition:opacity .45s cubic-bezier(.22,.85,.32,1),transform .45s cubic-bezier(.22,.85,.32,1);}
  .qt.in{opacity:1;transform:none;}
  .qt.out{opacity:0;transform:translateY(8px);transition:opacity .4s ease,transform .4s ease;}
  .qt-mark{flex:none;width:34px;height:34px;border-radius:11px;background:var(--limesoft);color:var(--lime);
    font:800 30px/1 Georgia,'Times New Roman',serif;display:grid;place-items:start center;padding-top:6px;}
  .qt-body{min-width:0;}
  .qt-text{font-size:14.5px;line-height:1.45;color:var(--text);font-weight:520;}
  .qt-by{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px;}
  .qt-by b{font-size:12.5px;color:var(--lime);font-weight:700;}
  .qt-by span{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);
    border:1px solid var(--line2);border-radius:999px;padding:2px 8px;}
  .qt-x{position:absolute;top:10px;right:10px;width:28px;height:28px;border-radius:9px;display:grid;place-items:center;color:var(--muted);transition:.15s;}
  .qt-x:hover{color:var(--text);background:var(--panel2);}
  .qt-x:focus-visible{outline:2px solid var(--lime);outline-offset:1px;}
  .qt-x svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;}
  .qt-bar{position:absolute;left:0;bottom:0;height:3px;width:100%;background:var(--lime);opacity:.7;transform-origin:left;
    animation:qtbar linear forwards;}
  .qt.paused .qt-bar{animation-play-state:paused;}
  @keyframes qtbar{from{transform:scaleX(1);}to{transform:scaleX(0);}}
  /* обычный тост поднимается, если в этот момент видна цитата */
  body.qt-on .toast{bottom:calc(var(--qt-h, 90px) + 40px);}

  /* переключатель в профиле */
  .pd-toggle{display:flex;align-items:center;gap:12px;margin-top:10px;padding:12px 14px;background:var(--panel);border:1px solid var(--line);
    border-radius:14px;cursor:pointer;-webkit-user-select:none;user-select:none;}
  .pd-toggle span{flex:1;min-width:0;}
  .pd-toggle b{display:block;font-size:14px;font-weight:650;}
  .pd-toggle small{display:block;font-size:12px;color:var(--muted);margin-top:1px;}
  .pd-toggle input{position:absolute;opacity:0;pointer-events:none;}
  .sw{flex:none;position:relative;width:44px;height:26px;border-radius:99px;background:#2A3038;transition:background .2s;}
  .sw::after{content:'';position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#C3CAD2;transition:transform .22s cubic-bezier(.22,.85,.32,1),background .2s;}
  .pd-toggle input:checked + .sw{background:var(--lime);}
  .pd-toggle input:checked + .sw::after{transform:translateX(18px);background:var(--ink);}
  .pd-toggle input:focus-visible + .sw{outline:2px solid var(--lime);outline-offset:2px;}

  @media (max-width:900px){
    /* над нижним меню; слева место под кнопку профиля */
    .qt-root{left:70px;right:12px;width:auto;bottom:calc(76px + env(safe-area-inset-bottom));}
    .qt{padding:13px 40px 15px 13px;gap:10px;border-radius:16px;}
    .qt-mark{width:28px;height:28px;font-size:24px;padding-top:5px;}
    .qt-text{font-size:13.5px;}
    body.qt-on .toast{bottom:calc(var(--qt-h, 90px) + 96px + env(safe-area-inset-bottom));}
  }
  @media (prefers-reduced-motion:reduce){ .qt,.qt.out{transition:opacity .2s;transform:none;} }

  /* ================= СКАНЕР v2 ================= */
  .bcbox{aspect-ratio:3/4;max-height:min(420px,52vh);}
  @media (min-width:701px){ .bcbox{aspect-ratio:4/3;} }
  /* затемнение вокруг рамки — видно, куда наводить */
  .bcshade{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .3s;
    box-shadow:inset 0 0 0 9999px rgba(0,0,0,.45);
    clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 27.5%,10% 27.5%,10% 72.5%,90% 72.5%,90% 27.5%,0 27.5%);}
  .bcbox.live .bcshade{opacity:1;}
  .bcframe{left:10%;right:10%;top:27.5%;bottom:27.5%;transition:opacity .3s,filter .2s;}
  .bcbox.hit .bcframe i{border-color:var(--green);}
  .bcbox.hit .bcline{display:none;}
  .bcbox.hit::after{content:'';position:absolute;inset:0;background:rgba(95,208,140,.18);animation:fade .3s ease;}
  .bctorch{position:absolute;right:10px;top:10px;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;
    background:rgba(11,12,14,.72);border:1px solid rgba(255,255,255,.18);color:#fff;z-index:2;}
  .bctorch svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round;}
  .bctorch.on{background:var(--lime);color:var(--ink);border-color:var(--lime);}
  .bctorch.on svg{fill:currentColor;}
  .bcstatus{min-height:40px;font-size:13.5px;line-height:1.4;}
  .bcmanual input{height:46px;font-size:16px;}
  .bcmanual .btn{height:46px;}
  .fnotfound{margin-top:10px;padding:12px 14px;border-radius:12px;background:rgba(255,181,71,.08);border:1px solid rgba(255,181,71,.35);
    color:#FFD08A;font-size:13px;line-height:1.45;animation:fade .25s ease;}
  .fnotfound b{color:#fff;}
  .fnotfound .linkbtn{font-size:13px;}

  /* ================= ОТКЛИК КНОПОК, «ЗАПОМНИТЬ МЕНЯ» ================= */
  .btn.busy{position:relative;color:transparent !important;pointer-events:none;}
  .btn.busy::after{content:'';position:absolute;left:50%;top:50%;width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;
    border:2.5px solid rgba(13,15,17,.25);border-top-color:var(--ink);animation:spin .7s linear infinite;}
  .btn.ghost.busy::after{border-color:rgba(255,255,255,.2);border-top-color:var(--lime);}
  .btn:disabled{cursor:default;}
  .chk.remember{min-height:44px;margin:-4px 0 -8px;}
  .chk input{position:absolute;opacity:0;width:1px;height:1px;}
  .cbox{flex:none;width:22px;height:22px;border-radius:7px;border:1.5px solid var(--line2);background:#0F1113;display:grid;place-items:center;transition:background .15s,border-color .15s;}
  .cbox::after{content:'';width:10px;height:6px;border-left:2.2px solid var(--ink);border-bottom:2.2px solid var(--ink);transform:rotate(-45deg) translate(1px,-1px);opacity:0;transition:opacity .15s;}
  .chk input:checked + .cbox{background:var(--lime);border-color:var(--lime);}
  .chk input:checked + .cbox::after{opacity:1;}
  .chk input:focus-visible + .cbox{outline:2px solid var(--lime);outline-offset:2px;}
  .chk span{font-size:14px;color:var(--text);}
  /* тост вверху, когда открыто окно (телефон) */
  .toast.top{top:calc(14px + env(safe-area-inset-top));bottom:auto !important;transform:translate(-50%,-20px);}
  .toast.top.on{transform:translate(-50%,0);}
  @media (max-width:700px){
    /* форма регистрации появляется сразу, без «невидимой» полусекунды */
    .authslide.signup-active .aform-signup,.aform-signin{animation:fade .2s ease;}
    .aswitch.mobile-only a{display:inline-block;padding:12px 6px;margin:-12px -6px;}
  }

  /* ================= ПРОИЗВОДИТЕЛЬНОСТЬ НА ТЕЛЕФОНЕ ================= */
  html,body{overflow-x:clip;max-width:100%;}
  img{max-width:100%;}
  /* браузер не рендерит карточки за пределами экрана */
  .rcard,.ecard{content-visibility:auto;contain-intrinsic-size:auto 420px;}
  /* на сенсорных экранах hover «залипает» — убираем подъёмы/зумы */
  @media (hover:none){
    .rcard:hover,.ecard:hover,.slot:hover,.pmini:hover,.wday:hover,.btn:hover,.dplus:hover,.glass:hover,.pfab:hover{transform:none;}
    .rcard:hover .rphoto img{transform:none;}
    .rcard:hover .rphoto::before{animation:none;opacity:0;}
    .dplus:hover svg{transform:none;}
    .rcard:active,.ecard:active{transform:scale(.99);}
    .btn:active,.dplus:active,.wbtn:active{transform:scale(.96);}
  }
  @media (max-width:900px){
    /* размытие фона — самое тяжёлое для мобильных GPU: заменяем плотной подложкой */
    .rtag,.ephoto b,.favbtn,.ephoto .bmap,.mtop,.tabbar,.modal,.qt{-webkit-backdrop-filter:none;backdrop-filter:none;}
    .rtag,.ephoto b,.favbtn{background:rgba(11,12,14,.86);}
    .ephoto .bmap{background:rgba(8,9,11,.86);}
    .mtop{background:rgba(11,12,14,.97);}
    .tabbar{background:rgba(14,16,18,.98);transform:translateZ(0);transition:transform .22s ease;}
    .modal{background:rgba(6,7,9,.84);}
    /* бесконечные анимации на каждой карточке упражнения — выключаем */
    .ephoto .mtag i.dot{animation:none;}
    .shell{min-height:100dvh;}
    /* клавиатура открыта — прячем нижнее меню и плавающие кнопки, чтобы не наезжали на поле ввода */
    body.kb-open .tabbar{transform:translateY(110%);}
    body.kb-open .pfab,body.kb-open .qt-root,body.kb-open .chatfab{opacity:0;pointer-events:none;}
    .pfab,.qt-root{transition:opacity .18s;}
  }

  /* ================= ИИ-МЕНТОР ================= */
  .chatfab{position:fixed;right:18px;bottom:18px;z-index:55;display:flex;align-items:center;gap:9px;height:52px;padding:0 18px 0 14px;border-radius:18px;
    background:var(--lime);color:var(--ink);font-weight:750;font-size:14px;box-shadow:0 12px 30px -8px rgba(201,244,92,.45),0 8px 24px -10px rgba(0,0,0,.6);
    transition:transform .2s cubic-bezier(.22,.85,.32,1),opacity .2s;}
  .chatfab svg{width:22px;height:22px;fill:currentColor;}
  .chatfab:hover{transform:translateY(-2px);}
  .chatfab:active{transform:scale(.95);}
  .chatfab.hide{opacity:0;pointer-events:none;transform:scale(.85);}
  .chatfab:focus-visible{outline:2px solid #fff;outline-offset:3px;}
  /* цитаты — над кнопкой чата */
  .qt-root{bottom:84px;}

  .chat{position:fixed;right:18px;bottom:18px;z-index:59;width:min(410px,calc(100vw - 36px));height:min(640px,calc(100dvh - 36px));
    display:flex;flex-direction:column;background:var(--bg);border:1px solid var(--line2);border-radius:22px;overflow:hidden;
    box-shadow:0 30px 70px -20px rgba(0,0,0,.8);
    opacity:0;transform:translateY(16px) scale(.94);transform-origin:bottom right;visibility:hidden;pointer-events:none;
    transition:opacity .25s cubic-bezier(.22,.85,.32,1),transform .3s cubic-bezier(.22,.85,.32,1),visibility 0s linear .3s;}
  .chat.on{opacity:1;transform:none;visibility:visible;pointer-events:auto;transition:opacity .25s cubic-bezier(.22,.85,.32,1),transform .3s cubic-bezier(.22,.85,.32,1);}
  .chat-h{display:flex;align-items:center;gap:10px;padding:12px 10px 12px 14px;border-bottom:1px solid var(--line);background:var(--panel);}
  .chat-ava,.chat-spark{width:40px;height:40px;border-radius:13px;background:var(--limesoft);display:grid;place-items:center;flex:none;}
  .chat-ava svg,.chat-spark svg{width:22px;height:22px;fill:var(--lime);}
  .chat-t{flex:1;min-width:0;}
  .chat-t b{display:block;font-size:15px;}
  .chat-t span{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;}
  .chat-t em{font-style:normal;}
  .chat-dot{width:7px;height:7px;border-radius:50%;background:var(--green);flex:none;}
  .chat-ib{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;color:var(--muted);flex:none;}
  .chat-ib:hover{background:var(--panel2);color:var(--text);}
  .chat-ib svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .chat-cfg{padding:12px 14px;display:grid;gap:10px;border-bottom:1px solid var(--line);background:var(--panel);}
  .chat-cfg .foot{margin:0;font-size:11.5px;}
  .chat-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:14px 12px 6px;display:flex;flex-direction:column;gap:8px;-webkit-overflow-scrolling:touch;}
  .msg{display:flex;animation:msgin .25s cubic-bezier(.22,.85,.32,1);}
  @keyframes msgin{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
  .msg.me{justify-content:flex-end;}
  .bub{max-width:86%;padding:10px 13px;border-radius:18px;font-size:14.5px;line-height:1.5;overflow-wrap:anywhere;
    -webkit-user-select:text;user-select:text;}
  .msg.me .bub{background:var(--lime);color:var(--ink);border-bottom-right-radius:6px;}
  .msg.ai .bub{background:var(--panel);border:1px solid var(--line);border-bottom-left-radius:6px;}
  .bub p+p,.bub p+ul,.bub p+ol,.bub ul+p,.bub ol+p,.bub pre+p,.bub p+pre{margin-top:7px;}
  .bub ul,.bub ol{padding-left:20px;margin:4px 0;}
  .bub li+li{margin-top:3px;}
  .bub b{font-weight:700;}
  .msg.ai .bub b{color:#fff;}
  .bub code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:rgba(255,255,255,.08);padding:1px 5px;border-radius:5px;}
  .msg.me .bub code{background:rgba(0,0,0,.12);}
  .bub pre{background:#07080A;border:1px solid var(--line);border-radius:10px;padding:10px;overflow-x:auto;margin:6px 0;}
  .bub pre code{background:none;padding:0;font-size:12.5px;white-space:pre;}
  .caret{display:inline-block;width:7px;height:15px;margin-left:2px;vertical-align:-2px;background:var(--lime);border-radius:2px;animation:blink 1s steps(2) infinite;}
  @keyframes blink{50%{opacity:0;}}
  .typing{display:inline-flex;gap:4px;padding:4px 2px;}
  .typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:tdot 1.2s ease-in-out infinite;}
  .typing i:nth-child(2){animation-delay:.15s;} .typing i:nth-child(3){animation-delay:.3s;}
  @keyframes tdot{0%,80%,100%{opacity:.3;transform:translateY(0);}40%{opacity:1;transform:translateY(-3px);}}
  .chat-hello{margin:auto 0 8px;text-align:center;padding:10px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;}
  .chat-hello b{font-size:17px;}
  .chat-hello p{font-size:13.5px;color:var(--muted);line-height:1.5;}
  .chat-note{font-size:12.5px;color:var(--muted);text-align:center;padding:8px 10px;border-radius:12px;border:1px dashed var(--line2);line-height:1.45;}
  .chat-note.err{color:#FFB0A6;border-color:rgba(255,110,96,.4);}
  .chat-note.warn{color:#FFD08A;border-color:rgba(255,181,71,.4);text-align:left;}
  .chat-note code{font-size:11.5px;background:rgba(255,255,255,.07);padding:1px 4px;border-radius:4px;}
  .chat-sugg{padding:4px 12px 8px;gap:6px;}
  .chat-sugg .chip{font-size:12.5px;padding:9px 12px;text-align:left;}
  .chat-in{display:flex;align-items:flex-end;gap:8px;padding:10px 10px 6px;border-top:1px solid var(--line);background:var(--panel);}
  .chat-in textarea{flex:1;min-width:0;resize:none;max-height:140px;min-height:44px;padding:11px 14px;border-radius:14px;background:#0F1113;border:1px solid var(--line);
    font:inherit;font-size:15px;line-height:1.4;color:var(--text);}
  .chat-in textarea:focus{outline:none;border-color:var(--lime);}
  .chat-send{width:44px;height:44px;border-radius:14px;background:var(--lime);color:var(--ink);display:grid;place-items:center;flex:none;transition:transform .15s,background .15s;}
  .chat-send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;}
  .chat-send.stop{background:var(--panel2);color:var(--text);border:1px solid var(--line2);}
  .chat-send.stop svg{fill:currentColor;stroke:none;}
  .chat-send:active{transform:scale(.92);}
  .chat-disc{font-size:10.5px;color:#6C737C;text-align:center;padding:0 10px 8px;background:var(--panel);}

  @media (max-width:900px){
    .chatfab{right:12px;bottom:calc(74px + env(safe-area-inset-bottom));height:50px;width:50px;padding:0;justify-content:center;border-radius:16px;}
    .chatfab span{display:none;}
    .qt-root{left:70px;right:70px;bottom:calc(76px + env(safe-area-inset-bottom));}
  }
  @media (max-width:700px){
    /* на телефоне чат — во весь экран, выезжает снизу; высота = видимая область (клавиатура не закрывает ввод) */
    .chat{left:0;right:0;top:0;bottom:auto;width:100%;height:var(--vvh,100dvh);border-radius:0;border:none;transform:translateY(24px);transform-origin:bottom center;}
    .chat.on{transform:none;}
    .chat-h{padding-top:calc(10px + env(safe-area-inset-top));}
    .chat-in{padding-bottom:calc(8px + env(safe-area-inset-bottom));}
    .chat-disc{display:none;}
    .bub{max-width:90%;font-size:15px;}
  }
  .chat-cfg[hidden]{display:none;}

  /* ================= МОБИЛЬНАЯ АДАПТАЦИЯ ================= */
  .main{min-width:0;}
  @media (max-width:900px){
    .shell{grid-template-columns:minmax(0,1fr);}
    .main{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));}
    .mtop{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));}
    .mtop #meNameM{max-width:34vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    .phead h1{font-size:clamp(22px,6.4vw,26px);line-height:1.2;overflow-wrap:anywhere;}
    .phead p{font-size:14px;}
    .card{padding:18px;}
    .normbig b{font-size:clamp(36px,11vw,46px);}
    .sheethead h3{font-size:18px;overflow-wrap:anywhere;}
    h3,h4,b{overflow-wrap:anywhere;}
  }
  /* сенсорные экраны: все нажимаемые элементы — не меньше 44×44 (Apple HIG / Material) */
  @media (max-width:900px), (pointer:coarse){
    .btn,.btn.sm{min-height:44px;}
    .btn.sm{height:44px;}
    .chip{min-height:44px;display:inline-flex;align-items:center;}
    .seg button{min-height:44px;}
    .x{width:44px;height:44px;display:grid;place-items:center;margin:-8px -10px -8px 0;font-size:26px;}
    .linkbtn{min-height:44px;display:inline-flex;align-items:center;}
    .dplus{width:44px;height:44px;min-width:44px;}
    .dprog{height:44px;min-width:44px;}
    .ditem-x,.ditem-e{width:44px;height:44px;margin:-8px -6px -8px 0;}
    .favbtn{width:44px;height:44px;left:8px;top:8px;}
    .favbtn svg{width:19px;height:19px;}
    .wbtn{min-width:44px;height:44px;}
    .glass{width:30px;height:44px;border-width:0;background:none;clip-path:none;display:grid;place-items:end center;padding-bottom:4px;}
    .glass::before{content:'';position:absolute;left:4px;right:4px;top:8px;bottom:4px;border:2px solid #2E3540;border-top:none;border-radius:0 0 7px 7px;
      clip-path:polygon(0 0,100% 0,88% 100%,12% 100%);background:#0F1113;}
    .glass.on::before{border-color:#4C8DFF;}
    .glass i{left:6px;right:6px;bottom:6px;z-index:1;border-radius:0 0 5px 5px;}
    .glass.on i{height:24px;}
    .dspark{height:44px;}
    .dbw-f input{height:44px;font-size:16px;}
    .field input,.field select,.fsearch input,.gsearch input{min-height:44px;font-size:16px;}   /* 16px — iOS не зумит поле при фокусе */
    .pmini{min-height:66px;}
    .acc-h{min-height:60px;}
    .fres{min-height:52px;}
    .set-del{width:44px;height:44px;}
    .setrow input{height:44px;font-size:16px;}
    .ai-g input,.ai-n{height:44px;font-size:16px;}
    .fp-amount input{font-size:28px;}
    .qt-x{width:44px;height:44px;top:2px;right:2px;}
    .logout{min-height:44px;}
    .chk{min-height:44px;}
    .rfoot{flex-wrap:wrap;row-gap:4px;}
    .starpick button{width:48px;height:48px;font-size:30px;}
    .tabbar button{min-height:52px;}
    #fManualLink,.stk-go{min-height:44px;}
  }
  @media (max-width:700px){ .dprog{width:44px;} }
  @media (max-width:900px), (pointer:coarse){
    .ic-r{width:44px;height:44px;right:2px;}
    .field.ic .inputwrap input{padding-right:48px;}
    .dnav{width:44px;height:44px;}
    .x,#pdClose,.chat-ib{flex:none;}
    .del{min-height:44px;padding:0 6px;}
    .aicfg summary{min-height:44px;display:flex;align-items:center;}
    .glasses{pointer-events:none;}
  }
  @media (max-width:700px){
    .dweekcard{padding:12px;}
    .dweek{gap:4px;}
    .wday{padding:6px 0 7px;}
  }
  @media (max-width:400px){
    .setrow{gap:6px;padding-left:8px;}
    .setrow small{display:none;}
    .setrow .set-x{margin:0 -2px;}
  }
  span.glass{display:inline-grid;position:relative;}
  .qt-text{overflow-wrap:anywhere;}
  @media (max-width:420px){
    /* узкий экран: цитата над кнопками профиля и чата, во всю ширину */
    .qt-root{left:12px;right:12px;bottom:calc(132px + env(safe-area-inset-bottom));}
    body.qt-on .toast{bottom:calc(var(--qt-h, 90px) + 150px + env(safe-area-inset-bottom));}
  }
  @media (max-width:420px){
    .dwater-row{flex-wrap:wrap;justify-content:space-between;}
    .glasses{order:3;flex-basis:100%;justify-content:center;gap:2px;}
    .gsearch input{padding-right:84px;}
  }
  .chat-note.signin{text-align:left;color:var(--text);border-style:solid;border-color:rgba(201,244,92,.35);background:var(--limesoft);display:grid;gap:10px;padding:12px 14px;font-size:13.5px;}
  .chat-note.signin b{color:var(--lime);}
  .chat-note.signin .btn{width:100%;}
  #chatMode button{font-size:12.5px;}

  /* ================= ЦИТАТЫ НА ТЕЛЕФОНЕ: компактная строка ================= */
  @media (max-width:900px){
    .qt-root{left:12px;right:12px;width:auto;bottom:calc(var(--tabbar-h, 68px) + 8px);}
    .qt.qt-mini{display:block;padding:9px 12px 10px;border-radius:12px;gap:0;cursor:pointer;touch-action:none;
      background:rgba(20,22,25,.97);border-color:var(--line2);box-shadow:0 8px 22px -10px rgba(0,0,0,.7);
      transform:translateY(10px);transition:opacity .3s ease,transform .3s cubic-bezier(.22,.85,.32,1);}
    .qt.qt-mini.in{transform:none;}
    .qt.qt-mini.drag{transition:none;}
    .qt-line{font-size:12.5px;line-height:1.35;color:#DDE2E8;
      display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;}
    .qt-line b{font-size:11.5px;font-weight:700;color:var(--lime);white-space:nowrap;}
    .qt.qt-mini .qt-bar{height:2px;opacity:.55;}
    /* кнопки профиля и чата плавно приподнимаются над цитатой, чтобы ничего не перекрывалось */
    .pfab,.chatfab{transition:opacity .18s,transform .28s cubic-bezier(.22,.85,.32,1);}
    body.qt-on .pfab,body.qt-on .chatfab{transform:translateY(calc(-1 * var(--qt-h, 44px) - 8px));}
    body.qt-on .toast{bottom:calc(var(--qt-h, 44px) + var(--tabbar-h, 68px) + 20px);}
  }
  @media (max-width:420px){
    .qt-root{left:10px;right:10px;bottom:calc(var(--tabbar-h, 68px) + 6px);}
    body.qt-on .toast{bottom:calc(var(--qt-h, 44px) + var(--tabbar-h, 68px) + 18px);}
  }
  @media (max-width:900px){
    /* длинная цитата: текст — 2 строки, автор — отдельной короткой строкой, чтобы не обрезался */
    .qt.qt-long .qt-line{display:block;}
    .qt.qt-long .qt-q{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
    .qt.qt-long .qt-line b{display:block;margin-top:2px;}
  }

  /* ================= САХАР (КБЖУ + Сахар) ================= */
  .dmacros{grid-template-columns:repeat(4,minmax(0,1fr));}
  .dmac.sugar .dmac-h b{color:#FFB3D1;}
  .dmac.sugar.over .dmac-h b,.dmac.sugar.over .dmac-l{color:var(--red);}
  .dmac.sugar.over .dmac-bar em{background:var(--red) !important;}
  .kb span.sg{background:rgba(255,154,193,.08);border-color:rgba(255,154,193,.28);color:#FFC2DA;}
  .fp-res{grid-template-columns:repeat(5,minmax(0,1fr));}
  .fpk{padding:10px 6px;min-width:0;}
  .fpk.sugar b{color:#FFB3D1;}
  .fpk span{display:block;}
  .kpi.sg b{color:#FFB3D1;}
  .kpi.sg.warn b{color:#FFB547;}
  .row4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
  #dayTotal{grid-template-columns:repeat(5,minmax(0,1fr));}
  @media (max-width:900px){
    #dayTotal{grid-template-columns:repeat(3,minmax(0,1fr));}
  }
  @media (max-width:700px){
    .fp-res{grid-template-columns:repeat(4,minmax(0,1fr));}
    .fp-res .fpk:first-child{grid-column:1 / -1;display:flex;align-items:baseline;justify-content:center;gap:8px;padding:8px;}
    .fpk b{font-size:17px;}
    .fpk span{font-size:10.5px;letter-spacing:0;text-transform:none;}
  }
  @media (max-width:560px){
    .dmacros{grid-template-columns:repeat(2,minmax(0,1fr));}
    .row4{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
    #dayTotal{grid-template-columns:repeat(2,minmax(0,1fr));}
    #dayTotal .kpi:last-child{grid-column:1 / -1;}
  }

  /* окно «Добавить еду»: содержимое никогда не шире окна (фото + результат ИИ на телефоне) */
  .fsheet,#fMain,.fpane,#aiResult{min-width:0;max-width:100%;}
  .aidrop{min-width:0;max-width:100%;}
  .ai-row{min-width:0;}
  .ai-k{min-width:0;flex:none;max-width:44%;}
  @media (max-width:560px){
    .ai-row{flex-wrap:wrap;row-gap:4px;}
    .ai-n{flex:1 1 100%;}
    .ai-k{margin-left:auto;max-width:none;}
  }

  /* ================= мобильные правки (аудит 320–430px) ================= */
  .ephoto .mtag .mt{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .bcmanual input{min-width:0;}
  .bcmanual .btn{flex:none;}
  .pd-head .me{flex:1;min-width:0;}
  .pd-head .me b,.pd-head .me span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;}
  .witem{min-width:0;}
  @media (max-width:560px){
    /* названия продуктов в дневнике — до 2 строк, а не обрезка на полуслове */
    .ditem-t b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;overflow-wrap:anywhere;}
    .witem{gap:8px;padding:12px;}
    .witem b{width:auto;min-width:0;white-space:nowrap;}
    .witem span{white-space:nowrap;}
  }
  .sheet{min-width:0;}
  .sheet > *,.sheet .field,.sheet label{min-width:0;}
  select{max-width:100%;min-width:0;text-overflow:ellipsis;}
  #progEx{width:100%;}
  .prog-kpis .kpi{min-width:0;}
  @media (max-width:560px){
    .prog-kpis{gap:6px;}
    .prog-kpis .kpi{padding:10px 8px;}
    .prog-kpis .kpi b{font-size:17px;}
    .prog-kpis .kpi span{font-size:9.5px;letter-spacing:.02em;white-space:normal;overflow-wrap:break-word;hyphens:auto;line-height:1.25;}
  }
  .field input,.field select,.field textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box;}
  @media (max-width:900px){
    .mtop .brand{flex:none;}
    .mtop > div:last-child{min-width:0;}
    .mtop #meNameM{max-width:calc(100vw - 240px);min-width:0;}
  }
  .sheetbody{grid-template-columns:minmax(0,1fr);}
  @media (max-width:360px){
    .sheethead{padding:18px 16px 0;}
    .sheetbody{padding:14px 16px 18px;}
    .seg button{padding-left:4px;padding-right:4px;}
  }
  /* фото еды: камера или галерея */
  .aisrc{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 8px;}
  .aisrc .btn{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;cursor:pointer;}
  .aisrc svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
  /* пока открыто окно — страница под ним не прокручивается (особенно важно на iPhone) */
  html:has(.modal.on),html:has(.modal.on) body{overflow:hidden;}
  .sheet{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
  @supports (height:100dvh){
    .sheet{max-height:88dvh;}
    @media (max-width:560px){ .sheet{max-height:92dvh;} }
  }
  .mtop{gap:10px;}

  /* ============ телефон: без плавающих кнопок поверх контента ============
     Профиль — аватар в верхней панели, ИИ-ментор — вкладка в нижнем меню.
     Раньше круглые кнопки закрывали «+» у приёмов пищи и карточки. */
  .mprof{display:none;}
  #tabChat{display:none;}
  @media (max-width:900px){
    .pfab,.chatfab{display:none !important;}
    .main{padding-bottom:calc(96px + env(safe-area-inset-bottom));}
    .mtop{background:var(--bg,#0B0C0E);}
    .mtop #meNameM{display:none;}
    .mprof{display:inline-flex;position:relative;align-items:center;justify-content:center;width:44px;height:44px;border-radius:13px;flex:none;}
    .mprof .ava{width:38px;height:38px;border-radius:12px;font-size:16px;display:grid;place-items:center;}
    .mfire{position:absolute;right:-9px;top:-7px;display:inline-flex;align-items:center;gap:1px;padding:1px 5px 1px 3px;border-radius:9px;
      font-size:10.5px;font-weight:800;color:#FFB547;background:#1E1A14;border:1px solid rgba(255,154,46,.4);line-height:1.3;}
    .mfire svg{width:10px;height:10px;fill:#FF9A2E;}
    .mfire:empty{display:none;}
    #tabChat{display:flex;}
    .tabbar button{flex:1 1 0;min-width:0;}
  }
  @media (max-width:900px){ .tabbar{background:#0E1012 !important;} }
  @media (max-width:560px){
    .macros{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
    .macro{padding:11px 10px;min-width:0;}
    .macro b{font-size:20px;}
    .macro span{font-size:12px;}
  }
  .ai-cnt{display:inline-flex;align-items:center;gap:2px;background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:2px;flex:none;}
  .ai-cnt button{width:36px;height:36px;border-radius:8px;font-size:18px;font-weight:700;color:var(--lime);display:grid;place-items:center;}
  .ai-cnt button:active{background:var(--limesoft);}
  .ai-cnt b{font-size:12.5px;min-width:34px;text-align:center;font-weight:700;}
  @media (max-width:560px){ .ai-cnt button{width:40px;height:40px;} }
  .ai-gw{display:inline-flex;align-items:center;gap:4px;flex:none;}
  .ai-gs{width:36px;height:36px;border-radius:9px;background:var(--panel2);border:1px solid var(--line);color:var(--lime);font-size:18px;font-weight:700;display:grid;place-items:center;flex:none;}
  .ai-gs:active{background:var(--limesoft);}
  @media (max-width:560px){ .ai-gs{width:40px;height:44px;} .ai-g input{width:58px;} }
  /* штрих-кода нет в базах — карточка «сфоткай этикетку» */
  .bcnf{display:grid;gap:10px;margin-top:10px;padding:14px;border-radius:14px;background:var(--limesoft);border:1px solid rgba(201,244,92,.3);animation:fade .2s ease;}
  .bcnf b{font-size:15px;color:var(--lime);}
  .bcnf span{font-size:13px;color:#C9D0D8;line-height:1.45;}
  .bcnf .btn{display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;}
  .bcnf .btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;}
  .bcnf-gal{justify-self:center;font-size:13px;cursor:pointer;}
  .bcnf-alt{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .bcnf-alt .btn{min-height:44px;}
  .bcnf .busy{opacity:.55;pointer-events:none;}

  /* ================= Дневник: шапка без лишнего ================= */
  .dhead{margin-bottom:14px;}
  .ddate{font:inherit;font-weight:700;font-size:15px;color:var(--text);background:none;border:0;padding:6px 10px;border-radius:10px;cursor:default;min-height:36px;}
  .ddate.back{cursor:pointer;}
  .ddate.back:hover{background:#1B1F24;}
  .ddate small{font-size:12px;color:var(--lime);font-weight:650;margin-left:4px;}

  /* ================= Упражнение: выбор из базы с живым поиском ================= */
  .wopick{position:relative;}
  .wo-inp{position:relative;}
  .wo-inp input{padding-right:44px;}
  .wo-inp input.ok{border-color:rgba(201,244,92,.55);}
  .wo-inp input.bad{border-color:rgba(255,110,96,.7);}
  .wo-clear{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:10px;color:var(--muted);font-size:22px;display:grid;place-items:center;}
  .wo-clear:hover{color:var(--text);}
  .wo-sug{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:5;background:#15181C;border:1px solid var(--line2);border-radius:14px;
    box-shadow:0 18px 40px rgba(0,0,0,.5);padding:6px;max-height:300px;overflow-y:auto;overscroll-behavior:contain;animation:fade .15s ease;}
  .wo-opt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:10px 12px;border-radius:10px;min-height:48px;justify-content:center;}
  .wo-opt b{font-size:14.5px;font-weight:650;}
  .wo-opt b mark{background:none;color:var(--lime);}
  .wo-opt small{font-size:12px;color:var(--muted);}
  .wo-opt.on,.wo-opt:hover{background:#1E2329;}
  .wo-err{margin-top:6px;font-size:13px;color:var(--red);font-weight:600;}
  .sets.locked{opacity:.45;pointer-events:none;}
  .wo-next{justify-self:center;font-size:14px;min-height:44px;}
  #woSave:disabled{opacity:.45;cursor:not-allowed;}

  /* подходы: номер · повторы · вес · ✓ · × */
  .sethead,.setrow{display:grid;grid-template-columns:62px minmax(0,1fr) minmax(0,1fr) 44px 32px;gap:8px;align-items:center;}
  .sethead span:nth-child(2),.sethead span:nth-child(3){text-align:center;}
  .setrow{padding:6px;}
  .setrow label{display:block;min-width:0;}
  .setrow input{text-align:center;}
  .set-n{width:auto;height:auto;display:flex;flex-direction:column;align-items:center;line-height:1.1;padding:4px 0;border-radius:9px;background:var(--limesoft);color:var(--lime);}
  .set-n small{font-size:9.5px;font-weight:650;letter-spacing:.03em;text-transform:uppercase;color:rgba(201,244,92,.8);}
  .set-n b{font-size:16px;font-weight:800;}
  .set-ok{width:44px;height:40px;border-radius:10px;border:1px solid var(--line2);display:grid;place-items:center;color:var(--muted);background:var(--panel2);}
  .set-ok svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;}
  .setrow.done{border-color:rgba(95,208,140,.45);}
  .setrow.done .set-ok{background:var(--green);border-color:var(--green);color:#0B0C0E;}
  .setrow.done .set-n{background:rgba(95,208,140,.15);color:var(--green);}
  .setrow.done .set-n small{color:rgba(95,208,140,.85);}
  @media (max-width:360px){
    .sethead,.setrow{grid-template-columns:52px minmax(0,1fr) minmax(0,1fr) 40px 28px;gap:6px;}
    .set-ok{width:40px;}
  }
  .wsets span{display:inline-flex;align-items:center;gap:5px;}
  .wsets span i{font-style:normal;font-size:10px;font-weight:800;width:15px;height:15px;border-radius:5px;display:grid;place-items:center;background:rgba(201,244,92,.2);}
  .ddate{min-height:44px;}
  .set-ok{height:44px;min-width:44px;}
  .setrow input{height:44px;}
  @media (max-width:560px){ .ai-gs{width:44px;} }
  @media (max-width:360px){ .sethead,.setrow{grid-template-columns:48px minmax(0,1fr) minmax(0,1fr) 44px 26px;gap:5px;} .set-ok{width:44px;} }
  @media (max-width:360px){ .sethead{font-size:9.5px;letter-spacing:0;} .set-n small{font-size:8.5px;letter-spacing:0;} }

  /* окно «Добавить еду»: что уже в этом приёме пищи + «Готово» (окно после добавления не закрывается) */
  .fadded{margin:10px 0 12px;padding:10px 12px;border-radius:14px;background:#0F1113;border:1px solid rgba(201,244,92,.3);display:grid;gap:8px;animation:fade .2s ease;}
  .fadded-h{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13.5px;color:var(--muted);}
  .fadded-h b{color:var(--lime);}
  .fadded-h .btn{min-height:40px;padding:0 18px;flex:none;}
  .fadded-l{display:flex;flex-wrap:wrap;gap:6px;max-height:112px;overflow-y:auto;}
  .fchip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 4px 4px 10px;border-radius:9px;background:#1A1E23;border:1px solid var(--line);font-size:12.5px;font-weight:600;}
  .fchip i{font-style:normal;color:var(--muted);font-weight:500;}
  .fchip button{width:28px;height:28px;border-radius:7px;color:var(--muted);font-size:17px;display:grid;place-items:center;flex:none;}
  .fchip button:hover{color:var(--red);background:rgba(255,110,96,.1);}
  .fchip.new{border-color:rgba(201,244,92,.55);animation:ditemin .3s ease;}
  @media (max-width:560px){ .fadded-h .btn{min-height:44px;} .fchip button{width:34px;height:34px;} }
  @media (max-width:560px){ .fchip{padding-right:0;} .fchip button{width:44px;height:44px;margin:-7px 0 -7px -6px;} }
  /* г / мл */
  .useg{display:inline-flex;margin-left:8px;border:1px solid var(--line);border-radius:8px;overflow:hidden;vertical-align:middle;}
  .useg button{padding:3px 10px;font-size:12px;font-weight:700;color:var(--muted);min-height:28px;}
  .useg button.on{background:var(--limesoft);color:var(--lime);}
  .fpunit{font:inherit;color:var(--muted);font-size:14px;padding:6px 8px;border-radius:8px;border:1px dashed var(--line2);min-height:36px;}
  .fpunit:not(:disabled):hover{color:var(--lime);border-color:var(--lime);}
  .fpunit:disabled{border-color:transparent;}
  .ai-u{font:inherit;font-size:12px;color:var(--muted);padding:4px 6px;border-radius:7px;border:1px dashed var(--line2);min-height:30px;}
  @media (max-width:560px){ .useg button{min-height:34px;padding:4px 12px;} .fpunit{min-height:44px;min-width:44px;} .ai-u{min-height:40px;min-width:40px;} }
  /* расход калорий на тренировке */
  .woburn{font-size:13px;color:#FFB547;min-height:0;margin:2px 0 0;}
  .woburn b{color:#FFC46B;}
  .woburn span{color:var(--muted);font-size:11.5px;}
  .woburn-sum{color:#FFB547;font-weight:650;}
  .wkcal{font-size:11.5px;color:#FFB547;font-weight:650;margin-left:4px;white-space:nowrap;}
  .sets.nokg .set-k,.sets.nokg .setrow label:nth-of-type(2){visibility:hidden;}
  @media (max-width:560px){
    .ai-u{min-height:44px;min-width:44px;}
    .useg button{min-height:44px;min-width:44px;}
    .fp-amount{gap:6px;}
    .fp-amount label{padding:4px 8px;min-width:0;}
    .fp-amount input{width:76px;font-size:24px;}
  }
  .bcpack{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;font-size:13.5px;text-align:center;cursor:pointer;min-height:44px;line-height:1.35;}
  .bcpack svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;flex:none;}
  .bcpack.busy{opacity:.5;pointer-events:none;}

  /* ================= Разбор дня ================= */
  .dreview{padding:14px 16px;display:grid;gap:8px;margin-top:12px;}
  .rv-h{display:flex;align-items:center;gap:10px;}
  .rv-h b{font-size:15px;flex:1;}
  .rv-ic{width:30px;height:30px;border-radius:9px;background:var(--limesoft);display:grid;place-items:center;flex:none;}
  .rv-ic svg{width:17px;height:17px;fill:var(--lime);}
  .rv-btn{font-size:13.5px;min-height:40px;padding:0 4px;}
  .rv-text{display:grid;gap:6px;}
  .rv-text p{font-size:14px;line-height:1.45;color:#D6DCE2;}
  .rv-hint,.rv-load,.rv-stale{font-size:13px;color:var(--muted);}
  .rv-load{display:flex;align-items:center;gap:8px;}
  .rv-stale{font-size:12px;}

  /* ================= Рекорды / 1ПМ ================= */
  .wpr{font-size:12px;margin-left:2px;}
  .prog-note{font-size:12px;color:var(--muted);line-height:1.45;margin:-4px 0 0;}
  .prog-note:empty,.prog-recs:empty{display:none;}
  .prog-recs{display:grid;gap:6px;}
  .prec{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;padding:10px 12px;border-radius:12px;background:#0F1113;border:1px solid var(--line);min-height:52px;}
  .prec.on{border-color:rgba(201,244,92,.5);}
  .prec span{display:grid;gap:2px;min-width:0;}
  .prec b{font-size:13.5px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .prec small{font-size:11.5px;color:var(--muted);}
  .prec em{font-style:normal;font-weight:800;font-size:17px;color:var(--lime);white-space:nowrap;flex:none;}
  .prec em small{font-size:11px;color:var(--muted);font-weight:600;}

  /* ================= Итоги ================= */
  .sum-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;}
  .sum-nav .dnav:disabled{opacity:.3;}
  .sum-lbl{text-align:center;display:grid;gap:2px;}
  .sum-lbl b{font-size:16px;}
  .sum-lbl small{font-size:12px;color:var(--muted);}
  .sum-verdict{font-size:14px;line-height:1.5;color:#D6DCE2;background:#0F1113;border:1px solid var(--line);border-radius:12px;padding:10px 12px;}
  .sum-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .sum-kpis .kpi{padding:12px;min-width:0;}
  .sum-kpis .kpi b{font-size:20px;}
  .sum-kpis .kpi b small{font-size:12px;color:var(--muted);font-weight:600;}
  .sum-kpis .kpi span{font-size:10.5px;letter-spacing:.03em;}
  .sum-kpis .kpi.warn b{color:#FFB547;}
  .sum-pr{display:flex;justify-content:space-between;gap:10px;font-size:13.5px;padding:8px 0;border-bottom:1px solid var(--line);}
  .sum-pr:last-child{border-bottom:0;}
  .sum-pr b{color:var(--lime);white-space:nowrap;}
  @media (min-width:700px){ .sum-kpis{grid-template-columns:repeat(4,minmax(0,1fr));} }
  .sumopen{margin-top:4px;}

  /* ================= Напоминания ================= */
  .rmdays-wrap{display:grid;gap:8px;margin-top:-4px;}
  .rmdays-wrap small{font-size:12px;color:var(--muted);}
  .rmdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;}
  .rmdays button{min-height:40px;border-radius:10px;border:1px solid var(--line);background:#0F1113;font-size:12.5px;font-weight:700;color:var(--muted);text-transform:uppercase;}
  .rmdays button.on{background:var(--limesoft);border-color:rgba(201,244,92,.5);color:var(--lime);}
  .nudge{position:fixed;left:50%;top:14px;z-index:58;transform:translate(-50%,-140%);display:flex;align-items:center;gap:10px;
    width:min(440px,calc(100% - 24px));padding:8px 8px 8px 14px;border-radius:14px;background:#15181C;border:1px solid var(--line2);
    box-shadow:0 14px 34px rgba(0,0,0,.45);transition:transform .26s cubic-bezier(.22,.85,.32,1),opacity .26s;opacity:0;}
  .nudge.in{transform:translate(-50%,0);opacity:1;}
  .nudge[hidden]{display:none;}
  .ng-ic{font-size:18px;flex:none;}
  .ng-t{flex:1;font-size:13.5px;font-weight:600;line-height:1.3;min-width:0;}
  .ng-act{flex:none;min-height:40px;padding:0 12px;border-radius:10px;background:var(--lime);color:var(--ink);font-weight:750;font-size:13px;}
  .ng-x{flex:none;width:36px;height:40px;color:var(--muted);font-size:20px;}
  @media (max-width:900px){
    .nudge{top:calc(env(safe-area-inset-top) + 8px);}
    .ng-act{min-height:44px;} .ng-x{width:44px;height:44px;}
    .rmdays button{min-height:44px;}
  }
  @media (prefers-reduced-motion:reduce){ .nudge{transition:none;} }
  .rv-btn{min-height:44px;}
  .prec b{white-space:normal;overflow:visible;line-height:1.3;}
