:root{--ink:#2d322e;--muted:#85877c;--paper:#f5f2eb;--line:#dfddd3;--green:#517563;--red:#ad594e;--serif:Georgia,'Times New Roman',serif;--sans:Inter,'Avenir Next','Helvetica Neue','PingFang TC','Noto Sans TC','Microsoft JhengHei',sans-serif;--mono:'SFMono-Regular',Consolas,'Liberation Mono',monospace}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#e6dfcd;color:var(--ink);font-family:var(--sans);font-size:13px;-webkit-font-smoothing:antialiased}button,select{font:inherit}button{border:0;cursor:pointer;color:inherit;background:none;-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid #9c6d3f;outline-offset:4px}button{transition:background .18s,transform .18s,opacity .18s}button:disabled{cursor:default;opacity:.34}button:not(:disabled):active{transform:translateY(1px)}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.6;flex-shrink:0}button svg{vertical-align:middle}[hidden]{display:none!important}#app{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 352px}#stage{position:relative;min-width:0;overflow:hidden;background:#d9d0ba;isolation:isolate}#scene{display:block;width:100%;height:100%;touch-action:none;outline:none;cursor:grab}#scene.dragging{cursor:grabbing}#scene.over-car{cursor:grab}.scene-vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 47% 45%,transparent 43%,rgba(63,47,27,.09) 100%);z-index:1}.glass{background:rgba(250,247,238,.90);box-shadow:0 5px 30px #453b2415,inset 0 1px 0 #ffffffe0;border:1px solid #fff9;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.topbar{position:absolute;top:24px;left:50%;transform:translateX(-50%);height:55px;width:max-content;max-width:calc(100% - 42px);border-radius:40px;padding:6px 7px 6px 16px;display:flex;align-items:center;gap:13px;z-index:4;white-space:nowrap}.brand{display:flex;align-items:center;gap:9px;font-family:var(--serif);font-size:21px;letter-spacing:-.6px}.brand i{font-weight:normal}.brand-icon{width:25px;height:25px;display:grid;place-items:center;color:#596a58}.brand-icon svg{width:24px;height:24px;stroke-width:1.3}.edition{font:10px var(--mono);background:#dfddcf;padding:4px 6px;border-radius:4px;white-space:nowrap;color:#646659}.bar-rule{height:20px;width:1px;background:#d6d3c8}.top-subtitle{font-size:11px;letter-spacing:1px;color:#6a6d60}.top-actions{display:flex;align-items:center;gap:8px;margin-left:5px}.icon-button{width:31px;height:31px;display:grid;place-items:center;border-radius:50%;padding:0}.icon-button:hover{background:#deded0}.restart-button{height:39px;padding:0 15px;background:#2f352d;color:#f7f5e8;display:flex;align-items:center;gap:7px;border-radius:30px;font-size:11px;letter-spacing:.4px}.restart-button:hover{background:#495244}.restart-button svg{width:14px;height:14px}.scene-caption{position:absolute;top:102px;left:30px;display:flex;flex-direction:column;gap:8px;color:#4c5346;pointer-events:none;z-index:2}.eyebrow{font-size:9px;letter-spacing:1.7px;line-height:1.4;font-weight:600}.caption-line{font-size:11px;letter-spacing:1.4px;opacity:.7}.scene-bottom{position:absolute;bottom:22px;left:0;right:0;z-index:4;display:flex;flex-direction:column;align-items:center;gap:13px;pointer-events:none}.gesture-hint{border-radius:20px;color:#fcfaf2;text-shadow:0 1px 4px #423c2e66;display:flex;align-items:center;justify-content:center;gap:8px;font-size:11px;letter-spacing:.7px;background:#363a30a3;backdrop-filter:blur(10px);padding:8px 14px;max-width:90%;text-align:center;transition:opacity .3s}.hint-dot{width:5px;height:5px;background:#ccd9ad;border-radius:50%;flex-shrink:0}.dock{border-radius:30px;display:flex;align-items:center;padding:5px 7px;gap:3px;pointer-events:auto;min-height:45px}.dock button{padding:8px 11px;border-radius:22px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px;white-space:nowrap}.dock button:not(:disabled):hover{background:#dddfd2}.dock svg{width:15px;height:15px}.dock-divider{width:1px;height:18px;background:#d4d4c7;margin:0 5px}.view-switch{display:flex;gap:1px}.view-switch button{padding:8px 12px}.view-switch button.active{background:#d9dcd0;box-shadow:inset 0 1px 2px #4953441c}.dock .dock-icon{width:34px;padding:8px}.floating-hint{position:absolute;background:#faf7e9f2;color:#434738;border:1px solid #fff;border-radius:10px;padding:8px 12px;font-size:11px;box-shadow:0 6px 20px #0002;z-index:3;pointer-events:none;transform:translate(-50%,-100%);max-width:220px;white-space:nowrap}.floating-hint:after{content:'';position:absolute;bottom:-5px;left:50%;width:8px;height:8px;background:#faf7e9;transform:rotate(45deg)}#dashboard{background:var(--paper);position:relative;border-left:1px solid #d8d4c8;box-shadow:-8px 0 35px #443a2110;padding:27px 25px 19px;display:flex;flex-direction:column;overflow:auto;z-index:5;scrollbar-width:thin;scrollbar-color:#d0d0c2 transparent}.dashboard-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.dashboard-header .eyebrow{display:flex;align-items:center;gap:7px;letter-spacing:1px;font-size:8px}.status-dot{width:5px;height:5px;border-radius:50%;background:#939680;flex-shrink:0}.status-dot.running{background:#b46556;box-shadow:0 0 0 3px #b4655611;animation:pulse 2s infinite}.lap-pill{background:#31392e;border-radius:20px;color:#f9f7ed;display:flex;align-items:center;gap:5px;font-size:9px;white-space:nowrap;padding:7px 10px;letter-spacing:.5px}.lap-pill strong{font-weight:500}.lap-pill>span{color:#aeb6a5}.timer-row{display:flex;align-items:center;justify-content:space-between;margin-top:18px}.race-timer{font-family:var(--mono);font-size:43px;line-height:1.2;letter-spacing:-2px;font-weight:600;font-variant-numeric:tabular-nums}.race-timer>span{font-size:28px;font-weight:400;color:#85897c;letter-spacing:-2px}.move-counter{display:flex;flex-direction:column;align-items:flex-end;gap:2px;margin-top:2px}.move-counter strong{font-family:var(--mono);font-size:24px;line-height:1.1;color:#586b54;font-weight:400}.move-counter span{font-size:9px;letter-spacing:1px;color:#838779}.race-line{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#838778;margin:12px 0 21px;letter-spacing:.4px}.race-line>span:first-child{color:#566451}.scoreboard{background:#fcfaf5b0;border:1px solid #e7e4da;border-radius:12px;padding:11px 11px 5px}table{width:100%;border-collapse:collapse;text-align:center;font-size:11px}th{font-weight:500;font-size:10px;padding-bottom:11px;color:#4c5546}th:first-child,td:first-child{text-align:left;width:20%;padding-left:8px}th small{display:block;color:#9a9b90;font-size:8px;font-weight:400;margin-top:3px}th .player-dot,th .computer-dot{display:inline-block;width:5px;height:5px;background:#58896c;border-radius:50%;margin-right:3px;vertical-align:1px}th .computer-dot{background:#b77d61}tbody td{height:31px;font-family:var(--mono);color:#929488;font-size:11px}tbody tr.active{background:#e7e9dc}tbody tr.active td{color:#515c47}tbody tr.active td:first-child{border-radius:5px 0 0 5px}tbody tr.active td:last-child{border-radius:0 5px 5px 0}tbody td.winner{color:#437454;font-weight:700}tbody tr td:first-child>span{display:inline-grid;place-items:center;width:21px;height:19px;border-radius:3px;font-size:10px}tbody tr.active td:first-child>span{background:#37412f;color:#f6f4e9}tfoot{border-top:1px solid #e1e2d7}tfoot td{padding:10px 0 6px;font-family:var(--mono);font-size:13px;font-weight:600;color:#4b5942}tfoot td:first-child{font-family:var(--sans);font-size:9px;font-weight:400;letter-spacing:1px}.opponent-section{margin-top:24px}.section-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.section-label h2{font-size:12px;font-weight:500;letter-spacing:.6px;margin:0}.live-label{font:8px var(--mono);color:#898c7e;display:flex;gap:5px;align-items:center}.live-label i{width:4px;height:4px;background:#8c9d79;border-radius:50%}.opponent-card{border:1px solid #deded2;border-radius:13px;padding:12px;background:#fffcf6a6;box-shadow:0 4px 12px #60513304}.opponent-top{display:flex;justify-content:space-between;align-items:center;font:8px var(--mono);letter-spacing:.5px;color:#7d8374;margin-bottom:10px}.opponent-top>span:first-child{display:flex;align-items:center;gap:5px;color:#4f5d47}.opponent-top svg{width:13px;height:13px}.mini-wrap{background:#dad3c2;border-radius:7px;position:relative;overflow:hidden}.mini-wrap canvas{display:block;width:100%;height:auto}.mini-tag{position:absolute;right:6px;bottom:6px;font-size:8px;letter-spacing:.4px;color:#f6f3e6;background:#434b3bb0;border-radius:4px;padding:3px 6px}.trace-header{display:flex;align-items:center;gap:6px;margin-top:12px;font-size:9px;color:#7b816d;letter-spacing:.3px}.trace-header>span:last-child{margin-left:auto;font:8px var(--mono);color:#94988a}.trace-dot{width:4px;height:4px;background:#b3785b;border-radius:50%}.ai-log{height:34px;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;margin-top:6px;font-size:10px;line-height:1.7;color:#808576}.ai-log p{margin:0}.ai-log p.old{opacity:.45;font-size:9px}.play-section{margin-top:25px}.play-section .section-label{margin-bottom:8px}.play-section h2{font-size:14px;font-weight:500;letter-spacing:1px}.play-section p{font-size:11px;color:#8a8c80;line-height:1.85;letter-spacing:.2px;margin:0 0 16px}.hint-button{font-size:10px;display:flex;align-items:center;gap:4px;padding:5px 7px;border:1px solid #dcded1;border-radius:6px;color:#647256}.hint-button svg{width:13px;height:13px}.hint-button:hover{background:#e8ebdf}.pace-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px;font-size:10px;color:#848a7a}.pace-row select{border:1px solid #d9ddcd;background:#f6f6ed;border-radius:5px;padding:4px 22px 4px 9px;color:#596650;font-size:10px;max-width:120px}.primary-button{display:flex;justify-content:space-between;align-items:center;width:100%;padding:14px 17px;background:#4d654c;border:1px solid #4d654c;color:#faf9ee;border-radius:8px;font-size:12px;letter-spacing:1px;box-shadow:0 3px 7px #4053340d}.primary-button svg{width:17px;height:17px}.primary-button:hover{background:#61795c}.primary-button.paused{background:#323c30}.keyboard-tip{display:flex;gap:6px;align-items:center;justify-content:center;margin-top:11px;font-size:8px;color:#a0a396;white-space:nowrap}.keyboard-tip i{width:2px;height:2px;background:#a8ab9b;border-radius:50%}.dashboard-footer{margin-top:auto;padding-top:29px;display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;color:#929989;font-size:9px;letter-spacing:1.6px}.dashboard-footer>span:last-child{font:6px var(--mono);letter-spacing:1.8px;color:#acb0a1}#loading{position:absolute;inset:0;background:#e5ddca;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:opacity .7s}#loading.ready{opacity:0;pointer-events:none}#loading h2{font:30px var(--serif);letter-spacing:-.7px;margin:15px 0}#loading h2 i{font-weight:400}#loading p{font-size:11px;letter-spacing:1px;color:#7a806e}.loading-mark{width:55px;height:55px;border:1px solid #9ba28a;border-radius:50%;display:grid;place-items:center}.loading-mark svg{width:29px;height:29px;stroke:#68765a;stroke-width:1}.loading-track{width:100px;height:2px;background:#bfc3af;margin-top:21px;overflow:hidden}.loading-track i{height:100%;width:50%;background:#637258;display:block;animation:loading 1.3s ease-in-out infinite}.pause-overlay,.result-overlay{position:absolute;z-index:6;left:50%;top:50%;width:325px;max-width:85%;transform:translate(-50%,-35%);background:#f6f3e9f5;backdrop-filter:blur(20px);border:1px solid #fff9;border-radius:17px;padding:28px 28px 25px;text-align:center;box-shadow:0 12px 55px #333a2633;animation:reveal .4s ease-out}.pause-overlay .eyebrow,.result-overlay .eyebrow{color:#8b927d;font-size:8px}.pause-overlay h2,.result-overlay h2{font-size:23px;font-weight:400;letter-spacing:2px;margin:16px 0 22px}.result-overlay p{color:#7e8572;font-size:11px;line-height:1.9;margin:0 0 20px}.result-overlay .primary-button,.pause-overlay .primary-button{font-size:11px}.result-overlay{top:auto;bottom:155px;left:auto;right:30px;transform:none;width:280px;padding:22px}.result-overlay h2{font-size:20px;margin:12px 0}.result-overlay .primary-button{padding:12px 14px}#toast{position:fixed;left:calc((100% - 352px)/2);top:92px;transform:translate(-50%,-10px);z-index:30;background:#f9f6ed;color:#4c5c43;padding:11px 18px;border:1px solid #fff8;border-radius:30px;box-shadow:0 5px 24px #38412a22;font-size:12px;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;max-width:80vw;text-align:center;line-height:1.5}#toast.visible{opacity:1;transform:translate(-50%,0)}dialog{color:var(--ink);border:1px solid #fff9;border-radius:20px;background:#f8f5ec;box-shadow:0 25px 100px #18230b44;width:570px;max-width:calc(100% - 30px);padding:36px 38px;max-height:90vh;overflow:auto}dialog::backdrop{background:#27342250;backdrop-filter:blur(7px)}.dialog-close{position:absolute;right:17px;top:17px}.dialog-close svg{width:19px;height:19px}dialog>.eyebrow{color:#8c987d}dialog>h2{font-size:30px;font-weight:400;letter-spacing:3px;margin:15px 0 14px}dialog>p{font-size:12px;line-height:1.95;color:#7b8371}.guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px 26px;margin:26px 0}.guide-grid>div>span{font:10px var(--mono);color:#b3ac8f}.guide-grid h3{font-size:12px;font-weight:500;margin:8px 0;letter-spacing:.6px}.guide-grid p{font-size:10px;color:#818777;line-height:1.8;margin:0}.help-keys{border-top:1px solid #e0e3d3;padding-top:14px;display:flex;align-items:center;gap:7px;font-size:9px;flex-wrap:wrap}.help-keys kbd{font:9px var(--mono);background:#e4e9d8;padding:2px 5px;border-radius:3px}.help-note{font-size:9px;color:#a4aa99;margin-top:10px}dialog>.primary-button{margin-top:20px}body.paused #scene{filter:brightness(.85)}@keyframes pulse{50%{opacity:.45}}@keyframes loading{0%{transform:translateX(-100%)}100%{transform:translateX(210%)}}@keyframes reveal{from{opacity:0;margin-bottom:-10px}to{opacity:1;margin-bottom:0}}
@media(min-width:1600px){#app{grid-template-columns:minmax(0,1fr) 390px}#dashboard{padding:30px 29px 23px}.race-timer{font-size:48px}.opponent-section{margin-top:29px}.play-section{margin-top:29px}.scoreboard tbody td{height:35px}#toast{left:calc((100% - 390px)/2)}}
@media(max-height:850px) and (min-width:761px){#dashboard{padding-top:16px;padding-bottom:12px}.timer-row{margin-top:8px}.race-timer{font-size:35px}.race-line{margin:6px 0 10px}.scoreboard{padding:8px 10px 4px}.scoreboard tbody td{height:22px}.opponent-section{margin-top:12px}.opponent-card{padding:9px}.mini-wrap canvas{max-height:112px;object-fit:contain}.play-section{margin-top:12px}.play-section p{margin-bottom:8px;line-height:1.6}.pace-row{margin-bottom:8px}.primary-button{padding:11px 15px}.dashboard-footer{padding-top:12px}.section-label{margin-bottom:6px}.keyboard-tip{margin-top:6px}}
@media(max-width:1100px) and (min-width:761px){#app{grid-template-columns:minmax(0,1fr) 310px}#dashboard{padding-left:20px;padding-right:20px}.topbar{gap:9px;height:50px;top:18px;padding-left:12px}.brand{font-size:18px}.top-subtitle,.bar-rule{display:none}.top-actions{gap:4px;margin-left:0}.restart-button{font-size:10px;padding:0 10px;height:35px}.edition{font-size:9px}.scene-caption{top:88px;left:24px}.scene-caption .eyebrow{font-size:7px}.caption-line{font-size:9px}.dock button{padding:8px;font-size:10px}.dock button>span{display:none}.dock-divider{margin:0 3px}.view-switch button{padding:8px 9px}#toast{left:calc((100% - 310px)/2)}}
@media(max-width:760px){html,body{height:auto;overflow:auto}#app{min-height:100svh;height:auto;display:flex;flex-direction:column}#stage{height:67svh;min-height:460px;width:100%;flex-shrink:0}.topbar{top:14px;max-width:calc(100% - 24px);height:47px;padding-left:12px;gap:8px}.brand{font-size:18px;gap:5px}.brand-icon svg{width:21px}.edition{font-size:8px}.top-subtitle,.bar-rule{display:none}.top-actions{margin-left:1px;gap:3px}.restart-button{height:33px;font-size:9px;padding:0 10px;gap:5px}.restart-button svg{width:12px}.icon-button{width:27px;height:27px}.icon-button svg{width:16px}.scene-caption{top:77px;left:19px;gap:6px}.scene-caption .eyebrow{font-size:6px}.caption-line{font-size:9px;letter-spacing:1px}.scene-bottom{bottom:14px;gap:9px}.gesture-hint{font-size:9px;padding:7px 11px;letter-spacing:.3px}.dock{padding:4px 5px;gap:0;min-height:39px}.dock button{font-size:10px;padding:7px 9px}.dock button>span{display:none}.dock svg{width:14px;height:14px}.dock-divider{margin:0 3px}.view-switch button{padding:7px 11px}.dock .dock-icon{width:30px}#dashboard{border-left:0;border-top:1px solid #d3d1c3;overflow:visible;padding:23px 24px 20px;display:grid;grid-template-columns:1fr 1fr;column-gap:22px;row-gap:0}.dashboard-header{grid-column:1/-1}.timer-row{grid-column:1/-1;margin-top:10px}.race-timer{font-size:40px}.race-line{grid-column:1/-1;margin:8px 0 18px}.scoreboard{grid-column:1/-1}.scoreboard tbody td{height:29px}.opponent-section{grid-column:1/-1;margin-top:23px}.opponent-card{display:grid;grid-template-columns:1.2fr 1fr;column-gap:14px;padding:12px}.opponent-top{grid-column:1/-1}.mini-wrap{grid-row:2/5}.mini-wrap canvas{height:100%;object-fit:cover}.trace-header{grid-column:2;align-self:start;flex-wrap:wrap;margin-top:4px;gap:5px;font-size:8px}.trace-header>span:last-child{flex-basis:100%;margin-left:9px;margin-top:3px}.ai-log{height:auto;max-height:60px;align-self:end;font-size:10px;margin-bottom:2px;line-height:1.7;display:block}.ai-log p.old{display:none}.play-section{grid-column:1/-1;margin-top:23px}.play-section p{font-size:11px}.dashboard-footer{grid-column:1/-1;padding-top:25px}.keyboard-tip{font-size:9px}#toast{left:50%;top:77px;font-size:10px;max-width:90vw}.result-overlay{width:250px;right:15px;bottom:118px;padding:18px}.result-overlay h2{font-size:18px}.result-overlay p{font-size:10px}.pause-overlay{width:280px;padding:22px}.pause-overlay h2{font-size:20px}dialog{padding:30px 25px}.guide-grid{gap:18px}.help-keys{font-size:8px}.floating-hint{font-size:9px}}
@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* FunApp platform navigation, accessibility, and responsive touch-target refinements */
.svg-sprites{position:absolute;width:0;height:0;overflow:hidden}
h1.brand{margin:0;font-weight:400}
button,select{touch-action:manipulation}
.topbar,.dock,button{user-select:none;-webkit-user-select:none}
.platform-links{display:flex;align-items:center;gap:8px;margin-bottom:4px;pointer-events:auto}
.platform-links a,.platform-links button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;border-radius:999px;background:rgba(250,247,238,.88);border:1px solid #fff9;box-shadow:0 3px 14px #453b2414;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:var(--ink);text-decoration:none;font-size:11px;letter-spacing:.3px;white-space:nowrap;transition:background .18s,transform .18s}
.platform-links a:hover,.platform-links button:hover{background:#fffaf0}
.platform-links a:focus-visible,.platform-links button:focus-visible{outline:2px solid #9c6d3f;outline-offset:3px}
.hint-button,.dialog-close{min-height:44px}
.dialog-close{min-width:44px}
@media(max-width:760px){#stage{height:67svh;height:67dvh;min-height:460px}.topbar{top:max(12px,env(safe-area-inset-top));min-height:48px;height:auto;padding:3px 6px 3px 12px;gap:6px;max-width:calc(100% - 20px)}.topbar .icon-button{min-width:44px;min-height:44px;width:44px;height:44px}.topbar .restart-button{min-height:44px;height:44px;padding:0 11px}.scene-caption{top:72px;left:14px}.scene-bottom{bottom:max(14px,env(safe-area-inset-bottom))}.dock{min-height:48px;padding:3px 5px}.dock button{min-height:44px;min-width:40px;padding:6px 8px}.dock .dock-icon{min-width:44px;width:44px}.hint-button{padding:6px 12px}.pace-row select{min-height:44px;font-size:16px;max-width:150px;padding:6px 12px}.primary-button{min-height:48px}#dashboard{padding-bottom:max(20px,env(safe-area-inset-bottom))}}
@media(max-width:420px){.edition{display:none}h1.brand{font-size:16px}.dock button{min-width:38px;padding:6px 7px}.dock .dock-icon{min-width:40px;width:40px}}
@media(max-height:500px) and (min-width:651px){#app{grid-template-columns:minmax(0,1fr) 300px}#dashboard{padding:14px 16px}.topbar{top:8px;height:46px;padding:4px 6px 4px 12px}.scene-caption{top:62px;left:16px}.scene-caption .eyebrow,.scene-caption .caption-line,.gesture-hint{display:none}.scene-bottom{bottom:8px}.dock button{min-height:40px;padding:6px 9px}}

