.replay-kicker{display:block;font-size:.68rem;font-weight:800;letter-spacing:.13em;line-height:1.6;color:#547466}.replay-intro{margin-bottom:22px}.replay-intro h3,.replay-collection-heading h3{font-size:clamp(1.6rem,4vw,2.2rem);line-height:1.1;margin:8px 0 12px}.replay-intro p{font-size:.93rem;color:#546b64;line-height:1.6}.replay-goal{display:flex;align-items:center;gap:16px;text-align:left;width:100%;padding:18px 20px;background:#173d43;color:#fff9e8;border-radius:15px;margin:15px 0;pointer-events:auto}.replay-goal>span:nth-child(2){flex:1;min-width:0}.replay-goal small{display:block;font-size:.6rem;font-weight:800;letter-spacing:.12em;color:#eac475}.replay-goal strong{display:block;font-size:1.05rem;margin:4px 0}.replay-goal span span{display:block;font-size:.75rem;line-height:1.4;color:#e0e9dd}.replay-goal-icon{font-size:1.8rem;color:#efc46e}.replay-goal progress{display:block;width:100%;height:5px;accent-color:#edc36a;border:0;margin-top:9px}.replay-starter{font-size:.8rem;line-height:1.5;padding:12px 15px;background:#eee9cf;border-radius:10px;margin:14px 0 22px}.replay-choice-prompt{margin:15px 0}.replay-events{display:grid;gap:18px}.replay-event-card{padding:22px;border:1px solid #d2ddcd;border-top:4px solid var(--event-accent);border-radius:16px;background:#fffdf6}.replay-event-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.replay-event-number{font-size:.82rem;font-weight:800;color:#44665c;letter-spacing:.08em}.replay-duration{font-size:.74rem;padding:5px 10px;border-radius:16px;background:#ecf0e5}.replay-event-card h3{font-size:1.5rem;line-height:1.2;margin:0 0 10px}.replay-event-card>p{font-size:.85rem;line-height:1.6}.replay-medals{display:flex;flex-wrap:wrap;gap:6px 16px;margin:18px 0 12px;font-size:.72rem}.replay-medals>span{display:flex;align-items:center;gap:5px}.replay-medals strong{font-variant-numeric:tabular-nums}.replay-medals i{font-style:normal}.replay-medals .bronze i{color:#aa633d}.replay-medals .silver i{color:#5c7884}.replay-medals .gold i{color:#a77716}.replay-best{color:#305c50}.replay-payout{font-weight:700;color:#5b6036;margin:6px 0 16px}.replay-event-actions{display:flex;gap:9px}.replay-event-actions .btn{flex:1;font-size:.8rem}.replay-mode-note{display:grid;gap:10px;margin:20px 0;padding:17px;background:#eaf0e4;border-radius:12px;font-size:.8rem;line-height:1.55}.replay-callout{border-left:3px solid #b6752d;padding:12px 16px;background:#f6ecd4;line-height:1.5;margin:15px 0}.replay-result{text-align:center}.replay-medal-seal{width:76px;height:76px;display:grid;place-items:center;margin:18px auto 15px;border-radius:50%;background:#d7ead9;border:5px solid #b4d0b8;color:#205f4d;font-size:2rem;box-shadow:0 0 0 7px #edf2e5;animation:replay-medal-in .5s cubic-bezier(.2,.8,.2,1)}.replay-medal-seal.gold{background:#f4d27a;border-color:#c59739;color:#714709}.replay-medal-seal.silver{background:#dce6e8;border-color:#93a8b0;color:#324e5b}.replay-medal-seal.bronze{background:#e3b18d;border-color:#b67d55;color:#6f3922}.replay-result h3{font-size:1.9rem;margin:10px}.replay-result>p{font-size:.85rem;line-height:1.5}.replay-finish-time{display:block;font-size:clamp(2.8rem,10vw,4.3rem);line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.035em;margin:16px 0}.replay-improvement{color:#286552;margin:10px 0}.replay-next-target{padding:10px;background:#eff0df;border-radius:9px}.replay-rewards{display:flex;justify-content:center;gap:45px;margin:22px 0 8px}.replay-rewards strong{display:block;color:#72521a;font-size:1.9rem;font-variant-numeric:tabular-nums}.replay-rewards span{font-size:.73rem;color:#53695f}.replay-breakdown{color:#647168;font-size:.7rem!important;margin-bottom:22px}.replay-result-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:20px}.replay-unlock-notice{padding:12px;background:#e0eed9;border-radius:10px;margin:15px 0}.replay-collection-heading{display:flex;align-items:center;gap:15px;justify-content:space-between}.replay-collection-heading>div{min-width:0}.replay-collection-heading p{font-size:.8rem;color:#587065}.replay-balance{flex:none;font-size:1.6rem;color:#755117;font-variant-numeric:tabular-nums}.replay-balance small{display:block;font-size:.7rem;text-align:right}.replay-filters{display:flex;gap:7px;flex-wrap:wrap;margin:22px 0 17px}.replay-filters button{border:1px solid #ccdacb;border-radius:24px;padding:10px 15px;min-height:44px;background:#f4f5e9;color:#244f46;font-size:.8rem;font-weight:700}.replay-filters button[aria-pressed=true]{background:#224f47;color:#fff9e8;border-color:#224f47}.replay-collection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.replay-item{text-align:left;display:flex;flex-direction:column;gap:6px;min-width:0;padding:12px;border:1px solid #d3ddce;border-radius:13px;background:#fffdf5}.replay-item:hover{border-color:#407665}.replay-item-art{display:grid;place-items:center;height:88px;width:100%;border-radius:9px;background:linear-gradient(140deg,var(--item-color) -30%,#173d43 130%);font-size:2.3rem;color:#fff5df}.replay-item-type{text-transform:uppercase;letter-spacing:.09em;font-size:.58rem;color:#627169;margin-top:5px}.replay-item>strong{font-size:.93rem;line-height:1.25}.replay-item-status{font-size:.72rem;color:#5c6e62;line-height:1.4}.replay-item.owned .replay-item-status{color:#24634e;font-weight:700}.replay-item-pinned{font-size:.65rem;color:#795718}.replay-item-detail>h3{font-size:1.8rem;margin:8px 0 12px}.replay-item-detail>p{line-height:1.6;font-size:.87rem}.replay-preview-stage{margin-bottom:22px}.replay-item-requirement{display:flex;justify-content:space-between;gap:12px;margin:18px 0;padding:15px;background:#edf1e4;border-radius:12px;font-size:.8rem}.replay-item-requirement span{color:#5d6e61}.replay-item-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}.replay-kit-effect{padding:13px 16px;border-left:3px solid #a7bf87;color:#275247}.replay-starter-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.replay-starter-choices button{display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid #d2ddcd;border-radius:14px;text-align:left;background:#fffdf5}.replay-starter-choices strong{font-size:1rem;line-height:1.3}.replay-starter-choices button>span:last-child{font-size:.75rem;color:#527262}.replay-starter-swatch{display:block;width:100%;height:90px;border-radius:10px}.replay-milestones{display:grid;gap:12px;margin:20px 0}.replay-milestone{display:flex;align-items:center;gap:15px;border:1px solid #d4dfce;border-radius:13px;padding:17px}.replay-milestone>div{flex:1;min-width:0}.replay-milestone-mark{font-size:1.6rem;color:#6f855c}.replay-milestone h3{font-size:1rem;margin-bottom:7px}.replay-milestone p{font-size:.8rem;line-height:1.45}.replay-milestone strong,.replay-milestone small{font-size:.72rem;display:block;margin-top:8px}.replay-milestone progress{width:100%;height:5px;accent-color:#3b8067;margin-top:10px}.replay-milestone.earned{background:#eef3e5}.replay-garage-link{margin-bottom:20px}.replay-save-tools{display:grid;gap:12px}.replay-save-tools textarea{width:100%;min-height:135px;resize:vertical;padding:12px;border:1px solid #bfcfbc;border-radius:10px;font:12px ui-monospace,monospace;background:#fffef7;color:#183b32}.replay-save-tools label{font-weight:700}.replay-save-tools input[type=file]{max-width:100%}.replay-backup-summary{display:flex;gap:16px;flex-wrap:wrap;padding:16px;background:#e9efdf;border-radius:12px;font-size:.83rem}.replay-save-error{color:#8a342c;line-height:1.5}.driving-event-hud{position:fixed;top:82px;left:50%;transform:translateX(-50%);width:355px;max-width:calc(100vw - 32px);padding:13px 16px;border:1px solid #f8dda880;border-radius:16px;background:#12383ef2;color:#fff9e8;pointer-events:auto;box-shadow:0 6px 24px #163f3c20}.driving-event-top{display:flex;align-items:center;gap:12px}.driving-event-top>div{flex:1}.driving-event-top small{display:block;font-size:.66rem;color:#d1e0d4;margin-bottom:4px}.driving-event-top strong{font-size:1.6rem;font-variant-numeric:tabular-nums}.driving-event-top button{min-width:44px;min-height:44px;background:#ffffff15;color:#fff9e8;border-radius:10px}.driving-event-next{display:flex;justify-content:space-between;gap:12px;font-size:.82rem;margin-top:9px}.driving-event-hud p{font-size:.7rem;margin-top:6px;line-height:1.35;color:#d4e4d7}.driving-event-hud progress{display:block;width:100%;height:4px;margin-top:9px;accent-color:#edc36a}.driving-event-hud .event-split{color:#f4d685;min-height:1em}.has-driving-event #route-slot,.has-driving-event #interaction-slot{display:none}.replay-pinned-hud{position:fixed;left:20px;top:83px;width:220px;pointer-events:auto}.replay-pinned-hud .replay-goal{padding:12px 14px;margin:0;gap:8px}.replay-pinned-hud .replay-goal-icon{display:none}.replay-pinned-hud strong{font-size:.85rem}.replay-pinned-hud small{font-size:.53rem}.replay-pinned-hud span span{font-size:.66rem}.has-driving-event .replay-pinned-hud{top:auto;bottom:182px}.has-driving-event .road-chip{max-width:calc(100vw - 530px)}body:has(dialog[open]) .replay-pinned-hud,body:has(dialog[open]) .driving-event-hud,body:not(.playing) .replay-pinned-hud{display:none}.has-driving-event .map-boundary-notice{top:272px}.replay-actions-row{display:flex;gap:9px;flex-wrap:wrap;margin:15px 0}.replay-kit-summary{font-size:.78rem;color:#386758;margin:12px 0;line-height:1.5}@keyframes replay-medal-in{from{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-width:760px),(pointer:coarse),(any-pointer:coarse){.replay-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.replay-event-card{padding:18px}.replay-event-actions{flex-direction:column}.replay-result-actions{grid-template-columns:1fr}.replay-starter-choices{grid-template-columns:1fr}.replay-starter-choices button{display:grid;grid-template-columns:80px 1fr;column-gap:15px}.replay-starter-swatch{height:72px;grid-row:span 2}.replay-starter-choices strong{align-self:end}.replay-starter-choices button>span:last-child{grid-column:2}.replay-milestone{flex-wrap:wrap}.replay-milestone .btn{margin-left:40px}.replay-collection-heading{align-items:flex-start}.replay-balance{font-size:1.3rem}.driving-event-hud{top:calc(107px + env(safe-area-inset-top));left:16px;transform:none;max-width:430px;width:calc(100vw - 32px)}.replay-pinned-hud{left:16px;top:auto;bottom:calc(86px + env(safe-area-inset-bottom));width:195px}.has-driving-event .replay-pinned-hud{display:none}.has-driving-event .minimap-wrap{display:none}.has-driving-event .road-chip{max-width:calc(100vw - 32px)}.has-driving-event .map-boundary-notice{top:calc(295px + env(safe-area-inset-top))}.has-nearby .replay-pinned-hud{display:none}.action-dock .dock-button{padding:10px 12px;font-size:.75rem}}
@media(max-height:550px) and (orientation:landscape){.driving-event-hud{top:73px;left:50%;transform:translateX(-50%);width:310px;max-width:calc(100vw - 300px);padding:10px 12px}.driving-event-top strong{font-size:1.15rem}.driving-event-hud [data-event-instruction]{display:none}.driving-event-hud p{font-size:.65rem}.driving-event-hud .event-split{min-height:0}.driving-event-next{font-size:.72rem}.replay-pinned-hud{display:none}.replay-starter-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.replay-starter-choices button{display:flex}.replay-starter-swatch{height:60px}.has-driving-event .map-boundary-notice{top:230px}}
@media(prefers-reduced-motion:reduce){.replay-medal-seal{animation:none}.replay-result *{scroll-behavior:auto}}

.replay-medal-seal.replay-still{animation:none}.replay-flying-coin{position:absolute;pointer-events:none;z-index:5;color:#c49831;font-size:18px;font-style:normal;text-shadow:0 1px #fff7c9}

@media(max-width:760px),(pointer:coarse),(any-pointer:coarse){.replay-pinned-hud{top:calc(107px + env(safe-area-inset-top));bottom:auto;width:210px}}
@media(max-height:550px) and (orientation:landscape){.driving-event-hud .event-next-medal{display:none}.driving-event-hud .event-split:empty{display:none}}

.replay-finish-car{position:relative;height:170px;background:radial-gradient(ellipse at center,#dee9cd,#f8f8e9 70%);border-radius:16px;margin:16px 0}.replay-finish-car canvas{display:block;width:100%;height:100%}.replay-finish-car .replay-medal-seal{position:absolute;top:12px;right:20px;width:58px;height:58px;font-size:1.5rem;margin:0}.replay-finish-car .fine-print{padding:40px 20px}@media(max-height:550px) and (orientation:landscape){.replay-finish-car{height:140px}}

.replay-result-hero{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:center;margin-top:14px}.replay-result-hero .replay-finish-car{height:205px;margin:0}.replay-time-summary h3{font-size:1.4rem}.replay-time-summary>p{font-size:.75rem;line-height:1.5}.replay-time-summary .replay-finish-time{font-size:3.2rem;margin:12px 0}.replay-result-actions{position:sticky;bottom:-32px;padding:12px 0;background:#fffcf2;z-index:1;border-top:1px solid #dce2cf}.replay-result .replay-rewards{margin-top:15px}.replay-result .replay-breakdown{margin-bottom:15px}@media(max-width:600px){.replay-result-hero{grid-template-columns:1fr;gap:8px}.replay-result-hero .replay-finish-car{height:145px}.replay-time-summary .replay-finish-time{font-size:2.7rem;margin:8px 0}.replay-result-actions{grid-template-columns:1fr 1fr;bottom:-24px;gap:7px}.replay-result-actions .btn{font-size:.76rem;padding:11px 8px;min-height:44px}}

.replay-result-actions{bottom:0}.replay-goal progress::-webkit-progress-bar{background:#ffffff30;border-radius:5px}.replay-goal progress::-webkit-progress-value{background:#edc36a;border-radius:5px}.driving-event-hud progress::-webkit-progress-value{background:#edc36a}

@media(max-height:550px) and (orientation:landscape){dialog:has(.replay-item-detail) .panel-head{padding:16px 24px}dialog:has(.replay-item-detail) .panel-head h2{font-size:1.5rem}.replay-preview-stage{height:170px;min-height:0}}
.replay-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
dialog:has(.replay-result) .panel-head{padding:16px 32px}dialog:has(.replay-result) .panel-head h2{font-size:1.5rem}dialog:has(.replay-result) .panel-body{padding:18px 32px}.replay-result-hero .replay-finish-car{height:150px}.replay-result .replay-goal{padding:10px 14px;margin:10px 0}.replay-result .replay-goal strong{font-size:.9rem;margin:3px 0}.replay-result .replay-goal progress{margin-top:5px}.replay-result .replay-rewards{margin-top:12px}.replay-result .replay-breakdown{margin-bottom:10px}@media(max-width:600px){dialog:has(.replay-result) .panel-head{padding:16px 20px}dialog:has(.replay-result) .panel-body{padding:18px 20px}.replay-result-hero .replay-finish-car{height:130px}}

/* Progress belongs to each medal, so collected targets remain visibly complete. */
.replay-medals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:22px 0 16px}
.replay-medals>.replay-medal{display:flex;flex-direction:column;gap:5px;padding:14px 5px 10px;border:1px solid #d8ddd4;border-radius:12px;background:#f0f1ea;position:relative;text-align:center}
.replay-medal-icon{display:grid;place-items:center;position:relative;width:48px;height:48px;border:4px solid #bac3bd;border-radius:50%;background:#dce0d9;box-shadow:0 0 0 3px #e9ece4;color:#84938c;font-size:1.3rem;margin:0 0 10px}
.replay-medal-icon::after{content:'';position:absolute;top:39px;left:7px;right:7px;height:14px;background:#bac3bd;clip-path:polygon(0 0,100% 0,100% 100%,50% 65%,0 100%)}
.replay-medals .replay-medal.locked .replay-medal-icon{color:#84938c}
.replay-medals .replay-medal.earned{background:#fffdf3;border-color:#c6d6c4}
.replay-medals .replay-medal.earned.bronze .replay-medal-icon{background:#e7bc97;border-color:#ab7249;color:#694025}
.replay-medals .replay-medal.earned.silver .replay-medal-icon{background:#e4edf0;border-color:#91a9b5;color:#385967}
.replay-medals .replay-medal.earned.gold .replay-medal-icon{background:#f8da85;border-color:#c19737;color:#735017}
.replay-medal.earned.bronze .replay-medal-icon::after{background:#ab7249}.replay-medal.earned.silver .replay-medal-icon::after{background:#91a9b5}.replay-medal.earned.gold .replay-medal-icon::after{background:#c19737}
.replay-medal-name{font-weight:800;font-size:.8rem}.replay-medal.earned .replay-medal-name{text-decoration:line-through;text-decoration-thickness:1px;text-decoration-color:#72927e}.replay-medal small{font-size:.63rem;color:#65766c}.replay-medal.earned small{color:#2d654e;font-weight:800}.replay-event-card.mastered{border-top-color:#ba913a}

/* Static car images show the purchased design; one clicked detail owns rotation. */
.replay-item-art.has-car,.replay-starter-art{position:relative;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at center,#e0e9dd,#f4f5ec);border-radius:10px;height:118px;width:100%}
.replay-item-art img,.replay-starter-art img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0;object-fit:contain}.replay-item-art.has-car{font-size:inherit}.replay-item-next{font-size:.7rem;font-weight:800;color:#356b55;margin-top:4px}
.replay-starter-art{height:148px}.replay-starter-art>span{font-size:.7rem;color:#637b6e}.replay-starter-choices button{padding:10px;gap:9px}.replay-starter-choices button>span:last-child{font-weight:800;color:#2c654f;line-height:1.4}.replay-starter-choices strong{font-size:.92rem}.replay-preview-stage{height:220px;min-height:0;margin-bottom:16px}.replay-preview-stage canvas{height:100%}.replay-item-actions>.primary{flex:1;min-width:180px}
.replay-kit-detail .replay-kit-effect{font-size:1.18rem;line-height:1.55;font-weight:750;margin:0;padding:0;border:0;color:#254f42}.replay-kit-detail .replay-kit-sharing{margin:12px 0 18px;color:#5c6e61;font-size:.86rem}.replay-kit-detail .replay-item-requirement{margin:18px 0 12px}.replay-kit-detail .fine-print{font-size:.77rem;line-height:1.5}.replay-kit-detail #item-test{margin-top:10px}
@media(max-width:760px),(pointer:coarse),(any-pointer:coarse){.replay-starter-choices button{display:grid;grid-template-columns:minmax(110px,42%) 1fr;column-gap:12px;row-gap:7px}.replay-starter-art{height:106px;grid-row:span 2}.replay-starter-choices strong{align-self:end}.replay-starter-choices button>span:last-child{align-self:start}.replay-item-art.has-car{height:106px}.replay-preview-stage{height:205px}.replay-item-requirement{flex-wrap:wrap}.replay-medals{gap:7px}.replay-medal-name{font-size:.74rem}}
@media(max-height:550px) and (orientation:landscape){.replay-starter-choices button{display:flex}.replay-starter-art{height:112px}.replay-preview-stage{height:165px}}
