:root{
  --bg:#0b1626; --panel:#13243f; --panel2:#0e1c33;
  --line:rgba(255,255,255,.10); --line2:rgba(255,255,255,.16);
  --text:#d7e2f0; --muted:#8da0b8; --muted2:#6f829c;
  --sky:#3d92d6; --green:#5dca8f; --amber:#e9a23a; --red:#e2574a;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
#app{
  max-width:980px; margin:0 auto; min-height:100vh; min-height:100dvh;
  display:flex; flex-direction:column;
  padding:calc(18px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom));
}
.view{flex:1; display:flex; flex-direction:column; width:100%; margin:0 auto}
.view[hidden]{display:none}
.view.center{align-items:center; justify-content:center; gap:22px; text-align:center}
.view.center, .view.checkin{max-width:460px}
.view.staff{max-width:920px}
.view.wordle{max-width:480px}

/* ---------- brand / login / closed ---------- */
.brand{display:flex; flex-direction:column; align-items:center; gap:10px}
.crest{
  width:64px; height:64px; border-radius:50%; background:#173a63;
  border:1.5px solid var(--sky); color:#7cc0f5;
  display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:700; letter-spacing:.5px;
}
.brand h1{font-size:24px; font-weight:600; margin:4px 0 0; color:#fff}
.muted{color:var(--muted); font-size:14px; margin:0}
.btn-ms{
  display:inline-flex; align-items:center; gap:10px;
  background:#fff; color:#1b1b1b; border:none; border-radius:12px;
  padding:13px 20px; font-size:15px; font-weight:600; cursor:pointer; min-width:240px; justify-content:center;
}
.btn-ms.disabled{opacity:.55}
.btn-ms:active{transform:scale(.99)}
.linkbtn{background:none; border:none; color:var(--sky); font-size:14px; cursor:pointer; padding:6px}
.linkbtn.subtle{color:var(--muted2)}
.error{color:#f0928b; font-size:13px; margin:0; max-width:280px}
.ml{display:flex; flex-direction:column; gap:9px; width:100%; max-width:260px}
.ordiv{font-size:12px; color:var(--muted2); text-align:center}
#ml-email{background:#0a1730; border:1px solid #22395a; border-radius:10px; color:var(--text); font-size:15px; padding:12px; text-align:center; font-family:inherit}
#ml-email:focus{outline:none; border-color:var(--sky)}
.ml-btn{background:#173a63; color:#fff; border:1px solid #2c5a8f; border-radius:11px; padding:12px; font-size:14px; font-weight:600; cursor:pointer}
.ml-btn:disabled{opacity:.6}

/* ---------- check-in shell ---------- */
.checkin{display:flex; flex-direction:column}
.top{display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--muted2)}
.dots{display:flex; gap:6px}
.dots span{width:7px; height:7px; border-radius:50%; background:#26405f; transition:background .2s}
.dots span.on{background:var(--sky)}
.screen{flex:1; display:flex; flex-direction:column; margin-top:14px; min-height:0}
.step{flex:1; display:none; flex-direction:column; align-items:center; text-align:center}
.step.in{animation:stepIn .28s ease}
@keyframes stepIn{from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none}}
.step h3{font-size:22px; font-weight:600; color:#fff; margin:6px 0 2px}
.hint{font-size:13px; color:var(--muted); margin:0 0 6px}
.ctl{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; width:100%}
.tapnote{font-size:12px; color:var(--muted2)}

/* orb (soreness) */
.orb{
  width:148px; height:148px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--green); transition:background .15s, box-shadow .15s, transform .12s;
}
.orbNum{font-size:50px; font-weight:600; color:#0b1626}
.bigLabel{font-size:16px; font-weight:600; color:#fff}

/* horizontal tap scale */
.tapwrap{display:flex; flex-direction:column; align-items:center; cursor:pointer; touch-action:none; padding:8px 0; width:100%}
.track{width:min(80vw,300px); height:20px; border-radius:10px; background:#21364f; position:relative}
.trackFill{position:absolute; left:0; top:0; bottom:0; border-radius:10px; background:var(--sky); width:30%; transition:width .1s, background .15s}
.thumb{position:absolute; top:50%; width:26px; height:26px; border-radius:50%; background:#fff; border:3px solid var(--sky); transform:translate(-50%,-50%); left:30%; transition:left .1s, border-color .15s}
.ticks{display:flex; justify-content:space-between; width:min(80vw,300px); margin-top:10px; font-size:12px; color:var(--muted2)}

/* mood bar + face */
.gbar{width:min(80vw,300px); height:18px; border-radius:9px; position:relative; background:linear-gradient(90deg,var(--red),var(--amber) 50%,var(--green))}
.gthumb{position:absolute; top:50%; width:26px; height:26px; border-radius:50%; background:#fff; border:3px solid #0b1626; box-shadow:0 0 0 1px rgba(255,255,255,.55); transform:translate(-50%,-50%); left:70%; transition:left .1s}

/* sleep-quality ring */
.ringwrap{cursor:pointer; touch-action:none; padding:6px}
#sqArc{transition:stroke-dasharray .12s ease, stroke .15s}

/* hours tank */
.tubewrap{display:flex; align-items:center; gap:16px; cursor:pointer; touch-action:none}
.tube{width:92px; height:236px; border-radius:46px; background:#152843; border:1px solid var(--line2); position:relative; overflow:hidden}
.tubeFill{position:absolute; left:0; right:0; bottom:0; height:62%; background:var(--green); transition:height .12s, background .15s}
.tubeNum{position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); text-align:center; font-size:30px; font-weight:600; color:#fff; text-shadow:0 1px 4px rgba(0,0,0,.5)}
.tubeticks{display:flex; flex-direction:column; justify-content:space-between; height:236px; font-size:12px; color:var(--muted2)}

/* notes */
textarea#comments{
  width:100%; height:170px; background:#0a1730; border:1px solid #22395a; border-radius:12px;
  color:var(--text); font-size:14px; padding:12px; resize:none; font-family:inherit;
}
textarea#comments:focus{outline:none; border-color:var(--sky)}

/* done */
.done-icon{width:74px; height:74px; border-radius:50%; background:rgba(93,202,143,.16); color:var(--green); display:flex; align-items:center; justify-content:center; font-size:38px; margin-top:14px}
.recap{display:grid; grid-template-columns:1fr 1fr; gap:10px; width:100%; margin:16px 0}
.rc{background:var(--panel); border-radius:12px; padding:11px 13px; text-align:left}
.rc .l{font-size:12px; color:var(--muted)}
.rc .v{font-size:20px; font-weight:600; margin-top:3px}

/* footer / buttons */
.footer{display:flex; gap:12px; align-items:center; margin-top:14px}
.primary{background:var(--sky); color:#fff; border:none; border-radius:13px; padding:14px 0; font-size:15px; font-weight:600; cursor:pointer}
.footer .primary{flex:1}
.primary:active{transform:scale(.98)}
.primary:disabled{opacity:.7}
.ghost{background:none; border:1px solid var(--line2); color:#9fb4d0; border-radius:13px; padding:14px 22px; font-size:15px; cursor:pointer}
.wide{width:100%}

/* ---------- staff dashboard ---------- */
.s-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:14px}
.s-head h1{font-size:22px; font-weight:600; color:#fff; margin:0}
.s-seg{display:inline-flex; border:1px solid var(--line2); border-radius:10px; overflow:hidden; align-self:flex-start}
.s-seg span{font-size:13px; padding:7px 14px; color:var(--muted); cursor:pointer}
.s-seg span.on{background:rgba(61,146,214,.22); color:#7cc0f5; font-weight:600}
.s-tabs{display:flex; gap:2px; border-bottom:1px solid var(--line); margin:14px 0 16px; flex-wrap:wrap}
.s-tabs span{font-size:14px; padding:9px 12px; color:var(--muted); cursor:pointer}
.s-tabs span.on{color:#fff; font-weight:600; border-bottom:2px solid var(--sky)}
.s-cards{display:grid; grid-template-columns:repeat(4,1fr); gap:11px; margin-bottom:18px}
.s-mc{background:var(--panel); border-radius:10px; padding:12px 14px}
.s-mc .l{font-size:12px; color:var(--muted)}
.s-mc .v{font-size:24px; font-weight:600; margin-top:3px; color:#fff}
.s-sec{font-size:14px; font-weight:600; color:#cdd9e8; margin:0 0 9px; display:flex; align-items:center; gap:7px}
.s-strip{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:9px; margin-bottom:18px}
.s-flag{background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:10px 12px}
.s-flag .nm{display:flex; align-items:center; gap:7px; margin-bottom:6px; font-size:13px; font-weight:600}
.s-flag .sq{font-size:11px; color:var(--muted2); margin-left:auto; font-weight:400}
.s-chip{font-size:11px; padding:2px 8px; border-radius:20px; display:inline-block; margin:2px 2px 0 0}
.s-filters{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:11px}
.s-pill{font-size:13px; padding:5px 13px; border-radius:20px; border:1px solid var(--line2); color:var(--muted); cursor:pointer}
.s-pill.on{background:rgba(61,146,214,.22); color:#7cc0f5; border-color:transparent; font-weight:600}
.s-tablewrap{overflow-x:auto}
table.s-table{width:100%; border-collapse:collapse; font-size:13px; min-width:560px}
.s-table th{text-align:center; font-size:12px; color:var(--muted); font-weight:400; padding:8px 5px; border-bottom:1px solid var(--line2); white-space:nowrap}
.s-table td{padding:8px 5px; border-bottom:1px solid var(--line); text-align:center}
.s-table .l{text-align:left}
.s-cell{display:inline-block; min-width:26px; padding:2px 0; border-radius:5px; font-size:12px}
.s-st{font-size:11px; padding:2px 9px; border-radius:20px}
.s-trow{display:flex; align-items:center; gap:10px; padding:10px 2px; border-bottom:1px solid var(--line)}
.s-row-dot{width:8px; height:8px; border-radius:50%; flex:none; display:inline-block}
.s-hm{width:100%; border-collapse:collapse; font-size:12px}
.s-hm td{padding:3px; text-align:center}
.s-hm .l{text-align:left; color:#cdd9e8; white-space:nowrap; padding-right:8px}
.s-hc{display:block; width:100%; height:22px; border-radius:3px}
.s-legend{display:flex; gap:14px; margin-top:10px; font-size:12px; color:var(--muted)}
.s-empty{color:var(--muted); font-size:13px; padding:22px 0; text-align:center}
.st-redwrap{margin-bottom:10px}
.st-grid{display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px}
.st-card{background:var(--panel); border:1.5px solid transparent; border-radius:12px; padding:14px 16px; cursor:pointer}
.st-card .st-n{font-size:28px; font-weight:600; line-height:1; color:#fff}
.st-card .st-l{font-size:12px; margin-top:6px; color:var(--muted)}
.st-card.big{padding:18px 20px; display:flex; align-items:baseline; gap:14px}
.st-card.big .st-n{font-size:42px}
.st-card.big .st-l{margin-top:0; font-size:14px}
.st-card.red{background:rgba(226,87,74,.13)}
.st-card.red .st-n, .st-card.red .st-l{color:#f0928b}
.st-card.amber .st-n{color:#f0b35a}
.st-card.green .st-n{color:#74d7a0}
.st-card.notin .st-n{color:#9fb4d0}
.st-card.on{border-color:#7cc0f5}
.st-card.red.on{border-color:#e2574a}
.st-card.amber.on{border-color:#e9a23a}
.st-card.green.on{border-color:#5dca8f}
.st-detail{margin-top:16px}
.st-detail h4{font-size:14px; font-weight:600; color:#cdd9e8; margin:0 0 8px}
.st-prow{display:flex; align-items:center; gap:11px; padding:11px 2px; border-bottom:1px solid var(--line); cursor:pointer}
.st-prow:hover{background:rgba(255,255,255,.03)}
.pd-chev{color:var(--muted2); font-size:20px; line-height:1; flex:none; margin-left:2px}
.pd-head{margin-bottom:10px}
.pd-back{background:none; border:1px solid var(--line2); color:#9fb4d0; border-radius:9px; padding:6px 12px; font-size:13px; cursor:pointer}
.pd-back:hover{border-color:var(--line2); color:#cdd9e8}
.pd-title{margin-bottom:14px}
.pd-name{font-size:20px; font-weight:600; color:#fff}
.pd-sq{font-size:13px; color:var(--muted2); margin-top:2px}
.pd-noterow td{border-bottom:1px solid var(--line)}
.pd-note{font-size:12px; color:var(--muted); font-style:italic; padding-top:0 !important; padding-bottom:9px !important}
@media(max-width:520px){ .s-cards{grid-template-columns:repeat(2,1fr)} }

/* ---------- football wordle ---------- */
.wd-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px}
.wd-back{background:none; border:none; color:#9fb4d0; font-size:14px; cursor:pointer; padding:4px}
.wd-title{font-size:15px; font-weight:600; color:#fff}
.wd-date{font-size:12px; color:var(--muted2)}
.wd-main{flex:1; display:flex; flex-direction:column; justify-content:center; min-height:0}
.wd-board{display:grid; grid-template-columns:repeat(5,1fr); gap:6px; max-width:330px; width:100%; margin:0 auto 16px}
.wd-tile{aspect-ratio:1; min-height:48px; display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:700; color:#fff; border:2px solid #2c466b; border-radius:6px}
.wd-filled{border-color:#4a6a9a}
.wd-correct{background:#5dca8f; border-color:#5dca8f; color:#0b1626}
.wd-present{background:#e9a23a; border-color:#e9a23a; color:#0b1626}
.wd-absent{background:#26405f; border-color:#26405f; color:#9fb4d0}
.wd-msg{text-align:center; min-height:24px; margin-bottom:14px; font-size:13px; color:var(--text)}
.wd-flash{color:#f0b35a; font-weight:500}
.wd-end{display:flex; flex-direction:column; align-items:center; gap:8px}
.wd-share{background:var(--sky); color:#fff; border:none; border-radius:10px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer}
.wd-keys{display:flex; flex-direction:column; gap:7px; max-width:400px; margin:0 auto; width:100%}
.wd-krow{display:flex; gap:5px; justify-content:center}
.wd-key{flex:1; max-width:34px; height:50px; border:none; border-radius:6px; background:#33507a; color:#fff; font-size:16px; font-weight:600; cursor:pointer; padding:0}
.wd-key.wd-wide{max-width:52px; font-size:13px}
.wd-key.wd-correct{background:#5dca8f; color:#0b1626}
.wd-key.wd-present{background:#e9a23a; color:#0b1626}
.wd-key.wd-absent{background:#1a2b44; color:#6f829c}
