/* Cheerful game styling is confined to the small race panel, not the customer workbench. */
#right-rail.race-ready{height:calc(100vh - 145px);max-height:calc(100vh - 145px);display:grid;grid-template-rows:minmax(200px,1fr) minmax(340px,1fr);gap:16px;overflow:hidden;padding-bottom:0}
#culture-slot,#race-slot{min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d4cfeb transparent}
#culture-slot{padding-right:3px}#culture-slot .rail-title{margin-bottom:10px}#culture-slot .culture-upload{margin-bottom:10px}#culture-slot .culture-card{margin-bottom:12px}#culture-slot .culture-image img{aspect-ratio:1.5}#culture-slot .culture-author{padding:9px 12px}#culture-slot .culture-caption{padding:9px 12px 2px;font-size:11px;-webkit-line-clamp:2}#culture-slot .culture-note{display:none}
#right-rail.race-ready.race-disabled{grid-template-rows:minmax(200px,1fr) auto}.race-disabled #race-slot{max-height:150px}
.race-card{border-radius:19px;background:#fdfcff;border:1px solid #e5dff6;overflow:hidden;box-shadow:0 8px 24px #7365b211;color:#33304b;font-family:inherit}
.race-header{background:linear-gradient(115deg,#6750a4,#8564ca 58%,#ac77d8);color:white;padding:14px 13px 12px;display:flex;align-items:flex-start;justify-content:space-between;gap:5px;position:relative;overflow:hidden}.race-header:after{content:'';position:absolute;width:110px;height:110px;border:18px solid #ffffff08;border-radius:50%;right:-34px;top:-50px;pointer-events:none}
.race-kicker{font-size:8px;letter-spacing:1.4px;font-weight:750;color:#eee5ff}.race-header h2{font-size:19px;letter-spacing:-.5px;color:white;margin:4px 0;line-height:1.2}.race-header h2 span{font-size:17px}.race-header p{font-size:10px;color:#eee5ff;margin:0;line-height:1.5}.race-head-actions{display:flex;gap:3px;z-index:1}.race-head-actions button{width:25px;height:26px;background:#ffffff18;border-radius:8px;display:grid;place-items:center;font-size:16px;color:white}.race-head-actions button:hover{background:#ffffff36}.race-head-actions svg{width:13px;height:13px}
.race-content{padding:11px}.race-periods{display:flex;background:#f0ecf8;padding:3px;border-radius:9px;gap:2px}.race-periods button{flex:1;min-height:28px;font-size:10px;white-space:nowrap;border-radius:7px;font-weight:650;color:#787089}.race-periods button.selected{background:#fff;color:#644ca0;box-shadow:0 2px 4px #7b6c9620}
.race-metrics{display:flex;gap:4px;margin-top:8px}.race-metrics button{flex:1;display:flex;align-items:center;justify-content:center;gap:3px;min-height:30px;border:1px solid #e8e1f2;border-radius:9px;font-size:10px;font-weight:650;white-space:nowrap;color:#817490;background:white}.race-metrics button.selected{border-color:#a18ac9;background:#ebe2fa;color:#654798}.race-metrics svg{width:12px;height:12px}.race-subtype{display:flex;gap:7px;justify-content:center;margin-top:7px}.race-subtype button{padding:3px 8px;border-radius:20px;font-size:9px;color:#80728e}.race-subtype button[aria-pressed=true]{background:#f8eed3;color:#8d683a}
.race-demo-label{padding:5px 6px;text-align:center;background:#fff1cc;color:#846127;border-radius:7px;margin-bottom:8px;font-size:8px;font-weight:750;letter-spacing:.5px}.race-section-label{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:10px;font-weight:650;padding:10px 1px 5px}.race-section-label small{font-size:9px;font-weight:400;color:#94879e;white-space:nowrap}
.race-podium{display:flex;justify-content:center;align-items:flex-end;gap:8px;background:radial-gradient(ellipse at 50% 95%,#f7eccc,transparent 75%);padding:7px 2px 10px;margin-bottom:2px}.race-winner{display:flex;align-items:center;flex-direction:column;width:30%;max-width:110px;position:relative;min-width:0;order:3}.race-winner.place-1{order:2}.race-winner.place-2{order:1}.race-animal{display:inline-flex;align-items:center;justify-content:center;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:30px;line-height:1;width:35px;height:35px;flex-shrink:0;filter:drop-shadow(0 2px 1px #51431f14)}.race-winner .race-animal{background:#f6eedd;border:2px solid #eddcbb;border-radius:50%;width:44px;height:44px;font-size:29px;box-shadow:0 3px 5px #ad91651c}.race-winner.place-1 .race-animal{width:52px;height:52px;font-size:35px;border-color:#e2ba57;background:#fff2c4;box-shadow:0 0 0 4px #fff8e6}.race-medal{font-size:9px;border-radius:20px;background:#e7dbf2;color:#705285;padding:1px 5px;position:absolute;top:33px;right:6px;min-width:18px;text-align:center}.place-1 .race-medal{top:42px;background:#edbb59;color:white}.race-winner strong{font-size:11px;margin-top:6px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.race-winner small{font-size:9px;color:#95869a;margin-top:3px}
.race-lanes{display:grid;gap:9px;margin:4px 0 8px}.race-lane{border:1px solid #ede8f3;border-radius:12px;padding:8px 9px 7px;background:#fff}.race-lane.is-me{border-color:#c1b0e4;background:#faf7ff}.race-lane-label{display:flex;align-items:center;gap:5px;min-width:0;font-size:11px;margin-bottom:8px}.race-lane-label strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.race-lane-label strong small{font-size:8px;font-weight:500;color:#977ac1;border-radius:5px;background:#eee6fb;padding:2px 4px}.race-lane-label>b{font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#705289}.race-rank{font-size:9px;color:#a69aae;min-width:17px;font-weight:700}.is-leading .race-rank{color:#c19739}
.race-track{height:28px;border-radius:9px;background:repeating-linear-gradient(0deg,transparent,transparent 10px,#fff6 10px,#fff6 12px),hsl(var(--lane-hue) 52% 95%);position:relative;margin-top:5px}.race-track:before{content:'';position:absolute;left:5px;right:6px;top:50%;border-top:1px dashed hsl(var(--lane-hue) 38% 78%)}.race-track-fill{position:absolute;inset:0 auto 0 0;max-width:100%;border-radius:9px;background:linear-gradient(90deg,hsl(var(--lane-hue) 50% 86% / .2),hsl(var(--lane-hue) 55% 78% / .45));transition:width .85s ease-out}.race-runner{position:absolute;top:-5px;transform:translateX(-50%);transition:left .85s ease-out;z-index:2}.race-runner .race-animal{font-size:29px;width:36px;height:36px}.race-crown{position:absolute;right:3px;top:-9px;color:#dcb356;font-size:15px}.race-finish{position:absolute;right:7px;top:4px;height:21px;width:9px;opacity:.36;background:repeating-conic-gradient(#756285 0% 25%,transparent 0% 50%) 0 0/6px 6px;border-radius:2px}.race-pending{display:block;font-size:9px;color:#9a8b9f;margin-top:5px}.race-empty{padding:12px;font-size:11px;line-height:1.7;color:#918299;background:#f6f1fc;border-radius:12px}.race-empty button{display:block;margin-top:8px}
.race-self{display:flex;gap:8px;align-items:center;border-radius:11px;padding:8px 10px;background:#eeebfb;margin-top:9px}.race-self .race-animal{font-size:24px;width:27px;height:27px}.race-self strong{font-size:11px;color:#6a5190}.race-self p{font-size:10px;color:#8b769e;margin:3px 0 0;line-height:1.4}.race-friendly{text-align:center;color:#8c735c;font-size:10px;background:#faf3e5;border-radius:10px;padding:9px;margin-top:10px}.race-friendly small{display:block;font-size:9px;color:#a29683;margin-top:4px}
.race-rules{margin-top:10px;border-top:1px solid #eee7f5;padding-top:8px;font-size:10px;color:#93829e}.race-rules summary{cursor:pointer;font-weight:600}.race-rules p{line-height:1.65;font-size:10px;margin-top:7px}.race-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}.race-footer small{font-size:8px;color:#a498ae}.race-footer button{font-size:10px;color:#7855a7;padding:4px 1px;font-weight:650}.race-preview-link{display:block;text-decoration:underline;text-underline-offset:3px;font-size:9px;color:#a18ca7;margin:6px auto 0;padding:5px}.race-off{border:1px dashed #d4c7e2;padding:15px;border-radius:15px;background:#f7f3fc}.race-off h2{font-size:15px;margin:6px 0}.race-off p{font-size:11px;line-height:1.6;color:#8d8297}.race-off .btn{margin-top:9px}
.race-full-page{max-width:820px;margin:0 auto}.race-expanded .race-header{padding:24px}.race-expanded .race-header h2{font-size:28px}.race-expanded .race-kicker{font-size:10px}.race-expanded .race-header p{font-size:12px}.race-expanded .race-content{padding:18px}.race-expanded .race-periods button{font-size:12px;min-height:35px}.race-expanded .race-metrics button{font-size:12px;min-height:36px}.race-expanded .race-lane{padding:12px 15px}.race-expanded .race-lane-label{font-size:13px}.race-expanded .race-lane-label>b{font-size:12px}.race-expanded .race-track{height:34px}.race-expanded .race-runner .race-animal{font-size:36px;height:42px;width:42px}.race-expanded .race-podium{gap:35px;padding:16px 0}.race-expanded .race-winner .race-animal{height:56px;width:56px;font-size:39px}.race-expanded .place-1 .race-animal{height:66px;width:66px;font-size:46px}.race-expanded .race-medal{top:46px}.race-expanded .place-1 .race-medal{top:56px}.race-expanded .race-winner strong{font-size:13px}.race-expanded .race-winner small{font-size:11px}.race-expanded .race-section-label{font-size:13px}.race-config-metrics{display:flex;gap:15px;flex-wrap:wrap}.race-profile-table select{min-width:140px}
.race-card button:focus-visible{outline:2px solid #8664bc;outline-offset:3px}.race-card button:disabled{opacity:.6;cursor:wait}.race-no-motion *{transition:none!important;animation:none!important}
@keyframes raceFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}.race-card:not(.race-no-motion) .place-1 .race-animal{animation:raceFloat 3.6s ease-in-out infinite}
@media(min-width:1800px){#right-rail.race-ready{height:calc(100vh - 155px);max-height:calc(100vh - 155px)}}
@media(max-width:1400px) and (min-width:1101px){.race-header{padding:12px 10px}.race-header h2{font-size:17px}.race-head-actions button{width:22px}.race-content{padding:9px}.race-metrics button{font-size:9px}.race-metrics svg{display:none}.race-periods button{font-size:9px}.race-lane-label{font-size:10px}.race-lane-label>b{font-size:9px}.race-winner strong{font-size:10px}}
@media(max-width:1100px){#right-rail.race-ready{display:none}.race-full-page{max-width:700px}}
@media(max-width:600px){.race-expanded .race-content{padding:12px}.race-expanded .race-header{padding:18px}.race-expanded .race-header h2{font-size:24px}.race-expanded .race-podium{gap:15px}.race-expanded .race-lane-label{font-size:12px}.race-config-metrics{display:grid;gap:10px}.race-expanded .race-periods button{font-size:10px}.race-expanded .race-metrics button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.race-card *{animation:none!important;transition:none!important}}

.focus-management #right-rail.race-ready{display:none}

/* The expanded race is its own workspace, never a duplicate beside the rail. */
.race-page .workspace{display:block;max-width:1120px;margin:0 auto}
.race-page #left-rail,.race-page #right-rail,.race-page #right-rail.race-ready{display:none}
.race-day-filter{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0;color:#61758c;font-size:11px}.race-day-filter input{border:1px solid #dce5ed;border-radius:8px;background:#fff;padding:6px;color:inherit;font:inherit}.race-day-filter small{flex-basis:100%;font-size:10px}
.race-talk-filter>label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.race-talk-filter input[type=number]{width:86px}.race-today{border:1px solid #dce5ed;border-radius:8px;background:#f7fbff;padding:7px 10px;color:#426485;font:inherit;cursor:pointer}.race-today:hover,.race-today:focus-visible{background:#eaf4fc;border-color:#8db8dc}.race-talk-filter small{line-height:1.5}
