@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');
:root{font-family:'Noto Sans KR',Arial,sans-serif;color:#102e47;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#b7def0}button{font:inherit;cursor:pointer;border:0;color:inherit}button:focus-visible{outline:3px solid #fcad25;outline-offset:4px}button:active{transform:translateY(2px)}[hidden]{display:none!important}#world{position:fixed;inset:0;width:100%;height:100%;display:block}#lobby{position:fixed;inset:0;background:linear-gradient(100deg,transparent 25%,#eef6fac9 53%,#eef6fa 75%);display:flex;flex-direction:column;padding:32px 4vw 20px;gap:28px}header{display:flex;justify-content:space-between;align-items:center;height:68px;flex-shrink:0}.logo{font:900 italic 43px/.85 'Barlow Condensed',Arial,sans-serif;letter-spacing:-1px;color:#153653;text-shadow:0 2px white;position:relative;border-left:8px solid #ffb925;padding-left:14px}.logo span{color:#087ac6}.logo b{font-size:24px;background:#ffbe2a;color:#153653;padding:3px 9px;margin-left:8px;vertical-align:middle;text-shadow:none}.header-right{font:700 14px 'Barlow Condensed',sans-serif;letter-spacing:2px;color:#5f7b90}.header-right span{color:#f2ac12;margin:0 20px}.lobby-grid{display:grid;grid-template-columns:46% 54%;gap:0;flex:1;min-height:0}.garage{position:relative;display:flex;flex-direction:column;padding-right:35px}.garage-tabs{display:flex;gap:8px}.garage-tabs button{padding:12px 33px;background:#ffffffe8;border:1px solid #b2cfdf;border-radius:6px;box-shadow:0 3px 0 #bbd4e1;font-size:16px;font-weight:800}.garage-tabs button:hover{background:#dff4ff;border-color:#1294d8}.garage-title{margin-top:38px}.garage-title>span,.eyebrow{font:700 14px 'Barlow Condensed',sans-serif;letter-spacing:3px;color:#007bb8}.garage-title h1{font:900 italic clamp(28px,3.5vw,52px) 'Barlow Condensed',sans-serif;margin:4px 0;letter-spacing:-1px}.garage-labels{margin-top:auto;display:flex;gap:18px;margin-bottom:24px}.garage-labels>div{min-width:140px;padding:13px 17px;border-left:3px solid #0089d2;background:linear-gradient(90deg,#ffffffe6,#ffffff70);border-radius:0 5px 5px 0}.garage-labels small{display:block;font:600 12px 'Barlow Condensed';letter-spacing:1.5px;color:#668699}.garage-labels strong{display:block;font-size:21px;margin:3px 0}.garage-labels span{font-size:12px;color:#0079b7}.race-panel{background:#ffffffc9;border:1px solid #fff;border-radius:14px;padding:20px;box-shadow:0 15px 60px #35618415;display:flex;flex-direction:column;min-height:0}.modes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:#e4edf2;border-radius:7px;overflow:hidden;min-height:75px}.modes button{background:transparent;font-size:17px;font-weight:800;border-right:1px solid #cfdee6;padding:12px 3px}.modes small{display:block;font:600 12px 'Barlow Condensed';letter-spacing:1px;margin-top:5px;opacity:.65}.modes .selected{background:#087fc6;color:white;box-shadow:inset 0 -4px #00558e}.modes .unavailable{opacity:.4;cursor:default}.track-heading{display:flex;align-items:center;justify-content:space-between;margin:19px 0 12px}.track-heading h2{font-size:18px;margin:0}.track-heading>span{font:600 14px 'Barlow Condensed';color:#6b8596}.tracks{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,minmax(100px,1fr));gap:12px;flex:1;min-height:230px}.track{padding:0;background:white;border-radius:7px;text-align:left;position:relative;overflow:hidden;display:flex;flex-direction:column;min-width:0}.track.selected{border:3px solid #088bd3;box-shadow:0 4px 14px #078bc526}.track canvas,.track>img{width:100%;height:calc(100% - 69px);min-height:45px;object-fit:cover;background:#8dcaf1}.track>div{padding:10px 9px;position:relative;background:white;min-height:65px}.track strong{display:block;font-size:clamp(12px,1.05vw,16px);white-space:nowrap;letter-spacing:-.6px}.track small{display:flex;justify-content:space-between;font-size:12px;margin-top:5px;color:#edaa1c}.track small span{color:#087fbb;font-size:11px}.track-tag{position:absolute;left:7px;top:7px;background:#15344fdc;color:white;padding:4px 7px;font:600 12px 'Barlow Condensed';letter-spacing:1px}.empty{background:#edf2f5;border:1px dashed #c7d7e1;border-radius:7px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#a7bdca;font-size:29px;gap:8px}.empty span{font-size:13px}.race-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:20px;gap:10px}.race-bottom p{font-size:13px;color:#6c8391;margin:0}.race-bottom b{padding:0 6px;color:#a7b7c0}#start{background:#ffbd2b;border-radius:5px;font-size:21px;font-weight:900;padding:16px 24px;box-shadow:0 4px 0 #dd9015;white-space:nowrap}#start:hover{background:#ffcd51}#start span{margin-left:20px}footer{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#4c7188;gap:20px}kbd{font:700 12px 'Noto Sans KR',sans-serif;padding:4px 8px;border:1px solid #a6c2d2;background:#ffffffaa;border-radius:4px;margin:0 7px 0 18px}kbd:first-child{margin-left:0}footer>span{font-size:11px;opacity:.7}#hud{position:fixed;inset:0;pointer-events:none;color:white;text-shadow:0 2px 3px #142f50}.boost-slots{position:absolute;left:30px;top:28px;display:flex;gap:12px}.slot{width:70px;height:74px;border:2px solid #b0f4ff;background:#10273d66;box-shadow:inset 0 0 10px #86e9ff66,0 0 8px #86e9ff77;transform:skew(-3deg);border-radius:2px;display:grid;place-items:center}.slot img{width:53px;height:59px;object-fit:contain;filter:drop-shadow(0 0 5px #f8fbff)}.boost-slots>span{position:absolute;top:84px;left:0;font:600 13px 'Barlow Condensed';letter-spacing:2px;color:#e0faff}.race-stats{position:absolute;right:80px;top:27px;display:flex;gap:32px}.race-stats small{display:block;letter-spacing:2px;font:600 12px 'Barlow Condensed';color:#d9f7ff}.race-stats strong{font:700 italic 41px 'Barlow Condensed';display:block}.race-stats em{font:500 23px 'Barlow Condensed';opacity:.7;margin-left:6px}#time{font-size:32px;margin-top:7px;min-width:152px}#ranking{position:absolute;top:159px;left:30px;font-size:13px;line-height:2.1}#ranking div{padding:0 13px;background:#193d4d6b;border-radius:3px;margin-bottom:3px;min-width:134px;display:flex;gap:13px}#ranking .me{background:#027bc9ce;font-weight:800}#ranking i{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:7px}#minimap{position:absolute;right:22px;bottom:65px;width:210px;height:175px;background:#0d334443;border-radius:14px}.speedometer{position:absolute;width:300px;height:250px;bottom:-8px;left:50%;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse at 50% 54%,#07121ef0 0 39%,#1c2c3edb 49%,transparent 51%);filter:drop-shadow(0 2px 5px #021b3255)}.speedometer svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.gauge-base{fill:none;stroke:#b9cbdc;stroke-width:15;stroke-linecap:butt}.inner-ring{fill:none;stroke:#3c5366;stroke-width:5}#gaugeFill{fill:none;stroke:#24d8ff;stroke-width:11;stroke-dasharray:0 100;filter:drop-shadow(0 0 5px #00d5ff);transition:stroke-dasharray .08s}.speed-number{position:absolute;top:70px;left:0;width:100%;text-align:center}.speed-number strong{display:block;font:500 85px/.95 'Barlow Condensed','Arial Narrow',sans-serif;letter-spacing:-2px}.speed-number small{font:500 italic 18px 'Barlow Condensed';color:#98abbd;display:block;margin-top:9px}.n2o,.xmark{position:absolute;bottom:39px;font:500 italic 28px 'Barlow Condensed';color:#e7f2fa}.n2o{left:-20px}.xmark{right:-8px;font-size:46px}#driftLabel{position:absolute;width:100%;bottom:18px;text-align:center;font:600 12px 'Barlow Condensed';letter-spacing:2px;color:#aac2d3}.drifting .speed-number strong,.boosting .speed-number strong{color:#40e2ff;text-shadow:0 0 15px #00c3ff}.drifting #driftLabel{color:#59ecff}.boosting .speedometer{filter:drop-shadow(0 0 24px #00afff)}#countdown{position:absolute;inset:0;display:grid;place-items:center;font:900 italic 140px 'Barlow Condensed';color:#ffcc34;-webkit-text-stroke:3px white;text-shadow:0 8px 0 #16417b;pointer-events:none}#notice{position:absolute;left:50%;top:25%;transform:translateX(-50%);font-size:23px;font-weight:900;color:#fff0a9;white-space:nowrap}#pause{pointer-events:auto;position:absolute;right:24px;top:30px;background:#153e6499;border:1px solid #ffffff70;color:white;border-radius:5px;padding:10px;font-size:20px}#pause span{display:block;font-size:10px;margin-top:3px}.race-help{position:absolute;left:23px;bottom:18px;font-size:11px;color:#ecf7ffbf}dialog{border:1px solid #c3e4f4;border-radius:14px;padding:34px;background:#f4faff;color:#15344f;max-width:90vw;min-width:380px;box-shadow:0 30px 100px #062e6477}dialog::backdrop{background:#04244195;backdrop-filter:blur(7px)}dialog h2{font-size:30px;margin:8px 0 26px}dialog button{background:#0788ce;color:white;padding:13px 20px;border-radius:5px;font-weight:800;margin:5px 5px 0 0}dialog button.toLobby{background:#ddebf3;color:#365f78}.close{position:absolute;right:15px;top:10px;background:transparent;color:#4c708b;font-size:28px;padding:0 6px}.owned-card{border:2px solid #158bd3;border-radius:9px;background:white;padding:20px;display:flex;flex-direction:column;align-items:center;min-width:290px}.owned-card img{width:190px;height:180px;object-fit:contain;border-radius:5px}.owned-card h3{margin:16px 0 0;font-size:23px}.owned-card p{font-size:13px;color:#6b8699}.owned-card button{width:100%}#resultTime{font:700 46px 'Barlow Condensed';color:#0788ce;margin-bottom:15px}#resultList{max-height:250px;overflow:auto;margin-bottom:18px;font-size:14px}#resultList>div{display:flex;justify-content:space-between;padding:7px 10px;border-bottom:1px solid #d6e8f2;gap:50px}#touch{display:none}#loadError{position:fixed;top:40%;left:15%;right:15%;background:white;padding:40px;z-index:10}
@media(min-width:1500px){#lobby{padding:40px 5vw 25px}.race-panel{padding:26px}.tracks{gap:16px}.garage-title{margin-top:50px}.track>div{padding:14px}.track strong{font-size:17px}.modes{min-height:85px}.race-bottom{margin-top:25px}}@media(max-width:1000px){#lobby{padding:16px 20px 14px;gap:15px}.lobby-grid{grid-template-columns:40% 60%}.logo{font-size:34px}.header-right{font-size:12px}.garage-title h1{font-size:31px}.garage-labels{gap:8px;flex-wrap:wrap;margin-bottom:8px}.garage-labels>div{min-width:115px;padding:8px}.garage-labels strong{font-size:17px}.garage-tabs button{padding:10px 22px}.race-panel{padding:14px}.modes button{font-size:15px}.tracks{gap:8px}.track strong{font-size:12px}.track small span{display:none}#start{font-size:18px;padding:12px 15px}.race-bottom p{font-size:11px}.race-bottom b{padding:0 2px}footer>span{display:none}.race-help{max-width:30%;line-height:1.8}.speedometer{width:240px;height:200px}.speed-number{top:57px}.speed-number strong{font-size:65px}.speed-number small{font-size:15px}.n2o{bottom:28px}.xmark{bottom:26px}#driftLabel{bottom:12px}.race-stats{gap:18px}.race-stats strong{font-size:32px}#time{font-size:25px}.slot{width:55px;height:61px}.slot img{width:44px;height:50px}.boost-slots>span{top:69px}}
@media(max-width:650px) and (orientation:portrait){body:has(#lobby:not([hidden])){overflow:auto}#lobby{position:absolute;min-height:100svh;height:auto;background:linear-gradient(180deg,transparent 25%,#eaf6ff 48%);gap:14px}header{height:50px}.header-right{display:none}.lobby-grid{display:flex;flex-direction:column}.garage{height:330px;padding:0}.garage-title{margin-top:18px}.garage-title h1{font-size:30px}.garage-labels{margin-bottom:12px;justify-content:space-between}.garage-labels>div{min-width:130px}.race-panel{min-height:415px}.tracks{min-height:215px}.track canvas,.track>img{min-height:36px}.track strong{font-size:11px}.track>div{padding:7px 5px;min-height:52px}.modes{min-height:60px}.modes button{font-size:14px}.modes small{font-size:10px}.track-heading{margin:15px 0 10px}.race-bottom{margin-top:15px}footer{font-size:10px;gap:0;padding-bottom:10px}kbd{font-size:10px;padding:3px 4px;margin-left:7px}.race-stats{top:115px;right:15px;gap:12px}.race-stats strong{font-size:28px}#time{font-size:21px;min-width:110px}#ranking{top:190px;left:13px;font-size:11px}#ranking div{min-width:95px;padding:0 7px}#minimap{right:8px;bottom:190px;width:135px;height:112px}.boost-slots{left:15px;top:22px}.speedometer{bottom:65px}.race-help{display:none}dialog{min-width:0;width:90vw;padding:25px}.owned-card{min-width:0}.garage-labels small{font-size:10px}}
@media(pointer:coarse){#touch{display:flex;position:absolute;bottom:15px;width:100%;padding:0 15px;gap:7px;justify-content:space-between;pointer-events:auto}#touch button{background:#13355399;border:1px solid #ffffff80;color:white;width:52px;height:49px;border-radius:9px;touch-action:none;font-weight:800;font-size:13px}#touch button:active{background:#0f9be4}#touch button:nth-child(3){margin-left:auto}#touch button:nth-child(5){margin-left:auto}.race-help{display:none}}

#wind{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}

#collection{width:min(1400px,96vw);max-width:96vw;max-height:90svh;overflow:auto;padding:28px}#collection h2{margin-bottom:15px}#statLegend{padding:12px 16px;margin-bottom:16px;background:#e0eef8;border-radius:8px;font-size:14px}#statLegend p{margin:5px 0 0;color:#537187}#collectionGrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.collection-card{margin:0;padding:0 0 14px!important;background:white;color:#193b52;border:2px solid #c4dbe9;overflow:hidden;display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0}.collection-card img{width:100%;aspect-ratio:4/3;object-fit:cover}.collection-card strong{font-size:18px}.collection-card.equipped{border-color:#0796dc;box-shadow:0 0 0 2px #0796dc30}.card-stats{font-size:15px;font-variant-numeric:tabular-nums;color:#355e75}.equip-state{font-size:14px;color:#057fbd}.collection-card.equipped .equip-state{font-weight:900}#garageStats{font-size:14px;letter-spacing:0;color:#205574;margin:6px 0}@media(max-width:650px){#collectionGrid{grid-template-columns:repeat(2,minmax(0,1fr))}#collection{padding:24px 14px}.collection-card strong{font-size:16px}.card-stats{font-size:14px}}

/* Requested kart tiers: color covers both the 3D backdrop and selection card. */
.collection-card[data-rarity="common"]{background:#fff;color:#172534}
.collection-card[data-rarity="rare"]{background:#b989ed;color:#211033}
.collection-card[data-rarity="legend"]{background:#ffda45;color:#342300}
.collection-card[data-rarity="unique"]{background:#f36368;color:#33090e}
.collection-card[data-rarity] .card-stats,.collection-card[data-rarity] .equip-state{color:inherit}
.collection-card[data-rarity] strong{padding:0 8px;line-height:1.35;text-align:center}
.rarity-label{font-size:14px;font-weight:800;padding:3px 12px;border-radius:20px;background:#ffffffa6;color:#182937}
.collection-card[data-rarity].equipped{border-color:#152a44;box-shadow:0 0 0 2px #ffffff,0 0 0 4px #152a44}

/* Show the courtyard behind the existing menu controls. */
#lobby{background:transparent}

.player-profile{display:flex;align-items:center;gap:9px;max-width:42%;padding:5px 9px 5px 5px;background:#f4faffed;border:1px solid #aacbde;border-radius:7px;box-shadow:0 3px 10px #102e4720}.player-profile button{padding:0;background:transparent}#profileAvatar{width:44px;height:44px;flex-shrink:0;border:2px solid #1b8ec6;border-radius:4px;overflow:hidden}#profileImage{display:block;width:100%;height:100%;object-fit:cover}#profileNickname{font-size:16px;font-weight:800;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;min-height:44px;min-width:0}.profile-dialog{min-width:0;width:min(600px,92vw)}#profileAvatarGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}#profileAvatarGrid button{margin:0;padding:6px;background:white;color:#17334b;border:3px solid transparent;min-width:0}#profileAvatarGrid button[aria-pressed="true"]{border-color:#078bc5}#profileAvatarGrid img{width:100%;height:auto;aspect-ratio:1;display:block;border-radius:4px}#profileAvatarGrid span{display:block;font-size:14px;margin-top:8px}#profileNameDialog{width:min(420px,92vw)}#profileNameForm label{display:block;font-size:16px;margin-bottom:8px}#profileNicknameInput{width:100%;font:inherit;font-size:18px;padding:12px;border:1px solid #94b3c8;border-radius:6px}.profile-name-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}#profileNameCancel{background:#ddebf3;color:#365f78}@media(max-width:650px){.player-profile{max-width:45%;gap:5px;padding:3px 6px 3px 3px}#profileAvatar{width:36px;height:36px}#profileNickname{font-size:14px;min-height:36px}#profileAvatarGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.collection-card[data-generation="V1"]{background:#ff982e;color:#38200a}

.tracks{overflow-y:auto;grid-template-rows:none;grid-auto-rows:minmax(120px,1fr);align-content:start;scrollbar-width:thin;padding:3px}

/* License selection follows the original game tier colors. */
.license-badge{display:inline-block;font-size:24px;font-weight:1000;font-style:italic;line-height:1.3;color:var(--license-color,#ffd638);text-shadow:-1px -1px #192734,1px -1px #192734,-1px 1px #192734,2px 2px #192734;white-space:nowrap}.license-beginner{--license-color:#ffd638}.license-rookie{--license-color:#92ef30}.license-l3{--license-color:#54c8ff}.license-l2{--license-color:#ff554d}.license-l1{--license-color:#ba82ff}.license-pro{--license-color:#8de9ef}.mp-seat-head .license-badge{font-size:22px}.mp-seat-head{gap:6px;flex-wrap:wrap}#licenseDialog{width:min(860px,94vw);max-height:90dvh;overflow:auto;padding:28px;background:linear-gradient(135deg,#e8f5fd,#bbd4e9);border:3px solid #6287a1}#licenseDialog h2{margin-top:0}.license-layout{display:grid;grid-template-columns:240px 1fr;gap:24px}#licenseRanks{display:flex;flex-direction:column;gap:14px}.license-rank{min-height:64px;border:3px solid #3b5060;border-radius:8px;transform:skew(-8deg);background:linear-gradient(170deg,#fff,var(--license-color) 38%,#25334b);color:white;font-size:18px;font-weight:900;text-shadow:1px 2px #172c3d;box-shadow:0 4px #658398}.license-rank:disabled{cursor:default;opacity:.62}.license-details{background:#f4f9ff;border:2px solid #699aba;border-radius:10px;padding:18px}.license-details h3{margin:0;color:#236b9e}.license-details p{font-size:14px}.license-test{position:relative;width:100%;min-height:106px;display:flex;align-items:center;gap:14px;margin:12px 0;padding:8px;border:2px solid #6089a7;border-radius:8px;background:linear-gradient(#dfeaf5,#a2bdd4);text-align:left;color:#15334d;font-size:17px;font-weight:bold}.license-test img{width:100px;height:80px;object-fit:cover;border-radius:5px}.license-test small{display:block;font-size:14px;margin-top:8px}.license-clear{position:absolute;right:8px;bottom:8px;transform:rotate(-13deg);color:#e53648;border:3px solid;font-size:22px;background:#fffe}#licenseClaim{width:100%;padding:13px;background:linear-gradient(#56c7ff,#1263b6);border:2px solid #255981;border-radius:8px;color:white;font-size:19px;font-weight:900}#licenseClaim:disabled{opacity:.5;cursor:default}#licenseGoal{position:absolute;top:120px;left:50%;transform:translateX(-50%);padding:12px 24px;border-radius:10px;background:#173654de;color:#fff;font-size:26px;font-weight:900;white-space:nowrap}@media(max-width:650px){.license-layout{grid-template-columns:125px 1fr;gap:10px}#licenseDialog{padding:18px 12px}.license-rank{font-size:14px}.license-rank .license-badge{font-size:22px}.license-details{padding:10px}.license-test{display:block;font-size:15px}.license-test img{width:100%;height:65px}.license-clear{font-size:18px}#licenseGoal{font-size:20px;top:100px}}

.license-badge{height:42px;vertical-align:middle;background-image:url('license-icons.jpeg');background-size:294px 170px;background-repeat:no-repeat;color:transparent!important;text-shadow:none!important;font-size:0!important;border-radius:5px;flex-shrink:0}.license-badge.license-beginner{width:49px;background-position:-2px -53px}.license-badge.license-rookie{width:49px;background-position:-54px -53px}.license-badge.license-l3{width:42px;background-position:-108px -53px}.license-badge.license-l2{width:42px;background-position:-154px -53px}.license-badge.license-l1{width:39px;background-position:-199px -53px}.license-badge.license-pro{width:52px;background-position:-239px -53px}

.license-rank-state{display:block;font-size:12px;line-height:1.3;margin-top:2px}.license-rank[aria-pressed="true"]{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px #3287b9}.license-test{padding-bottom:28px}.license-clear{bottom:2px;font-size:18px}

#kartNotice{width:min(380px,88vw);padding:26px;text-align:center;border:2px solid #518bb0;border-radius:16px;background:#f1f8ff;color:#17334b}#kartNotice p{font-size:18px;font-weight:800;margin:8px 0 24px}#kartNotice button{min-width:130px;padding:12px 24px;background:#147ec2;border:0;border-radius:8px;color:white;font-size:16px;font-weight:800}#kartNotice::backdrop{background:#10233788}.collection-card.locked .equip-state{color:#a24524}
#countdown.failed{color:#9ba3aa;-webkit-text-stroke:2px #e7eaed;text-shadow:0 7px 0 #353b40;font-size:110px}
