:root{--bg:#080c19;--panel:#131a2e;--panel-2:#1a2540;--ink:#f0f3ff;--muted:#bac4df;--line:#41496b;--accent:#257476;--accent-deep:#235c62;--gold:#f5c67e;--display:system-ui,sans-serif;--body:system-ui,sans-serif}
html{scrollbar-color:#719fae #131a2e}::selection{background:#f5c67e;color:#131a2e}body{padding:0;background:#080c19 url('/art/chess-club-768.webp') center top/cover fixed}.wrap{gap:8px;max-width:1440px;padding:8px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left));min-height:100dvh;background:#080c19dc}.site{min-height:44px;gap:8px;padding-top:env(safe-area-inset-top)}.brand{gap:6px}.wm{font:700 18px system-ui}.nav{gap:8px}.nav a,.btn,summary{min-height:44px;display:inline-flex;align-items:center;padding:8px 12px}.btn,.act{border-radius:10px;background:#234b5b;color:#f0f3ff;border-color:#7299a8;min-height:44px}.btn.primary{background:#f5c67e;color:#263341}.btn:hover,.act:hover{background:#315e6c}.intro{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.intro h1{font-size:22px;margin:0;color:#f5c67e}.intro p{font-size:14px;margin:0;color:var(--muted)}.picker,.preferences{border:1px solid var(--line);border-radius:10px;background:var(--panel)}summary{cursor:pointer;font-weight:600}.picker[open]{max-height:45dvh;overflow:auto}.vlist{padding:8px}.vcard{min-height:68px}.vopts{padding:8px}.battle{display:flex;flex-direction:column;gap:6px;flex:1;min-height:0}.tbar{flex-wrap:wrap;gap:6px}.toggles{padding:8px;gap:10px}.chk{min-height:44px;font-size:16px}.sel select{font-size:16px;min-height:44px}.ti{font-size:14px}.stage{height:var(--table-room,500px);overflow:hidden;min-height:140px}.mtable{position:absolute;top:0;left:50%;width:100%;transform:translateX(-50%) scale(var(--table-fit,1));transform-origin:top center;box-shadow:inset 0 0 0 1px #ffffff1a;border-radius:14px;min-height:360px}.actions{min-height:44px;flex-wrap:wrap;gap:6px}.actions .waitmsg{font-size:14px}.hint{font-size:13px;max-height:32px;overflow:auto}.rules{margin:0;border-radius:10px}.foot{font-size:12px;margin:0;padding:4px;min-height:24px}.hand .tl{touch-action:manipulation;min-height:44px}.sheet{max-height:calc(100dvh - 24px);overflow:auto}.viewport-full{position:fixed;inset:0;width:100%;height:100%;overflow:hidden}.viewport-full>.wrap{height:var(--mahjong-vh,100dvh);min-height:0}.viewport-full .intro,.viewport-full .foot,.viewport-full #rules{display:none}:focus-visible{outline:3px solid #b7abff;outline-offset:2px}@media(max-width:600px){.intro p{display:none}.wm{font-size:16px}.nav a,.btn,summary{padding:6px 10px}.vgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.ti b{font-size:14px}.ti span{font-size:12px}.preferences summary{font-size:14px}.site .brand img{width:24px;height:24px}.mid{min-height:65px}}
@media(orientation:landscape) and (max-height:600px){.intro{display:none}.wrap{gap:4px}.tbar{min-height:32px}.picker summary,.preferences summary{min-height:32px;padding-block:4px}.mtable{min-height:240px}.seat{gap:2px;padding:2px}.mid{min-height:50px}.pinfo{font-size:11px}.ohand .tl{--w:12px}.actions{gap:4px}.hint{display:none}.foot{display:none}.rules{display:none}.hand .tl{--w:var(--hw);min-height:44px}.mtable .river{max-height:90px;overflow:auto}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.viewport-full #variant-picker{display:none}
@media(orientation:landscape) and (max-height:600px){.viewport-full .mtable .ohand:not(.open){display:none}.viewport-full .mtable .mid{min-height:32px}.viewport-full .mtable .compass{transform:scale(.75)}.viewport-full .mtable .river{max-height:50px}.viewport-full .mtable .seat{gap:2px}.viewport-full .mtable .hand{justify-content:center}.viewport-full .mtable{min-height:220px}}
