:root{
  --bg:#f3f8fd; --card:#ffffff; --ink:#1d2939; --muted:#667085; --line:#e4ecf5;
  --sky:#0ea5e9; --sky-d:#0284c7; --sky-l:#e0f2fe; --orange:#f97316; --orange-d:#ea580c; --orange-l:#fff1e6;
  --green:#22c55e; --amber:#f59e0b; --violet:#8b5cf6; --red:#ef4444;
  --shadow:0 6px 20px rgba(14,80,140,.08); --r:16px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:'Noto Sans Bengali','Hind Siliguri','Kalpurush',system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:16px;line-height:1.55;-webkit-tap-highlight-color:transparent}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
.wrap{max-width:520px;margin:0 auto;min-height:100%;display:flex;flex-direction:column}
.hidden{display:none!important}

/* হেডার */
.top{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}
.brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:22px;color:var(--sky-d)}
.brand svg{width:30px;height:30px}
.brand small{font-size:12px;font-weight:500;color:var(--muted);margin-left:2px}
.icon-btn{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--sky-d);background:var(--sky-l)}
.icon-btn svg{width:20px;height:20px}

/* বোতাম */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px 18px;border-radius:14px;font-weight:700;font-size:17px;transition:transform .08s}
.btn:active{transform:scale(.98)}
.btn-primary{background:linear-gradient(135deg,var(--orange),var(--orange-d));color:#fff;box-shadow:0 6px 16px rgba(249,115,22,.3)}
.btn-sky{background:linear-gradient(135deg,var(--sky),var(--sky-d));color:#fff;box-shadow:0 6px 16px rgba(14,165,233,.28)}
.btn-ghost{background:#fff;color:var(--sky-d);border:1.5px solid var(--sky-l)}
.btn[disabled]{opacity:.45;pointer-events:none}

/* হোম */
.home{padding:20px 16px 8px;display:flex;flex-direction:column;gap:16px}
.hero{background:linear-gradient(160deg,#e0f2fe 0%,#fff 55%,#fff1e6 100%);border-radius:24px;padding:26px 20px;text-align:center;box-shadow:var(--shadow);position:relative;overflow:hidden}
.hero .sun{width:76px;height:76px;margin:0 auto 6px}
.hero h1{font-size:44px;line-height:1.2;color:var(--sky-d)}
.hero h1 span{color:var(--orange)}
.hero p{color:var(--muted);margin-top:6px}
.hero .btns{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.paths{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.path{background:#fff;border-radius:14px;padding:12px 6px;text-align:center;font-size:14px;font-weight:600;box-shadow:var(--shadow)}
.path svg{width:26px;height:26px;display:block;margin:0 auto 4px;color:var(--sky)}
.path:nth-child(even) svg{color:var(--orange)}
.soon{background:var(--orange-l);border:1.5px dashed #fdba74;border-radius:16px;padding:14px;font-size:15px;color:#9a3412;text-align:center}
.soon b{display:block;font-size:16px}

/* ফর্ম */
.card{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);padding:16px}
.create{padding:16px;display:flex;flex-direction:column;gap:14px}
.create h2{font-size:22px;color:var(--sky-d)}
.field label{display:block;font-weight:600;font-size:15px;margin-bottom:6px}
.row{display:flex;gap:8px}
.input,.select{width:100%;padding:12px 14px;border-radius:12px;border:1.5px solid var(--line);background:#fff;font-size:16px;outline:none}
.input:focus,.select:focus{border-color:var(--sky)}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.seg button{padding:12px;border-radius:12px;border:1.5px solid var(--line);background:#fff;font-weight:600}
.seg button.on{border-color:var(--sky);background:var(--sky-l);color:var(--sky-d)}
.dice{flex:0 0 48px;border-radius:12px;background:var(--orange-l);color:var(--orange-d);display:grid;place-items:center}
.dice svg{width:22px;height:22px}

/* গেম */
.game{padding:12px 12px 190px;display:flex;flex-direction:column;gap:12px}
.profile{display:flex;gap:12px;align-items:center}
.ava{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;font-size:26px;font-weight:700;color:#fff;background:linear-gradient(135deg,var(--sky),var(--orange));flex:0 0 58px}
.pinfo{flex:1;min-width:0}
.pname{font-weight:700;font-size:19px;line-height:1.3}
.pmeta{color:var(--muted);font-size:14px}
.age-badge{background:var(--orange-l);color:var(--orange-d);font-weight:700;border-radius:12px;padding:6px 10px;text-align:center;line-height:1.2;font-size:13px}
.age-badge b{display:block;font-size:22px}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.chip{font-size:13px;padding:3px 10px;border-radius:20px;background:var(--sky-l);color:var(--sky-d);font-weight:600}
.chip.o{background:var(--orange-l);color:var(--orange-d)}
.chip.r{background:#fee2e2;color:#b91c1c}
.money{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.money .v{font-size:22px;font-weight:700;color:var(--green)}
.money .v.neg{color:var(--red)}
.money .l{color:var(--muted);font-size:14px}
.stat{display:grid;grid-template-columns:72px 1fr 34px;align-items:center;gap:8px;font-size:14px;margin-top:7px}
.bar{height:10px;border-radius:10px;background:#eef3f8;overflow:hidden}
.bar i{display:block;height:100%;border-radius:10px;transition:width .4s}
.stat .n{text-align:right;font-weight:600;color:var(--muted)}
.logbox h3{font-size:16px;color:var(--sky-d);margin-bottom:6px}
.yr{border-left:3px solid var(--sky-l);padding:2px 0 8px 12px;position:relative}
.yr:before{content:'';position:absolute;left:-7px;top:6px;width:11px;height:11px;border-radius:50%;background:var(--sky)}
.yr .a{font-weight:700;font-size:14px;color:var(--sky-d)}
.yr p{font-size:15px;margin-top:2px}

/* নিচের বার */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:6;background:rgba(255,255,255,.97);border-top:1px solid var(--line);padding:8px 10px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px rgba(14,80,140,.07)}
.dock-in{max-width:520px;margin:0 auto}
.tabs{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;margin-bottom:8px}
.tab{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0;border-radius:12px;font-size:12px;font-weight:600;color:var(--muted)}
.tab svg{width:22px;height:22px;color:var(--sky)}
.tab.crime svg{color:var(--red)}
.tab:active{background:var(--sky-l)}

/* মডাল ও শিট */
.overlay{position:fixed;inset:0;background:rgba(15,40,70,.45);z-index:20;display:flex;align-items:flex-end;justify-content:center}
.overlay.center{align-items:center;padding:16px}
.sheet{background:#fff;width:100%;max-width:520px;max-height:82vh;overflow:auto;border-radius:22px 22px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom));animation:up .2s ease-out}
.dialog{background:#fff;width:100%;max-width:480px;max-height:90vh;overflow:auto;border-radius:22px;padding:20px 18px;animation:pop .18s ease-out}
@keyframes up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes pop{from{transform:scale(.94);opacity:.4}to{transform:none;opacity:1}}
.sheet h3,.dialog h3{font-size:20px;color:var(--sky-d);margin-bottom:4px}
.ev-tag{display:inline-block;font-size:13px;font-weight:700;color:var(--orange-d);background:var(--orange-l);border-radius:20px;padding:2px 10px;margin-bottom:8px}
.ev-text{font-size:16px;margin:6px 0 14px}
.choices{display:flex;flex-direction:column;gap:8px}
.choice{text-align:left;padding:13px 14px;border-radius:14px;border:1.5px solid var(--line);background:#fff;font-weight:600;font-size:15px;line-height:1.4}
.choice:active{background:var(--sky-l);border-color:var(--sky)}
.choice small{display:block;font-weight:500;color:var(--muted);font-size:13px;margin-top:2px}
.choice[disabled]{opacity:.45;pointer-events:none}
.sheet .note{font-size:14px;color:var(--muted);margin-bottom:10px}
.sheet .warn{font-size:14px;color:#b91c1c;background:#fef2f2;border-radius:12px;padding:8px 12px;margin-bottom:10px}
.info{background:var(--sky-l);border-radius:14px;padding:10px 12px;font-size:14px;margin-bottom:10px}
.close-x{float:right;width:34px;height:34px;border-radius:10px;background:#f1f5f9;font-size:20px;line-height:34px;text-align:center;color:var(--muted)}
.sum{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.sum div{background:#f8fafc;border-radius:12px;padding:8px 10px;font-size:13px;color:var(--muted)}
.sum b{display:block;font-size:15px;color:var(--ink)}
.score{text-align:center;margin:6px 0 4px}
.score b{display:block;font-size:44px;color:var(--orange);line-height:1.1}
.dialog .btns{display:flex;flex-direction:column;gap:8px;margin-top:10px}

/* টোস্ট ও ফুটার */
.toast{position:fixed;left:50%;bottom:200px;transform:translateX(-50%);background:#1d2939;color:#fff;padding:10px 16px;border-radius:12px;font-size:14px;z-index:40;max-width:90%;text-align:center;animation:pop .2s}
.foot{text-align:center;font-size:13px;color:var(--muted);padding:14px 16px 20px}
.foot a{color:var(--muted)}
.foot .credit{font-weight:600;color:var(--sky-d)}
.linkbtn{color:var(--sky-d);font-weight:600;text-decoration:underline;font-size:13px}
@media (max-width:360px){.tab{font-size:11px}.hero h1{font-size:38px}}
