/* Freehand-first studio: the paper is the primary workspace. */
/* The race host shares the generic race-surface class. Keep it a viewport overlay. */
#raceView.race-surface,#raceView.race-view{position:fixed;inset:0;width:100vw;height:100dvh;min-height:0;z-index:100;margin:0;padding:0}
.boot-status{position:fixed;inset:14px 14px auto;z-index:500;display:flex;align-items:center;justify-content:center;gap:18px;padding:14px 18px;background:#fffdf5;border:1px solid #d9dfca;border-radius:13px;box-shadow:0 8px 30px #28362c25;font-size:12px}
.boot-status[data-state=error]{border-color:#d9ac91}.boot-status button{border:1px solid #bdc9b0;background:#eaf1df;border-radius:9px;padding:8px 12px;font-size:11px;white-space:nowrap}
.launch-pending{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;color:#f4f8ef;background:radial-gradient(ellipse at center,#294b42,#172c32)}
.launch-pending>span{width:38px;height:38px;border:2px solid #ffffff25;border-top-color:#b6e6b9;border-radius:50%;animation:launch-spin .8s linear infinite}.launch-pending strong{font-size:22px;font-weight:550}.launch-pending p{font-size:12px;color:#c3d5ca;margin:0}@keyframes launch-spin{to{transform:rotate(360deg)}}
.preview-options{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 15px;border-top:1px solid #ebeee4;font-size:10px;color:#81917a;background:#fafbf5}.preview-options select{max-width:70%;min-width:0;border:1px solid #dbe3d1;border-radius:8px;padding:6px 8px;background:#fffdf7;color:#526b4c;font-size:10px}
.choose-world-button{display:flex;align-items:center;justify-content:center;gap:7px;padding:11px 7px 0;margin:0 14px;color:#7e8d74;font-size:10px}.choose-world-button strong{font-weight:550;max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#536b49}.choose-world-button svg{height:13px;width:13px}
.launch-error{margin:12px 15px 0;padding:12px;border:1px solid #e5cbb9;border-radius:12px;background:#fcf3e8;color:#805b43;font-size:11px;line-height:1.6}.launch-error p{margin:0 0 9px}.launch-error>button:first-of-type{display:block;background:#385c4b;color:white;padding:9px 12px;border-radius:8px;font-size:11px;width:100%}.launch-error>.quiet-button{display:block;font-size:10px;margin:5px auto 0;padding:5px}
.free-studio{max-width:1800px;margin:auto;padding:25px 30px 20px}
.free-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:23px}
.free-heading .eyebrow{font-size:10px;letter-spacing:1.8px;color:#7f8d7e}
.free-heading h1{font-size:33px;line-height:1.15;letter-spacing:-1.3px;font-weight:580;margin:0}
.free-heading h1 span{color:#6e9d60}
.free-subtitle{font-size:12px;line-height:1.6;color:#7b887e;margin:9px 0 0}
.free-heading .quiet-button{font-size:12px;min-height:42px}
.free-workspace{display:grid;grid-template-columns:66px minmax(0,1fr) 328px;grid-template-rows:minmax(560px,calc(100dvh - 302px)) auto;gap:13px 17px}
.free-tools{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:center;gap:6px;padding:9px 5px;background:#fffefa;border:1px solid #e1e5da;border-radius:19px;box-shadow:0 10px 25px #28372c05}
.free-tool{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;width:54px;min-height:61px;border-radius:12px;color:#7b887a;padding:8px 2px;font-size:9px;font-weight:570;line-height:1.1}
.free-tool svg{width:22px;height:22px}
.free-tool:not(.active):hover:not(:disabled){background:#edf1e7}
.free-tool.active{background:#e4eedc;color:#365a43;box-shadow:inset 0 0 0 1px #bdd1af44}
.free-tool:disabled{opacity:.28}
.free-tool-divider{display:block;flex:none;height:1px;width:28px;background:#e1e7d9;margin:7px 0}
.free-paper-shell{grid-column:2;grid-row:1;position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;background:#fffdf8;border:1px solid #dce2d4;border-radius:22px;box-shadow:0 12px 30px #243f2b05}
.free-paper-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px 8px;position:relative;z-index:2;background:#fffdf8ed;border-bottom:1px solid #edf0e6;min-height:56px}
.free-paper-top>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.paper-indicator{width:6px;height:6px;border-radius:50%;background:#8fad7b;flex:none}
.free-paper-top strong{font-size:12px;font-weight:560;color:#586d57}
.free-paper-top #strokeCount{font-size:10px;color:#9aa591;margin-left:7px;white-space:nowrap}
.free-paper-top .icon-button{width:34px;height:34px;flex:none}
.free-paper-top .icon-button svg{width:18px;height:18px}
.free-canvas{position:relative;min-height:0;flex:1;overflow:hidden;touch-action:none;isolation:isolate}
.free-canvas>canvas{display:block;touch-action:none;outline:none}
.free-paper-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 12px 5px 18px;border-top:1px solid #edf0e7;min-height:47px;background:#fffdf8;z-index:2}
.free-paper-foot>span{font-size:11px;color:#8e9c86;line-height:1.5}
.free-paper-foot .quiet-button{font-size:10px;padding:9px 5px;white-space:nowrap;min-height:36px}
.free-paper-foot .quiet-button svg{width:14px;height:14px}
.free-side{grid-column:3;grid-row:1/3;display:flex;flex-direction:column;gap:13px;min-height:0}
.free-preview-card,.free-understanding{border:1px solid #e0e5d9;background:#fffefa;border-radius:20px;overflow:hidden;box-shadow:0 10px 24px #273a2b04}
.free-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 17px 12px;font-size:12px;font-weight:570;color:#4f6652}
.free-panel-heading>span:first-child{display:flex;align-items:center;gap:7px}
.free-panel-heading i{width:5px;height:5px;border-radius:50%;background:#83ad72}
.free-preview-tag{font-size:8px;font-weight:650;letter-spacing:1px;color:#8b9d7e}
.free-preview-card{flex:none}
.free-preview{position:relative;height:220px;background:#efeee7;overflow:hidden}
.free-preview canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
.free-preview-empty{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;text-align:center;color:#9ba78e;background:radial-gradient(ellipse at 50% 40%,#f7f7ec,#e9ebdf);pointer-events:none}
.free-preview-empty>svg{width:35px;height:35px;stroke-width:.9;color:#a9b791;margin-bottom:3px}
.free-preview-empty strong{font-size:13px;font-weight:550;color:#829574}
.free-preview-empty span{font-size:11px;line-height:1.7;color:#9ba68f}
.free-preview-note{font-size:11px;color:#8a886e;background:#f5f3e8;line-height:1.6;padding:10px 14px}
.free-animation{display:flex;align-items:center;justify-content:center;gap:4px;padding:8px;border-top:1px solid #ebeee4}
.free-animation button{font-size:11px;color:#82917a;min-height:34px;flex:1;padding:8px 4px;border-radius:8px}
.free-animation button.active{background:#e7efdf;color:#46613e;font-weight:650}
.free-understanding{display:flex;flex-direction:column;min-height:0;flex:1;padding-bottom:15px}
.free-understanding .free-panel-heading{padding-bottom:5px}
.recognition-summary{font-size:11px;line-height:1.65;color:#89967f;padding:0 17px;margin:5px 0 11px}
.free-part-list{flex:1;overflow:auto;min-height:45px;max-height:265px;margin:0 9px;padding:0 4px;scrollbar-width:thin;scrollbar-color:#d5dfca transparent;display:flex;flex-direction:column;gap:3px}
.free-part{display:flex;align-items:center;gap:9px;flex:none;width:100%;padding:10px 8px;text-align:left;border:1px solid transparent;border-radius:10px;min-height:43px;font-size:11px}
.free-part:hover{background:#f4f6ed}
.free-part.active{background:#eaf1e2;border-color:#d5e1c9}
.free-part-color{width:17px;height:17px;border-radius:6px;border:1px solid #1c322418;flex:none;box-shadow:inset 0 2px 3px #fff5}
.free-part-text{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.free-part-text strong{font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.free-part-text small{font-size:9px;color:#98a18f}
.free-part-link{width:6px;height:6px;flex:none;border-radius:50%;background:#97b17e}
.free-part-link.detached{background:#db8067;box-shadow:0 0 0 3px #e7a78618}
.free-selection{margin:10px 17px 3px;padding-top:10px;border-top:1px solid #e7ecdf}
.free-selection-title{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:11px;color:#617454}
.free-selection-title strong{font-weight:570}
.free-delete{display:grid;place-items:center;width:30px;height:30px;color:#a38c77;border-radius:8px}
.free-delete:hover{background:#f4e9df}
.free-delete svg{width:15px;height:15px}
.free-selection details>summary{font-size:10px;color:#8b967f;cursor:pointer;padding:7px 0}
.free-selection details label{font-size:10px;color:#809074;display:flex;gap:5px;align-items:center;margin-top:5px}
.free-selection details select{min-width:0;flex:1;font-size:10px;background:#f4f6eb;border:1px solid #dde6d3;padding:8px 5px;border-radius:8px;color:#546b4a}
.free-selection details p{font-size:9px;line-height:1.6;color:#9aa58d;margin:7px 0 3px}
.free-connections{font-size:10px;line-height:1.6;color:#a47759;padding:9px 10px;margin:9px 17px 3px;background:#fbf1e3;border:1px solid #eadcc7;border-radius:9px}
.free-race-button{margin:12px 16px 0;min-height:43px;font-size:12px;gap:8px;padding:12px 10px}
.free-race-button svg{width:17px;height:17px}
.free-brushbar{grid-column:2;grid-row:2;display:flex;align-items:center;gap:14px;padding:11px 15px;min-height:57px;border:1px solid #e0e6d7;border-radius:15px;background:#fffefa}
.free-swatches{display:flex;gap:8px;align-items:center}
.free-swatch{position:relative;width:25px;height:25px;border-radius:50%;background:var(--swatch);border:2px solid #fffefa;box-shadow:0 0 0 1px #31452c18;flex:none}
.free-swatch.active{box-shadow:0 0 0 2px #668356}
.free-swatch.active:after{content:'';position:absolute;width:5px;height:5px;background:#fff9;top:8px;left:8px;border-radius:50%;box-shadow:0 1px 3px #213d2e35}
.free-custom-color{display:flex;align-items:center;gap:6px;font-size:9px;color:#8b9881;cursor:pointer}
.free-custom-color input{width:26px;height:26px;background:none;padding:0;border:none;cursor:pointer;border-radius:50%}
.free-custom-color input::-webkit-color-swatch-wrapper{padding:3px}
.free-custom-color input::-webkit-color-swatch{border-radius:50%;border:none}
.brush-divider{height:24px;width:1px;background:#e4e9dc;flex:none}
.free-brush-width{display:flex;align-items:center;gap:10px;font-size:10px;color:#87977d;min-width:125px;flex:1;max-width:240px}
.free-brush-width input{width:80px;flex:1;min-width:40px;accent-color:#93b57b}
.free-brush-width output{width:20px;font-size:10px;font-variant-numeric:tabular-nums;color:#74915e}
.free-pen-label{font-size:9px;color:#a2aa98;margin-left:auto;white-space:nowrap}
.free-bottom-hint{display:flex;align-items:center;gap:25px;padding:17px 0 0 83px;color:#8a977e;font-size:10px;line-height:1.6}
.free-bottom-hint>span{white-space:nowrap}
.free-bottom-hint b{font-size:9px;color:#b6c3a6;letter-spacing:.04em;margin-right:5px}
.free-bottom-hint p{margin:0 0 0 auto;font-size:9px;color:#a2ac96;text-align:right}
@media(min-width:1550px){.free-workspace{grid-template-columns:70px minmax(0,1fr) 370px;gap:16px 20px}.free-studio{padding:28px 40px 20px}.free-preview{height:255px}.free-heading h1{font-size:38px}.free-understanding .free-panel-heading{font-size:13px}.recognition-summary{font-size:12px}.free-part{font-size:12px}.free-brushbar{gap:18px}.free-swatch{width:28px;height:28px}.free-swatch.active:after{left:9px;top:9px}}
@media(max-width:1190px){.free-studio{padding:22px 20px 18px}.free-workspace{grid-template-columns:59px minmax(0,1fr) 285px;gap:12px;grid-template-rows:minmax(550px,calc(100dvh - 292px)) auto}.free-tool{width:48px;min-height:59px;font-size:8px}.free-heading h1{font-size:29px}.free-subtitle{font-size:11px;max-width:470px}.free-heading .quiet-button{font-size:11px;padding:9px}.free-paper-top{padding:10px 12px}.free-preview{height:202px}.free-panel-heading{font-size:11px;padding:14px 14px 10px}.free-preview-tag{font-size:7px}.recognition-summary{padding:0 14px;font-size:10px}.free-part{padding:8px 6px;gap:7px;font-size:10px}.free-brushbar{padding:10px;gap:10px}.free-swatches{gap:6px}.free-swatch{width:22px;height:22px}.free-swatch.active:after{left:6.5px;top:6.5px}.free-custom-color span,.free-pen-label{display:none}.free-brush-width{font-size:9px;gap:6px;min-width:100px}.free-bottom-hint{padding-left:71px;gap:14px}.free-bottom-hint p{max-width:340px}}
@media(max-width:950px){.free-studio{padding:22px 18px}.free-heading{align-items:flex-start;gap:15px;margin-bottom:19px}.free-heading h1{font-size:30px}.free-subtitle{max-width:440px;font-size:11px}.free-heading .project-actions{gap:3px}.free-heading .quiet-button{font-size:0;width:38px;height:38px;min-height:38px;padding:10px}.free-heading .quiet-button svg{width:17px;height:17px}.free-workspace{grid-template-columns:62px minmax(0,1fr);grid-template-rows:minmax(470px,57dvh) auto auto;gap:12px}.free-tools{grid-column:1;grid-row:1}.free-tool{width:49px;min-height:57px}.free-paper-shell{grid-column:2;grid-row:1}.free-brushbar{grid-column:2;grid-row:2;padding:12px 15px;gap:15px}.free-swatches{gap:8px}.free-swatch{width:25px;height:25px}.free-swatch.active:after{left:8px;top:8px}.free-custom-color span{display:inline}.free-brush-width{font-size:11px;max-width:none}.free-side{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:1fr 1fr;align-items:stretch;gap:12px;margin-top:4px}.free-preview{height:240px}.free-understanding{max-height:340px}.free-panel-heading{font-size:12px}.recognition-summary{font-size:11px}.free-part{font-size:11px}.free-preview-tag{font-size:8px}.free-part-list{max-height:180px}.free-bottom-hint{padding-left:0;gap:18px;flex-wrap:wrap}.free-bottom-hint p{max-width:none;text-align:left;flex-basis:100%;margin:-8px 0 0}.free-paper-foot>span{font-size:10px}.free-paper-top strong{font-size:12px}}
@media(max-width:600px){.free-studio{padding:19px 12px 22px}.free-heading{gap:7px;margin-bottom:17px}.free-heading .eyebrow{font-size:7px;letter-spacing:1.3px}.free-heading h1{font-size:25px;letter-spacing:-1px;max-width:245px}.free-subtitle{font-size:10px;line-height:1.6;max-width:270px;margin-top:8px}.free-heading .project-actions{gap:0;flex-wrap:wrap;justify-content:flex-end;width:70px;flex:none}.free-heading .quiet-button{width:32px;height:32px;min-height:32px;padding:8px}.free-heading .quiet-button svg{width:15px;height:15px}.free-workspace{display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(440px,58dvh) auto auto;gap:10px}.free-tools{grid-column:1;grid-row:1;flex-direction:row;justify-content:space-between;padding:5px;gap:1px;border-radius:14px}.free-tool{width:43px;min-height:47px;padding:5px 1px;gap:5px;border-radius:9px;font-size:7px}.free-tool svg{width:19px;height:19px}.free-tool-divider{height:22px;width:1px;margin:0 2px}.free-paper-shell{grid-column:1;grid-row:2;border-radius:17px}.free-paper-top{padding:7px 12px;min-height:45px}.free-paper-top strong{font-size:10px}.free-paper-top #strokeCount{font-size:9px;margin-left:1px}.free-paper-top .icon-button{height:27px;width:27px}.free-paper-top .icon-button svg{width:16px;height:16px}.free-paper-top>div{gap:6px}.free-paper-foot{padding:5px 9px 5px 12px;gap:7px;min-height:42px}.free-paper-foot>span{font-size:9px;max-width:225px}.free-paper-foot .quiet-button{font-size:0;gap:0;width:28px;min-height:30px}.free-paper-foot .quiet-button svg{width:16px;height:16px}.free-brushbar{grid-column:1;grid-row:3;flex-wrap:wrap;padding:11px 13px;gap:11px 13px;border-radius:13px}.free-swatches{gap:8px}.free-swatch{width:25px;height:25px}.free-custom-color{margin-left:auto}.free-custom-color span{font-size:9px}.brush-divider{display:none}.free-brush-width{width:100%;max-width:none;flex-basis:100%;font-size:10px;gap:14px;padding-top:8px;border-top:1px solid #e9eee2}.free-brush-width input{min-width:0;flex:1}.free-side{grid-column:1;grid-row:4;grid-template-columns:1fr;gap:12px;margin-top:5px}.free-preview{height:260px}.free-preview-card,.free-understanding{border-radius:17px}.free-understanding{max-height:440px;padding-bottom:14px}.free-understanding .free-panel-heading{font-size:13px;padding:16px 16px 7px}.recognition-summary{padding:0 16px;font-size:11px}.free-part-list{max-height:180px;min-height:40px}.free-part{font-size:12px;min-height:45px}.free-part-text small{font-size:10px}.free-race-button{font-size:13px;min-height:46px}.free-selection-title{font-size:12px}.free-selection details>summary{font-size:11px;padding:10px 0}.free-selection details label,.free-selection details select{font-size:11px}.free-selection details p{font-size:10px}.free-connections{font-size:11px}.free-bottom-hint{gap:12px;font-size:9px;padding-top:17px}.free-bottom-hint b{font-size:8px}.free-bottom-hint p{font-size:9px;line-height:1.7;margin-top:-4px}.free-animation button{font-size:12px;min-height:37px}}
@media(prefers-reduced-motion:reduce){.free-tool,.free-part{transition:none}}
