:root{
  --bg:#000;--card:#101010;--card2:#151515;--line:#262626;
  --text:#fff;--muted:#8d95a3;--lime:#a3ff12;--lime2:#66ff00;
  --red:#ff4c39;--blue:#16a2ff;--radius:28px;--shadow:0 18px 50px rgba(0,0,0,.65);
  --af-sheet-backdrop:rgba(0,0,0,.74);
  --af-sheet-border:#2b2d31;
  --af-sheet-bg:radial-gradient(circle at 50% 12%,rgba(255,255,255,.075),transparent 34%),linear-gradient(155deg,#151515,#090909 70%);
  --af-sheet-shadow:0 -28px 80px rgba(0,0,0,.72);
  --af-sheet-handle:#78808d;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;min-width:0}
html,body{width:100%;max-width:100%;margin:0;background:#000;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter",Segoe UI,Arial,sans-serif;overflow-x:hidden}
body{min-height:100vh;overflow-x:hidden}
.app{width:100%;max-width:460px;margin:0 auto;min-height:100vh;background:#000;position:relative;padding:18px 16px 96px;overflow-x:hidden}
.top{display:flex;align-items:center;gap:12px;margin:6px 0 16px}
.avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#f5f5f5,#9ea4ad);display:grid;place-items:center;color:#111;font-weight:1000;overflow:hidden;position:relative;background-size:cover;background-position:center}
.avatar.empty:before{content:"+";font-size:25px;line-height:1}
.avatar.has-photo:before{content:""}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.welcome{flex:1}
.welcome small{display:block;color:var(--muted);font-size:12px}
.welcome b{font-size:18px}
.circle-btn{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:#080808;color:#fff;display:grid;place-items:center;font-size:18px}
.af-sheet-close{position:relative;width:42px;height:42px;min-width:42px;min-height:42px;padding:0;border:1px solid #34363a;border-radius:50%;background:rgba(71,74,80,.26);color:#9aa0a9;cursor:pointer}
.af-sheet-close::before,.af-sheet-close::after{content:"";position:absolute;top:50%;left:50%;width:15px;height:1.5px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(45deg)}
.af-sheet-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
.af-sheet-close:active{background:rgba(91,95,102,.32);transform:scale(.94)}
.screen{display:none}
.screen.active{display:block}

h1,h2,h3,p{margin-top:0}
h1{font-size:30px;line-height:.98;letter-spacing:-1px}
h2{font-size:22px;letter-spacing:-.5px}
h3{font-size:16px}
.muted{color:var(--muted)}
.lime{color:var(--lime)}
.btn{border:0;border-radius:999px;background:#191919;color:#fff;min-height:48px;padding:0 18px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.btn.full{width:100%}
.btn.lime{background:linear-gradient(135deg,var(--lime),var(--lime2));color:#071000;box-shadow:0 14px 36px rgba(163,255,18,.28)}
.btn.dark{background:#181818;color:#fff}
.btn.ghost{background:#0a0a0a;border:1px solid var(--line);color:#d9dee7}
.btn.red{background:var(--red)}
.section-title{display:flex;align-items:center;justify-content:space-between;margin:20px 0 10px}
.section-title a{color:var(--lime);font-size:13px;font-weight:900}
.chips{display:flex;gap:8px;overflow:auto;padding-bottom:4px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{border:0;background:#171717;color:#8d95a3;border-radius:999px;padding:10px 17px;font-size:12px;font-weight:900;white-space:nowrap}
.chip.active{background:var(--lime);color:#081000}
.programs{display:flex;gap:12px;overflow:auto;margin:0 -16px;padding:0 16px 6px;scrollbar-width:none}
.programs::-webkit-scrollbar{display:none}
.program-card{min-width:225px;height:178px;border-radius:26px;background:linear-gradient(180deg,rgba(0,0,0,.06),rgba(0,0,0,.82)),var(--img) center/cover;border:1px solid #202020;padding:14px;display:flex;flex-direction:column;justify-content:flex-end;position:relative;overflow:hidden}
.program-card b{font-size:20px}
.program-card small{color:#aeb4bf;margin-top:5px}
.list{display:grid;gap:10px}
.row-card{display:flex;align-items:center;gap:12px;background:#151515;border:1px solid #232323;border-radius:18px;padding:10px}
.row-card .pic{width:68px;height:58px;border-radius:14px;background:var(--img) center/cover;flex:0 0 auto}
.row-card .grow{flex:1;min-width:0}
.row-card b{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-card small{display:block;color:var(--muted);font-size:11px;margin-top:3px;overflow-wrap:anywhere}
.value{font-weight:900;color:var(--lime)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.trainer-nutrition-goals .chip-row-title{margin-top:16px}.trainer-nutrition-weekdays{display:flex;gap:6px;overflow-x:auto;padding-bottom:3px;scrollbar-width:none}.trainer-nutrition-weekdays::-webkit-scrollbar{display:none}.trainer-nutrition-weekdays .chip{position:relative;flex:1 0 39px;min-width:39px;padding:0;background:transparent;border:0}.trainer-nutrition-weekdays input{position:absolute;opacity:0;pointer-events:none}.trainer-nutrition-weekdays span{display:grid;place-items:center;height:38px;border:1px solid #2b2d31;border-radius:999px;color:var(--muted);font-size:10px;font-weight:1000}.trainer-nutrition-weekdays input:checked+span{border-color:var(--lime);background:rgba(163,255,18,.12);color:var(--lime)}.trainer-nutrition-goals>.input{margin-top:8px}.trainer-nutrition-goals>.btn{margin-top:10px}
.stat{background:#151515;border:1px solid #232323;border-radius:22px;padding:16px}
.stat .num{font-size:30px;font-weight:1000;line-height:1}
.stat small{color:var(--muted);font-size:11px}
.card{width:100%;max-width:100%;min-width:0;overflow:hidden;background:#101010;border:1px solid #202020;border-radius:26px;padding:16px;margin-bottom:12px;box-shadow:var(--shadow)}
.input,select,textarea{width:100%;min-height:48px;border-radius:16px;border:1px solid #262626;background:#111;color:#fff;padding:0 14px;margin:6px 0 10px;font-weight:800;outline:none}
textarea{padding-top:12px}
.input::placeholder,textarea::placeholder{color:#657080}
.profile-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.metric-card{background:#151515;border:1px solid #242424;border-radius:22px;padding:14px}
.metric-card .label{color:var(--muted);font-size:11px;font-weight:800}
.metric-card .value-big{font-size:28px;font-weight:1000;line-height:1.05}
.chart-card{background:#0b0b0b;border:1px solid #222;border-radius:24px;padding:14px;margin:12px 0}
.chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.chart-head b{font-size:15px}
.avg-pill{border-radius:999px;background:rgba(163,255,18,.12);border:1px solid rgba(163,255,18,.28);color:var(--lime);padding:6px 9px;font-size:11px;font-weight:1000;white-space:nowrap}
.axis-chart{height:184px;border-radius:20px;background:linear-gradient(180deg,#090909,#050505);border:1px solid #1e1e1e;padding:10px}
.chart{width:100%;height:100%}
.profile-note{font-size:12px;line-height:1.45;color:var(--muted);margin:8px 0 0}
.today-input-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.bottom{position:fixed;left:50%;transform:translateX(-50%);bottom:12px;width:min(428px,calc(100% - 24px));height:72px;background:rgba(16,16,16,.88);border:1px solid #2a2a2a;border-radius:26px;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:8px;backdrop-filter:blur(18px);z-index:50}

.tab {
  border: 0;
  background: transparent;
  color: #747b87;
  border-radius: 18px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 6px 4px;
  font-family: inherit;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

.tab > div {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
}

.tab svg {
  width: 24px;
  height: 24px;
  display: block;
}

.tab .icon-outline {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab .icon-filled {
  display: none;
  fill: currentColor;
  stroke: none;
}

.tab.active .icon-outline {
  display: none;
}

.tab.active .icon-filled {
  display: block;
}

.tab .icon-cutout {
  fill: none;
  stroke: #071000;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.tab span {
  margin: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}

.tab.active {
  color: var(--lime);
  background: rgba(163, 255, 18, 0.08);
}

.tab:active {
  transform: scale(0.93);
}

.auth-screen{min-height:calc(100dvh - 132px);display:grid;place-items:center;padding:18px 0}
.auth-card{position:relative;width:min(100%,520px);padding:42px 24px 24px;border:1px solid var(--af-sheet-border);border-radius:34px;background:var(--af-sheet-bg);box-shadow:var(--af-sheet-shadow)}
.auth-sheet-handle{position:absolute;top:14px;left:50%;width:52px;height:5px;border-radius:999px;background:var(--af-sheet-handle);transform:translateX(-50%)}
.auth-head{margin:0 0 22px}
.auth-head small{display:block;margin-bottom:6px;color:var(--lime);font-size:10px;font-weight:950;letter-spacing:.12em;text-transform:uppercase}
.auth-head h1{margin:0;color:#fff;font-size:30px;line-height:1;letter-spacing:-.045em}
.auth-head p{margin:11px 0 0;color:#858d99;font-size:13px;font-weight:650;line-height:1.45}
.auth-tabs{display:flex;align-items:center;gap:22px;margin:0 0 20px;border-bottom:1px solid #292b2f}
.auth-tabs button{min-height:42px;padding:0 2px;border:0;border-bottom:2px solid transparent;background:transparent;color:#858d99;font-size:14px;font-weight:900;cursor:pointer}
.auth-tabs button.active{border-bottom-color:var(--lime);color:var(--lime)}
.auth-card .input,.auth-card select{height:56px;min-height:56px;margin:0 0 11px;padding:0 15px;border:1px solid #303236;border-radius:19px;background:rgba(0,0,0,.14);box-shadow:none}
.auth-card .grid2{gap:10px}
.auth-card .password-field{margin:0 0 11px}
.auth-card .password-field>.input{margin:0;padding-right:52px}
.auth-submit{display:block;width:max-content;min-height:44px;margin:10px auto 0;padding:8px 12px;border:0;background:transparent;color:var(--lime);font-size:16px;font-weight:900;cursor:pointer}
.auth-error{color:var(--red);font-size:12px;font-weight:800;min-height:18px;margin-top:8px}
@media(max-width:520px){.auth-screen{min-height:calc(100dvh - 112px);padding:10px 0}.auth-card{padding:40px 16px 20px;border-radius:30px}.auth-head{margin-bottom:18px}.auth-head h1{font-size:27px}.auth-card .input,.auth-card select{height:54px;min-height:54px;border-radius:18px}.auth-card .grid2{gap:8px}}
.password-field{position:relative;display:block;width:100%;min-width:0}
.password-field>.input{padding-right:52px}
.password-toggle{position:absolute;z-index:2;top:50%;right:8px;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:transparent;color:#858d99;display:grid;place-items:center;transform:translateY(-50%);cursor:pointer;-webkit-tap-highlight-color:transparent}
.password-toggle svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.password-toggle .password-eye-slash{display:none}
.password-toggle.is-visible{color:var(--lime)}
.password-toggle.is-visible .password-eye-slash{display:block}
.password-toggle:active{transform:translateY(-50%) scale(.9)}
.hidden{display:none!important}
.set-row{display:grid;grid-template-columns:1fr 1fr 1fr 42px;gap:8px;align-items:center}
.lang-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 12px}

.detail-img{height:260px;border-radius:30px;background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.72)),var(--img) center/cover;margin-bottom:14px;position:relative;overflow:hidden}.detail-title{position:absolute;left:16px;right:16px;bottom:14px}.timerScreen{min-height:calc(100vh - 150px);display:grid;align-content:center;text-align:center}.timerBig{font-size:44px;font-weight:1000}.workout-img{height:240px;border-radius:30px;background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.5)),var(--img) center/cover;margin-bottom:18px;position:relative}.play{width:64px;height:64px;border-radius:50%;background:var(--lime);display:grid;place-items:center;color:#071000;font-size:24px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.mini-nav{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ring{--p:70;width:176px;height:176px;border-radius:50%;margin:16px auto;background:conic-gradient(var(--lime) calc(var(--p)*1%),#171717 0);display:grid;place-items:center;box-shadow:0 0 0 20px rgba(163,255,18,.04)}.ring-inner{width:126px;height:126px;border-radius:50%;background:#000;display:grid;place-items:center;text-align:center}.ring-inner b{font-size:30px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.day{aspect-ratio:1;border-radius:50%;background:#101010;border:1px solid #222;color:#e5e7eb;display:grid;place-items:center;font-size:12px;font-weight:900}.day.mark{background:var(--lime);color:#071000}.chart-wrap{height:220px;border-radius:24px;background:#090909;border:1px solid #222;padding:12px}.tag{display:inline-flex;align-items:center;gap:6px;border-radius:999px;background:rgba(163,255,18,.14);color:var(--lime);padding:6px 10px;font-size:11px;font-weight:800}.meta-grid{display:grid;grid-template-columns:1fr;gap:8px;margin:10px 0}.meta-line{background:#151515;border:1px solid #242424;border-radius:16px;padding:11px 12px}.meta-line small{display:block;color:var(--muted);font-size:11px;font-weight:800}.meta-line b{display:block;margin-top:3px;font-size:13px}.video-link{color:var(--lime);font-weight:1000;text-decoration:none}.exercise-detail-head{display:flex;align-items:flex-start;gap:12px}.exercise-detail-head .pic{width:78px;height:70px;border-radius:18px;background:var(--img) center/cover;flex:0 0 auto}.diary-set{display:flex;justify-content:space-between;gap:8px;color:#dfe6ef;font-size:12px;margin-top:5px}.chip-row-title{font-size:11px;color:var(--muted);font-weight:900;margin:12px 0 7px}.select-card{cursor:pointer}.select-card.active{border-color:rgba(163,255,18,.65);box-shadow:0 0 0 1px rgba(163,255,18,.22) inset}

.scroll-chart{overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scrollbar-width:none}
.scroll-chart::-webkit-scrollbar{display:none}
.dynamic-canvas{height:100%;display:block}
.delta-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;min-width:44px;max-width:92px;height:24px;padding:0 9px;font-size:10px;font-weight:1000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1}
.delta-up{background:linear-gradient(135deg,rgba(255,76,57,.95),rgba(130,17,9,.9));color:#fff}
.delta-down{background:linear-gradient(135deg,rgba(163,255,18,.95),rgba(32,100,8,.9));color:#071000}
.trainer-window{max-height:390px;overflow:auto;padding-right:2px}
.comment-card{align-items:flex-start}
