/* Marathon artwork and controls remain independent of run timing and records. */
body[data-screen="challenges"] header{position:fixed;inset:0 0 auto;max-width:none;height:90px;padding:8px 3.7%;z-index:31;background:transparent;border-bottom:1px solid #35647b;pointer-events:none}
body[data-screen="challenges"] header .brand{margin-left:190px;pointer-events:auto}
body[data-screen="challenges"] .brand-logo{width:140px;height:77px}
body[data-screen="challenges"] .prototype,body[data-screen="challenges"] #fullscreen{display:none}
body[data-screen="challenges"] .tools{pointer-events:auto;gap:16px}
body[data-screen="challenges"] .tools button{width:64px;height:64px;padding:16px;border:0;border-radius:0;background:transparent url(assets/lobby-v2/button-secondary.webp) center/100% 100% no-repeat}
body[data-screen="challenges"] .tools img{width:31px;height:31px}
.marathon-screen{position:fixed;inset:0;z-index:30;overflow-y:auto;padding:118px 3.7% 26px;background:#03101d;isolation:isolate;scrollbar-color:#409caf #03101d}
.marathon-hero{position:absolute;inset:0 0 auto;width:100%;height:420px;object-fit:cover;object-position:center top;z-index:-1;pointer-events:none}
.marathon-back{position:fixed;top:13px;left:3.7%;height:64px;width:155px;z-index:32;display:flex;align-items:center;gap:13px;justify-content:center;border:0;border-radius:0;padding:12px;background:transparent url(assets/lobby-v2/button-secondary.webp) center/100% 100% no-repeat;color:#fff2df;font:800 21px/1 'Roboto Slab',serif}
.marathon-back img{filter:invert(95%);width:27px;height:27px}
.marathon-intro{width:54%;height:285px;padding-left:3.8%}
.marathon-intro>p{font-size:17px;font-weight:800;letter-spacing:.23em;text-transform:uppercase;color:#41eff7;margin:8px 0 0}
.marathon-intro h1{font:900 clamp(55px,7.3vw,112px)/1.04 'Roboto Slab',serif;letter-spacing:-.065em;color:#ffedce;margin:0;text-shadow:0 3px 0 #837660,0 6px 14px #000}
.marathon-intro h2{font:800 clamp(21px,2vw,30px)/1.2 'Roboto Slab',serif;color:#95eef5;letter-spacing:-.045em;margin:5px 0 22px}
.marathon-tabs{display:flex;gap:10px;margin-left:-20px;max-width:660px}
.marathon-tabs button{display:block;flex:1;min-width:0;height:78px;padding:14px 22px;background:transparent url(assets/lobby-v2/button-secondary.webp) center/100% 100% no-repeat;border:0;border-radius:0;color:#bcd3ee;font:800 clamp(18px,1.85vw,28px)/1.1 'Roboto Slab',serif;white-space:nowrap}
.marathon-tabs [aria-selected="true"]{background-image:url(assets/lobby-v2/button-primary.webp);color:#071b29}
.marathon-layout{display:grid;grid-template-columns:minmax(0,1.23fr) minmax(0,1fr);align-items:start;gap:24px}
.marathon-courses{display:flex;flex-direction:column;gap:16px}
.marathon-course{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:stretch;gap:24px;width:100%;height:180px;text-align:left;border:2px solid #44617a;border-radius:14px;padding:0;background:#041726;box-shadow:inset 0 0 0 5px #05101b;transition:border-color .15s,filter .15s}
.marathon-course:hover{background:#041726;filter:brightness(1.1)}
.marathon-course[aria-pressed="true"]{border:3px solid #fff0c9;box-shadow:0 0 14px #53e9ff50,inset 0 0 0 4px #20394c}
.marathon-course-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1;pointer-events:none}
.marathon-number{display:flex;align-items:center;justify-content:center;flex:none;width:92px;border-right:1px solid #6dbac959;background:#031321d6;font:600 47px/1 'Roboto Slab',serif;color:#ffefd7}
.marathon-course-copy{display:flex;flex-direction:column;justify-content:flex-end;gap:6px;padding:65px 18px 14px 0;min-width:0;text-shadow:0 2px 4px #000,0 0 10px #000,0 0 20px #000}
.marathon-course strong{font:800 clamp(20px,1.9vw,29px)/1.12 'Roboto Slab',serif;letter-spacing:-.04em;color:#fff2df}
.marathon-course small{font-size:clamp(13px,1.25vw,18px);line-height:1.2;color:#c7f5ff;font-weight:500}
.marathon-detail{border:2px solid #2c536c;border-radius:15px;background:#031522e8;overflow:hidden;box-shadow:inset 0 0 0 5px #03101d}
.marathon-preview{display:block;width:100%;height:190px;object-fit:cover}
.marathon-detail-content{padding:13px 24px 14px}
.marathon-detail h2{font:800 clamp(24px,2.3vw,35px)/1.12 'Roboto Slab',serif;color:#fff1dc;letter-spacing:-.04em;margin:0 0 6px}
#marathon-type{color:#42e9f6;font-size:18px;margin:0 0 15px}
.marathon-record{display:flex;gap:13px;align-items:center;padding-bottom:13px;border-bottom:1px solid #4692a7}
.marathon-record>img{width:43px;height:43px;filter:invert(80%) sepia(15%) saturate(825%) hue-rotate(164deg)}
.marathon-record p{color:#59e4f3;font-size:15px;margin:0}.marathon-record span{display:block;color:#c1dbea;margin-top:3px;font-size:17px}
.marathon-play{display:flex;align-items:center;justify-content:center;gap:15px;width:calc(100% + 26px);margin:8px -13px 3px;min-height:101px;padding:16px 31px;border:0;border-radius:0;box-shadow:none;background:transparent url(assets/lobby-v2/button-primary.webp) center/100% 100% no-repeat;color:#051a25;font:900 clamp(18px,1.8vw,27px)/1.1 'Roboto Slab',serif;text-transform:uppercase;letter-spacing:-.04em}
.marathon-play img{width:38px;height:38px;flex:none}
.marathon-play:hover,.marathon-tabs button:hover,.marathon-back:hover{background-color:transparent;filter:brightness(1.1)}
.marathon-rules p{display:flex;align-items:center;gap:13px;font-size:14px;line-height:1.4;color:#d6edf5;margin:5px 0}
.marathon-rules img{width:23px;height:23px;flex:none;filter:invert(86%) sepia(14%) saturate(594%) hue-rotate(167deg)}
.marathon-local{border-top:1px solid #416179;padding-top:15px;margin:17px 0 0;font-size:12px;text-align:center;color:#b4cfdf}
.marathon-screen button:focus-visible{outline:3px solid #83faff;outline-offset:3px}
@media(min-width:1600px){.marathon-screen{padding-left:max(3.7%,calc((100vw - 1600px)/2));padding-right:max(3.7%,calc((100vw - 1600px)/2))}.marathon-intro h1{font-size:112px}}
@media(max-width:1100px) and (min-width:761px){.marathon-intro{padding-left:0;height:255px}.marathon-intro>p{font-size:14px}.marathon-intro h1{font-size:7.2vw}.marathon-tabs{margin-left:-12px}.marathon-tabs button{font-size:21px}.marathon-layout{gap:16px}.marathon-course{height:165px;gap:14px}.marathon-number{width:65px;font-size:37px}.marathon-detail-content{padding:14px}.marathon-preview{height:165px}.marathon-play{font-size:20px}.marathon-rules p{font-size:12px}}
@media(max-width:760px){
 body[data-screen="challenges"] header{height:70px;padding:6px 16px}body[data-screen="challenges"] header .brand{margin-left:81px}body[data-screen="challenges"] .brand-logo{width:99px;height:57px}body[data-screen="challenges"] .tools{gap:4px}body[data-screen="challenges"] .tools button{width:48px;height:48px;padding:11px}body[data-screen="challenges"] .tools img{width:24px;height:24px}
 .marathon-screen{padding:88px 16px max(110px,calc(100px + env(safe-area-inset-bottom)));}.marathon-back{left:9px;top:10px;width:78px;height:48px;padding:8px;gap:3px;font-size:13px}.marathon-back img{width:18px;height:18px}
 .marathon-hero{height:285px;object-position:70% top;opacity:.78}
 .marathon-intro{width:100%;height:auto;padding:0}.marathon-intro>p{font-size:11px;letter-spacing:.2em;margin:0 0 4px}.marathon-intro h1{font-size:clamp(40px,12vw,85px);letter-spacing:-.065em}.marathon-intro h2{font-size:18px;margin:5px 0 18px}.marathon-tabs{margin:0 -7px 12px;gap:2px;max-width:none}.marathon-tabs button{height:61px;font-size:18px;padding:10px 15px}
 .marathon-layout{display:flex;flex-direction:column;gap:17px}.marathon-courses{width:100%;gap:10px}.marathon-course{height:112px;gap:13px;border-radius:9px}.marathon-number{width:50px;font-size:30px}.marathon-course-copy{padding:26px 11px 11px 0;gap:4px}.marathon-course strong{font-size:19px}.marathon-course small{font-size:12px}.marathon-detail{width:100%;overflow:visible;scroll-margin-top:82px}.marathon-preview{border-radius:12px 12px 0 0}.marathon-preview{height:145px}.marathon-detail-content{padding:15px 18px}.marathon-detail h2{font-size:25px}#marathon-type{font-size:15px}.marathon-record p{font-size:13px}.marathon-record span{font-size:15px}.marathon-play{position:fixed;z-index:35;bottom:max(6px,env(safe-area-inset-bottom));left:16px;width:calc(100% - 32px);margin:0;min-height:85px;font-size:20px}.marathon-play img{width:31px;height:31px}.marathon-rules p{font-size:12px}.marathon-local{font-size:10px}
}
@media(prefers-reduced-motion:reduce){.marathon-course{transition:none}}

/* Keep the hero's subject above the course cards on desktop, including wide screens. */
@media(min-width:761px){
 .marathon-screen{--marathon-banner-height:clamp(380px,32vw,620px)}
 .marathon-hero{height:var(--marathon-banner-height);object-position:center 60%}
 .marathon-intro{height:calc(var(--marathon-banner-height) - 118px);min-height:285px}
}

/* Portrait videos retain their full composition on both screen orientations. */
.marathon-cinematic{z-index:100;background:#020915f5;display:flex;align-items:center;justify-content:center}
.marathon-cinematic .splash-art{width:min(94vw,calc(94dvh * 480 / 854));height:auto;aspect-ratio:480 / 854;max-height:94dvh;margin:0;flex:none}
.marathon-cinematic .splash-art video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.marathon-cinematic .splash-status{left:5%;right:5%;bottom:3%;min-height:0;background:none}
.marathon-cinematic .splash-status button{background:#041b2ee6;border-color:#82d9ee;color:#effbff;min-height:44px}

.marathon-cinematic.is-playing .splash-status{left:5%;right:5%;bottom:3%;background:none}
