  :root{
    --iron:#15171C; --steel:#1E2128; --steel2:#262A33; --line:#31363F;
    --chalk:#F3F1EC; --ash:#9298A4; --ash-dim:#666C77;
    --volt:#FF5A1F; --volt-soft:rgba(255,90,31,.14);
    --green:#37D6A0; --amber:#F5B53D; --red:#F2553B;
    --r:18px;
    --display:"Barlow Condensed",-apple-system,system-ui,sans-serif;
    --body:"Inter",-apple-system,system-ui,sans-serif;
  }
  *{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
  html,body{height:100%; overflow:hidden; overscroll-behavior:none;}
  body{ background:#0C0D10; color:var(--chalk); font-family:var(--body); line-height:1.45; }
  .device{ width:100%; height:100vh; height:100dvh;
    background:var(--iron); position:relative; overflow:hidden;
    display:flex; flex-direction:column; }
  @media(min-width:480px){
    body{ display:flex; align-items:center; justify-content:center; }
    .device{ max-width:430px; height:880px; max-height:96vh; border-radius:38px; border:10px solid #05060a; box-shadow:0 40px 80px rgba(0,0,0,.5); }
  }

  .screen{ position:absolute; inset:0; display:flex; flex-direction:column;
    opacity:0; pointer-events:none; transform:translateX(14px);
    transition:opacity .28s ease, transform .28s ease; }
  .screen.active{ opacity:1; pointer-events:auto; transform:none; }
  @media(prefers-reduced-motion:reduce){ .screen{transition:none} }
  .scroll{ flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; padding-bottom:env(safe-area-inset-bottom); }
  .pad{ padding:0 18px 28px; }

  button{ font-family:var(--body); cursor:pointer; border:none; background:none; color:inherit; }
  .btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px;
    font-weight:600; font-size:15px; border-radius:14px; padding:13px 16px; transition:transform .1s, background .15s; }
  .btn:active{ transform:scale(.97); }
  .btn-primary{ background:var(--volt); color:#1a0c04; font-weight:700; }
  .btn-ghost{ background:var(--steel2); color:var(--chalk); }
  .btn-line{ background:transparent; border:1.5px solid var(--line); color:var(--chalk); }

  /* ---------- LOGIN / REGISTER ---------- */
  .auth{ justify-content:flex-end; overflow:hidden; background:
      radial-gradient(120% 80% at 80% -10%, rgba(255,90,31,.22), transparent 55%),
      linear-gradient(180deg,#101216 0%, #16181d 60%, #15171c 100%); }
  .login-hero{ flex:1; min-height:0; padding:calc(54px + env(safe-area-inset-top)) 26px 0; display:flex; flex-direction:column; }
  .mark{ font-family:var(--display); font-weight:700; letter-spacing:.18em; font-size:15px; color:var(--volt); }
  .login-big{ font-family:var(--display); font-weight:700; font-size:60px; line-height:.92;
    letter-spacing:-.01em; margin-top:auto; text-transform:uppercase; }
  .login-big span{ color:var(--volt); }
  .login-sub{ color:var(--ash); font-size:15px; margin-top:14px; max-width:24ch; }
  .plate{ position:absolute; right:-70px; top:90px; width:230px; height:230px; border-radius:50%;
    border:34px solid rgba(255,255,255,.04); }
  .plate::after{ content:""; position:absolute; inset:30px; border-radius:50%; border:2px solid rgba(255,90,31,.18); }
  .login-form{ padding:24px 26px calc(30px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:11px; }
  .field{ background:var(--steel); border:1.5px solid var(--line); border-radius:14px;
    padding:14px 16px; display:flex; flex-direction:column; gap:2px; transition:border-color .15s; }
  .field:focus-within{ border-color:var(--volt); }
  .field label{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--ash-dim); }
  .field input{ background:none; border:none; color:var(--chalk); font-size:16px; font-family:var(--body); outline:none; }
  .field input::placeholder{ color:var(--ash-dim); }
  .remember{ display:flex; align-items:center; gap:9px; color:var(--ash); font-size:14px; padding:2px; }
  .remember input{ width:18px; height:18px; accent-color:var(--volt); }
  .login-foot{ text-align:center; color:var(--ash); font-size:14px; margin-top:4px; }
  .login-foot a{ color:var(--volt); font-weight:600; text-decoration:none; }

  /* ---------- top bar ---------- */
  .topbar{ padding:calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) 12px calc(18px + env(safe-area-inset-left)); display:flex; align-items:center; gap:12px; }
  .topbar h1{ font-family:var(--display); font-weight:700; font-size:30px; letter-spacing:-.01em; }
  .icon-btn{ width:40px; height:40px; border-radius:12px; background:var(--steel2); display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
  .spacer{ flex:1; }

  .stats{ display:flex; gap:10px; padding:4px 18px 16px; }
  .stat{ flex:1; background:var(--steel); border-radius:14px; padding:13px 12px;
    display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
  .stat .num{ font-family:var(--display); font-weight:700; font-size:30px; line-height:1; }
  .stat .num small{ font-size:15px; color:var(--ash); font-weight:600; }
  .stat .lbl{ font-size:11px; color:var(--ash); text-transform:uppercase; letter-spacing:.05em; margin-top:5px; }
  .stat.accent .num{ color:var(--volt); }

  .row2{ display:flex; gap:10px; padding:0 18px 18px; }
  .row2 .btn{ flex:1; }
  .section-label{ font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--ash-dim);
    padding:0 18px 10px; font-weight:600; }

  .card{ background:var(--steel); border-radius:var(--r); margin:0 18px 12px; padding:16px; position:relative; overflow:hidden; }
  .card .edge{ position:absolute; left:0; top:0; bottom:0; width:4px; }
  .edge.green{ background:var(--green);} .edge.amber{ background:var(--amber);} .edge.red{ background:var(--red);}
  .card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
  .group-name{ font-family:var(--display); font-weight:600; font-size:24px; letter-spacing:.01em; }
  .status{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; }
  .dot{ width:8px; height:8px; border-radius:50%; }
  .status.green{ color:var(--green);} .status.green .dot{ background:var(--green);}
  .status.amber{ color:var(--amber);} .status.amber .dot{ background:var(--amber);}
  .status.red{ color:var(--red);} .status.red .dot{ background:var(--red);}
  .group-meta{ color:var(--ash); font-size:13px; margin-top:3px; }
  .card-actions{ display:flex; gap:9px; margin-top:14px; }
  .card-actions .btn{ flex:1; padding:11px; font-size:14px; }

  /* segmented control */
  .seg{ display:flex; background:var(--steel2); border-radius:11px; padding:3px; margin:0 18px 16px; }
  .seg button{ flex:1; padding:8px; font-size:13px; font-weight:600; color:var(--ash); border-radius:8px; }
  .seg button.on{ background:var(--volt); color:#1a0c04; }

  .ex{ background:var(--steel); border-radius:var(--r); margin:0 18px 14px; padding:16px; position:relative; }
  .ex-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; }
  .ex-name{ font-family:var(--display); font-weight:600; font-size:23px; }
  .ex-name-edit{ font-family:var(--display); font-weight:600; font-size:23px; background:var(--steel2);
    border:1.5px solid var(--volt); border-radius:9px; color:var(--chalk); padding:2px 8px; outline:none; width:70%; }
  .pr{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:var(--amber); font-size:13px; font-weight:600; margin-top:2px; }
  .pr .lab{ color:var(--ash); font-weight:500; }
  .menu-btn{ font-size:22px; color:var(--ash); width:34px; height:34px; border-radius:9px; }
  .menu-btn:active{ background:var(--steel2); }

  .set{ display:flex; align-items:stretch; gap:10px; margin-bottom:10px; transition:opacity .2s; }
  .set-no{ width:30px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
    font-family:var(--display); font-weight:600; font-size:20px; color:var(--ash); }
  .cell{ flex:1; background:var(--steel2); border:1.5px solid transparent; border-radius:13px;
    padding:9px 12px 7px; transition:border-color .15s; min-width:0; }
  .cell:focus-within{ border-color:var(--volt); }
  .cell input{ width:100%; background:none; border:none; outline:none; color:var(--chalk);
    font-family:var(--display); font-weight:600; font-size:26px; }
  .cell input::placeholder{ color:var(--ash-dim); }
  .cell .cap{ font-size:11px; color:var(--ash); display:flex; gap:6px; align-items:center; }
  .cell .cap b{ color:var(--ash-dim); font-weight:500; }
  .prev-chip{ background:none; border:none; padding:0; font:inherit; font-size:11px; color:var(--volt); font-weight:700; text-decoration:underline; text-decoration-style:dotted; text-underline-offset:2px; }
  .prev-chip:active{ opacity:.55; }
  .set.done .cell{ background:rgba(55,214,160,.12); border-color:rgba(55,214,160,.40); }
  .set.done .cell input{ color:#fff; font-weight:700; }
  .set.done .cell .cap{ color:rgba(55,214,160,.85); }
  .add-set{ width:100%; border:1.5px dashed var(--line); border-radius:13px; padding:11px;
    color:var(--ash); font-weight:600; font-size:14px; }
  .add-set:active{ border-color:var(--volt); color:var(--volt); }
  .add-ex{ margin:2px 18px 20px; width:calc(100% - 36px); border:1.5px dashed var(--line);
    border-radius:var(--r); padding:15px; color:var(--ash); font-weight:600; }

  .paused-wrap{ margin:8px 18px 24px; }
  .paused-row{ background:var(--steel); border-radius:13px; padding:13px 15px; display:flex; align-items:center; justify-content:space-between; }
  .paused-row .pn{ display:flex; align-items:center; gap:9px; color:var(--ash); font-weight:600; }
  .reactivate{ color:var(--volt); font-weight:600; font-size:14px; display:flex; align-items:center; gap:6px; }

  .pop{ position:absolute; right:14px; top:50px; background:#2b2f38; border:1px solid var(--line);
    border-radius:13px; padding:6px; min-width:170px; z-index:30; box-shadow:0 16px 40px rgba(0,0,0,.45); display:none; }
  .pop.show{ display:block; }
  .pop button{ display:flex; align-items:center; gap:10px; width:100%; padding:11px 12px; border-radius:9px; font-size:14px; font-weight:500; text-align:left; }
  .pop button:active{ background:var(--steel2); }
  .pop button.danger{ color:var(--red); }

  .rest{ position:absolute; left:14px; right:14px; bottom:calc(14px + env(safe-area-inset-bottom)); background:#2b2f38;
    border:1px solid var(--line); border-radius:18px; padding:14px 16px;
    display:flex; align-items:center; gap:14px; transform:translateY(160%); transition:transform .3s ease; z-index:40;
    box-shadow:0 16px 40px rgba(0,0,0,.5); }
  .rest.show{ transform:none; }
  .ring{ width:50px; height:50px; flex-shrink:0; }
  .ring circle{ fill:none; stroke-width:5; }
  .ring .bg{ stroke:var(--steel2); }
  .ring .fg{ stroke:var(--volt); stroke-linecap:round; transform:rotate(-90deg); transform-origin:50% 50%; transition:stroke-dashoffset 1s linear; }
  .rest .info b{ font-family:var(--display); font-size:24px; }
  .rest .info div{ font-size:12px; color:var(--ash); }
  .rest-skip{ margin-left:auto; font-weight:600; color:var(--ash); font-size:14px; padding:8px 10px; border-radius:10px; background:var(--steel2); }

  /* ---------- VERLAUF ---------- */
  .panel{ background:var(--steel); border-radius:var(--r); margin:0 18px 14px; padding:16px; }
  .panel h3{ font-family:var(--display); font-weight:600; font-size:19px; margin-bottom:2px; }
  .panel .sub{ color:var(--ash); font-size:12px; margin-bottom:12px; }
  .prog-row{ display:flex; align-items:center; gap:10px; background:var(--steel2); border-radius:12px; padding:11px 13px; margin-bottom:8px; }
  .prog-row:last-child{ margin-bottom:0; }
  .prog-name{ flex:1; font-weight:600; font-size:14px; min-width:0; }
  .prog-name small{ display:block; color:var(--ash); font-weight:500; font-size:11.5px; margin-top:1px; }
  .prog-delta{ font-size:13px; font-weight:700; white-space:nowrap; flex-shrink:0; }
  .prog-delta.up{ color:var(--green); }
  .prog-delta.down{ color:var(--red); }
  .chips{ display:flex; gap:8px; overflow-x:auto; padding:0 18px 14px; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .chips::-webkit-scrollbar{ display:none; }
  .chip{ flex-shrink:0; background:var(--steel2); color:var(--ash); border-radius:30px; padding:8px 14px; font-size:13px; font-weight:600; border:1.5px solid transparent; }
  .chip.on{ border-color:var(--volt); color:var(--chalk); }
  .pr-badge{ display:inline-flex; align-items:center; gap:6px; background:var(--volt-soft); color:var(--amber);
    border-radius:30px; padding:5px 12px; font-size:13px; font-weight:600; }
  .badge-row{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
  .delta{ font-size:13px; font-weight:700; }
  .delta.up{ color:var(--green); }
  .delta.down{ color:var(--red); }
  .sess{ display:flex; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
  .sess:first-child{ border-top:none; }
  .sess .d{ font-family:var(--display); font-weight:600; font-size:18px; width:54px; text-align:center; line-height:1; }
  .sess .d small{ display:block; font-size:11px; color:var(--ash); font-weight:500; }
  .sess .g{ flex:1; font-weight:600; font-size:15px; }
  .sess .g small{ display:block; color:var(--ash); font-weight:400; font-size:12px; }
  .sess .v{ color:var(--ash); font-size:13px; font-weight:600; }

  /* ---------- NEUES TRAINING ---------- */
  .nt-ex{ display:flex; align-items:center; gap:10px; background:var(--steel); border-radius:13px; padding:12px 14px; margin:0 18px 10px; }
  .nt-ex .nm{ flex:1; font-weight:600; }
  .nt-ex .rm{ color:var(--red); font-size:20px; }
  .nt-ex .drag{ color:var(--ash-dim); font-size:18px; cursor:grab; touch-action:none; user-select:none; padding:2px 2px; flex-shrink:0; }
  .nt-ex.dragging{ opacity:.6; border:1.5px solid var(--volt); }

  /* ---------- SETTINGS ---------- */
  .set-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--steel); border-radius:14px; margin:0 18px 10px; padding:15px 16px; }
  .set-row .t{ font-weight:600; font-size:15px; }
  .set-row .t small{ display:block; color:var(--ash); font-weight:400; font-size:12px; margin-top:2px; }
  .switch{ width:48px; height:28px; border-radius:30px; background:var(--steel2); position:relative; flex-shrink:0; transition:.2s; }
  .switch.on{ background:var(--volt); }
  .switch::after{ content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:var(--chalk); transition:.2s; }
  .switch.on::after{ left:23px; }
  .rest-pill{ display:inline-flex; align-items:center; gap:4px; background:var(--steel2); color:var(--ash); border-radius:30px; padding:3px 9px; font-size:12px; font-weight:600; margin-left:8px; white-space:nowrap; flex-shrink:0; }
  .rest-pill.start{ background:var(--volt-soft); color:var(--volt); padding:5px 11px; cursor:pointer; }
  .rest-pill.start.subtle{ background:var(--steel2); color:var(--ash); }
  .rest-adjust{ display:flex; gap:7px; margin-left:auto; }
  .rest-adjust button{ width:38px; height:38px; border-radius:11px; background:var(--steel2); font-family:var(--display); font-size:16px; font-weight:600; color:var(--chalk); }
  .pop .pop-lbl{ padding:8px 12px 4px; font-size:11px; color:var(--ash-dim); text-transform:uppercase; letter-spacing:.05em; font-weight:600; }
  .pop .div{ height:1px; background:var(--line); margin:6px 4px; }

  /* ---------- CREW ---------- */
  .crew-head{ display:flex; align-items:center; justify-content:space-between; padding:4px 18px 14px; }
  .crew-name{ font-family:var(--display); font-weight:600; font-size:24px; }
  .crew-sub{ color:var(--ash); font-size:13px; margin-top:2px; }
  .avatars{ display:flex; }
  .avatar{ width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; color:#15171c; flex-shrink:0; }
  .avatars .avatar{ margin-left:-10px; border:2px solid var(--iron); }
  .avatars .avatar:first-child{ margin-left:0; }
  .challenge{ background:var(--steel); border-radius:var(--r); margin:0 18px 14px; padding:16px; }
  .ch-top{ font-weight:600; font-size:15px; display:flex; justify-content:space-between; gap:10px; }
  .ch-top span{ color:var(--volt); }
  .ch-bar{ height:8px; background:var(--steel2); border-radius:30px; margin:11px 0 8px; overflow:hidden; }
  .ch-bar div{ height:100%; background:var(--volt); border-radius:30px; transition:width .4s; }
  .ch-sub{ color:var(--ash); font-size:12px; }
  .lb-row{ display:flex; align-items:center; gap:12px; background:var(--steel); border-radius:14px; margin:0 18px 9px; padding:12px 14px; }
  .lb-row.me{ border:1.5px solid var(--volt); }
  .lb-rank{ width:24px; text-align:center; font-family:var(--display); font-weight:700; font-size:20px; color:var(--ash); }
  .lb-name{ flex:1; font-weight:600; font-size:15px; min-width:0; }
  .lb-name small{ display:block; color:var(--ash); font-weight:500; font-size:12px; margin-top:1px; }
  .lb-val{ text-align:right; }
  .lb-val b{ font-family:var(--display); font-size:24px; }
  .lb-val span{ display:block; font-size:11px; color:var(--ash); }
  .feed-item{ display:flex; gap:12px; background:var(--steel); border-radius:14px; margin:0 18px 9px; padding:13px 14px; }
  .fi-body{ flex:1; min-width:0; }
  .fi-txt{ font-size:14px; line-height:1.4; }
  .fi-meta{ color:var(--ash-dim); font-size:12px; margin-top:3px; }
  .fi-actions{ margin-top:9px; }
  .react,.adopt,.nudge{ font-size:13px; font-weight:600; border-radius:30px; padding:7px 13px; background:var(--steel2); color:var(--ash); }
  .react.on{ background:var(--volt-soft); color:var(--volt); }
  .adopt{ background:var(--volt); color:#1a0c04; }
  .req{ background:var(--steel); border-radius:14px; margin:0 18px 9px; padding:13px 14px; }
  .req-top{ display:flex; align-items:center; gap:12px; }
  .req-actions{ display:flex; gap:9px; margin-top:11px; }
  .req-actions button{ flex:1; padding:10px; border-radius:11px; font-weight:600; font-size:14px; }
  .req-ok{ background:var(--volt); color:#1a0c04; }
  .req-no{ background:var(--steel2); color:var(--chalk); }
  .goal-edit{ background:none; color:var(--chalk); font-size:14px; padding:0 2px; cursor:pointer; }
  .empty-crew{ text-align:center; padding:56px 28px; display:flex; flex-direction:column; align-items:center; gap:6px; }
  .empty-crew .ec-emoji{ font-size:44px; margin-bottom:6px; }
  .empty-crew h3{ font-family:var(--display); font-weight:600; font-size:24px; }
  .empty-crew p{ color:var(--ash); font-size:14px; margin-bottom:14px; max-width:30ch; }
  .empty-crew .btn{ width:100%; max-width:280px; }
  .pr-edit{ width:230px; padding:0 6px 6px; display:flex; flex-direction:column; gap:8px; }
  .pr-edit-date{ font-size:12px; color:var(--ash); padding:0 6px 2px; line-height:1.4; }

  .toast{ position:absolute; left:50%; bottom:24px; transform:translate(-50%,30px); background:var(--chalk); color:#15171c;
    padding:11px 18px; border-radius:30px; font-weight:600; font-size:14px; opacity:0; transition:.25s; z-index:60; pointer-events:none; max-width:80%; text-align:center;}
  .toast.show{ transform:translate(-50%,0); opacity:1; }
  .hint{ text-align:center; color:var(--ash-dim); font-size:12px; padding:0 30px 18px; }
  svg text{ font-family:var(--body); }
  .ob-wrap{ display:flex; flex-direction:column; justify-content:center; padding:calc(20px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom)); }
  .ob-card{ text-align:center; padding:0 30px; display:flex; flex-direction:column; align-items:center; gap:10px; }
  .ob-emoji{ font-size:52px; margin-bottom:8px; }
  .ob-card h2{ font-family:var(--display); font-weight:700; font-size:26px; letter-spacing:-.01em; }
  .ob-card p{ color:var(--ash); font-size:15px; line-height:1.5; max-width:32ch; }
  .ob-dots{ display:flex; justify-content:center; gap:7px; margin:30px 0 22px; }
  .ob-dot{ width:7px; height:7px; border-radius:50%; background:var(--steel2); transition:.2s; }
  .ob-dot.on{ background:var(--volt); width:20px; border-radius:4px; }
  .ob-actions{ display:flex; gap:10px; padding:0 24px; }
  .ob-actions .btn{ flex:1; }
  .ob-hl{ color:var(--volt); font-weight:700; }
  .ob-c-green{ color:var(--green); font-weight:700; }
  .ob-c-amber{ color:var(--amber); font-weight:700; }
  .ob-c-red{ color:var(--red); font-weight:700; }
  .feed-card{ background:var(--steel); border-radius:var(--r); margin:0 18px 12px; padding:14px 16px; }
  .feed-top{ display:flex; align-items:center; gap:10px; }
  .feed-who{ flex:1; min-width:0; font-size:14px; line-height:1.3; }
  .feed-who span{ color:var(--ash); font-weight:400; }
  .feed-time{ color:var(--ash-dim); font-size:12px; flex-shrink:0; white-space:nowrap; }
  .feed-stats{ font-size:13px; color:var(--ash); margin:10px 0 12px; }
  .feed-stats .feed-pr{ color:var(--amber); }
  .feed-like{ display:inline-flex; align-items:center; gap:6px; background:var(--steel2); color:var(--ash); border-radius:30px; padding:7px 14px; font-size:13px; font-weight:700; }
  .feed-like.on{ background:var(--volt-soft); color:var(--volt); }
  .ob-preview{ position:relative; margin:20px 18px 0; padding:18px 14px 14px; border-radius:18px;
    background:linear-gradient(165deg, rgba(255,90,31,.16), rgba(255,90,31,.03));
    border:1.5px solid rgba(255,90,31,.40); box-shadow:0 16px 36px -16px rgba(255,90,31,.50); }
  .ob-preview-tag{ position:absolute; top:-9px; left:16px; background:var(--volt); color:#1a0c04;
    font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:3px 10px; border-radius:30px; }
