*{box-sizing:border-box}
html,body{overscroll-behavior:none;margin:0;background:#0b0f19;color:#e6ebf5;font-family:-apple-system,"Segoe UI","Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif}
a{color:#7de3ff}
.top{display:flex;align-items:baseline;gap:12px;padding:10px 18px;background:#141a29;border-bottom:1px solid #26304a}
.top h1{font-size:19px;margin:0;color:#ffd23f}
.top span{font-size:13px;color:#8b97b3}
.stage{position:relative;max-width:1100px;margin:14px auto 0;padding:0 10px}
#game{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#000;border-radius:14px;border:2px solid #26304a;touch-action:none;cursor:pointer;image-rendering:auto}
#touch{display:none;position:absolute;left:calc(10px + env(safe-area-inset-left));right:calc(10px + env(safe-area-inset-right));bottom:8px;justify-content:space-between;pointer-events:none;user-select:none;-webkit-user-select:none}
.pad{display:flex;gap:10px;align-items:flex-end;pointer-events:auto}
.pad button{width:64px;height:64px;border-radius:50%;border:2px solid rgba(255,255,255,.7);background:rgba(20,26,41,.55);color:#fff;font-size:20px;font-weight:700;touch-action:none;-webkit-tap-highlight-color:transparent}
.pad button.big{width:78px;height:78px;background:rgba(245,184,61,.75);color:#1b1400;font-size:24px}
.pad button:active{transform:scale(.93);background:rgba(125,227,255,.6)}
@media (hover:none) and (pointer:coarse){#touch.on{display:flex}}
.info{max-width:1100px;margin:16px auto;padding:0 14px;display:grid;grid-template-columns:1.4fr 1fr;gap:14px}
.info section{background:#141a29;border:1px solid #26304a;border-radius:14px;padding:12px 18px}
.info h2{font-size:17px;margin:4px 0 8px;color:#ffd23f}
.info ul{margin:0;padding-left:1.2em;line-height:1.8}
.info p{line-height:1.8;margin:0}
.foot{max-width:1100px;margin:0 auto;padding:10px 14px 130px;color:#8b97b3;font-size:13px;text-align:center}
.in-app .foot{padding-bottom:30px}
/* 遊玩中隱藏說明，讓畫面專心；手機橫向時畫面盡量放大 */
body[data-state=play] .info{opacity:.35}
@media (max-width:760px){.info{grid-template-columns:1fr}.top span{display:none}}
@media (orientation:landscape) and (max-height:520px){.top{display:none}.stage{margin:0 auto;padding:0;max-width:calc(100vh*16/9)}#game{border-radius:0;border:0;max-height:100vh}}
.doc{max-width:760px;margin:0 auto;padding:24px 20px 60px;line-height:1.8}.doc h1{font-size:24px;color:#ffd23f}.doc h2{font-size:18px;color:#7de3ff;margin-top:22px}

/* App 套殼與廣告：安全區、錨定廣告讓位 */
body{padding-top:env(safe-area-inset-top)}
.foot{padding-bottom:calc(130px + var(--sc-anchor,0px) + env(safe-area-inset-bottom))}
.in-app .foot{padding-bottom:calc(30px + env(safe-area-inset-bottom))}
.in-app .info{display:none}
.in-app,.in-app body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* 手機橫向遊玩時，錨定廣告出現就把按鈕往上移 */
@media (orientation:landscape) and (max-height:520px){#touch{bottom:calc(8px + var(--sc-anchor,0px))}}

.top .lang{margin-left:auto;background:#26304a;color:#e6ebf5;border:1px solid #3a4766;border-radius:10px;padding:5px 12px;font-weight:700;cursor:pointer}
