:root{
  --sun:#ffc23d; --sun2:#ff9a1f; --sky:#8fd3ff; --teal:#14a99a; --coral:#ff5d5d;
  --ink:#3d2a1e; --ink2:#7a5a44; --paper:#fffaf0; --line:#f1ddb8;
  --good:#22a960; --bad:#e5484d; --grape:#7b5cff;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}
body{font-family:'Fredoka',system-ui,sans-serif;color:var(--ink);
  background:linear-gradient(180deg,#bfe6ff 0%,#e3f4ff 45%,#fff7dd 100%);
  -webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
button{font-family:inherit}
button:focus-visible,input:focus-visible{outline:3px solid var(--grape);outline-offset:2px}
#app{position:fixed;inset:0;display:flex;flex-direction:column}

/* HUD: one tidy row */
#hud{position:relative;z-index:25;display:flex;align-items:center;gap:6px;padding:6px 10px;background:rgba(255,255,255,.95);
  border-bottom:3px solid var(--line);white-space:nowrap;overflow-x:auto;flex-shrink:0;min-height:54px;scrollbar-width:none}
#hud::-webkit-scrollbar{display:none}
.pill{display:flex;align-items:center;gap:6px;background:#fff;border:2px solid var(--line);border-radius:999px;
  padding:3px 10px;font-weight:600;font-size:14px;flex-shrink:0;height:38px}
.pill .sub{font-size:11px;color:var(--ink2);font-weight:500}
.who{gap:8px;padding-left:4px}
.who .av{width:30px;height:30px;border-radius:50%;background:var(--teal);color:#fff;display:grid;place-items:center;font-size:15px}
.who .nm{font-size:14px;line-height:1}
.clock{background:var(--ink);color:#ffe9a8;border-radius:8px;padding:1px 6px;font-size:13px;font-variant-numeric:tabular-nums}
.meter{width:64px;height:10px;background:#f3e7d3;border-radius:10px;overflow:hidden}
.meter i{display:block;height:100%;width:0;border-radius:10px;transition:width .25s,background .25s}
.sp{flex:1;min-width:6px}
.hbtn{border:none;background:var(--sun2);color:#fff;font-size:17px;border-radius:12px;width:38px;height:38px;
  cursor:pointer;box-shadow:0 3px 0 #d47a0d;flex-shrink:0;transition:transform .08s}
.hbtn:active{transform:translateY(2px);box-shadow:0 1px 0 #d47a0d}
.hbtn.off{background:#c9b79f;box-shadow:0 3px 0 #a8957d}

#stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
#mapTrack{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
#game{display:block;border-radius:18px;box-shadow:0 10px 30px rgba(40,90,140,.22);touch-action:none;cursor:pointer}
#goalsMini{position:absolute;left:14px;top:12px;background:rgba(255,250,240,.9);border:2px solid var(--line);
  border-radius:14px;padding:6px 10px;font-size:12px;line-height:1.5;max-width:270px;pointer-events:none}
#goalsMini .g.done{color:var(--good);text-decoration:line-through}
#combo{position:absolute;top:16%;left:50%;transform:translate(-50%,0) scale(.6);font-size:46px;font-weight:700;
  color:var(--coral);-webkit-text-stroke:3px #fff;paint-order:stroke fill;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s}
#combo.show{opacity:1;transform:translate(-50%,0) scale(1)}
#banner{position:absolute;top:40%;left:50%;transform:translate(-50%,-50%);font-size:38px;font-weight:700;color:#fff;
  background:var(--coral);padding:8px 24px;border-radius:18px;box-shadow:0 6px 0 #c13b3b;pointer-events:none;opacity:0;transition:opacity .25s;white-space:nowrap}
#banner.show{opacity:1}
#credit{position:fixed;right:10px;bottom:6px;font-size:12px;font-weight:600;color:rgba(61,42,30,.78);text-shadow:0 1px 2px rgba(255,255,255,.95);pointer-events:none;z-index:5}

#overlay{position:fixed;inset:0;background:rgba(40,80,120,.22);backdrop-filter:blur(1.5px);-webkit-backdrop-filter:blur(1.5px);display:flex;align-items:center;justify-content:center;z-index:20}
.hidden{display:none!important}
/* one standard pop-up size for everything */
#card{width:min(440px,94vw);height:min(580px,calc(100% - 16px));background:var(--paper);border-radius:24px;
  box-shadow:0 8px 0 rgba(120,60,0,.25),0 24px 60px rgba(60,30,0,.35);overflow:hidden;display:flex;flex-direction:column;animation:pop .22s ease-out}
@keyframes pop{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}
.cwrap{display:flex;flex-direction:column;height:100%}
.chead{background:var(--c);color:#fff;padding:14px 16px;display:flex;gap:12px;align-items:center;flex-shrink:0}
.cicon{font-size:28px;width:50px;height:50px;background:rgba(255,255,255,.22);border-radius:16px;display:grid;place-items:center;flex-shrink:0}
.ctag{font-size:13px;opacity:.92;font-weight:500}
.ctitle{font-size:21px;font-weight:700;line-height:1.15}
.tbar{height:7px;background:#f0e3cf;flex-shrink:0}
.tbar i{display:block;height:100%;width:100%;background:var(--coral);transition:width .1s linear}
.cbody{flex:1;overflow-y:auto;padding:14px 16px;font-size:15px;line-height:1.45}
.cbody p+p{margin-top:8px}
.cfoot{padding:10px 16px 14px;display:flex;gap:8px;justify-content:flex-end;border-top:2px dashed #f0dfc4;flex-shrink:0}
.from{font-size:13px;color:var(--ink2);margin-bottom:6px}
.opts{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.opt{display:flex;gap:10px;align-items:flex-start;text-align:left;font-size:14.5px;font-weight:500;color:var(--ink);background:#fff;
  border:2px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer;transition:border-color .1s,transform .1s}
.opt > b{background:var(--sun2);color:#fff;border-radius:8px;min-width:24px;height:24px;display:grid;place-items:center;font-size:13px;flex-shrink:0}
.opt:hover:not(:disabled){border-color:var(--sun2);transform:translateY(-1px)}
.opt:disabled{cursor:default}
.opt.right{border-color:var(--good);background:#e8f8ee}.opt.right > b{background:var(--good)}
.opt.wrong{border-color:var(--bad);background:#fdecec}.opt.wrong > b{background:var(--bad)}
.fb{margin-top:12px;padding:10px 12px;border-radius:12px;font-size:14px}
.fb.good{background:#e8f8ee}.fb.bad{background:#fdecec}
.gain{margin-top:6px;font-weight:700}
.btn{font-size:15px;font-weight:600;border:none;border-radius:12px;padding:10px 18px;cursor:pointer;background:#f1e3cc;color:var(--ink)}
.btn.primary{background:var(--teal);color:#fff;box-shadow:0 3px 0 #0c7d71}
.btn.sun{background:var(--sun2);color:#fff;box-shadow:0 3px 0 #d47a0d}
.btn.grape{background:var(--grape);color:#fff;box-shadow:0 3px 0 #5639cc}
.btn:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.btn:active:not(:disabled){transform:translateY(2px)}
.slip{background:#fff;border:2px dashed var(--line);border-radius:12px;padding:8px 12px;font-size:14px;margin:8px 0}
.slip div{display:flex;justify-content:space-between;gap:10px}
.hint{font-size:13px;background:#eef6ff;border-radius:10px;padding:6px 10px;margin-top:6px;color:#2a4d7a}
.ot-guide{background:#fff;border:1px solid #d3e5fa;border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:5px;line-height:1.45}
.ot-guide>b{font-size:14px;color:#194877;margin-bottom:3px}
.ot-guide .ot-example{background:#fff6df;border:1px solid #f6dda7;border-radius:8px;padding:8px;color:#573c17;margin-top:3px}
.ot-guide small{font-size:11px;color:#64748b}
.ot-more{padding:9px 3px 4px}.ot-more>b{display:block;margin-bottom:5px}
.ot-other{margin:0 0 6px;line-height:1.45}
.ot-note{border-top:1px dashed #bbd3ee;padding-top:7px;color:#725222;font-size:12px;line-height:1.45}
.cand{display:flex;gap:12px;align-items:center;margin-bottom:8px}
.cand .face{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;font-size:26px;flex-shrink:0}
.quote{background:#fff;border-left:4px solid var(--sky);padding:8px 12px;border-radius:8px;font-style:italic;margin:8px 0}
.row{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px dashed #efdcbe;font-size:14px}
.row:last-child{border-bottom:none}
.mashbtn{display:block;width:100%;margin-top:16px;font-size:24px;font-weight:700;color:#fff;background:var(--grape);border:none;border-radius:20px;
  padding:22px 10px;cursor:pointer;box-shadow:0 6px 0 #5639cc;touch-action:manipulation}
.mashbtn:active{transform:translateY(4px);box-shadow:0 2px 0 #5639cc}
.mbar{height:14px;background:#efe2cf;border-radius:10px;overflow:hidden;margin-top:12px}
.mbar i{display:block;height:100%;width:0;background:var(--good);transition:width .08s}
.tleft{font-size:13px;color:var(--ink2);margin-top:6px;text-align:center}
.goal{display:flex;gap:8px;align-items:center;background:#fff;border:2px solid var(--line);border-radius:12px;padding:8px 10px;margin-top:8px;font-size:14px}
.goal.ok{border-color:var(--good);background:#effbf3}
.goal .pg{margin-left:auto;font-weight:600;color:var(--ink2)}
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
.badge{background:#fff;border:2px solid var(--line);border-radius:14px;padding:8px;text-align:center;font-size:12px;line-height:1.3}
.badge .bi{font-size:24px}
.badge b{display:block;font-size:13px;margin:2px 0}
.badge.lock{opacity:.5;filter:grayscale(1)}
.rank{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:12px;margin-top:6px;background:#fff;border:2px solid var(--line)}
.rank.cur{border-color:var(--teal);background:#e9f8f6}
.rank.done{opacity:.6}
.req{font-size:13px;padding:3px 0}
.shop{display:flex;gap:10px;align-items:center;background:#fff;border:2px solid var(--line);border-radius:14px;padding:10px;margin-top:8px}
.shop .si{font-size:28px;width:44px;text-align:center}
.shop .sd{flex:1;font-size:13px;color:var(--ink2);line-height:1.3}
.shop .sd b{display:block;color:var(--ink);font-size:15px}
.lv{font-size:11px;color:var(--teal);font-weight:600}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:6px 0 10px}
.stat{background:#fff;border:2px solid var(--line);border-radius:12px;padding:8px 10px}
.stat b{display:block;font-size:20px}
.stat span{font-size:12px;color:var(--ink2)}
.logo{text-align:center;padding:10px 0 4px}
.logo h1{font-size:54px;line-height:.95;font-weight:700;color:var(--sun2);-webkit-text-stroke:3px var(--ink);paint-order:stroke fill;letter-spacing:-1px}
.logo h1 span{display:inline-block;background:var(--coral);color:#fff;-webkit-text-stroke:0;font-size:30px;border-radius:12px;padding:0 10px;transform:rotate(-6deg);vertical-align:middle;margin-left:4px}
.logo p{font-size:16px;color:var(--ink2);margin-top:8px}
.namein{width:100%;font:500 18px 'Fredoka';padding:12px 14px;border:3px solid var(--line);border-radius:14px;margin-top:12px;background:#fff;color:var(--ink);text-align:center}
.how{font-size:13.5px;color:var(--ink2);margin-top:12px;line-height:1.5}
.how li{margin-left:18px}
.cv{display:block;width:100%;text-align:left;background:#fff;border:2px solid var(--line);border-radius:14px;padding:8px 12px;margin-top:8px;cursor:pointer;color:var(--ink);font-size:13.5px;line-height:1.4}
.cv:hover{border-color:var(--sun2)}
.cv.on{border-color:var(--teal);background:#e9f8f6}
.cvh{display:flex;justify-content:space-between;gap:8px;font-size:15px;margin-bottom:2px}
.cvh span{font-size:12px;color:var(--ink2)}
.cvr{color:var(--ink2)}
.opt.picked{border-color:var(--teal);background:#e9f8f6}
.opt.picked > b{background:var(--teal)}
.payslip{background:#fff;border:2px solid var(--line);border-radius:12px;padding:2px 10px;margin-top:6px}
.prow{display:grid;grid-template-columns:1fr 130px;align-items:center;gap:4px 8px;padding:7px 0;border-bottom:1px dashed #efdcbe;font-size:14px}
.prow:last-child{border-bottom:none}
.prow>b{text-align:right}
.prow .pres{grid-column:1/-1;font-size:12.5px;line-height:1.35}
.prow .pres:empty{display:none}
.prow.total{font-weight:600}
.pin{width:100%;font:500 15px 'Fredoka';padding:6px 8px;border:2px solid var(--line);border-radius:10px;text-align:right;color:var(--ink);background:#fffdf7}
.pin.ok{border-color:var(--good);background:#e8f8ee}.pin.no{border-color:var(--bad);background:#fdecec}
.steps{display:flex;gap:4px;margin-bottom:10px}
.steps i{flex:1;height:5px;border-radius:5px;background:#efe2cf}
.steps i.on{background:var(--teal)}
.sclsec{margin-top:12px}
.sclsec h4{font-size:13px;color:var(--ink2);font-weight:600;margin-bottom:2px}
.letter{background:#fff;border:1px solid #e6d7bd;border-radius:6px;padding:14px 16px;font-family:Georgia,'Times New Roman',serif;font-size:13px;line-height:1.55;color:#2b2118;box-shadow:0 2px 8px rgba(90,45,0,.08)}
.letter p+p{margin-top:8px}
.letter .lh{text-align:center;border-bottom:2px solid #c0392b;padding-bottom:6px;margin-bottom:10px;font-weight:700;letter-spacing:.5px}
.letter .lh small{display:block;font-weight:400;letter-spacing:0;color:#7a5a44}
.mk{border-radius:3px;padding:0 2px}.mk.ok{background:#dff5e7}.mk.no{background:#fbe0e0}
#buildbar{position:absolute;top:10px;left:50%;transform:translateX(-50%);background:#3d2a1e;color:#fff;border-radius:16px;padding:8px 10px 8px 14px;
  display:flex;gap:8px;align-items:center;font-size:14px;z-index:6;box-shadow:0 6px 18px rgba(60,30,0,.3);max-width:94%;flex-wrap:wrap;justify-content:center}
#buildbar .btn{padding:6px 12px;font-size:14px}
#bmenu{position:absolute;transform:translateX(-50%);background:#fff;border:2px solid var(--line);border-radius:16px;padding:6px;z-index:7;box-shadow:0 6px 18px rgba(90,45,0,.25)}
.bml{font-size:12px;font-weight:600;text-align:center;margin-bottom:4px;white-space:nowrap}
.bmr{display:flex;gap:4px}
.bmb{width:36px;height:36px;border-radius:10px;border:2px solid var(--line);background:#fffaf0;font-size:17px;cursor:pointer;color:var(--ink)}
.bmb:hover{border-color:var(--sun2)}
.bmb.on{border-color:var(--teal);background:#e9f8f6}
.bmb.del{background:#fdecec;border-color:#f5b5b5}.bmb.ok{background:#e8f8ee;border-color:#9fdcb7}
.tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{flex-shrink:0;border:2px solid var(--line);background:#fff;border-radius:999px;padding:5px 12px;font-size:13px;font-weight:600;cursor:pointer;color:var(--ink)}
.tab.on{background:var(--sun2);border-color:var(--sun2);color:#fff}
.fitem{background:#fff;border:2px solid var(--line);border-radius:14px;padding:10px;margin-top:8px}
.fhead{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.vers{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}
.ver{border:2px solid var(--line);background:#fffaf0;border-radius:12px;padding:4px;cursor:pointer;text-align:center;color:var(--ink)}
.ver:hover:not(:disabled){border-color:var(--sun2)}
.ver:disabled{opacity:.5;cursor:not-allowed}
.fprev{width:100%;height:auto;display:block}
.vn{font-size:12px;font-weight:600}.vc{font-size:12px;color:var(--teal);font-weight:600}
.scene{width:100%;height:auto;border-radius:14px;display:block;margin-bottom:8px;background:#e8e0ff}
.chat{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.say{padding:7px 10px;border-radius:12px;font-size:14px;max-width:92%;animation:pop .2s ease-out}
.say b{display:block;font-size:12px;opacity:.7}
.say.p{align-self:flex-start;background:#e9f8f6;border:2px solid #b6e6df}
.say.c{align-self:flex-end;background:#fff;border:2px solid var(--line)}
.say.blurt{background:#fff3d6;border-color:#ffd98a}
.qtag{display:block;font-size:12px;font-style:normal;margin-top:4px;color:var(--ink2)}
.banner-burn{background:var(--coral);color:#fff;border-radius:14px;padding:10px 12px;font-weight:600;margin-bottom:10px}

#toasts{position:fixed;top:66px;right:12px;display:flex;flex-direction:column;gap:6px;z-index:30;pointer-events:none;align-items:flex-end}
.toast{background:#fff;border-left:6px solid var(--teal);padding:8px 12px;border-radius:12px;box-shadow:0 4px 14px rgba(90,45,0,.2);
  font-size:14px;font-weight:500;max-width:290px;animation:slide .25s ease-out}
.toast.bad{border-color:var(--bad)}
.toast.ach{border-color:#e0a100;background:#fff8d6}
@keyframes slide{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}
#fx{position:fixed;inset:0;pointer-events:none;z-index:40}
@media (max-width:640px){
  .pill{font-size:12px;padding:2px 8px;height:34px}.meter{width:44px}.hbtn{width:34px;height:34px;font-size:15px}
  #goalsMini{font-size:11px;max-width:180px;top:6px;left:6px}
  .logo h1{font-size:42px}
}
@media (prefers-reduced-motion:reduce){#card,.toast{animation:none}}


/* HR LIFE 2.0: leaderboard, home screen, and coffee */
.hbtn.extras{background:#6652d8;box-shadow:0 3px 0 #4431a5}
.hbtn.extras.coffee{background:#aa6b30;box-shadow:0 3px 0 #815025}
.lb-status{background:#fff6dc;border:1px solid #f4d79c;padding:8px 10px;border-radius:10px;font-size:12.5px;line-height:1.35;margin:8px 0}
.lb-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 6px;border-bottom:1px dashed var(--line);font-size:13px}
.lb-row:nth-child(2),.lb-row:nth-child(3),.lb-row:nth-child(4){background:#fff6dc;border-radius:10px}
.lb-row.mine{background:#e8f8ee;border:1px solid #8ed6ab;border-radius:10px}
.lb-place{font-weight:700;color:var(--teal);text-align:center}
.lb-name{font-weight:600;overflow-wrap:anywhere}.lb-role{font-size:11px;color:var(--ink2)}
.lb-points{font-weight:700;font-variant-numeric:tabular-nums;text-align:right}
.lb-auth-panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin:8px 0}
.lb-auth-panel summary{cursor:pointer;font-size:13.5px;font-weight:700}
.lb-input{font:500 14px Fredoka,sans-serif;width:100%;margin-top:7px;padding:9px 10px;border:2px solid var(--line);border-radius:10px;background:white;color:var(--ink)}
.lb-action-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.lb-action-row .btn{font-size:13px;padding:8px 12px}
.qr-img{display:block;object-fit:contain;max-width:100%;width:min(280px,100%);height:auto;max-height:282px;margin:10px auto;border-radius:11px;border:1px solid #f1d9d9;image-rendering:auto}
.pwa-instructions{font-size:14px;line-height:1.5;background:#fff;border:2px solid var(--line);border-radius:12px;padding:12px;margin-top:12px}

/* Lightweight in-game feedback form; no new UI framework or Netlify function. */
.fb-field{display:block;margin:12px 0 0;font-size:13px;font-weight:600;color:var(--ink2)}
.fb-input{display:block;width:100%;margin-top:5px;border:2px solid var(--line);border-radius:12px;background:white;color:var(--ink);padding:10px 12px;font:500 15px Fredoka,system-ui,sans-serif;outline-color:var(--teal)}
.fb-message{min-height:132px;resize:vertical;line-height:1.45}
.fb-count{text-align:right;font-size:12px;color:var(--ink2);margin-top:4px}
.fb-notice{border-radius:12px;padding:10px 12px;font-size:13px;margin-top:10px;line-height:1.45;background:#eef6ff;color:#2a4d7a}
.fb-notice.error{background:#fdecec;color:#9a2d2d}
.fb-notice.success{background:#e8f8ee;color:#147847}
.creator-byline{font-size:12px!important;margin-top:5px!important;color:var(--ink2);letter-spacing:.2px}

/* HR LIFE 2.0 walkthrough + once-only Day 1 welcome. */
.title-how-btn{display:block;width:100%;margin:10px 0 7px;background:#fff;border:2px solid #b9dff3;color:#285878;font-weight:700;box-shadow:0 3px 0 #d1eafa}
.title-how-btn:active{transform:translateY(2px);box-shadow:none}
.title-start-note{text-align:center;font-size:12px;color:var(--ink2);margin:0 0 8px}
.guide-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}
.guide-tabs .tab{flex:1 1 75px;text-align:center;white-space:normal}
.guide-block{background:white;border:2px solid var(--line);border-radius:12px;padding:10px 12px;margin-top:9px;font-size:13.5px;line-height:1.45}
.guide-block strong{display:block;margin-bottom:3px;color:var(--ink)}
.guide-block p{margin:0}
.guide-block em{font-style:normal;color:var(--ink2)}
.welcome-two{background:#fff2d4;border:2px solid #ffd17e;border-radius:15px;padding:12px 13px;margin-bottom:10px}
.welcome-two h3{font-size:20px;margin-bottom:5px;line-height:1.25}
.welcome-two p{font-size:14px;line-height:1.4}
.welcome-new{display:grid;grid-template-columns:1fr;gap:7px;margin:10px 0}
.welcome-new div{background:#fff;border:1px solid #f1ddb8;border-radius:10px;padding:8px 10px;font-size:13px;line-height:1.35}
.welcome-new b{display:block;font-size:13.5px;color:var(--ink)}
.welcome-punchline{font-size:13px;margin-top:10px;background:#e9f8f6;padding:9px 11px;border-radius:10px}
/* Opening-screen account controls, using the existing leaderboard Supabase Auth. */
.title-auth-slot{margin:11px 0 5px}
.title-auth-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.title-auth-actions .btn{flex:1 1 126px;max-width:210px;text-align:center}
.title-auth-status{text-align:center;color:var(--ink2);font-size:12px;line-height:1.35;margin-top:6px;overflow-wrap:anywhere}
.title-auth-signed{background:#e9f8f6;border:2px solid #b6e6df;border-radius:12px;padding:8px 10px;font-size:12.5px}
.title-auth-signed .btn{font-size:12px;padding:5px 11px;margin-top:7px}
.title-auth-form{display:flex;flex-direction:column;gap:9px;margin-top:12px}
.title-auth-form label{font-size:13px;font-weight:600;color:var(--ink2)}
.title-auth-form .lb-input{margin-top:4px}
.title-auth-tabs{display:flex;gap:6px;margin:8px 0}
.title-auth-tabs .btn{flex:1;font-size:13px;padding:9px 10px}
.title-auth-form .btn{align-self:stretch}
/* MOBILE-ONLY: zoomable office camera, compact readable HUD and touch controls. */
#mobileMapTools{display:none}
@media (max-width:700px) and (orientation:portrait){
  #hud{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));align-items:center;
    gap:3px;padding:5px 5px 6px;min-height:0;overflow:visible;white-space:nowrap}
  #hud>.pill{width:100%;min-width:0;height:33px;padding:2px 5px;gap:4px;justify-content:center;
    font-size:clamp(10px,3vw,13px);border-width:1.5px}
  #hud>.pill.who{grid-column:span 3;justify-content:flex-start;padding-left:4px}
  #hud>.pill:nth-child(2){grid-column:span 4}
  #hud>.pill:nth-child(3){grid-column:span 3}
  #hud>.pill:nth-child(4){grid-column:span 2;height:26px}
  #hud>.pill:nth-child(5){grid-column:span 2;height:26px}
  #hud>.pill:nth-child(6){grid-column:span 3;height:26px}
  #hud>.pill:nth-child(7){grid-column:span 3;height:26px;font-size:11px}
  #hud>.sp{display:none}
  #hud>.hbtn{grid-column:span 1;width:min(100%,36px);height:34px;font-size:17px;
    justify-self:center;border-radius:9px;box-shadow:0 2px 0 #d47a0d;min-width:0}
  #hud>.hbtn.extras{box-shadow:0 2px 0 #4431a5}
  #hud>.hbtn.coffee{box-shadow:0 2px 0 #815025}
  #hud .av{width:25px;height:25px;font-size:14px}
  #hud .who{gap:4px}
  #hud .who .nm{font-size:clamp(11px,3vw,14px);overflow:hidden;text-overflow:ellipsis;max-width:65px}
  #hud .who .sub{font-size:10px}
  #hud .clock{font-size:12px;padding:2px 4px}
  #hud .meter{width:clamp(14px,5vw,26px);height:8px}
  #hud #hXpT{font-size:9px}
  #mapTrack{position:absolute;top:0;left:0;width:max-content;height:100%;min-width:0;
    display:flex;justify-content:center;align-items:center;will-change:transform;touch-action:none}
  #game{touch-action:none;max-width:none;flex:none;border-radius:12px}
  #goalsMini{display:none!important} /* Today's Goals remain available via HUD 🎯 */
  #mobileMapTools{display:flex;position:absolute;z-index:8;left:50%;bottom:15px;
    transform:translateX(-50%);gap:7px;align-items:center;border:1px solid rgba(190,160,115,.65);
    padding:6px;background:rgba(255,250,240,.96);border-radius:16px;
    box-shadow:0 3px 12px rgba(40,90,140,.18);white-space:nowrap}
  #mobileMapTools.hidden{display:none!important}
  #mobileMapTools button{border:0;border-radius:10px;padding:8px 11px;font:600 13px Fredoka,system-ui,sans-serif;
    color:var(--ink);background:#ffeac6;cursor:pointer;min-height:36px;touch-action:manipulation}
  #mobileMapTools #mMapOverview{background:#e9f8f6;min-width:124px}
  #mobileMapTools button:active{transform:translateY(1px)}
  #buildbar{font-size:12px;max-width:97%;top:7px;padding:7px}
  #bmenu{max-width:96vw}
  #combo{font-size:32px}
  #banner{max-width:94%;white-space:normal;text-align:center;font-size:26px}
  #toasts{top:112px;right:8px}
  #credit{font-size:10px;right:8px;bottom:max(5px,env(safe-area-inset-bottom,5px));z-index:5}
}
@media (max-width:360px) and (orientation:portrait){
  #hud>.hbtn{grid-column:span 2;font-size:17px;width:40px;height:36px}
  #hud>.pill{padding:2px 3px}
  #hud .who .sub{font-size:9px}
  #hud .clock{font-size:11px}
  #mobileMapTools{bottom:12px}
  #toasts{top:150px}
}
.language-choice{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:10px 0 8px}
.language-choice .btn{padding:7px 12px;font-size:13px}
#bLang{font-size:20px}
@media(max-width:700px){.language-choice .btn{font-size:12px;padding:8px 10px}}
.fb.mid{background:#fff6dc}
.fxrow{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.fxrow span{border-radius:999px;padding:2px 9px;font-size:13px;font-weight:600;border:1.5px solid var(--line);background:#fff}
.fxrow span.up{background:#e8f8ee;border-color:#9fdcb4}.fxrow span.down{background:#fdecec;border-color:#f2b0b0}
.meters3{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 8px;font-size:14px}.meters3 span{background:#fff4e0;border-radius:10px;padding:3px 9px}
.tbar{display:inline-block;width:120px;max-width:45vw;height:9px;background:#f3e7d3;border-radius:9px;overflow:hidden;vertical-align:middle}.tbar i{display:block;height:100%;border-radius:9px}
.team-row{display:flex;gap:10px;align-items:flex-start;padding:7px 0;border-bottom:1px dashed var(--line)}.team-row .tf{font-size:24px;width:30px;text-align:center;flex-shrink:0}
.promo{margin:10px 0;padding:9px 11px;border-radius:12px;background:#f1ecff;border:2px solid #cfc2ff;font-size:14px}.promo.ready{background:#e8f8ee;border-color:#8fd6a8}
.cond-card{margin:8px 0 10px;padding:10px 12px;border-radius:14px;background:#eaf4ff;border:2px solid #b6d6f7;font-size:14px;overflow:hidden}.cond-card .ci{font-size:28px;float:left;margin-right:10px;line-height:1}
.hbtn.ready{position:relative;animation:readyPulse 1.2s ease-in-out infinite}
.hbtn.ready::after{content:'';position:absolute;top:-3px;right:-3px;width:11px;height:11px;border-radius:50%;background:#e5484d;border:2px solid #fff}
@keyframes readyPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}

/* v33: shown only when the goals are complete and the ticket queue is clear. */
#earlyShiftBtn{position:absolute;right:16px;bottom:18px;z-index:12;border:2px solid #0f8d7c;
  border-radius:15px;background:#12a68f;color:#fff;font:700 15px Fredoka,system-ui,sans-serif;
  padding:12px 16px;box-shadow:0 4px 0 #087566,0 7px 18px rgba(0,0,0,.18);
  cursor:pointer;max-width:min(90%,340px);touch-action:manipulation}
#earlyShiftBtn:active{transform:translateY(2px);box-shadow:0 2px 0 #087566}
@media(max-width:700px) and (orientation:portrait){
  #earlyShiftBtn{left:50%;right:auto;bottom:80px;transform:translateX(-50%);width:max-content;
    max-width:90%;padding:9px 12px;font-size:13px;box-shadow:0 3px 0 #087566}
  #earlyShiftBtn:active{transform:translateX(-50%) translateY(2px)}
}

/* v37 fainting interstitial: short, non-interruptive recovery scene */
.faint-panel{padding:18px 15px;margin:8px 0;text-align:center;border:2px solid #ffd4d7;border-radius:18px;background:linear-gradient(180deg,#fff5f5,#fffdfa);}
.faint-panel p{margin:12px auto;max-width:470px;line-height:1.55}
.faint-emoji{font-size:66px;line-height:1.3;display:block;transform-origin:55% 75%;animation:hrFaint37 1.2s ease-out both;}
@keyframes hrFaint37{0%{transform:rotate(0deg) scale(1.14)}48%{transform:rotate(-21deg) scale(.96)}75%{transform:rotate(15deg) scale(.91)}100%{transform:rotate(-8deg) scale(.98)}}
@media(prefers-reduced-motion:reduce){.faint-emoji{animation:none}}

/* v42: long goal lists collapse into a tappable summary */
#goalsMini.compact{pointer-events:auto;cursor:pointer;max-width:250px}
#goalsMini.compact .from{font-size:11px}
/* v42: keep the HUD on one row without sideways scrolling on tablets/laptops */
@media (min-width:701px) and (max-width:1360px){
  #hud{gap:4px;padding:6px 8px}
  #hud>.pill{padding:2px 7px;gap:4px;font-size:13px;height:36px}
  #hud .meter{width:40px}
  #hud>.hbtn{width:33px;height:33px;font-size:15px;border-radius:10px}
  #hud .who .av{width:26px;height:26px;font-size:14px}
}
@media (min-width:701px) and (max-width:1100px){
  #hud .meter{width:26px}
  #hud #hXpT{display:none}
  #hud>.hbtn{width:30px;height:30px;font-size:14px}
  #hud .who .nm{max-width:80px;overflow:hidden;text-overflow:ellipsis}
}
@media (min-width:701px) and (max-width:980px){
  #hud{flex-wrap:wrap;justify-content:center;row-gap:5px;white-space:normal;overflow-x:visible}
  #hud>.sp{display:none}
}

/* v43: What's New, training and events */
.whatsnew{margin:10px 0 4px;padding:9px 12px;border-radius:14px;background:linear-gradient(135deg,#fff4d6,#ffe3f0);border:2px solid #ffc23d;font-size:13px;line-height:1.45;text-align:left}
.whatsnew b{font-size:14px}
.whatsnew ul{margin:5px 0 0;padding-left:18px}
.whatsnew li{margin:2px 0}
.course-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.btn.course{font-size:12px;padding:6px 9px;border-radius:10px}
.tab.newtab{position:relative}
.tab.newtab::after{content:'NEW';position:absolute;top:-7px;right:-6px;background:#e5484d;color:#fff;font-size:8px;font-weight:700;padding:1px 4px;border-radius:6px}
.tabs{padding-top:8px}

/* v44: Kedai + Premium */
.prem-bal{display:flex;align-items:center;justify-content:center;gap:6px;font-size:20px;margin:4px 0 8px;padding:8px;border-radius:14px;background:linear-gradient(135deg,#e9e4ff,#d7f4ff);border:2px solid #b9a8ff}
.prem-bal b{font-size:24px;color:#4431a5}
.prem-packs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0}
.prem-pack{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 6px;border-radius:14px;border:2px solid #b9a8ff;background:#fff;cursor:pointer;font:inherit}
.prem-pack b{font-size:17px;color:#4431a5}.prem-pack span{font-weight:700}
.prem-pack i{position:absolute;top:-9px;font-style:normal;font-size:10px;background:#e5484d;color:#fff;border-radius:8px;padding:1px 6px;white-space:nowrap}
.prem-pack:disabled{opacity:.6}
.prem-btns{display:flex;flex-direction:column;gap:5px;align-items:stretch}
.linkbtn{background:none;border:none;color:#6652d8;text-decoration:underline;cursor:pointer;font:inherit;font-size:13px;margin-top:6px}
#hName.goldname{background:linear-gradient(90deg,#b8860b,#ffd700,#b8860b);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:700}
#hName.goldname::before{content:'👑 ';-webkit-text-fill-color:initial}

/* v45: Kecoh Group companies */
.co-chip{display:inline-block;margin:0 0 8px;padding:4px 10px;border-radius:999px;background:#eef1ff;border:2px solid #c9d1f5;font-size:13px}
.co-row{display:flex;align-items:center;gap:10px;padding:10px;border:2px solid var(--line);border-radius:14px;margin:8px 0;background:#fff}
.co-row.cur{border-color:#22a960;background:#effbf3}
.co-row.locked{opacity:.6}
.co-ic{font-size:28px;width:40px;text-align:center}
.co-st{font-size:12px;font-weight:600;margin-top:3px;color:#2c3e70}
.headhunt{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 10px;padding:12px;border-radius:16px;background:linear-gradient(135deg,#fff3c4,#ffe0ef);border:2px solid #ffc23d}
.headhunt .hh-ic{font-size:30px;animation:readyPulse 1s ease-in-out infinite}
.headhunt>div:nth-child(2){flex:1;min-width:180px}
.hh-btns{display:flex;gap:6px;width:100%;justify-content:flex-end}

/* v47: inside the Google Play app */
.in-play #bCoffee,.in-play #bInstall{display:none!important}
