:root{font-family:system-ui,-apple-system,sans-serif;color:#243e3b;background:#f5f5ed}*{box-sizing:border-box}body{margin:0}header,main,footer{max-width:1040px;margin:auto;padding:24px}header{padding-top:40px}header span{color:#38695e;font-weight:700}h1{font-size:clamp(28px,5vw,44px);margin:12px 0}h2{font-size:22px;margin:0 0 16px}p{line-height:1.8}.card{background:white;border:1px solid #e1e7dd;border-radius:22px;padding:24px;margin-bottom:20px;box-shadow:0 5px 20px #243e3b05}.buttons{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}button,.button{font:inherit;font-weight:700;min-height:48px;border-radius:12px;padding:12px 20px;border:2px solid #236e5d;background:#236e5d;color:white;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.secondary{background:#f4f8f4;color:#245c50;border-color:#d3e1d7}button:disabled{opacity:.4;cursor:default}button[aria-pressed=true]{outline:3px solid #e8b348;outline-offset:2px}.button input{position:absolute;width:1px;height:1px;opacity:0}.button:focus-within,button:focus-visible{outline:3px solid #e8b348;outline-offset:3px}.note,footer{font-size:14px;color:#586b65}#status{background:#eff6ed;padding:12px;border-radius:10px}.comparison{display:grid;grid-template-columns:1fr 1fr;gap:20px}figure{margin:0}figcaption{font-weight:700;margin-bottom:10px}.surface{min-height:160px;border:1px solid #dbe2da;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#f0f3ee}.checker{background-color:#fff;background-image:linear-gradient(45deg,#dde4df 25%,transparent 25%),linear-gradient(-45deg,#dde4df 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dde4df 75%),linear-gradient(-45deg,transparent 75%,#dde4df 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}canvas{display:block;width:100%;height:auto}#edited{touch-action:none;cursor:crosshair}input[type=range]{display:block;width:100%;margin:20px 0;accent-color:#236e5d;min-height:32px}.range-labels{display:flex;justify-content:space-between;font-size:14px}output{background:#eff6ed;padding:4px 10px;border-radius:8px;margin-left:10px}@media(max-width:600px){header,main,footer{padding:16px}.card{padding:18px}.comparison{grid-template-columns:1fr}.buttons>*{flex-grow:1}h2{font-size:20px}}

[hidden]{display:none!important}input[type=text]{display:block;font:inherit;font-size:20px;padding:14px;border:2px solid #bdcec5;border-radius:10px;width:min(100%,440px);margin-top:10px}.participants{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:18px;margin:24px 0}.participant{border:1px solid #dbe2da;border-radius:16px;overflow:hidden;padding:16px;min-width:0}.participant img{width:100%;height:200px;object-fit:contain}.participant h3{overflow-wrap:anywhere}.notice{padding:16px;background:#fff6dc;border-radius:12px}#registrationError{color:#a33030}#progress:focus,h2:focus{outline:none}

.race-call{font-size:clamp(22px,4vw,34px);font-weight:800;text-align:center;min-height:48px}.track-labels{display:flex;justify-content:space-between;padding-left:100px}.lane{display:flex;align-items:center;border-bottom:2px dashed #fff;min-height:110px;background:#e8c898;padding:8px 12px;gap:8px}.lane:nth-child(even){background:#efd5ae}.lane-name{width:88px;flex-shrink:0;font-weight:700;overflow-wrap:anywhere;font-size:15px}.road{position:relative;flex:1;height:88px;border-left:3px solid white;border-right:5px dashed #426f58}.runner{position:absolute;left:0;bottom:2px;width:76px;height:76px;z-index:1}.runner img{width:100%;height:100%;object-fit:contain}.place{position:absolute;right:0;top:-5px;font-weight:800;background:white;border-radius:6px;padding:2px 6px;z-index:2}.place:empty{display:none}.champion{border:3px solid #e8b348;background:#fff9e9}#track{overflow:hidden;border-radius:14px}@media(max-width:500px){.lane{padding:8px 6px}.lane-name{width:60px;font-size:13px}.runner{width:58px;height:70px}.track-labels{padding-left:74px}.lane{min-height:100px}}@media(prefers-reduced-motion:reduce){.runner img{transform:none!important}}

.playing header{display:none}.playing main{padding-top:16px}.playing .card{margin-bottom:0}@media(orientation:landscape) and (max-height:600px){.playing main{padding:8px}.playing .card{padding:10px}.playing h2{font-size:18px;margin-bottom:4px}.playing .race-call{font-size:22px;margin:4px;min-height:28px}.playing .lane{min-height:0;padding:3px 8px}.playing .road{height:calc((100dvh - 125px)/4);min-height:38px}.playing .runner{height:calc((100dvh - 145px)/4);max-height:65px;min-height:30px;width:50px}.playing footer{display:none}}
