*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#0b1530;color:#e8ecf5;font-family:"PingFang HK","PingFang TC","Noto Sans CJK HK","Noto Sans CJK TC","Microsoft JhengHei",sans-serif;-webkit-text-size-adjust:100%;overscroll-behavior:none}
body{display:flex;justify-content:center}
#app{width:100%;max-width:480px;height:100%;height:100dvh;position:relative;overflow:hidden;display:flex;flex-direction:column;background:#0b1530}
.gold{color:#f5c542}.green{color:#5fd39a}.red{color:#ff8a6b}.mut{color:#9fb0d6}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
/* ---------- 標題 ---------- */
.title{flex:1;overflow-y:auto;padding:calc(env(safe-area-inset-top) + 18px) 18px 24px;background:radial-gradient(120% 55% at 50% 0%,#1d3370 0,#0b1530 70%);position:relative}
.title .sky{position:absolute;left:0;right:0;width:100%;top:200px;height:110px;opacity:.16;pointer-events:none}
.logoEn{text-align:center;font-size:13px;letter-spacing:5px;color:#9fb0d6;margin-top:30px}
.logoZh{text-align:center;font-size:46px;font-weight:900;color:#f5c542;text-shadow:0 0 24px rgba(245,197,66,.35);letter-spacing:2px;margin-top:4px}
.tagline{text-align:center;font-size:14px;color:#c9d4ee;margin-top:6px;line-height:1.5}
.tagline b{color:#fff}
.who{margin-top:90px;background:#121f42;border:1px solid #2c3f70;border-radius:16px;padding:14px;position:relative;z-index:1}
.who .row{display:flex;align-items:center;gap:10px}
.av{width:46px;height:46px;border-radius:50%;background:#f5c542;color:#0b1530;font-weight:900;font-size:22px;display:flex;align-items:center;justify-content:center;flex:none}
.who .nm{font-size:21px;font-weight:900}.who .sub{font-size:12px;color:#9fb0d6}
.seedTag{margin-left:auto;font-size:12px;color:#9fb0d6;text-align:right}.seedTag b{display:block;color:#f5c542;font-size:15px;letter-spacing:1px}
.abGrid{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px;margin-top:12px}
.abGrid div{display:flex;justify-content:space-between;font-size:13px;color:#c9d4ee}
.abGrid b{color:#fff}.abGrid .st b{color:#f5c542}.abGrid .gd b{color:#7fb4ff}
.mystery{margin-top:10px;font-size:12.5px;color:#a9c3ff;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.mystery span{border:1px dashed #6c9cff;border-radius:12px;padding:2px 9px}
.btnG{display:block;width:100%;background:#f5c542;color:#0b1530;font-weight:900;font-size:18px;border-radius:14px;padding:13px 0;margin-top:12px;box-shadow:0 4px 0 #b38a1e;text-align:center}
.btnG:active{transform:translateY(3px);box-shadow:0 1px 0 #b38a1e}
.btnO{display:block;width:100%;border:1.5px solid #f5c542;color:#f5c542;font-weight:900;font-size:15.5px;border-radius:14px;padding:10px 0;margin-top:10px;text-align:center}
.btnRow{display:flex;gap:10px}.btnRow>*{flex:1}
.seedIn{display:flex;gap:8px;margin-top:10px}
.seedIn input{flex:1;min-width:0;background:#0b1530;border:1px solid #34497c;border-radius:12px;color:#fff;font-size:16px;padding:10px 12px;letter-spacing:1px;text-transform:uppercase}
.seedIn button{background:#24345f;border-radius:12px;padding:0 14px;font-weight:900;color:#f5c542}
.friend{margin-top:14px;background:linear-gradient(90deg,#3a2a0a,#1a2c5e);border:1px solid #f5c542;border-radius:14px;padding:10px 12px;font-size:13.5px;line-height:1.5}
.how{margin-top:16px;font-size:12.5px;color:#9fb0d6;line-height:1.7;text-align:center}
.back{display:inline-block;font-size:13px;color:#9fb0d6;text-decoration:none;border:1px solid #34497c;border-radius:8px;padding:3px 9px}
/* ---------- 記分牌 ---------- */
.top{background:linear-gradient(#13224a,#0f1c3d);padding:calc(env(safe-area-inset-top) + 10px) 14px 9px;border-bottom:1px solid #24345f;border-top:3px solid #f5c542;flex:none}
.top .row{display:flex;align-items:center}
.top .av{margin-right:10px}
.name{font-size:21px;font-weight:900;line-height:1.15}.sub{font-size:12px;color:#9fb0d6}
.tbtn{border:1px solid #34497c;border-radius:8px;padding:3px 8px;font-size:12px;color:#c9d4ee;margin-left:6px}
.info{margin-top:8px;background:#0b1530;border:1px solid #2a3c6a;border-radius:10px;padding:5px 10px;font-size:14px;font-weight:700}
.info .big{font-size:17px}
.bars{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;margin-top:8px}
.bl{display:flex;justify-content:space-between;font-size:12px;color:#c9d4ee}.bl b{color:#fff;transition:color .3s}
.seg{display:flex;gap:2px;margin-top:3px}.seg i{flex:1;height:5px;border-radius:2px;background:#26365f;transition:background .4s}
.bl b.up{color:#5fd39a}.bl b.dn{color:#ff8a6b}
.city{display:flex;justify-content:space-between;margin-top:8px;font-size:12.5px;background:#0b1530;border-radius:8px;padding:5px 10px;border:1px dashed #2a3c6a}
.city b{font-size:14px}
.abRow{display:grid;grid-template-columns:repeat(4,1fr);gap:3px 6px;margin-top:8px;font-size:11.5px;background:#0b1530;border-radius:8px;padding:5px 9px;border:1px dashed #2a3c6a;color:#9fb0d6}
.abRow b{color:#e8ecf5;float:right}
.abRow .st b{color:#f5c542}
/* ---------- 時間線 ---------- */
.tl{flex:1;overflow-y:auto;padding:10px 14px 12px;-webkit-overflow-scrolling:touch}
.small{background:#121f42;border:1px solid #24345f;border-radius:12px;padding:7px 12px;font-size:12.5px;color:#b8c5e4;margin-bottom:10px;line-height:1.5}
.card{background:#121f42;border:1px solid #2c3f70;border-radius:14px;padding:12px;animation:slide .35s ease-out}
@keyframes slide{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.tag{font-size:13px;color:#9fb0d6;font-weight:700}
.tag.key{color:#f5c542}
.h{font-size:19px;font-weight:900;margin:6px 0 4px;line-height:1.35}
.p{font-size:14px;line-height:1.6;color:#d7def0}
.hint{font-size:13px;color:#7fb4ff;margin-top:8px}
.hint.no{color:#5d6d94}
.chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.chip{font-size:12px;font-weight:700;border-radius:8px;padding:2px 7px;background:#0b1530;border:1px solid #2a3c6a}
.chip.g{color:#5fd39a;border-color:#2d6b52}.chip.b{color:#ff8a6b;border-color:#7a3a33}.chip.n{color:#f5c542;border-color:#6b5a26}
.whisper{margin-top:8px;font-size:12.5px;color:#c7a6ff;font-style:italic}
.res{font-size:22px;font-weight:900}
.res.ok{color:#5fd39a}.res.no{color:#ff8a6b}
.roll{font-size:12px;color:#9fb0d6;margin-left:6px;font-weight:400}
.stageCard{text-align:center;padding:22px 14px}
.stageCard .ic{font-size:48px}
.stageCard .sn{font-size:26px;font-weight:900;color:#f5c542;margin-top:4px}
.stageCard .sa{font-size:13px;color:#9fb0d6;margin-top:2px}
.stageCard .p{margin-top:10px}
.prog{display:flex;gap:4px;justify-content:center;margin-top:14px}
.prog i{width:34px;height:5px;border-radius:3px;background:#26365f}.prog i.on{background:#f5c542}.prog i.done{background:#8a7228}
/* 示意圖 */
.art{height:100px;margin:9px 0 4px;border-radius:10px;background:#0e1a38;position:relative;border:1px solid #24345f;overflow:hidden}
.art .lbl{position:absolute;font-size:11px;color:#9fb0d6}
.art .sig{position:absolute;right:8px;top:8px;background:#0b1530;border:1px solid #f5c542;color:#f5c542;font-weight:900;border-radius:6px;padding:1px 7px;font-size:13px}
.art .em{position:absolute;font-size:40px;line-height:1;filter:drop-shadow(0 4px 6px rgba(0,0,0,.4))}
.art svg{position:absolute;inset:0;width:100%;height:100%}
/* ---------- 底部 ---------- */
.panel{flex:none;background:#0d1834;border-top:1px solid #24345f;padding:9px 12px calc(env(safe-area-inset-bottom) + 12px)}
.oq{font-size:12.5px;color:#9fb0d6;margin-bottom:7px}
.o{display:flex;align-items:center;width:100%;text-align:left;border-radius:12px;padding:8px 11px;margin-bottom:7px;background:#121f42;border:1px solid #2c3f70;transition:transform .08s}
.o:active{transform:scale(.98)}
.o.s{border-color:#3fbf8a}.o.m{border-color:#f5c542}.o.r{border-color:#ff6b5a}
.ring{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:900;margin-right:10px;flex:none}
.ring span{width:33px;height:33px;border-radius:50%;background:#121f42;display:flex;align-items:center;justify-content:center}
.ot{flex:1;min-width:0}.ot b{font-size:15.5px;display:block;line-height:1.3}.ot small{font-size:11.5px;color:#9fb0d6}
.lab{font-size:12.5px;font-weight:900;flex:none;margin-left:6px;text-align:center}
.lab em{display:block;font-style:normal;font-size:10.5px;color:#7fb4ff;font-weight:700}
.acts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.act{background:#121f42;border:1.5px solid #2c3f70;border-radius:12px;padding:9px 10px;text-align:left;position:relative}
.act .ai{font-size:22px}.act b{display:block;font-size:15px;margin-top:2px}.act small{font-size:11.5px;color:#9fb0d6;line-height:1.4;display:block}
.act.sel{border-color:#f5c542;background:#1d2b55}
.act.sel:after{content:"✓";position:absolute;right:8px;top:6px;color:#0b1530;background:#f5c542;border-radius:50%;width:20px;height:20px;font-weight:900;font-size:13px;display:flex;align-items:center;justify-content:center}
.offer{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#121f42;border:1.5px solid #f5c542;border-radius:12px;padding:10px 12px;margin-bottom:8px}
.offer .oi{font-size:26px}.offer b{font-size:16px;display:block}.offer small{font-size:12px;color:#9fb0d6}
.offer.lock{border-color:#34497c;opacity:.5}
.badge{display:inline-block;font-size:10.5px;background:#f5c542;color:#0b1530;border-radius:6px;padding:0 5px;margin-left:5px;font-weight:900;vertical-align:2px}
.pop{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%) scale(.3);font-size:58px;font-weight:900;color:#f5c542;text-shadow:0 0 30px rgba(245,197,66,.8),0 4px 0 #7a5a10;z-index:50;pointer-events:none;animation:pop 1.3s ease-out forwards;white-space:nowrap}
.pop small{display:block;font-size:16px;color:#fff;text-align:center;text-shadow:none;margin-top:4px}
@keyframes pop{0%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(-8deg)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.15) rotate(3deg)}35%{transform:translate(-50%,-50%) scale(1) rotate(-2deg)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-62%) scale(1)}}
/* ---------- 彈窗 ---------- */
.modal{position:fixed;inset:0;background:rgba(5,10,25,.82);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.modal.hide,.toast.hide{display:none}
.sheet{width:100%;max-width:480px;max-height:86vh;overflow-y:auto;background:#0f1c3d;border-top:3px solid #f5c542;border-radius:18px 18px 0 0;padding:16px 16px calc(env(safe-area-inset-bottom) + 18px)}
.sheet h3{font-size:18px;font-weight:900;color:#f5c542;margin-bottom:8px}
.sheet .x{float:right;font-size:14px;color:#9fb0d6;border:1px solid #34497c;border-radius:8px;padding:2px 9px}
.logi{border-bottom:1px solid #1e2d55;padding:7px 0;font-size:13px;line-height:1.5}
.logi .lt{color:#9fb0d6;font-size:11.5px}
.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%);background:#f5c542;color:#0b1530;font-weight:900;border-radius:20px;padding:8px 16px;z-index:60;font-size:14px}
/* ---------- 結局 ---------- */
.end{flex:1;overflow-y:auto;padding:calc(env(safe-area-inset-top) + 16px) 16px 16px;background:radial-gradient(120% 50% at 50% 0%,#1a2c5e 0,#0b1530 70%)}
.endH{font-size:13px;color:#9fb0d6;letter-spacing:2px;text-align:center}
.endT{font-size:24px;font-weight:900;color:#f5c542;text-align:center;margin-top:4px}
.endBox{background:#121f42;border:1px solid #2c3f70;border-radius:14px;padding:12px;margin-top:12px;animation:slide .4s ease-out}
.endDots{display:flex;gap:5px;justify-content:center;margin-top:8px}.endDots i{width:7px;height:7px;border-radius:50%;background:#26365f}.endDots i.on{background:#f5c542}
.rec{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-bottom:1px solid #1e2d55;font-size:14.5px}
.rec:last-child{border:0}
.msg{display:flex;gap:9px;margin-top:10px;animation:slide .4s ease-out both}
.msg .ma{width:36px;height:36px;border-radius:50%;background:#24345f;display:flex;align-items:center;justify-content:center;flex:none;font-size:18px}
.msg .mb{background:#121f42;border:1px solid #2c3f70;border-radius:4px 14px 14px 14px;padding:8px 11px;font-size:14px;line-height:1.55}
.msg .mw{font-size:11.5px;color:#9fb0d6;margin-bottom:2px}
.scoreBig{text-align:center;margin-top:18px}
.scoreBig .lbl{font-size:13px;color:#9fb0d6}
.scoreBig .num{font-size:64px;font-weight:900;line-height:1.1}
.tierBig{text-align:center;font-size:40px;font-weight:900;color:#f5c542;text-shadow:0 0 18px rgba(245,197,66,.35);margin-top:6px;animation:slide .5s ease-out}
.tierSub{text-align:center;font-size:14px;color:#c9d4ee}
.pctPill{text-align:center;background:#f5c542;color:#0b1530;font-weight:900;border-radius:20px;padding:5px 0;margin:12px 40px 0;font-size:15px}
.gapLine{text-align:center;margin-top:10px;font-size:14px;color:#ff8a6b;font-weight:700}
.ladder{margin-top:12px}
.ladder div{display:flex;justify-content:space-between;font-size:13px;padding:4px 10px;border-radius:8px;color:#9fb0d6}
.ladder div.me{background:#24345f;color:#fff;font-weight:900}
.tcard{display:flex;gap:10px;align-items:center;background:#121f42;border:1px solid #6c9cff;border-radius:14px;padding:12px;margin-top:10px;animation:flip .6s ease-out both}
@keyframes flip{from{transform:rotateY(90deg);opacity:0}to{transform:none;opacity:1}}
.tcard .ti{font-size:30px}.tcard b{font-size:18px;display:block}.tcard small{font-size:12.5px;color:#9fb0d6}
.ten{font-size:16px;line-height:1.8;color:#e8ecf5;border-left:3px solid #f5c542;padding:4px 12px;margin-top:14px}
.shareImg{display:block;width:100%;max-width:340px;margin:0 auto;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.5)}
.cmp{display:grid;grid-template-columns:1fr auto 1fr;gap:6px;align-items:center;text-align:center;margin-top:8px}
.cmp b{font-size:24px;display:block}.cmp small{font-size:12px;color:#9fb0d6}
.endNav{flex:none;padding:10px 16px calc(env(safe-area-inset-bottom) + 12px);background:#0d1834;border-top:1px solid #24345f}
