:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#1d1d1f;background:#fff;font-synthesis:none;--accent:#0071e3;--secondary:#6e6e73;--line:#e8e8ed}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;border:0;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.4;cursor:not-allowed}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #0071e366;outline-offset:4px}button,input{touch-action:manipulation}
.site-header{height:64px;max-width:1408px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;margin:auto}.brand{font-size:20px;letter-spacing:-.5px;font-weight:600}.text-button{font-size:14px;background:transparent;color:var(--secondary);padding:9px 0;line-height:1.5}.text-button:hover{color:#1d1d1f}main{max-width:1408px;padding:28px 32px 0;margin:auto}.game-heading{margin:0 0 28px}.game-heading h1{font-size:34px;letter-spacing:-1px;font-weight:600;line-height:1.2;margin:0 0 10px}.game-heading p{font-size:16px;color:var(--secondary);line-height:1.5;margin:0}.play-layout{display:block}.stage{position:relative;isolation:isolate;overflow:hidden;border-radius:20px;height:clamp(420px,56dvh,700px);background:#e9eef0}#scene{position:absolute;inset:0;display:block;width:100%;height:100%}.stage-tools{position:absolute;top:20px;left:24px;right:20px;display:flex;justify-content:space-between;align-items:center;gap:12px}.stage-tools>span{font-size:14px;font-weight:500;color:#fff;text-shadow:0 1px 4px #0008}.tool-buttons{display:flex;gap:8px}.glass-button,.reset-car{padding:9px 14px;border-radius:20px;background:#fff9;backdrop-filter:blur(16px);color:#1d1d1f;font-size:13px;line-height:1.4}.glass-button:hover,.reset-car:hover{background:#ffffffd9}
.controls-surface{padding:28px 0 0}.setup-row{display:flex;align-items:center;justify-content:space-between;gap:24px}.world-picker{display:flex;align-items:center;gap:16px}.field-label{color:var(--secondary);font-size:14px;white-space:nowrap}.themes{display:flex;padding:4px;border-radius:11px;background:#f5f5f7;gap:2px}.theme{font-size:14px;line-height:1.4;padding:10px 15px;background:transparent;color:var(--secondary);border-radius:8px;white-space:nowrap}.theme.active{color:#1d1d1f;background:#fff;box-shadow:0 1px 4px #00000012}.theme:hover{color:#1d1d1f}.entry-actions{display:flex;gap:12px}.button{font-size:15px;font-weight:500;padding:12px 22px;border-radius:24px;line-height:1.5;transition:background .15s}.primary{background:var(--accent);color:#fff}.primary:hover{background:#0077ed}.secondary{background:#f5f5f7;color:#1d1d1f}.secondary:hover{background:#e8e8ed}.full{width:100%}.instructions{font-size:13px;line-height:1.7;color:#86868b;margin:24px 0 0}footer{max-width:1408px;padding:28px 32px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;color:#86868b;font-size:12px}footer .text-button{font-size:12px}
.room-bar{display:flex;align-items:center;justify-content:space-between;gap:20px}.room-code-card{display:flex;align-items:center;gap:12px;background:transparent;padding:4px 0;font-size:14px;text-align:left}.room-code-card>span:first-child{color:var(--secondary)}.room-code-card strong{font-size:17px;letter-spacing:2px;font-variant-numeric:tabular-nums;font-weight:600}.room-code-card>span:last-child{color:var(--accent);margin-left:8px}.room-setup{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:24px}.players{display:flex;gap:32px;min-width:0}.player{display:flex;align-items:center;gap:14px;min-width:0}.player .avatar{display:none}.player strong{font-size:15px;font-weight:500;display:block;overflow-wrap:anywhere}.player small{font-size:13px;color:var(--secondary);display:block;line-height:1.7;margin-top:4px}.player .status{font-size:12px;color:var(--secondary);white-space:nowrap}.ready-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.ready-actions .text-button{padding:8px 10px}.room-note{font-size:12px;color:#86868b;margin:16px 0 0;line-height:1.7}
.hud{position:absolute;left:24px;top:20px;width:220px;max-width:45%;pointer-events:none;color:#fff;text-shadow:0 1px 5px #0009}.hud-pills{display:flex;gap:18px;align-items:center;font-size:14px;font-variant-numeric:tabular-nums;font-weight:500}.progress-track{height:3px;overflow:hidden;background:#ffffff60;border-radius:5px;margin-top:12px}.progress-track>div{height:100%;background:#fff;width:0;transition:width .12s}#checkpoint-label{font-size:12px;margin-top:8px}.center-message{position:absolute;top:43%;left:50%;transform:translate(-50%,-50%);min-width:260px;max-width:calc(100% - 40px);padding:24px 32px;text-align:center;background:#ffffffeb;backdrop-filter:blur(20px);border-radius:20px;font-size:23px;font-weight:600;line-height:1.5;box-shadow:0 12px 50px #00000008}.center-message small{display:block;font-size:14px;line-height:1.7;font-weight:400;color:var(--secondary);margin-top:8px}.role-hint{position:absolute;left:24px;bottom:20px;font-size:14px;color:white;text-shadow:0 1px 5px #000b;padding:8px 0;pointer-events:none}.reset-car{position:absolute;bottom:20px;right:20px}.touch-controls{position:absolute;left:max(20px,env(safe-area-inset-left));bottom:70px;display:flex;gap:14px;touch-action:none}.touch-controls button{width:76px;height:68px;border-radius:20px;background:#ffffffbc;backdrop-filter:blur(16px);color:#1d1d1f;font-size:28px;touch-action:none;user-select:none}.touch-controls button.pressed{background:#fff;transform:scale(.96)}.graphics-error{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);width:min(440px,80%);padding:24px;background:#fff;border-radius:16px;color:var(--secondary);font-size:15px;line-height:1.7}
 dialog{border:0;border-radius:22px;background:#fff;padding:32px;max-width:390px;width:calc(100% - 40px);color:#1d1d1f;box-shadow:0 24px 90px #0002}dialog::backdrop{background:#0003;backdrop-filter:blur(8px)}dialog h2{font-size:24px;font-weight:600;margin:0 0 24px;letter-spacing:-.6px}.dialog-close{position:absolute;right:18px;top:13px;background:transparent;font-size:25px;color:#86868b;padding:4px}.auth-tabs{display:flex;background:#f5f5f7;border-radius:10px;padding:4px;margin-bottom:22px;gap:4px}.auth-tabs button{width:50%;padding:9px;border-radius:7px;color:var(--secondary);background:none;font-size:14px}.auth-tabs .active{color:#1d1d1f;background:#fff;box-shadow:0 1px 4px #0001}form label{display:block;font-size:14px;margin:16px 0 8px;color:var(--secondary)}input{width:100%;border:1px solid #d2d2d7;border-radius:11px;background:white;padding:13px 14px;color:#1d1d1f;font-size:16px;outline:none}input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #0071e31a}.form-error{font-size:13px;line-height:1.5;color:#c32c2c;min-height:18px;margin:12px 0}.tiny{font-size:12px;color:#86868b;text-align:center;line-height:1.7;margin-bottom:0}#join-form .button{margin-top:24px}#room-code{text-transform:uppercase;letter-spacing:3px}#log-dialog h3{font-size:16px;font-weight:500;margin-top:24px}#log-dialog ul,#log-dialog p{font-size:14px;line-height:1.8;color:var(--secondary)}#log-dialog ul{padding-left:18px}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);max-width:90%;background:#1d1d1fea;backdrop-filter:blur(12px);color:white;border-radius:14px;padding:13px 20px;font-size:14px;line-height:1.5;text-align:center;z-index:20}.hidden{display:none!important}
body[data-mode="playing"] .game-heading,body[data-mode="playing"] .instructions,body[data-mode="playing"] footer,body[data-mode="playing"] .room-setup,body[data-mode="playing"] .room-note{display:none}body[data-mode="playing"] main{padding-top:8px}body[data-mode="playing"] .stage{height:calc(100dvh - 142px);min-height:350px}body[data-mode="playing"] .controls-surface{padding-top:12px}body[data-mode="playing"] #scene-caption{visibility:hidden}.stage:fullscreen{height:100dvh;width:100vw;border-radius:0;min-height:0}.stage:fullscreen .stage-tools{top:max(20px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right))}.stage:fullscreen .reset-car{right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom))}
@media(max-width:900px){.setup-row{align-items:flex-start}.world-picker{align-items:flex-start;flex-direction:column;gap:10px}.entry-actions{padding-top:27px}.theme{padding:10px 12px}.room-setup{align-items:flex-start}.players{gap:24px;flex-direction:column}.ready-actions{justify-content:flex-end}.stage{height:52dvh}}
@media(max-width:600px){.site-header{height:56px;padding:0 20px}.brand{font-size:18px}main{padding:24px 16px 0}.game-heading{margin-bottom:24px}.game-heading h1{font-size:28px}.game-heading p{font-size:14px}.stage{border-radius:16px;height:48dvh;min-height:310px;max-height:480px}.stage-tools{top:14px;left:16px;right:14px}.stage-tools>span,.glass-button{font-size:12px}.glass-button{padding:8px 11px}.tool-buttons{gap:6px}.controls-surface{padding-top:24px}.setup-row{flex-direction:column;align-items:stretch;gap:24px}.world-picker{gap:12px}.themes{width:100%}.theme{flex:1;font-size:14px;padding:11px 7px}.entry-actions{padding-top:0;gap:12px}.entry-actions .button{flex:1}.button{font-size:15px;padding:12px 18px}.instructions{font-size:12px;margin-top:22px}footer{padding:24px 20px}.room-code-card{gap:8px;flex-wrap:wrap}.room-code-card strong{font-size:16px}.room-code-card>span:last-child{font-size:13px;margin-left:4px}.room-bar>.text-button{white-space:nowrap;font-size:13px}.room-setup{flex-direction:column;gap:22px}.players{width:100%;flex-direction:row;justify-content:space-between;gap:18px}.player{display:block;flex:1}.player .status{display:block;margin-top:6px}.ready-actions{width:100%;justify-content:flex-start}.hud{left:16px;top:18px;width:145px}.hud-pills{gap:10px;font-size:12px}.role-hint{left:16px;bottom:16px;font-size:12px}.reset-car{right:16px;bottom:16px;font-size:12px;padding:9px 12px}.touch-controls{left:16px;bottom:64px;gap:14px}.touch-controls button{height:60px;width:68px}.center-message{min-width:240px;font-size:21px;padding:22px}.center-message small{font-size:13px}body[data-mode="playing"] .stage{height:calc(100dvh - 130px);max-height:none;min-height:310px}body[data-mode="playing"] main{padding-top:4px}body[data-mode="playing"] .controls-surface{padding-top:12px}}
@media(orientation:landscape) and (max-height:550px){.stage:fullscreen .touch-controls{bottom:max(28px,env(safe-area-inset-bottom));left:max(24px,env(safe-area-inset-left))}.stage:fullscreen .role-hint{left:24px;bottom:112px}.stage:fullscreen .reset-car{bottom:28px}.stage:fullscreen .hud{left:24px;top:20px}.stage:fullscreen .stage-tools>span{visibility:hidden}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.stage-tools{justify-content:flex-end}

.account-links{display:flex;align-items:center;gap:24px}
