@font-face{font-family:'DM Sans';src:url('./fonts/DMSans-LatinExt.woff2') format('woff2');font-style:normal;font-weight:100 1000;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'DM Sans';src:url('./fonts/DMSans-Latin.woff2') format('woff2');font-style:normal;font-weight:100 1000;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Instrument;src:url('./fonts/InstrumentSerif-Regular.ttf') format('truetype');font-display:swap}
:root{--ui-panel-bg:#f3f0e8;--ui-panel-ink:#26382e;--ui-panel-edge:#fffdf6;--ui-charcoal:#33302b;--ui-control-ink:#424942;--ui-control-emphasis:#30473d;--ui-control-hover:rgb(88 104 95 / .09);--ui-control-open:rgb(88 104 95 / .12);--ui-control-pressed:rgb(88 104 95 / .14);--ui-control-focus:#58685f;--ink:#161616;--muted:#70706a;--paper:#E3E0DA;--rule:#deded8}body{font-family:'DM Sans',Arial,sans-serif;color:var(--ink)}body:before{opacity:.012}.app-header{height:90px;margin:0 4%;border:0;position:relative;z-index:7}.brand{font:38px Instrument,serif;letter-spacing:-1px}.brand span{font:12px 'DM Sans';vertical-align:top;margin-left:4px}.header-note{font-size:12px;color:var(--muted)}.quiet-button{border:0;background:#eeeee9;border-radius:30px;padding:12px 20px;font-size:12px}.quiet-button span{margin-left:16px}.hero{padding:24px 4% 0;overflow:visible}.intro{pointer-events:auto;z-index:1}.eyebrow{font:500 10px 'DM Sans';letter-spacing:1.8px;margin-bottom:22px;color:#666}.intro h1,.intro h1 em{font:400 clamp(70px,8vw,112px)/.89 Instrument,Georgia,serif;letter-spacing:-1px;color:#151515;font-style:normal}.intro h1 em{color:#790b06}.intro-copy{font:14px/1.5 'DM Sans';color:#73736c;margin:22px 0}.lobby-actions{display:flex;gap:8px;justify-content:center;position:relative;z-index:7}.primary,.secondary{font:500 13px 'DM Sans';border-radius:30px;padding:14px 23px;border:1px solid #191919;background:#191919;color:#fafafa}.primary span{margin-left:23px}.secondary{background:transparent;color:#171717;border-color:#d4d4ce}.primary:hover{background:#333}.secondary:hover{background:#eeeee9}button:disabled{cursor:wait;opacity:.55}.playground{margin-top:16px;height:clamp(330px,46vw,470px);max-width:1180px}.playbar{flex-direction:column;gap:12px;margin-bottom:20px}.playbar>p{font:12px/1.5 'DM Sans';text-align:center;margin:0}.controls>#motion{height:36px;width:36px}.app-note{text-align:center;font-size:11px;color:#777;margin:24px 0 36px}.app-footer{padding:22px 4%;font-size:11px;color:#777}.app-footer button{background:none;border:0;color:#555;font-size:11px}.room-strip{position:relative;z-index:7;max-width:900px;margin:32px auto 0;padding:12px 0;border-bottom:1px solid var(--rule);display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:12px}.room-strip[hidden]{display:none}.room-strip>div{display:flex;align-items:center;gap:12px}.room-strip strong{letter-spacing:.14em;color:#066399}.room-strip button{border:0;background:#eeeee9;padding:9px 12px;border-radius:20px;font:11px 'DM Sans'}.live-dot{width:6px;height:6px;background:#447252;border-radius:50%}.roster{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:900px;margin:20px auto}.player-chip{font-size:12px;border:1px solid #e2e2da;border-radius:28px;padding:8px 15px;display:flex;gap:10px;align-items:center}.player-chip b{color:#790b06}.player-chip i{display:inline-block;width:8px;height:8px;border-radius:50%}.avatar-hit{position:fixed;left:0;top:0;z-index:6;padding:0;margin:0;background:transparent;border:0;border-radius:40% 40% 18% 18%;cursor:grab;touch-action:none;user-select:none}.avatar-hit[hidden]{display:none}.avatar-hit.is-dragging{cursor:grabbing}.avatar-hit:focus-visible{outline:2px dashed #790b06;outline-offset:4px}.skip-link{position:fixed;top:-80px;left:12px;z-index:100;background:#171717;color:white;padding:12px}.skip-link:focus{top:12px}.toast{z-index:8}.ball-hit[data-online=true]{pointer-events:none}
dialog{background:#fafafa;border:1px solid #deded8;color:#171717;padding:26px;border-radius:20px;max-width:min(760px,calc(100vw - 32px));max-height:90dvh;width:760px;box-shadow:0 28px 100px #2222}dialog::backdrop{background:#20272666;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;font:10px 'DM Sans';letter-spacing:1.5px;margin-bottom:22px}.close{border:0;background:#eeeee9;width:32px;height:32px;border-radius:50%;font:24px 'DM Sans';line-height:1}.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}.player-preview{background:#e8e4dc;border-radius:12px;position:relative;display:flex;flex-direction:column;align-items:center;min-height:440px;overflow:hidden;align-self:stretch}.preview-kicker{font:24px Instrument;margin-top:36px;color:#615e53}.player-preview canvas{width:100%;height:auto;margin:auto;cursor:default;z-index:1;touch-action:auto}.preview-floor{position:absolute;bottom:100px;width:120px;height:18px;border-radius:50%;background:#7773;filter:blur(8px)}.player-preview p{margin:0 0 34px;font-size:14px}.editor-fields h2,dialog h2{font:400 50px/.94 Instrument;letter-spacing:-.5px;margin:0 0 24px}.editor-fields label,dialog label{display:flex;flex-direction:column;gap:6px;font-size:11px;margin-bottom:13px}input,select{border:1px solid #d5d5cc;border-radius:8px;background:#fafafa;color:#171717;font:13px 'DM Sans';padding:9px 10px;min-width:0;width:100%}input:focus-visible,select:focus-visible{outline:2px solid #066399;outline-offset:2px}input[type=color]{padding:3px;height:36px;cursor:pointer;width:100%}.field-row{display:grid;grid-template-columns:1fr 76px;gap:10px}.editor-fields .check{flex-direction:row;align-items:center;gap:8px}.check input{width:14px;height:14px;accent-color:#790b06}.editor-fields .primary{width:100%;margin-top:3px}.small-print{font-size:10px;line-height:1.5;text-align:center;color:#777}.form-message{font-size:12px;line-height:1.4;color:#790b06;min-height:16px;margin:4px 0 12px}#join-dialog,#help-dialog{width:420px;padding:28px}#join-code{font-size:24px;letter-spacing:.15em;text-transform:uppercase}#join-dialog .primary{width:100%}#help-dialog li,#help-dialog p{font-size:13px;line-height:1.6;margin-bottom:12px}#help-dialog ol{padding-left:20px}@media(max-width:650px){.app-header{height:76px}.brand{font-size:31px}.header-note{display:none}.quiet-button{padding:10px 15px}.hero{padding-top:20px}.intro h1,.intro h1 em{font-size:76px}.intro-copy{font-size:12px}.eyebrow{font-size:8px;letter-spacing:1.1px}.playground{height:300px;margin-top:8px}#scene{inset:0 -15px}.playbar p{font-size:10px;max-width:300px}.app-note{font-size:10px}.room-strip{font-size:10px;margin-top:24px;align-items:start}.room-strip>div{gap:6px;flex-wrap:wrap}.room-strip button{font-size:10px;padding:8px}.editor-grid{grid-template-columns:1fr;gap:22px}.player-preview{min-height:200px;max-height:200px;display:block}.preview-kicker{position:absolute;top:25px;left:20px;font-size:22px;margin:0}.player-preview canvas{width:200px;height:200px;position:absolute;right:0;top:0}.preview-floor{right:45px;bottom:5px;width:100px}.player-preview p{position:absolute;left:20px;bottom:20px;margin:0;font-size:12px}.editor-fields h2{font-size:40px}.editor-fields h2 br{display:none}dialog{padding:20px}.app-footer{font-size:10px}.intro h1{pointer-events:none}}

body.in-room #motion{display:none}

.live-strip{display:flex;justify-content:center;align-items:center;gap:10px;font-size:11px;color:#6d716a;margin:24px 0 0}.live-strip .live-dot{width:5px;height:5px}#visitor-count{color:#999}#leave-player[hidden],#join-player[hidden]{display:none}.ball-hit[data-online=true]{pointer-events:auto}body.in-room #motion{display:none}.lobby-actions{min-height:45px}

/* Court-first layout: the drawing is the main screen. */
.app-header{height:72px;margin-inline:3%}.hero{padding:0 2%}.court-toolbar{position:relative;z-index:7;display:flex;justify-content:space-between;align-items:center;gap:16px;width:94%;max-width:1440px;margin:0 auto;min-height:48px}.court-toolbar .live-strip{margin:0;justify-content:flex-start}.court-toolbar .primary{padding:11px 19px;font-size:12px}.playground{height:calc(100svh - 220px);min-height:440px;max-height:920px;max-width:1600px;margin:0 auto}#scene{inset:0}.playbar{margin:0 auto 12px;gap:8px}.playbar p{font-size:11px}.roster{margin:10px auto}.app-note{display:none}.app-footer{padding:18px 3%}.court-toolbar #join-player[hidden]{display:none}
@media(max-width:650px){.app-header{height:68px}.court-toolbar{width:94%;min-height:48px;gap:8px}.court-toolbar .live-strip{font-size:9px;gap:6px;flex-wrap:wrap}.court-toolbar .primary{font-size:11px;padding:10px 14px}.court-toolbar .primary span{margin-left:8px}.playground{height:calc(100svh - 220px);min-height:350px;max-height:620px}#scene{inset:0 -8px}.playbar p{max-width:330px;font-size:10px}.app-footer{font-size:9px}}

/* Player actions live below the drawing; help stays in the corner without a footer. */
.hero{padding-bottom:28px}.player-actions{position:relative;z-index:7;display:flex;justify-content:center;align-items:center;gap:10px;min-height:40px;flex-wrap:wrap}.player-actions [hidden],.playbar>.controls[hidden]{display:none}.player-actions .primary,.player-actions .secondary{padding:11px 19px;font-size:12px}.player-actions .quiet-button{padding:12px 19px}.player-message{font-size:12px;color:#790b06;text-align:center;margin:8px auto;max-width:480px}.player-message:empty{display:none}.help-button{position:fixed;z-index:7;right:3%;bottom:max(14px,env(safe-area-inset-bottom));padding:8px 10px;background:var(--paper);border:0;color:#555;font:11px 'DM Sans',Arial,sans-serif}.roster:empty{display:none}@media(max-width:650px){.player-actions{gap:8px}.player-actions .primary,.player-actions .secondary,.player-actions .quiet-button{font-size:11px;padding:11px 15px}.help-button{font-size:10px}}

/* Center the identity and collect court information below the drawing. */
.app-header{justify-content:center}.court-toolbar{justify-content:center;min-height:32px;margin:0 auto 8px}.court-toolbar .live-strip{justify-content:center}

/* Bottom controls: the player action stays centered, with presence to its left. */
.hero{padding-bottom:110px}.playbar{position:fixed;z-index:7;left:3%;right:3%;bottom:max(14px,env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px;max-width:none;margin:0}.playbar .court-toolbar{grid-column:1;justify-self:end;width:auto;min-height:0;margin:0}.playbar .player-actions{grid-column:2}.playbar .live-strip{white-space:nowrap}
@media(max-width:650px){.playbar{bottom:max(54px,calc(env(safe-area-inset-bottom) + 40px));grid-template-columns:1fr;gap:12px}.playbar .court-toolbar,.playbar .player-actions{grid-column:1;justify-self:center}.hero{padding-bottom:160px}}

/* Scores are painted on the gym board; retain a complete accessible roster. */
@media(min-width:701px){.roster{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}

@media(max-width:700px){.roster:not(:empty){display:flex;flex-direction:column;gap:0;width:min(340px,88%);max-height:150px;margin:-130px auto 0;position:relative;z-index:5;overflow:auto;padding:16px;border:5px solid #92978b;border-radius:5px;background:#414d49;box-shadow:inset 0 0 0 2px #b7b29e;color:#e0d6bd}.roster:not(:empty)::before{content:'COURTSIDE · LIVE SCORES';font-size:10px;letter-spacing:1.5px;text-align:center;margin:2px 0 12px}.roster .player-chip{border:0;border-top:1px solid #637068;border-radius:0;padding:10px 0;font-size:12px}.roster .player-chip b{margin-left:auto;white-space:nowrap;color:#df9b79}}

/* Leave breathing room between the scoreboard and the playing surface. */
@media(min-width:701px){.playground{margin-top:54px;max-width:none}}

/* Reference composition: open header, lower artwork, and paired bottom controls. */
.app-header>.court-toolbar{position:absolute;left:0;top:50%;transform:translateY(-50%);width:auto;min-height:0;margin:0;justify-content:flex-start}
.app-header>.court-toolbar .live-strip{justify-content:flex-start}
.playbar{gap:16px;bottom:max(5svh,env(safe-area-inset-bottom))}
.playbar .help-button{position:static;grid-column:3;justify-self:start;border-radius:30px;background:#eeeee9;padding:14px 24px;font-size:11px;white-space:nowrap}
@media(min-width:701px){
 .app-header{height:12svh}
 .playground{margin-top:13svh;height:60svh;min-height:0;max-height:none}
}
@media(max-width:700px){
 .app-header{height:94px;align-items:flex-start;padding-top:16px}
 .app-header>.court-toolbar{top:66px;left:50%;transform:translateX(-50%)}
 .app-header>.court-toolbar .live-strip{font-size:9px;flex-wrap:nowrap;white-space:nowrap}
 .playbar{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;gap:10px;bottom:max(20px,env(safe-area-inset-bottom))}
 .playbar .help-button{padding:12px 17px;font-size:10px}
}

/* A closer collective framing; individual artwork proportions stay unchanged. */
@media(min-width:701px){
 .brand{font-size:34px}
 .brand span{font-size:10px}
}

/* Quiet live presence: readable type, balanced spacing and a steady counter. */
.app-header .live-strip{min-height:24px;padding:0;gap:10px;color:var(--ui-control-ink);font:400 .75rem/1.5 'DM Sans',Arial,sans-serif;letter-spacing:0;white-space:nowrap}
.app-header .live-strip .live-dot{background:#55765c;width:5px;height:5px;flex:none}
.app-header .live-strip #visitor-count{display:flex;align-items:center;gap:10px;color:#6b6e67;font-variant-numeric:tabular-nums}
@media(min-width:701px){
 .playground{margin-top:calc(13svh + 18px)}
 .playbar{bottom:max(calc(5svh - 18px),env(safe-area-inset-bottom))}
}
@media(max-width:700px){
 .app-header>.court-toolbar .live-strip{min-height:24px;padding:0;gap:10px;font-size:.75rem}
}

/* Soft bevels and warm charcoal, following the supplied button reference. */
.primary,.secondary,.player-actions .quiet-button,.playbar .help-button{
 --button-fill:var(--ui-charcoal);--button-ink:#fff;--button-edge:var(--ui-charcoal);--button-highlight:rgb(255 255 255 / .25);
 display:inline-flex;align-items:center;justify-content:center;min-height:40px;min-width:0;
 padding:9px 18px;border:1px solid transparent;border-radius:999px;
 font:500 13px/20px 'DM Sans',Arial,sans-serif;letter-spacing:0;
 color:var(--button-ink);background:var(--button-fill);
 box-shadow:0 1px 2px rgb(51 48 43 / .25),inset 0 -1px 1px 1px rgb(51 48 43 / .25),inset 0 1px 1px 1px var(--button-highlight),inset 0 0 0 1px var(--button-edge);
 -webkit-tap-highlight-color:transparent;
 transition:background-color 150ms ease-out,box-shadow 150ms ease-out;
}
.secondary,.player-actions .quiet-button,.playbar .help-button{
 --button-fill:#d1c9be;--button-ink:var(--ui-charcoal);--button-edge:#b9afa2;--button-highlight:rgb(250 246 239 / .5);
 background-image:url('./button-grain.svg?v=67'),radial-gradient(ellipse at 28% 0%,rgb(250 246 239 / .18),transparent 72%);
 background-size:120px 80px,100% 100%;
 border-color:var(--button-edge);
 box-shadow:0 1px 1px rgb(60 52 45 / .13),inset 0 1px 1px var(--button-highlight),inset 0 -2px 4px rgb(89 75 65 / .14);
}
.player-actions .primary,.player-actions .secondary,.player-actions .quiet-button,.playbar .help-button{padding:9px 18px;font-size:13px}
.primary:hover,.secondary:hover{background-color:var(--button-fill)}
@media(hover:hover){
 .primary:not(:disabled):hover{background-color:#3e3b34}
 .secondary:not(:disabled):hover,.player-actions .quiet-button:not(:disabled):hover,.playbar .help-button:hover{background-color:#dad2c8}
}
.primary:focus-visible,.secondary:focus-visible,.player-actions .quiet-button:focus-visible,.playbar .help-button:focus-visible{outline:2px solid #066399;outline-offset:4px}
.primary:not(:disabled):active,.secondary:not(:disabled):active,.player-actions .quiet-button:not(:disabled):active,.playbar .help-button:active{box-shadow:0 0 1px rgb(51 48 43 / .2),inset 0 2px 3px rgb(0 0 0 / .16),inset 0 0 0 1px var(--button-edge)}
@media(prefers-reduced-motion:no-preference){
 .primary,.secondary,.player-actions .quiet-button,.playbar .help-button{transition:background-color 150ms ease-out,box-shadow 150ms ease-out,scale 150ms ease-out}
 .primary:not(:disabled):active,.secondary:not(:disabled):active,.player-actions .quiet-button:not(:disabled):active,.playbar .help-button:active{scale:.96}
}
@media(max-width:700px){.player-actions .primary,.player-actions .secondary,.player-actions .quiet-button,.playbar .help-button{min-height:44px;min-width:0;padding:11px 18px;font-size:13px}}

.player-actions [hidden]{display:none}

/* The court is a single-screen app; overlays own their scrolling. */
html{height:100%;overflow:clip;overscroll-behavior:none}
body{height:100dvh;overflow:clip;overscroll-behavior:none}
.hero{padding-bottom:0}
dialog{overflow:auto;overscroll-behavior:contain}

/* Keep the wordmark steady on hover. */
.app-header .brand,.app-header .brand:hover{color:var(--ui-charcoal)}

/* A softly brushed charcoal surface, with pigment-like depth instead of a hard rim. */
.primary{
 background-image:url('./button-grain.svg?v=67'),radial-gradient(ellipse at 28% 0%,rgb(216 197 164 / .12),transparent 72%);
 background-size:120px 80px,100% 100%;
 box-shadow:0 2px 3px rgb(38 34 28 / .18),inset 0 1px 3px rgb(244 225 191 / .22),inset 0 -3px 5px rgb(13 17 15 / .36),inset 1px 0 4px rgb(222 203 171 / .08);
}
.primary:not(:disabled):active{
 box-shadow:0 1px 1px rgb(38 34 28 / .12),inset 0 2px 5px rgb(13 17 15 / .32),inset 0 -1px 2px rgb(244 225 191 / .10);
}

.secondary:not(:disabled):active,.player-actions .quiet-button:not(:disabled):active,.playbar .help-button:active{
 box-shadow:0 1px 1px rgb(60 52 45 / .08),inset 0 1px 2px rgb(89 75 65 / .23),inset 0 -1px 1px rgb(250 246 239 / .25);
}

/* A quiet, icon-only field guide beside the live court status. */
#how-to{
 position:static;display:inline-flex;align-items:center;justify-content:center;flex:none;
 width:36px;height:36px;min-height:36px;padding:7px;
 color:var(--ui-control-ink);background:transparent;border:1px solid transparent;
 border-radius:10px;box-shadow:none;cursor:pointer;
 transition:color 150ms ease-out,background-color 150ms ease-out;
}
#how-to svg{color:inherit;stroke:currentColor;display:block;width:18px;height:18px;flex:none}
@media(hover:hover){#how-to:hover{color:var(--ui-control-emphasis);background:var(--ui-control-hover);box-shadow:none}}
#how-to:active{color:var(--ui-control-emphasis);background:var(--ui-control-pressed);box-shadow:none}
#how-to:focus-visible{outline:2px solid var(--ui-control-focus);outline-offset:3px}
@media(prefers-reduced-motion:reduce){#how-to{transition:none}}

.app-header>.court-toolbar{gap:0}
@media(min-width:701px){.app-header>.court-toolbar{left:-10px}}
@media(max-width:700px){.app-header>.court-toolbar{top:54px}}

/* Live attendance opens as a light, warm field-guide card. */
.app-header .presence-button{
 height:36px;padding:0 10px;border:0;border-radius:10px;background:transparent;
 cursor:pointer;transition:background-color 150ms ease-out,color 150ms ease-out;
}
@media(hover:hover){.app-header .presence-button:hover{background:var(--ui-control-hover);color:#30473d}}
.app-header .presence-button[aria-expanded="true"]{background:var(--ui-control-open);color:#30473d}
.app-header .presence-button:focus-visible{outline:2px solid var(--ui-control-focus);outline-offset:3px}
#presence-panel,#help-dialog{
 position:fixed;inset:auto;margin:0;left:calc(3vw - 10px);top:calc(6svh + 30px);
 box-sizing:border-box;width:min(340px,calc(100vw - 32px));padding:26px 28px 22px;
 color:var(--ui-panel-ink);background:var(--ui-panel-bg);border:1px solid var(--ui-panel-edge);border-radius:22px;
 box-shadow:0 12px 28px rgb(53 47 36 / .15),0 2px 4px rgb(53 47 36 / .06);
 max-height:calc(100dvh - 120px);overflow:auto;
}
#presence-panel::backdrop,#help-dialog::backdrop{background:transparent}
#presence-panel h2,#help-dialog h2{font:400 34px/1.06 Instrument,Georgia,serif;letter-spacing:0;margin:0 0 24px}
.presence-counts{margin:0;display:grid;gap:13px;font:400 14px/1.4 'DM Sans',Arial,sans-serif}
.presence-counts>div{display:flex;align-items:baseline;justify-content:space-between;gap:24px}
.presence-counts dt{color:#59675e}
.presence-counts dd{margin:0;font-weight:500;font-variant-numeric:tabular-nums}
#presence-panel p{margin:22px 0 0;font:400 12px/1.5 'DM Sans',Arial,sans-serif;color:#73786d}
@media(max-width:700px){#presence-panel,#help-dialog{left:16px;top:104px}}
@media(prefers-reduced-motion:reduce){.app-header .presence-button{transition:none}}

#how-to[aria-expanded="true"]{background:var(--ui-control-open);color:#30473d}
#help-dialog ol{margin:0;padding-left:18px;color:#59675e}
#help-dialog li{font:400 13px/1.5 'DM Sans',Arial,sans-serif;margin-bottom:10px}
#help-dialog p{font:400 12px/1.5 'DM Sans',Arial,sans-serif;color:#73786d;margin:16px 0 0}

.app-header .presence-button:active{background:var(--ui-control-pressed);color:var(--ui-control-emphasis)}

/* A slightly larger wordmark, centered without the registration symbol. */
.app-header .brand{position:absolute;left:50%;transform:translateX(-50%);font-size:36.72px}
@media(max-width:700px){.app-header .brand{font-size:33.48px}}

/* The board keeps its painted lettering; this aligned layer adds native scroll. */
.scoreboard-scroll{position:fixed;z-index:7;width:708px;height:430px;transform-origin:0 0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#aeb5a5 #63706833;outline:none;border-radius:2px}
.scoreboard-scroll[hidden]{display:none}
.scoreboard-scroll:focus-visible{outline:3px solid #b7baa2;outline-offset:6px}
.scoreboard-scroll ol{list-style:none;margin:0;padding:0;opacity:0;pointer-events:none}
.scoreboard-scroll li{height:86px;margin:0;padding:0;white-space:nowrap}
.scoreboard-scroll::-webkit-scrollbar{width:12px}
.scoreboard-scroll::-webkit-scrollbar-track{background:#63706833;border-radius:8px}
.scoreboard-scroll::-webkit-scrollbar-thumb{background:#aeb5a5;border-radius:8px}

/* Locker room: the same warm paper and sculpted, crisp controls as the court UI. */
#editor{background:var(--ui-panel-bg);color:var(--ui-panel-ink);border-color:var(--ui-panel-edge);border-radius:22px;overscroll-behavior:contain;box-shadow:0 12px 28px rgb(53 47 36 / .15),0 2px 4px rgb(53 47 36 / .06);padding:28px}
#editor .dialog-top{position:absolute;top:14px;right:14px;margin:0;z-index:2}
#editor .close{color:var(--ui-control-ink);background:transparent;border-radius:10px;width:32px;height:32px}
#editor .editor-grid{gap:30px}
#editor .editor-fields h2{font-size:44px;line-height:1.06;letter-spacing:0;margin:6px 28px 22px 0}
#editor .editor-fields label{font-size:11px;font-weight:500;color:var(--ui-control-ink);gap:6px;margin-bottom:12px}
#editor input:not([type=checkbox]),#editor select{height:34px;border:1px solid;border-color:#b8b0a3 #b8b0a3 #8c867a;border-radius:8px;padding:6px 10px;color:var(--ui-charcoal);background:radial-gradient(ellipse at 30% 0%,rgb(255 253 246 / .22),transparent 85%),#e8e2d8;box-shadow:inset 0 1px 1px rgb(255 253 246 / .6),inset 0 -1px 2px rgb(88 73 53 / .1);font:400 12px/20px 'DM Sans',Arial,sans-serif;transition:border-color 120ms ease-out,background-color 120ms ease-out}
#editor .field-row{grid-template-columns:minmax(0,1fr) 76px;gap:12px}
#editor select{cursor:pointer;appearance:none;-webkit-appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6258' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");background-position:right 10px center;background-repeat:no-repeat}
#editor input:not([type=checkbox]):focus,#editor select:focus{outline:none;border-color:#62685b;background-color:#eee9e0;box-shadow:inset 0 1px 2px rgb(79 71 57 / .1)}
#editor input::selection{background:#c9d0bf;color:var(--ui-charcoal)}
#editor .check input:focus-visible,#editor .close:focus-visible{outline:1.5px solid var(--ui-control-focus);outline-offset:2px}
#editor input[type=color]{padding:4px;cursor:pointer}
#editor input[type=color]::-webkit-color-swatch-wrapper{padding:0}
#editor input[type=color]::-webkit-color-swatch{border:0;border-radius:4px;box-shadow:inset 0 1px 1px rgb(0 0 0 / .12),inset 0 -1px 1px rgb(255 255 255 / .18)}
#editor input[type=color]::-moz-color-swatch{border:0;border-radius:5px;box-shadow:inset 0 1px 2px rgb(0 0 0 / .16)}
#editor .check{display:inline-flex;flex-direction:row;align-items:center;gap:9px;min-height:32px;width:fit-content;cursor:pointer;font-size:12px;user-select:none;-webkit-tap-highlight-color:transparent}
#editor .check-control{position:relative;display:inline-flex;flex:none;width:24px;height:24px}
#editor .check input{appearance:none;-webkit-appearance:none;width:24px;height:24px;margin:0;padding:0;border:1px solid #888275;border-radius:7px;cursor:pointer;background:linear-gradient(180deg,#f1ede5,#eae4da);box-shadow:inset 0 1px 1px #fffdf6,inset 0 -2px 3px rgb(97 81 60 / .1),0 1px 2px rgb(53 47 36 / .1)}
#editor .check input:checked{background:radial-gradient(ellipse at 28% 0%,rgb(244 225 191 / .15),transparent 80%),var(--ui-charcoal);border-color:var(--ui-charcoal);box-shadow:inset 0 1px 2px rgb(244 225 191 / .24),inset 0 -2px 3px rgb(13 17 15 / .28),0 1px 2px rgb(53 47 36 / .15)}
#editor .check svg{position:absolute;inset:3px;width:18px;height:18px;stroke-width:2;pointer-events:none;color:#fffdf6;opacity:0;transition:opacity 120ms ease-out}
#editor .check input:checked+svg{opacity:1}
#editor .form-message:empty{display:none}
#editor .small-print{color:#73786d;margin:10px 0 0}
@media(hover:hover){#editor input:not([type=checkbox]):hover,#editor select:hover{border-color:#686d60}#editor .close:hover{background:var(--ui-control-hover)}#editor .check:hover input{border-color:var(--ui-control-focus)}}
@media(prefers-reduced-motion:no-preference){#editor .check-control{transition:scale 150ms ease-out}#editor .check:active .check-control{scale:.96}}
@media(forced-colors:active){#editor .check input:checked{background:Highlight}#editor .check svg{color:HighlightText}}
@media(max-width:650px){#editor{padding:22px}#editor .editor-fields h2{font-size:40px;margin-top:0}#editor .editor-grid{gap:22px}#editor input:not([type=checkbox]),#editor select{height:44px;font-size:16px}#editor .check{min-height:40px}#editor .player-preview{margin-top:20px}}
@media(min-width:651px) and (max-height:760px){#editor .editor-fields label{margin-bottom:8px}#editor .editor-fields h2{margin-bottom:14px}}

/* Match the other panel headings, above the preview surface. */
#editor .player-preview-column{display:flex;flex-direction:column;min-width:0}
#editor #editor-title{flex:none;font:400 34px/1.06 Instrument,Georgia,serif;letter-spacing:0;margin:0 0 18px;color:var(--ui-panel-ink)}
#editor .player-preview{flex:1;min-height:0;background:transparent}
#editor .editor-fields{padding-top:0}
@media(max-width:650px){#editor .player-preview{flex:none;min-height:200px;margin-top:0}#editor #editor-title{margin-right:28px}#editor .editor-fields{padding-top:0}}

/* Quiet inset tracks, with tactile selected segments and compact color chips. */
#editor .choice-field{border:0;padding:0;margin:0 0 14px;min-width:0}
#editor .choice-field legend,#editor .name-field>label{padding:0;margin:0 0 7px;font:500 11px/16px 'DM Sans',Arial,sans-serif;color:var(--ui-control-ink)}
#editor .name-field{margin-bottom:14px}
#editor .choice-row{display:flex;align-items:center;gap:12px;min-width:0}
#editor .choice-row>input[name=name]{flex:1;min-width:0;width:0}
#editor .segments{display:flex;flex:1;min-width:0;padding:3px;gap:2px;border-radius:10px;background:#e5e0d7;box-shadow:inset 0 1px 2px rgb(71 62 46 / .09),0 1px 0 rgb(255 253 246 / .6)}
#editor .segments .segment{position:relative;display:flex;flex:1;min-width:0;margin:0;cursor:pointer}
#editor .segment input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;padding:0;margin:0;clip-path:inset(50%);border:0}
#editor .segment span{display:flex;align-items:center;justify-content:center;width:100%;height:29px;padding:0 5px;border:1px solid transparent;border-radius:7px;font:400 12px/1 'DM Sans',Arial,sans-serif;white-space:nowrap;color:#78796e;transition:background-color 120ms ease,color 120ms ease}
#editor .segment input:checked+span{color:var(--ui-charcoal);background:linear-gradient(175deg,#faf7f0,#eee8de);border-color:#fffaf1 #d7d0c3 #c6beaf;box-shadow:inset 0 1px 1px #fffdf8,inset 0 -1px 2px rgb(106 87 59 / .06),0 1px 2px rgb(69 57 38 / .13)}
#editor .segment input:focus-visible+span{outline:1.5px solid var(--ui-control-focus);outline-offset:1px}
#editor input.color-dot{appearance:none;-webkit-appearance:none;flex:none;display:block;width:28px;height:28px;min-height:0;padding:3px;border:0;border-radius:50%;background:#e5e0d7;box-shadow:inset 0 1px 2px rgb(71 62 46 / .12),0 1px 0 rgb(255 253 246 / .65);cursor:pointer}
#editor input.color-dot::-webkit-color-swatch-wrapper{padding:0}
#editor input.color-dot::-webkit-color-swatch{border:0;border-radius:50%;background-image:radial-gradient(ellipse at 30% 0%,rgb(255 249 231 / .08),transparent 85%),linear-gradient(180deg,transparent 45%,rgb(42 33 22 / .07));box-shadow:inset 0 1px 1px rgb(255 253 246 / .15),inset 0 -1px 2px rgb(42 33 22 / .14),0 1px 2px rgb(69 57 38 / .16)}
#editor input.color-dot::-moz-color-swatch{border:0;border-radius:50%;background-image:radial-gradient(ellipse at 30% 0%,rgb(255 249 231 / .08),transparent 85%),linear-gradient(180deg,transparent 45%,rgb(42 33 22 / .07));box-shadow:inset 0 1px 1px rgb(255 253 246 / .15),inset 0 -1px 2px rgb(42 33 22 / .14),0 1px 2px rgb(69 57 38 / .16)}
#editor input.color-dot:focus-visible{outline:1.5px solid var(--ui-control-focus);outline-offset:3px}
@media(hover:hover){#editor .segment:hover span{color:var(--ui-charcoal)}#editor input.color-dot:hover{border-color:#686d60}}
@media(max-width:650px){#editor .segment span{height:38px}#editor .choice-row{gap:10px}#editor input.color-dot{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){#editor .segment span{transition:none}}
@media(forced-colors:active){#editor .segment input:checked+span{border:2px solid Highlight}}

/* The name field shares the segmented controls' warm recessed surface. */
#editor #player-name{height:35px;padding:7px 12px;border:0;border-radius:10px;background:#e5e0d7;color:var(--ui-charcoal);box-shadow:inset 0 1px 2px rgb(71 62 46 / .09),0 1px 0 rgb(255 253 246 / .6);caret-color:var(--ui-control-ink);transition:background-color 120ms ease-out,box-shadow 120ms ease-out}
#editor #player-name:focus{outline:none;background:#eae5dc;box-shadow:inset 0 0 0 1px rgb(88 104 95 / .38),inset 0 1px 2px rgb(71 62 46 / .07),0 1px 0 rgb(255 253 246 / .6)}
#editor #player-name:focus-visible{outline:1.5px solid var(--ui-control-focus);outline-offset:2px}
@media(hover:hover){#editor #player-name:hover:not(:focus){background:#e8e3da}}
@media(max-width:650px){#editor #player-name{height:44px}}
@media(prefers-reduced-motion:reduce){#editor #player-name{transition:none}}

#editor input.color-dot:focus{background:#e5e0d7;box-shadow:inset 0 1px 2px rgb(71 62 46 / .12),0 1px 0 rgb(255 253 246 / .65)}
@media(hover:hover){#editor input.color-dot:hover{background:#ded8cd}}
#editor input.color-dot:active{box-shadow:inset 0 1px 3px rgb(71 62 46 / .2),0 1px 0 rgb(255 253 246 / .65)}

/* A painted room frames the live player; all decoration stays behind the preview. */
#editor .player-preview{isolation:isolate;overflow:visible}
#editor .locker-room-art{position:absolute;inset:-22px -18px;width:calc(100% + 36px);height:calc(100% + 34px);object-fit:fill;pointer-events:none;user-select:none;z-index:0;max-height:none;max-width:none;margin:0;transform:none}
#editor #player-preview{position:absolute;width:88%;height:auto;left:50%;right:auto;top:auto;bottom:34px;transform:translateX(-50%);margin:0;z-index:1}
#editor .player-preview p{position:absolute;bottom:8px;left:0;right:0;text-align:center;margin:0;z-index:2}
#editor .preview-floor{bottom:58px;width:75px;height:10px;opacity:.45;z-index:0}
@media(max-width:650px){
 #editor .player-preview{height:280px;min-height:280px;max-height:280px}
 #editor .locker-room-art{width:min(100%,310px);left:50%;right:auto;top:-14px;height:calc(100% + 20px);transform:translateX(-50%)}
 #editor #player-preview{width:200px;bottom:22px}
 #editor .player-preview p{bottom:0}
 #editor .preview-floor{left:50%;right:auto;transform:translateX(-50%);bottom:36px}
}

/* Keep the close control clear after removing the visible room heading. */
#editor .editor-grid{margin-top:16px}

/* Illustrated wardrobe: room first, then one focused category at a time. */
#editor{width:460px;max-width:calc(100vw - 24px);max-height:94dvh;padding:22px 26px 20px}
#editor #player-form{display:flex;flex-direction:column;gap:14px}
#editor .player-preview{--room-height:clamp(180px,calc(94dvh - 390px),380px);flex:none;align-self:center;width:min(100%,calc(var(--room-height) * 1.05));height:var(--room-height);min-height:0;max-height:none;margin:0;background:transparent}
#editor .locker-room-art{inset:0;width:100%;height:100%;transform:none;max-width:none;max-height:none}
#editor #player-preview{width:calc(var(--room-height) * .704);height:auto;bottom:24px;top:auto;left:50%;right:auto;transform:translateX(-50%)}
#editor .preview-floor{bottom:46px;left:50%;right:auto;transform:translateX(-50%);width:58px;height:8px}
#editor .wardrobe-navigation{display:flex;align-items:center;gap:7px}
#editor .wardrobe-tabs{display:flex;flex:1;gap:2px;min-width:0;padding:3px;border-radius:12px;background:#e5e0d7;box-shadow:inset 0 1px 2px rgb(71 62 46 / .09),0 1px 0 rgb(255 253 246 / .6)}
#editor .wardrobe-tabs button{flex:1;padding:0 10px;min-width:0;height:32px;border:1px solid transparent;border-radius:9px;background:transparent;color:#686d61;font:400 12px 'DM Sans',Arial,sans-serif;cursor:pointer;transition:background-color 120ms ease-out,color 120ms ease-out}
#editor .wardrobe-tabs button[aria-selected=true]{background:linear-gradient(175deg,#faf7f0,#eee8de);color:var(--ui-charcoal);border-color:#fffaf1 #d7d0c3 #c6beaf;box-shadow:inset 0 1px 1px #fffdf8,0 1px 2px rgb(69 57 38 / .13)}
#editor .wardrobe-step{width:28px;height:36px;flex:none;display:grid;place-items:center;padding:4px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ui-control-ink);cursor:pointer}
#editor .wardrobe-step svg{width:19px;height:19px}
#editor .wardrobe-tabs button:focus-visible,#editor .wardrobe-step:focus-visible{outline:1.5px solid var(--ui-control-focus);outline-offset:2px}
#editor .wardrobe-panels{min-height:200px}
#editor .wardrobe-panels [hidden]{display:none}
#editor .appearance-identity{display:flex;gap:18px;align-items:flex-end;margin-bottom:12px}
#editor .name-field{flex:1;margin:0}
#editor .name-field>label,#editor .skin-choice>span{font:500 11px/16px 'DM Sans',Arial,sans-serif;color:var(--ui-control-ink);margin:0 0 6px}
#editor .skin-choice{display:flex;align-items:center;gap:8px;height:35px}
#editor .skin-choice>span{margin:0}
#editor .wardrobe-field{position:relative;min-width:0;margin:0;padding:0;border:0}
#editor .wardrobe-field legend{font:500 11px/28px 'DM Sans',Arial,sans-serif;color:var(--ui-control-ink);padding:0;margin:0 0 8px}
#editor .wardrobe-color{position:absolute;right:0;top:-36px}
#editor .wardrobe-options{display:flex;justify-content:center;gap:8px}
#editor .wardrobe-option{position:relative;flex:1;min-width:0;max-width:190px;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
#editor .wardrobe-option input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;min-height:0;margin:0;padding:0;clip-path:inset(50%);border:0}
#editor .wardrobe-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:132px;padding:6px 8px 10px;border:1px solid transparent;border-radius:12px;background:#e9e4db;color:#6f7368;box-shadow:inset 0 1px 2px rgb(71 62 46 / .055);transition:background-color 120ms ease-out,color 120ms ease-out}
#editor .wardrobe-card canvas{display:block;width:100%;height:99px;object-fit:contain;pointer-events:none}
#editor .wardrobe-card>span{font:400 12px/16px 'DM Sans',Arial,sans-serif}
#editor .wardrobe-option input:checked+.wardrobe-card{background:linear-gradient(170deg,#faf7f0,#eee8de);border-color:#fffaf1 #d7d0c3 #c6beaf;color:var(--ui-charcoal);box-shadow:inset 0 1px 1px #fffdf8,inset 0 -1px 2px rgb(106 87 59 / .06),0 2px 3px rgb(69 57 38 / .13)}
#editor .wardrobe-option input:focus-visible+.wardrobe-card{outline:1.5px solid var(--ui-control-focus);outline-offset:2px}
#editor #panel-appearance .wardrobe-card{height:92px;padding:4px 4px 7px;gap:0}
#editor #panel-appearance .wardrobe-card canvas{height:63px}
#editor .wardrobe-footer{text-align:center}
#editor #save-player{min-width:168px;min-height:38px;padding:9px 24px;font-size:12px;margin:0}
#editor .small-print{font-size:10px;margin:8px 0 0}
@media(hover:hover){#editor .wardrobe-step:hover{background:var(--ui-control-hover)}#editor .wardrobe-tabs button:hover{color:var(--ui-charcoal)}#editor .wardrobe-option:hover .wardrobe-card{background-color:#eee8dd;color:var(--ui-charcoal)}}
@media(prefers-reduced-motion:no-preference){#editor .wardrobe-step{transition:scale 150ms ease-out}#editor .wardrobe-step:active{scale:.96}}
@media(prefers-reduced-motion:reduce){#editor .wardrobe-card,#editor .wardrobe-tabs button{transition:none}}
@media(max-width:650px){#editor{padding:20px 18px 18px}#editor #player-name{height:35px;font-size:16px}#editor .wardrobe-tabs button{padding:0 6px}#editor .wardrobe-navigation{gap:3px}#editor .wardrobe-step{width:24px}#editor .wardrobe-card{height:132px}#editor .player-preview{--room-height:clamp(160px,calc(94dvh - 390px),380px)}}
@media(forced-colors:active){#editor .wardrobe-tabs button[aria-selected=true],#editor .wardrobe-option input:checked+.wardrobe-card{border:2px solid Highlight}}

/* Individual pills, with a clear six-step wardrobe sequence. */
#editor .wardrobe-tabs{gap:5px;padding:3px 2px;background:transparent;box-shadow:none;border-radius:0;overflow-x:auto;scrollbar-width:none}
#editor .wardrobe-tabs::-webkit-scrollbar{display:none}
#editor .wardrobe-tabs button{flex:0 0 auto;min-width:0;height:31px;padding:0 9px;border-radius:999px;background:#e7e2d9;color:#656b60;border:1px solid transparent;box-shadow:inset 0 1px 1px rgb(255 253 246 / .4);font-size:11px;white-space:nowrap}
#editor .wardrobe-tabs button[aria-selected=true]{color:#faf7ef;background:radial-gradient(ellipse at 28% 0%,rgb(216 197 164 / .12),transparent 72%),var(--ui-charcoal);border-color:transparent;box-shadow:0 1px 2px rgb(38 34 28 / .13),inset 0 1px 2px rgb(244 225 191 / .22),inset 0 -2px 3px rgb(13 17 15 / .26)}
#editor .wardrobe-panels{min-height:174px}
#editor #panel-name{min-height:174px;display:flex;align-items:center}
#editor #panel-name[hidden]{display:none}
#editor #panel-name .name-field{width:100%}
#editor #name-hint{margin:10px 0 0;font:400 11px/1.4 'DM Sans',Arial,sans-serif;color:#73786d}
#editor .skin-options .wardrobe-card{height:132px;gap:17px;padding:12px 4px}
#editor .skin-swatch{display:block;flex:none;width:48px;height:48px;border-radius:50%;background:radial-gradient(ellipse at 30% 0%,rgb(255 249 231 / .08),transparent 85%),linear-gradient(180deg,transparent 45%,rgb(42 33 22 / .07)),var(--skin-tone);box-shadow:inset 0 1px 1px rgb(255 253 246 / .15),inset 0 -2px 3px rgb(42 33 22 / .14),0 1px 2px rgb(69 57 38 / .12)}
#editor .skin-options .wardrobe-card>span:last-child{font-size:11px;text-align:center}
@media(hover:hover){#editor .wardrobe-tabs button:hover{background-color:#dfd9cd;color:var(--ui-charcoal)}#editor .wardrobe-tabs button[aria-selected=true]:hover{background-color:var(--ui-charcoal);color:#faf7ef}}
@media(max-width:650px){#editor .wardrobe-tabs button{padding:0 9px}#editor .skin-swatch{width:42px;height:42px}#editor .skin-options{gap:6px}}

/* Compact wardrobe cards and a persistent player name. */
#editor .player-preview{--room-height:clamp(160px,calc(94dvh - 420px),380px)}
#editor .wardrobe-name{width:100%}
#editor .wardrobe-name label{display:block;margin:0 0 6px;font:400 11px/16px 'DM Sans',Arial,sans-serif;color:var(--ui-charcoal)}
#editor .wardrobe-name #player-name{height:34px;min-height:34px;margin:0}
#editor .wardrobe-tabs{justify-content:center}
#editor .wardrobe-panels{min-height:140px}
#editor .wardrobe-card{position:relative;height:100px;padding:7px 8px 8px;gap:2px;border-radius:11px;background:linear-gradient(160deg,#eae5dc,#e5e0d6);color:#697065;border:1px solid transparent;box-shadow:inset 0 1px 1px rgb(255 253 247 / .35),0 1px 1px rgb(64 55 39 / .04)}
#editor .wardrobe-card canvas{height:65px}
#editor .wardrobe-option input:checked+.wardrobe-card{background:linear-gradient(160deg,#f4f1e9,#eae5da);border-color:var(--ui-charcoal);color:var(--ui-charcoal);box-shadow:inset 0 1px 1px rgb(255 253 247 / .7),inset 0 -1px 2px rgb(73 67 48 / .045),0 1px 2px rgb(64 55 39 / .08)}
#editor .skin-options .wardrobe-card{height:100px;padding:12px 4px 10px;gap:11px}
#editor .skin-swatch{width:39px;height:39px}
@media(hover:hover){#editor .wardrobe-option:hover .wardrobe-card{background:linear-gradient(160deg,#eee9df,#e8e2d7)}#editor .wardrobe-option input:checked+.wardrobe-card:hover{background:linear-gradient(160deg,#f4f1e9,#eae5da)}}
@media(max-width:650px){#editor .player-preview{--room-height:clamp(160px,calc(94dvh - 420px),380px)}#editor .skin-swatch{width:36px;height:36px}#editor .wardrobe-tabs button{padding:0 8px}}
@media(forced-colors:active){#editor .wardrobe-option input:checked+.wardrobe-card{border-color:Highlight}}

#editor #panel-skin{padding-top:16px}

/* Shared edges and steady spacing throughout the wardrobe controls. */
#editor #player-form{gap:16px}
#editor .wardrobe-navigation{gap:6px}
#editor .wardrobe-tabs{gap:6px;padding:2px 0;flex:1;min-width:0}
#editor .wardrobe-tabs button{flex:1 0 auto;min-height:32px;height:auto;padding:7px 10px;line-height:16px}
#editor .wardrobe-panels{min-height:136px}
#editor .wardrobe-field legend{line-height:24px;margin-block-end:8px}
#editor .wardrobe-color{top:-33px}
#editor #panel-skin{padding-block-start:16px}
#editor #panel-hair .wardrobe-card{padding:5px 6px 7px;gap:1px}
#editor #panel-hair .wardrobe-card canvas{height:70px}
#editor .wardrobe-footer{padding-block-start:0}
#editor .wardrobe-footer .small-print{margin-block-start:10px}
@media(max-width:400px){#editor .wardrobe-navigation{gap:4px}#editor .wardrobe-tabs{gap:4px}#editor .wardrobe-tabs button{padding-inline:7px}#editor .wardrobe-step{width:22px}}

/* Color belongs to the selected item, without a separate heading row. */
#editor .wardrobe-choice{position:relative;flex:1;min-width:0;max-width:190px}
#editor .wardrobe-choice>.wardrobe-option{display:block;max-width:none}
#editor .wardrobe-choice .wardrobe-color{inset-block-start:4px;inset-inline-end:4px;top:4px;right:4px;z-index:1}
#editor .wardrobe-choice input.color-dot{width:24px;height:24px;padding:3px;box-shadow:inset 0 1px 2px rgb(71 62 46 / .12),0 1px 1px rgb(255 253 246 / .65)}
#editor .wardrobe-panels{min-height:100px}
#editor #panel-skin{padding-block-start:0}

/* One compact completion action, in place of the editor close icon. */
#editor #save-player{min-width:64px;min-height:32px;padding:7px 16px;font-size:12px;line-height:18px}
#editor .dialog-top{top:14px;right:16px}
#editor .player-preview{margin-top:20px}
#editor #editor-message{margin:0;min-height:0}
#editor #editor-message:empty{display:none}

/* Matte charcoal color editor, shared by the selected wardrobe cards. */
#editor .color-trigger{display:grid;place-items:center;width:24px;height:24px;padding:3px;border:0;border-radius:50%;background:#e5e0d7;box-shadow:inset 0 1px 2px rgb(71 62 46 / .12),0 1px 1px rgb(255 253 246 / .65);cursor:pointer}
#editor .color-trigger>span{width:100%;height:100%;border-radius:50%;background:linear-gradient(180deg,rgb(255 249 231 / .05),transparent 45%,rgb(42 33 22 / .08)),var(--swatch);box-shadow:inset 0 -1px 2px rgb(42 33 22 / .15)}
#editor .color-trigger:focus-visible{outline:1.5px solid var(--ui-charcoal);outline-offset:3px}
#editor .color-panel{position:fixed;inset:auto;margin:0;width:min(282px,calc(100vw - 24px));padding:14px;border:1px solid #625d53;border-radius:24px;background:var(--ui-charcoal);color:#f3f0e8;box-shadow:0 12px 32px rgb(28 25 20 / .22),0 2px 6px rgb(28 25 20 / .16),inset 0 1px 0 rgb(255 246 224 / .09);font:12px/1.4 'DM Sans',Arial,sans-serif;overscroll-behavior:contain;box-sizing:border-box}
#editor .color-panel::backdrop{background:transparent}
#editor .color-panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;font-weight:500}
#editor .color-close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid transparent;border-radius:10px;background:transparent;color:#bdb8ad;box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
#editor .color-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
#editor .color-close:active{background:rgb(243 240 232 / .14);color:#f7f3e9}
#editor .color-mode{display:flex;gap:2px;padding:2px;border-radius:10px;background:#282621;box-shadow:inset 0 1px 2px rgb(0 0 0 / .18),0 1px 0 rgb(255 246 224 / .04)}
#editor .color-mode button{min-width:44px;height:28px;box-sizing:border-box;border:1px solid transparent;border-radius:8px;background:transparent;padding:0 9px;font:500 12px/16px 'DM Sans';color:#bdb8ad;cursor:pointer;-webkit-tap-highlight-color:transparent}
#editor .color-mode button[aria-pressed=true]{background:radial-gradient(ellipse at 28% 0%,rgb(216 197 164 / .12),transparent 72%),#48443c;box-shadow:inset 0 1px 1px rgb(244 225 191 / .22),inset 0 -2px 3px rgb(13 17 15 / .24),0 1px 2px rgb(0 0 0 / .18);color:#faf7ef}
#editor .color-plane{position:relative;height:176px;border:0;border-radius:12px;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--hue));background-origin:border-box;cursor:crosshair;touch-action:none;overflow:hidden}
#editor .color-cursor{position:absolute;left:var(--sat);top:var(--brightness);width:13px;height:13px;border:2px solid #faf7ef;border-radius:50%;box-shadow:0 0 0 1px #3339,0 1px 3px #0007;transform:translate(-50%,-50%);pointer-events:none}
#editor .color-spectrum{display:flex;align-items:center;gap:10px;margin:12px 0}
#editor .color-sample{width:28px;height:28px;flex:none;border-radius:8px;background:var(--chosen);box-shadow:inset 0 1px 1px #fff2,0 0 0 1px #fff2}
#editor .color-panel input.color-hue{appearance:none;-webkit-appearance:none;width:100%;height:14px;min-height:0;padding:0;border:0;border-radius:20px;background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);box-shadow:inset 0 1px 2px #0003;cursor:pointer}
#editor .color-hue::-webkit-slider-thumb{appearance:none;width:19px;height:19px;border:2px solid #faf7ef;border-radius:50%;background:var(--hue);box-shadow:0 1px 3px #0007}
#editor .color-hue::-moz-range-thumb{width:15px;height:15px;border:2px solid #faf7ef;border-radius:50%;background:var(--hue);box-shadow:0 1px 3px #0007}
#editor .color-values label{display:flex;align-items:center;flex-direction:row;gap:8px;margin:0;padding:0 10px;height:34px;border:1px solid #746e62;border-radius:10px;background:#2c2924;box-shadow:inset 0 1px 2px #0002;color:#bdb8ad;font:11px 'DM Sans'}
#editor .color-panel .color-values input{min-width:0;width:100%;height:30px;padding:0;border:0;background:transparent;box-shadow:none;color:#f3f0e8;font:12px 'DM Sans';font-variant-numeric:tabular-nums}
#editor .color-rgb{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#editor .color-rgb label{padding-inline:7px;gap:4px}
#editor .color-panel [hidden]{display:none!important}
#editor .color-panel input:focus-visible,#editor .color-panel button:focus-visible,#editor .color-plane:focus-visible{outline:2px solid #e0d5c1;outline-offset:3px}
#editor .color-error{margin:8px 0 0;font-size:11px;color:#f1b8a3}
#editor .color-error:empty{display:none}
@media(hover:hover){#editor .color-trigger:hover{background:#d8d1c4}#editor .color-mode button:hover{color:#fffaf0}#editor .color-close:hover{background:rgb(243 240 232 / .09);color:#f7f3e9}}
@media(prefers-reduced-motion:no-preference){#editor .color-trigger{transition:scale 150ms ease-out}#editor .color-trigger:active:not(:disabled){scale:.96}}

@media(prefers-reduced-motion:no-preference){#editor .color-close,#editor .color-mode button{transition:background-color 150ms ease-out,color 150ms ease-out,scale 150ms ease-out}#editor .color-close:active:not(:disabled),#editor .color-mode button:active:not(:disabled){scale:.96}}
