:root{--bg:#0b0f16;--panel:#0f1520}*{-webkit-tap-highlight-color:transparent}html,body{background:var(--bg);color:#e8eef8;height:100%;margin:0;font-family:Arial,Helvetica,sans-serif;font-size:14px;overflow:hidden}#app{background:var(--panel);width:min(100vw,480px);height:100dvh;margin:0 auto;position:relative;overflow:hidden}#frame{background:var(--panel);touch-action:manipulation;-webkit-user-select:none;user-select:none;--s:1;flex-direction:column;display:flex;position:absolute;inset:0}#topbar{box-sizing:border-box;background:var(--bg);z-index:5;border-bottom:1px solid #263248;flex:0 0 48px;align-items:center;gap:8px;height:48px;padding:0 14px;display:flex}#topbar .brand{font-size:18px;font-weight:700}#topbar .hi{text-overflow:ellipsis;white-space:nowrap;color:#9fb4d6;flex:1;min-width:0;font-size:13px;overflow:hidden}#topbar .right{flex-direction:column;align-items:flex-end;margin-left:auto;line-height:1.1;display:flex}#topbar .ore{color:#ffd36b;font-size:18px}#dbgbar{background:#1b1330;border-bottom:1px solid #3d2a66;flex:none;align-items:center;gap:8px;padding:2px 10px;display:flex}#debug{color:#c9b6f5;pointer-events:none;flex:1;min-width:0;font-size:12px}#dbg-reset{color:#ffb4a6;cursor:pointer;background:#3a1a1a;border:1px solid #7a3a3a;border-radius:6px;min-height:28px;padding:0 10px;font-size:12px;font-weight:700}#area{background:var(--bg);flex:auto;min-height:0;position:relative}#canvas-host{background:var(--bg);justify-content:center;align-items:flex-start;display:flex;position:absolute;inset:0}#canvas-host canvas{flex:none;display:block}#content{z-index:2;pointer-events:none;position:absolute;inset:0}#nav{height:calc(56px + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box;background:var(--bg);z-index:5;border-top:1px solid #263248;flex:none;display:flex}.tab{color:#8fa3c2;cursor:pointer;white-space:nowrap;background:0 0;border:0;flex:auto;min-width:0;min-height:44px;padding:0 2px;font-size:12px;font-weight:700}.tab.active{color:#fff;background:#1a2740;box-shadow:inset 0 3px #2f7de1}.screen{box-sizing:border-box;pointer-events:auto;background:var(--panel);padding:10px 14px;position:absolute;inset:0;overflow-y:auto}.screen[hidden]{display:none}.screen.battle{pointer-events:none;background:0 0;padding:0;overflow:visible}.screen.battle>*{pointer-events:auto}.title{margin:4px 0 10px;font-size:22px}.hint{color:#8fa3c2;font-size:14px}.sect{color:#8fa3c2;text-transform:uppercase;letter-spacing:.05em;margin:12px 0 6px;font-size:13px}.btn{color:#fff;cursor:pointer;background:#2b3b59;border:0;border-radius:10px;min-height:44px;padding:0 14px;font-size:16px;font-weight:700}.btn.primary{background:var(--tg-button,#2f7de1);color:var(--tg-button-text,#fff)}.btn.big{width:100%;margin-top:10px}.btn:disabled{opacity:.4;cursor:default}.btn.back{background:#1a2740;margin-bottom:6px}.grid{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.tile{border:1px solid hsl(var(--hue) 40% 38%);background:linear-gradient(160deg, hsl(var(--hue) 45% 30%), hsl(var(--hue) 40% 18%));color:#fff;cursor:pointer;border-radius:12px;height:128px;padding:0;display:block;position:relative;overflow:hidden}.tile .pt{object-fit:contain;box-sizing:border-box;pointer-events:none;width:100%;height:100%;padding-bottom:30px;position:absolute;top:0;left:0;right:0}.tile .tx{background:linear-gradient(#0000,#000000bf);flex-direction:column;align-items:center;gap:1px;padding:12px 2px 4px;display:flex;position:absolute;bottom:0;left:0;right:0}.tile .tn{text-align:center;word-break:break-word;font-size:12px;font-weight:700}.tile .tl{color:#ffd36b;font-size:12px}.tile .sm{color:#9fe0ff;font-size:12px}.tile.locked{border-color:#2b3b59}.tile.locked .pt{filter:brightness(.35)grayscale()}.tile .lock{font-size:18px;position:absolute;top:6px;right:8px}.detail{flex-direction:column;gap:8px;display:flex}.kv{border-bottom:1px solid #1f2b42;justify-content:space-between;padding:4px 0;font-size:15px;display:flex}.kv span{color:#9fb4d6}.actions{flex-direction:column;gap:8px;margin-top:6px;display:flex}.slots{flex-direction:column;gap:6px;display:flex}.reason{color:#ffb4a6;min-height:20px;font-size:13px}.badge{color:#ffd36b;vertical-align:middle;background:#5a3a1a;border-radius:8px;padding:2px 6px;font-size:12px}.badge.team{color:#8be3a1;background:#1d4a2c}.screen.heroes .detail{margin-top:calc(var(--s) * 330px - 10px)}.screen.heroes .detail .back{z-index:3;margin:0;position:absolute;top:8px;left:12px}.screen.heroes .detail .title{margin-top:0}.screen.heroes:has(.detail){pointer-events:none;background:0 0;padding:10px 14px}.screen.heroes:has(.detail) .detail{pointer-events:none;background:0 0}.screen.heroes:has(.detail) .detail>*{pointer-events:auto}.list{flex-direction:column;gap:6px;display:flex}.row{background:#172134;border-radius:10px;justify-content:space-between;align-items:center;gap:8px;min-height:44px;padding:8px 10px;display:flex}.rn{flex-direction:column;display:flex}.rv{flex-direction:column;align-items:flex-end;display:flex}.sub{color:#8fa3c2;font-size:12px}.total{margin-top:12px;font-size:16px}.note{color:#8be3a1;min-height:20px;margin-top:8px;font-size:14px}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{color:#fff;cursor:pointer;background:#172134;border:1px solid #2b3b59;border-radius:22px;min-height:44px;padding:0 12px;font-size:14px}.chip.sel{background:#2f7de1;border-color:#2f7de1}.chip small{color:#cfe0ff;font-size:12px}.cards{flex-direction:column;gap:8px;display:flex}.card{background:#172134;border-radius:12px;flex-direction:column;gap:2px;margin-bottom:8px;padding:8px 12px;display:flex}.card .ct{justify-content:space-between;align-items:center;font-size:16px;display:flex}.card .btn{margin-top:6px}#hint{box-sizing:border-box;background:var(--bg);color:#cfd8e6;text-align:center;flex:none;min-height:calc(1.3em + 8px);padding:4px 10px;font-size:13px;line-height:1.3;overflow:visible}#hint[hidden]{display:none}.b-bar{flex-direction:column;gap:2px;display:flex;position:absolute;bottom:4px;left:12px;right:12px}.b-btns2{gap:8px;height:48px;display:flex}.b-btns2 .btn{flex:1}.b-btns2 .btn#b-speed{color:#cfd8e6;background:#2b3b59;border:2px solid #4a5f86;flex:0 0 92px}.b-btns2 .btn#b-speed.on{color:#fff;background:#1d6b3a;border-color:#4cd964}.b-today{text-align:center;color:#e8eef8;text-shadow:0 1px 3px #000,0 0 6px #000;font-size:13px;line-height:1.2}.b-bar[hidden]{display:none}.b-dim{background:#0006;position:absolute;inset:0;pointer-events:none!important}.b-dim[hidden]{display:none}.b-result{box-sizing:border-box;text-align:center;background:#0a0e1cd1;border-radius:16px;width:min(86%,320px);padding:18px 16px 16px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.b-result[hidden]{display:none}.b-result .big{font-size:56px;font-weight:700;line-height:1.1}.b-result .big.win{color:#6be37a}.b-result .big.lose{color:#ff6b6b}.b-result .b-ore{color:#ffd36b;margin:2px 0;font-size:22px;font-weight:700}.b-result .b-cap{color:#ffb4a6;margin:2px 0;font-size:13px}.b-result .b-cap:empty{display:none}.b-result .b-pts{color:#ffd36b;min-height:0;margin:4px 0;font-size:22px;font-weight:700}.b-result .b-pts:empty{display:none}.b-result .b-sub{color:#9fb4d6;margin:4px 0 10px;font-size:12px}.b-result .b-btns{gap:8px;display:flex}.b-result .b-btns .btn{flex:1;min-width:0;padding:0 8px}.b-result .b-btns .btn[hidden]{display:none}.screen{scrollbar-width:thin;scrollbar-color:#2b3b59 var(--panel)}.demo{letter-spacing:.04em;color:#ffd36b;background:#3a2d12;border:1px solid #7a5a1a;border-radius:6px;margin:4px 0;padding:2px 8px;font-size:12px;font-weight:700;display:inline-block}.banner{background:linear-gradient(160deg,#1c2d52,#14203a);border:1px solid #2f4a7e;border-radius:12px;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 12px;display:flex}.banner .b-title{color:#fff;font-size:16px;font-weight:700}.banner .b-line{color:#c4d4ee;font-size:12px}.link{color:#6ab3f3;cursor:pointer;text-align:left;background:0 0;border:0;min-height:44px;padding:0;font-size:14px;font-weight:700}.stats{grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 0;display:grid}.stat{background:#172134;border-radius:10px;flex-direction:column;gap:2px;padding:6px 10px;display:flex}.stat span{color:#8fa3c2;font-size:12px}.stat b{font-size:18px}.seg{box-sizing:border-box;background:#172134;border-radius:10px;gap:3px;width:100%;margin:8px 0;padding:3px;display:flex}.seg button{color:#8fa3c2;cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:8px;flex:1 1 0;min-width:0;min-height:44px;padding:0 4px;font-size:14px;font-weight:700}.seg button.on{color:#fff;background:#2f7de1}.bhead,.brow{grid-template-columns:46px 1fr 64px 64px;align-items:center;gap:6px;padding:0 8px;display:grid}.bhead{color:#8fa3c2;min-height:22px;font-size:12px}.board{scrollbar-width:thin;background:#121b2c;border-radius:8px;flex-direction:column;gap:2px;max-height:300px;display:flex;overflow-y:auto}.brow{background:#172134;border-radius:6px;flex:none;min-height:32px;font-size:13px}.brow .nm{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.brow .pt{text-align:right}.brow .pz{text-align:right;color:#ffd36b}.brow.you{color:#d8ffe3;z-index:1;background:#1f4a2e;border:1px solid #3fae63;font-weight:700;position:sticky;bottom:0}.yrank{color:#cfe0ff;min-height:20px;margin:8px 0;font-size:14px}.chest .kv{border:0}.big-line{font-size:20px;font-weight:700}.rules{line-height:1.4}.sheet{z-index:20;background:#0009;align-items:flex-end;display:flex;position:absolute;inset:0}.sheet-card{box-sizing:border-box;width:100%;max-height:88%;padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px));background:#14203a;border-radius:16px 16px 0 0;overflow-y:auto}.sheet-card h2{margin:0 0 8px;font-size:20px}.sheet-card ol{flex-direction:column;gap:8px;margin:0;padding-left:20px;font-size:14px;line-height:1.35;display:flex}.sheet-card .foot{color:#c4d4ee;margin:12px 0 4px;font-size:13px}.sheet-card .foot a{color:#6ab3f3}.sheet-card .demo-line{color:#ffd36b;margin:4px 0;font-size:12px}.ore-ic{object-fit:contain;vertical-align:-3px;width:16px;height:16px;margin-right:3px}.ore-ic.big{vertical-align:-5px;width:22px;height:22px}.amt{align-items:center;font-weight:700;display:inline-flex}#topbar .logo{object-fit:contain;width:auto;max-width:140px;height:30px}.tab{flex-direction:column;justify-content:center;align-items:center;gap:1px;display:flex}.tab-ic{object-fit:contain;pointer-events:none;width:24px;height:24px}.tab span{font-size:12px;line-height:1.1}.card.exp{background:linear-gradient(#0c1220bd, #0c1220bd), var(--bg-img) center / cover no-repeat, #172134}.medal{object-fit:contain;vertical-align:middle;width:22px;height:22px}.stat b.lg{align-items:center;gap:6px;display:flex}.league{object-fit:contain;width:30px;height:30px}.cname{align-items:center;gap:8px;display:flex}.chest-img{object-fit:contain;width:44px;height:44px}.banner{padding-right:104px;position:relative}.banner .vault{object-fit:contain;pointer-events:none;width:88px;height:auto;max-height:90%;position:absolute;top:50%;right:8px;transform:translateY(-50%)}.days{grid-template-columns:repeat(7,1fr);gap:4px;margin:6px 0 2px;display:grid}.day{background:#121b2c;border:1px solid #263248;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:1px;min-width:0;min-height:52px;padding:3px 0;font-size:12px;line-height:1.15;display:flex}.day .dn{color:#8fa3c2;font-size:12px}.day .da{color:#ffd36b;font-weight:700}.day .dt{color:#8be3a1;min-height:14px;font-weight:700}.day.today{background:#1d3a6b;border-color:#6ab3f3;box-shadow:inset 0 0 0 1px #6ab3f3}.day.claimed{background:#16301f;border-color:#2c6b43}
