:root{color-scheme:light;--bg: #f4f1ea;--panel: #fffdf8;--text: #22222a;--muted: #6b6b75;--line: #ddd8cc;--point: #3d3d45;--orange: #f28c28;--azure: #2f9fe0;--accent: #3d3d45;--radius: 10px}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,sans-serif;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;padding:8px 14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);cursor:pointer;touch-action:manipulation;min-height:40px}button:disabled{opacity:.45;cursor:default}button:not(:disabled):active{filter:brightness(.95)}select,input[type=number]{font:inherit;font-size:16px;padding:6px 10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);color:inherit;min-height:40px}h2{margin:4px 0 12px;font-size:22px;font-weight:650}.muted{color:var(--muted)}.small{font-size:13px}.warn{color:#b45309;font-size:14px}.wordmark,.wordmark-btn{font-weight:750;font-size:20px;letter-spacing:.02em}.wordmark-btn{border:none;background:none;padding:4px 2px;min-height:0}.primary-btn{background:var(--accent);color:#fff;border-color:var(--accent);font-weight:650;padding:10px 22px}.ghost-btn{background:transparent}.accent{background:var(--orange);border-color:var(--orange);color:#fff;font-weight:650}.player-dot{display:inline-block;border-radius:50%;vertical-align:-2px}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 4px 0 6px;vertical-align:1px}.status-dot.online{background:#22c55e}.status-dot.offline{background:#ef4444}.segmented{display:inline-flex;max-width:100%;min-width:0;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--panel)}.segmented button{flex:0 1 auto;min-width:0;border:none;border-radius:0;background:transparent;padding:8px;min-height:38px;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.segmented button+button{border-left:1px solid var(--line)}.segmented button.on{background:var(--accent);color:#fff}.stepper{display:inline-flex;align-items:center}.stepper button{width:34px;min-height:36px;padding:0;font-size:20px;line-height:1}.stepper-value{min-width:26px;text-align:center;font-size:17px;font-variant-numeric:tabular-nums}.field{display:flex;flex-direction:column;gap:4px;font-size:14px}.field.inline{flex-direction:row;align-items:center;justify-content:space-between;gap:12px}.field-label{font-weight:600}.field-label .muted{font-weight:400}.seat-picker{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}.seat-row{display:flex;align-items:center;justify-content:space-between}.seat-picker .seat-help{margin:0}.seat-name{font-weight:600;display:inline-flex;align-items:center;gap:8px}.engine-picker{display:flex;flex-wrap:wrap;gap:12px 20px}.engine-picker .field{flex:1 1 180px}.board{display:block;width:100%;height:100%;max-width:100%;max-height:100%;touch-action:manipulation;-webkit-user-select:none;user-select:none}.board text{-webkit-user-select:none;user-select:none;pointer-events:none}.setup{min-height:100%;display:flex;flex-direction:column;max-width:720px;margin:0 auto;padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.setup-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.steps{display:flex;gap:6px;list-style:none;margin:0;padding:0;font-size:13px}.steps li{display:inline-flex;align-items:center;gap:6px;color:var(--muted);padding:4px 8px;border-radius:999px}.steps li.active{color:var(--text);font-weight:650;background:var(--panel);border:1px solid var(--line)}.steps li.done{cursor:pointer}.step-num{display:inline-flex;width:20px;height:20px;border-radius:50%;background:var(--line);align-items:center;justify-content:center;font-size:12px;font-weight:650}.steps li.active .step-num,.steps li.done .step-num{background:var(--accent);color:#fff}.setup-body{flex:1}.setup-footer{position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;padding:10px 0 0;margin-top:12px;background:linear-gradient(transparent,var(--bg) 30%)}.size-controls{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin:8px 0 12px}.steppers{display:flex;flex-wrap:wrap;gap:10px 16px}.steppers .field{align-items:flex-start}.steppers .field-label{white-space:nowrap}.preview{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:10px}.preview-board{height:auto;max-height:min(60vh,440px)}.load-game{margin-top:16px;display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}.load-game .warn{flex-basis:100%;margin:0}.collection{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}.collection-game{width:100%;margin:0;padding:8px 12px;text-align:left;font-weight:500;min-height:0}.file-btn{display:inline-flex;align-items:center;min-height:40px;padding:6px 14px;border:1px solid var(--line);border-radius:var(--radius);cursor:pointer;font-weight:600}.file-btn input{display:none}.rules{margin-bottom:16px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}.rules summary{cursor:pointer;font-weight:600}.rules-list{margin:10px 0 6px;padding-left:22px;font-size:14px;line-height:1.45}.rules-list li+li{margin-top:6px}.swap-field{margin-top:16px}.swap-field input[type=checkbox]{width:20px;height:20px}.play{height:100%;display:flex;flex-direction:column;max-width:900px;margin:0 auto;padding:6px 10px calc(8px + env(safe-area-inset-bottom));gap:8px}.play-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.status{display:inline-flex;align-items:center;gap:8px;min-width:0;font-weight:600;font-size:15px}.score{font-variant-numeric:tabular-nums;font-size:18px}.status-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.play-header .wordmark-btn,.menu-btn{flex-shrink:0}.menu-btn{font-size:22px;line-height:1;padding:0 12px;min-width:44px}.board-area{position:relative;flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center}.share-btn{position:absolute;right:0;bottom:0;width:40px;height:40px;padding:9px;box-shadow:0 1px 5px #00000040}.share-btn svg{display:block}.actions{display:flex;gap:8px}.actions button{flex:1 1 0;padding:8px 4px;white-space:nowrap}.info-line{display:flex;flex-direction:column;gap:6px;font-size:13px}.info-row{display:flex;align-items:center;gap:14px;min-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.info-row>*{flex:0 0 auto}.info-row>.info-count{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.info-row select{min-height:28px;padding:2px 6px;font-size:13px}.play-foot{display:flex;flex-direction:column;align-items:stretch;gap:8px;flex:0 1 54px;min-height:0}.play-foot-notes{flex-basis:134px}@media(hover:hover){.play-foot-notes{flex-basis:158px}}.play-foot-shared{flex-basis:86px}.play-foot-notes.play-foot-shared{flex-basis:166px}@media(hover:hover){.play-foot-notes.play-foot-shared{flex-basis:190px}}.play-foot>*{flex:0 0 auto}.link-button{border:none;border-radius:var(--radius);background:var(--accent);color:#fff;padding:2px 10px;min-height:24px;font-size:13px;cursor:pointer}.play-foot-notes>:last-child{margin-bottom:calc(8px + env(safe-area-inset-bottom))}.note{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);font-size:15px;line-height:1.45}.note-text{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.note textarea{font:inherit;line-height:inherit;padding:6px 8px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);color:inherit;resize:none;width:100%;box-sizing:border-box}.note-actions{display:flex;justify-content:flex-end;gap:16px}.note-button{align-self:flex-start;background:none;border:none;padding:0 2px;font-size:13px;color:var(--muted);cursor:pointer}.note-button:hover{color:inherit}.note .note-button{align-self:flex-end}.note-actions .note-button{align-self:auto;font-size:14px}.move-strip{display:flex;align-items:flex-start;gap:4px;overflow-x:auto;overflow-y:hidden;padding:4px;min-height:42px;scrollbar-width:thin}.chip-col{display:flex;flex-direction:column;align-items:center;gap:3px;flex:none}.chip{width:30px;height:30px;min-height:0;padding:0;border:none;border-radius:50%;color:#fff;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;display:inline-flex;align-items:center;justify-content:center}.chip.start{background:var(--point);font-size:18px}.chip.current{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--text)}.chip.future{opacity:.4}.chip.small{width:22px;height:22px;font-size:10px}.chip-more{font-size:11px;color:var(--muted)}.sheet-backdrop{position:fixed;inset:0;background:#00000059;display:flex;align-items:flex-end;justify-content:center;z-index:10}.sheet{width:100%;max-width:520px;max-height:85vh;overflow-y:auto;background:var(--bg);border-radius:16px 16px 0 0;padding:10px 18px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -4px 24px #0003}.sheet-handle{width:40px;height:4px;border-radius:2px;background:var(--line);margin:0 auto 14px}.sheet-actions{display:flex;flex-direction:column;gap:8px;margin-top:16px}.sheet-actions button.described{display:flex;flex-direction:column;align-items:center;gap:2px}.share-sheet .sheet-actions{margin-top:0}@media(min-width:640px){.sheet-backdrop{align-items:center}.sheet{border-radius:16px}}.sizes{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px;align-self:stretch}.sizes button{display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 2px;font-size:.9rem;white-space:nowrap;font-variant-numeric:tabular-nums}.family-row{display:flex;align-items:center;gap:10px}.shape sub{font-size:.7em;line-height:0}.size-cells{font-size:.75em;opacity:.7}.sizes button.on{background:var(--accent);border-color:var(--accent);color:#fff}.projex-preview{aspect-ratio:1;margin:0 auto;max-width:min(60vh,440px);pointer-events:none}.board-frame{position:relative;width:100%;height:100%;min-height:0}.display{position:absolute;left:0;bottom:0;display:flex;flex-direction:column-reverse;align-items:flex-start;gap:8px}.display-btn,.display-panel{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 1px 5px #00000040}.display-btn{width:40px;height:40px;padding:9px;color:var(--text)}.display-btn svg{display:block}.display-away{position:fixed;inset:0}.display-panel{display:flex;flex-direction:column;gap:4px;padding:4px}.projections,.display-options{display:flex;gap:4px}.display-options{padding-top:4px;border-top:1px solid var(--line)}.projection,.display-option{border:none;border-radius:7px;background:none;font-size:.68rem}.projection{display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 4px 3px}.display-option{flex:1;padding:7px 4px}.projection-picture{width:56px;height:56px;border-radius:5px;overflow:hidden;background:var(--bg)}.projection-picture svg{display:block;width:100%;height:100%;pointer-events:none}.projection.on,.display-option.on{background:var(--accent);color:#fff}.ball-board{position:relative;width:100%;height:100%;-webkit-user-select:none;user-select:none}.ball-board canvas{display:block;width:100%;height:100%;border-radius:var(--radius)}.ball-failed{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;padding:16px;text-align:center}.notice .setup-body{display:flex;flex-direction:column;align-items:flex-start;gap:16px;padding-top:24px}
