*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
html,body{margin:0;height:100%;overflow:hidden;background:#8fe0ff;font-family:"Avenir Next Rounded","Trebuchet MS",-apple-system,sans-serif;font-weight:900;color:#fff;touch-action:none}
#c{position:fixed;inset:0;width:100%;height:100%;display:block}
.hide{display:none!important}
#hud{position:fixed;top:max(10px,env(safe-area-inset-top));left:10px;right:10px;display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none}
.card{background:linear-gradient(160deg,#ff7a18,#ff3d6e);border:3px solid #fff;border-radius:18px;padding:6px 12px;text-align:center;box-shadow:0 4px 0 rgba(0,0,0,.25);text-shadow:0 2px 0 rgba(0,0,0,.25)}
.lapc{min-width:74px}.lbl{font-size:11px;letter-spacing:2px;opacity:.9}
#lap{font-size:26px;line-height:1}
.timec{background:linear-gradient(160deg,#2b8cff,#6a4dff);margin-top:0}
#time{font-size:28px;font-variant-numeric:tabular-nums;line-height:1.1}
#best{font-size:12px;opacity:.95;letter-spacing:1px}
.rightcol{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.posc{background:linear-gradient(160deg,#ffd43b,#ff9f1a);font-size:26px;min-width:74px}
#mini{width:84px;height:84px;background:rgba(0,40,80,.35);border:3px solid #fff;border-radius:16px}
.snd{position:fixed;right:10px;top:calc(max(10px,env(safe-area-inset-top)) + 160px);width:44px;height:44px;border-radius:14px;border:3px solid #fff;background:rgba(0,40,80,.45);font-size:20px;z-index:5}
#msg{position:fixed;left:0;right:0;top:26%;text-align:center;font-size:84px;pointer-events:none;text-shadow:0 6px 0 rgba(0,0,0,.3),0 0 20px rgba(255,120,0,.8);color:#fff;z-index:4}
#msg.small{font-size:34px;top:24%}
#msg.pop{animation:pop .7s ease-out}
@keyframes pop{0%{transform:scale(.3);opacity:0}30%{transform:scale(1.25);opacity:1}100%{transform:scale(1);opacity:1}}
#speed{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 190px);font-size:20px;background:rgba(0,0,0,.35);border-radius:12px;padding:2px 12px;pointer-events:none}
#pad{position:fixed;left:0;right:0;bottom:0;padding:0 14px calc(env(safe-area-inset-bottom) + 16px);display:flex;justify-content:space-between;align-items:flex-end;pointer-events:none}
.steer,.pedals{display:flex;gap:12px;align-items:flex-end;pointer-events:auto}
.pbtn{border:4px solid #fff;color:#fff;font:inherit;font-size:34px;border-radius:26px;width:94px;height:104px;background:linear-gradient(160deg,#2b8cff,#6a4dff);box-shadow:0 6px 0 rgba(0,0,0,.3);touch-action:none;opacity:.88}
.pbtn.on{transform:translateY(4px);box-shadow:0 2px 0 rgba(0,0,0,.3);opacity:1;filter:brightness(1.2)}
.gas{width:128px;height:128px;border-radius:50%;font-size:30px;background:linear-gradient(160deg,#37d67a,#0fa958)}
.brake{width:76px;height:76px;border-radius:22px;font-size:13px;background:linear-gradient(160deg,#ff5a5f,#d7263d)}
.sheet{position:fixed;left:0;right:0;bottom:0;padding:16px 18px calc(env(safe-area-inset-bottom) + 18px);background:linear-gradient(180deg,rgba(255,255,255,0),rgba(0,90,140,.55) 22%,rgba(0,60,110,.9));text-align:center;z-index:6}
.logo{font-size:36px;letter-spacing:1px;text-shadow:0 4px 0 #ff3d6e,0 8px 0 rgba(0,0,0,.25);margin-bottom:8px;color:#ffe45e}
.who{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-bottom:8px;font-size:14px}
.chip{background:rgba(255,255,255,.22);border:2px solid #fff;border-radius:99px;padding:3px 10px}
.pick{display:flex;align-items:center;justify-content:center;gap:12px;margin:6px 0}
.pick button{width:54px;height:54px;border-radius:16px;border:3px solid #fff;background:linear-gradient(160deg,#ffd43b,#ff9f1a);color:#fff;font:inherit;font-size:34px;line-height:1;box-shadow:0 4px 0 rgba(0,0,0,.25)}
#kname{min-width:150px;font-size:26px;background:rgba(255,255,255,.2);border-radius:16px;padding:8px}
.bestm{font-size:14px;min-height:18px;margin-bottom:6px;color:#bff}
.big{display:block;width:100%;max-width:360px;margin:6px auto;border:4px solid #fff;border-radius:22px;padding:16px;font:inherit;font-size:26px;color:#fff;background:linear-gradient(160deg,#37d67a,#0fa958);box-shadow:0 6px 0 rgba(0,0,0,.3)}
.big:disabled{background:linear-gradient(160deg,#8a9bb0,#667a90);opacity:.85}
.big.alt{background:linear-gradient(160deg,#2b8cff,#6a4dff);font-size:18px;padding:11px}
.hint{font-size:12px;opacity:.85;margin-top:6px;line-height:1.4}
.modal{position:fixed;left:14px;right:14px;top:max(70px,12%);margin:auto;max-width:400px;background:linear-gradient(180deg,rgba(255,120,30,.96),rgba(255,50,110,.96));border:4px solid #fff;border-radius:28px;padding:16px;text-align:center;z-index:7;box-shadow:0 10px 0 rgba(0,0,0,.25);max-height:76%;overflow:auto}
.modal h2{margin:0 0 8px;font-size:30px;text-shadow:0 3px 0 rgba(0,0,0,.25)}
.modal ol{list-style:none;margin:0 0 10px;padding:0}
.modal li{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.2);border-radius:14px;padding:7px 10px;margin:5px 0;text-align:left;font-size:17px}
.modal li.me{background:rgba(255,255,255,.42);outline:3px solid #ffe45e}
.modal li b{width:34px;font-size:22px}
.modal li .n{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.modal li small{display:block;font-size:11px;opacity:.9}
.modal li .t{text-align:right;font-variant-numeric:tabular-nums}
#load{position:fixed;inset:0;background:#8fe0ff;display:flex;align-items:center;justify-content:center;font-size:28px;z-index:20;color:#fff;text-shadow:0 3px 0 rgba(0,0,0,.2)}
@media (min-width:700px){.pbtn{opacity:.6}}
/* Dar telefonlar (≤420 px): düğmeler sığsın (ilk sürümde GAS sağdan taşıyordu) */
@media (max-width:420px){.steer,.pedals{gap:8px}.pbtn{width:72px;height:84px;font-size:28px}.gas{width:104px;height:104px;font-size:24px}.brake{width:64px;height:64px;font-size:11px}#speed{bottom:calc(env(safe-area-inset-bottom) + 150px)}}
/* Bilgisayarda (fare/touchpad) yarış sırasında tuş ipucu; dokunmatik telefonda görünmez */
#keyhint{display:none}
@media (hover:hover) and (pointer:fine){#pad:not(.hide) ~ #keyhint{display:block;position:fixed;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 122px);font-size:12px;color:#fff;background:rgba(0,0,0,.45);border-radius:10px;padding:4px 10px;white-space:nowrap;pointer-events:none;z-index:3}}
