:root{
  --sage:#2d5a18; --sage-deep:#20400f; --sage-soft:#e6efdc;
  --cream:#faf7f2; --ink:#3a2f23; --text2:#6b5c4e; --muted:#9a8c7a;
  --coral:#d5824f; --coral-soft:#fbe8db;
  --gold:#b98a3e; --line:#ddd0bd; --card:#ffffff;
  --serif:Georgia,"Times New Roman",serif;
  --shadow:0 12px 32px rgba(90,75,55,.14);
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:linear-gradient(180deg,#f6f3ee,#ece7de); color:var(--ink); min-height:100vh; line-height:1.5}

/* ---------- client phone ---------- */
.stage{display:flex; justify-content:center; padding:22px 14px 50px}
.phone{width:390px; max-width:100%; background:var(--cream); border-radius:26px; overflow:hidden;
  box-shadow:var(--shadow); border:1px solid var(--line); display:flex; flex-direction:column; min-height:80vh}
.app-top{padding:22px 20px 16px; background:linear-gradient(155deg,#3f6b26,#2d5a18); color:#fff}
.toprow{display:flex; align-items:center; justify-content:space-between; gap:8px}
.brand{display:flex; align-items:center; gap:8px; font-family:var(--serif); font-weight:700; font-size:16px}
.brand .dot{width:9px;height:9px;border-radius:50%;background:var(--coral)}
.nextsess{font-size:11px; font-weight:600; background:rgba(255,255,255,.2); padding:5px 10px; border-radius:20px; white-space:nowrap}
.nextsess.hide{display:none}
.hi{margin-top:14px; font-size:24px; font-weight:700; font-family:var(--serif)}
.subhi{font-size:13px; opacity:.9; margin-top:2px}
.motiv{margin-top:8px; font-family:var(--serif); font-style:italic; font-size:15px; opacity:.96}

.scroll{flex:1; overflow-y:auto; padding:16px 16px 30px}
.coachrow{display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:9px 11px; margin-bottom:10px}
.cav{width:36px;height:36px;border-radius:50%; background:#ccd6a6; color:#3a2f23; display:flex;align-items:center;justify-content:center; font-weight:700; font-family:var(--serif); font-size:16px; position:relative; flex:0 0 auto}
.cav::after{content:''; position:absolute; right:0; bottom:0; width:9px;height:9px;border-radius:50%; background:#4caf50; border:2px solid #fff}
.cinfo{display:flex; flex-direction:column; line-height:1.3}
.cinfo b{font-size:13px}
.cinfo span{font-size:11.5px; color:var(--muted)}

.saved{display:flex; align-items:center; justify-content:center; gap:7px; font-size:11.5px; color:var(--muted); margin:0 0 10px; transition:.25s}
.saved .sdot{width:7px;height:7px;border-radius:50%;background:#8bb06a}
.saved.saving{color:var(--gold)} .saved.saving .sdot{background:#e0b34a}

.daystrip{display:flex; gap:7px; overflow-x:auto; padding:2px 2px 8px; margin-bottom:4px}
.daystrip::-webkit-scrollbar{display:none}
.day{flex:0 0 auto; width:44px; text-align:center; background:#fff; border:1px solid var(--line); border-radius:12px; padding:7px 0; cursor:pointer}
.day small{display:block; font-size:10px; color:var(--muted)}
.day b{font-size:15px}
.day .pip{width:5px;height:5px;border-radius:50%;margin:4px auto 0;background:transparent}
.day.done .pip{background:var(--sage)}
.day.on{background:var(--ink); color:#fff; border-color:var(--ink)}
.day.on small{color:#cfd6d0}

.progress-card{background:#fff; border:1px solid var(--line); border-radius:18px; padding:16px; margin:10px 0 14px; display:flex; align-items:center; gap:14px}
.ring{--v:0; width:64px;height:64px;border-radius:50%; background:conic-gradient(var(--sage) calc(var(--v)*1%), var(--sage-soft) 0); display:flex;align-items:center;justify-content:center; flex:0 0 auto}
.ring span{width:48px;height:48px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px}
.pt b{font-size:14px}
.pt p{margin:5px 0 0; font-size:13px; color:#5f5445; line-height:1.4; font-weight:500}

.sec-title{font-size:12px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); margin:14px 4px 8px; font-weight:700}
.task{background:#fff; border:1px solid var(--line); border-radius:14px; padding:13px 14px; display:flex; align-items:center; gap:12px; margin-bottom:9px; cursor:pointer; user-select:none; transition:.15s}
.task:active{transform:scale(.99)}
.chk{width:24px;height:24px;border-radius:8px; border:2px solid var(--line); flex:0 0 auto; display:flex;align-items:center;justify-content:center; transition:.15s}
.chk svg{width:14px;height:14px; opacity:0; transition:.15s}
.task .body b{font-size:14px; display:block}
.task .body small{font-size:12px; color:var(--muted)}
.task.done .chk svg{opacity:1; stroke:#3a2f23}

.done-banner{margin:12px 4px 0; text-align:center; font-size:13px; color:var(--sage-deep); font-weight:600; background:var(--sage-soft); border:1px solid #cdd9b8; border-radius:12px; padding:11px; display:none}
.done-banner.show{display:block}

/* messaging */
.msgcard{margin-top:16px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px}
.msgtitle{font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px}
.msgthread{display:flex; flex-direction:column; gap:8px; margin-bottom:10px}
.bubble{font-size:13px; padding:9px 12px; border-radius:14px; max-width:86%; line-height:1.4}
.bubble b{display:block; font-size:10.5px; opacity:.65; margin-bottom:2px; text-transform:uppercase; letter-spacing:.3px}
.bubble.coach{background:#e7f2f4; align-self:flex-start; border-bottom-left-radius:4px}
.bubble.client{background:#eef2de; align-self:flex-end; border-bottom-right-radius:4px}
.msgcompose{display:flex; gap:8px}
.msgcompose input{flex:1; border:1px solid var(--line); border-radius:12px; padding:10px 12px; font-size:13px; font-family:inherit; outline:none; color:var(--ink)}
.msgcompose input:focus{border-color:var(--sage)}
.msgcompose button{border:0; background:var(--sage); color:#fff; font-weight:700; border-radius:12px; padding:0 15px; cursor:pointer}
.msghint{font-size:11px; color:var(--muted); margin-top:8px; text-align:center}
.msglocked{margin-top:16px; background:#faf7f0; border:1px dashed var(--line); border-radius:16px; padding:14px 16px; text-align:center; color:var(--muted)}
.msglocked .lockrow{font-size:13px; color:var(--ink); margin-bottom:5px}
.msglocked p{margin:0; font-size:12.5px; line-height:1.5}

/* ---------- coach dashboard ---------- */
.wrap{max-width:720px; margin:0 auto; padding:26px 16px 70px}
.chead{display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; flex-wrap:wrap; gap:10px}
.chead h1{font-family:var(--serif); font-size:22px; margin:0}
.chead .sub{font-size:13px; color:var(--muted)}
.btn{display:inline-block; border:0; background:var(--sage); color:#fff; font-weight:700; border-radius:12px; padding:10px 16px; cursor:pointer; text-decoration:none; font-size:14px}
.btn.ghost{background:#fff; color:var(--sage-deep); border:1px solid var(--line)}
.btn.coral{background:var(--coral)}
.pill{font-size:11px; font-weight:700; padding:5px 11px; border-radius:20px; background:var(--sage-soft); color:var(--sage-deep)}
.grouphdr{display:flex; align-items:center; justify-content:space-between; padding:14px 4px 8px; font-family:var(--serif); font-size:16px; color:var(--sage-deep)}
.grouphdr.prem{color:var(--gold)}
.card{background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); overflow:hidden; margin-bottom:12px}
.client-row{padding:15px 18px; display:block; text-decoration:none; color:inherit}
.client-row:hover{background:#faf9f5}
.cr-head{display:flex; align-items:center; justify-content:space-between; gap:10px}
.cr-name{display:flex; align-items:center; gap:11px}
.avatar{width:38px;height:38px;border-radius:50%; color:#3a2f23; display:flex;align-items:center;justify-content:center; font-weight:700; font-size:14px; flex:0 0 auto}
.cr-name b{font-size:14px; display:block}
.cr-name small{font-size:12px; color:var(--muted)}
.tags{display:flex; gap:6px; flex-wrap:wrap; margin-top:6px}
.pkgtag{font-size:10px; font-weight:700; letter-spacing:.3px; padding:3px 9px; border-radius:20px}
.pkgtag.prem{background:#f6ead0; color:var(--gold)}
.pkgtag.reset{background:#e8eede; color:#5f7a52}
.follow-tag{font-size:10px; font-weight:700; letter-spacing:.4px; color:var(--coral); background:var(--coral-soft); padding:3px 8px; border-radius:20px}
.unread{font-size:10px; font-weight:700; color:#fff; background:var(--coral); padding:3px 8px; border-radius:20px}
.adh{text-align:right}
.adh b{font-size:17px}
.adh small{display:block; font-size:11px; color:var(--muted)}
.grid14{display:flex; gap:4px; margin-top:12px; flex-wrap:wrap}
.cell{width:20px;height:20px;border-radius:5px; background:#f0e7db}
.cell.l1{background:#dce4cd}.cell.l2{background:#b7c793}.cell.l3{background:#7f9a55}.cell.l4{background:#3f6b28}

.detail-wrap{max-width:640px}
.logline{display:flex; align-items:center; gap:10px; font-size:13.5px; padding:8px 0; border-bottom:1px dashed var(--line)}
.logline:last-child{border-bottom:0}
.logline .frq{margin-left:auto; font-size:11px; color:var(--muted)}
.review-box{background:#faf8f3; border:1px solid var(--line); border-radius:12px; padding:12px 14px; margin-top:14px; font-size:13px}
.cmsg{font-size:13px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:8px; line-height:1.45}
.h4{margin:18px 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted)}

/* forms */
.form label{display:block; font-size:13px; font-weight:600; margin:14px 0 5px}
.form input, .form select, .form textarea{width:100%; border:1px solid var(--line); border-radius:12px; padding:11px 13px; font-size:14px; font-family:inherit; outline:none; color:var(--ink); background:#fff}
.form input:focus, .form select:focus, .form textarea:focus{border-color:var(--sage)}
.form small{color:var(--muted); font-size:12px}
.flash{background:var(--coral-soft); color:#a1502f; border-radius:10px; padding:10px 14px; margin-bottom:14px; font-size:13px}
.link-box{background:var(--sage-soft); border:1px solid #cdd9b8; border-radius:12px; padding:14px; font-size:14px; word-break:break-all}
.login-wrap{max-width:360px; margin:12vh auto; padding:0 18px; text-align:center}
.login-wrap .card2{background:#fff; border:1px solid var(--line); border-radius:18px; padding:26px 22px; box-shadow:var(--shadow)}
.login-wrap h1{font-family:var(--serif); color:var(--sage-deep); font-size:22px; margin:0 0 6px}
.muted{color:var(--muted); font-size:12.5px}
a.plain{color:var(--sage-deep)}

/* consent gate */
.gate{position:fixed; inset:0; z-index:50; background:linear-gradient(180deg,#faf7f2,#f2eee6); display:flex; flex-direction:column; align-items:center; text-align:center; padding:8vh 24px 26px; overflow-y:auto}
.gate.hide{display:none}
.gate .glogo{font-family:var(--serif); font-weight:700; font-size:19px; color:var(--sage-deep); display:flex; align-items:center; gap:8px}
.gate .glogo .dot{width:9px;height:9px;border-radius:50%;background:var(--coral)}
.gate h2{font-family:var(--serif); font-size:25px; margin:20px 0 6px}
.gate .wel{font-size:13.5px; color:var(--muted); margin-bottom:18px; max-width:340px}
.privacy{background:#fff; border:1px solid var(--line); border-radius:14px; padding:15px 16px; text-align:left; font-size:12.5px; color:#4a3f2c; line-height:1.5; max-width:340px; width:100%}
.privacy b{color:var(--sage-deep)}
.privacy ul{margin:8px 0 0; padding-left:16px} .privacy li{margin-bottom:5px}
.chkrow{display:flex; align-items:center; gap:10px; margin:16px 2px 6px; font-size:12.5px; text-align:left; cursor:pointer; max-width:340px; width:100%}
.chkbox{width:23px;height:23px;border-radius:7px;border:2px solid #e0d3c2; flex:0 0 auto; display:flex;align-items:center;justify-content:center}
.chkbox svg{width:13px;height:13px;stroke:#fff;opacity:0}
.chkrow.on .chkbox{background:var(--sage); border-color:var(--sage)} .chkrow.on .chkbox svg{opacity:1}
.gbtn{max-width:340px; width:100%; border:0; background:var(--sage); color:#fff; font-weight:700; font-size:15px; padding:14px; border-radius:14px; cursor:pointer; margin-top:8px; opacity:.45; pointer-events:none; transition:.18s}
.gbtn.ready{opacity:1; pointer-events:auto}
.gtip{font-size:11px; color:var(--muted); margin-top:12px; max-width:340px; line-height:1.5}
.gtip b{color:var(--sage-deep)}
