/* Kathy 3.5 layout layer; core app, Supabase and import code unchanged. */
:root{--kk-ice:#87c8ea;--kk-bg:#071321;--kk-panel:#0b2035;--kk-line:#42647b}
body{background:radial-gradient(circle at 65% 0%,#173750 0%,#071421 42%,#06111d 100%);color:#edf5fb}
.shell{max-width:1440px!important;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:18px;row-gap:0;padding-left:clamp(16px,3vw,42px);padding-right:clamp(16px,3vw,42px)}
.shell>*{min-width:0;grid-column:1/-1}
.top{order:-10;margin-bottom:15px;padding:13px 18px;border:1px solid #57728877;border-radius:18px;background:linear-gradient(120deg,#0d2337f5,#071b2f);box-shadow:0 12px 32px #0006}
.top .mark{background:#153a55!important;color:#bde6ff!important;box-shadow:0 0 0 1px #64b3d478!important}
.top .eyebrow{color:#9ccae1}.top h1{font-size:clamp(23px,2.4vw,33px);letter-spacing:.015em}
.top .accountControls{gap:8px}.top .accountButton,.top .refreshButton{background:#112c42;border-color:#55748c;color:#d9effc}
#tellKathy.tellHeader{font-size:0!important;min-width:44px;width:44px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#173d5b!important;border:1px solid #81c6e6!important;color:#d8f5ff;box-shadow:0 0 0 2px #4e8caa30!important}
#tellKathy.tellHeader svg{width:20px;height:20px;stroke:#a8def9;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
#tellKathy.tellHeader:hover{background:#205675!important;box-shadow:0 0 0 4px #7cc6ec3b!important}
.hero{order:-9;min-height:210px!important;margin-bottom:17px!important;border-radius:22px;box-shadow:0 16px 35px #0007;background-position:center 47%;padding:27px 32px}
.hero h2{font-size:clamp(29px,3.1vw,43px)}.hero .stats{margin-top:12px;max-width:510px}
.modules{order:-8;grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:0 0 22px!important;max-width:none!important}
.modules button{min-height:135px;max-height:190px;padding:0!important;overflow:hidden!important;border-radius:16px!important;border:1px solid #7691a17d!important;background:#0d2943!important;box-shadow:0 12px 26px #0008!important;position:relative}
.modules .moduleIcon{width:100%!important;height:100%!important;min-height:135px;max-height:190px;object-fit:cover!important;object-position:center;aspect-ratio:auto!important;display:block;border-radius:14px!important;margin:0!important;box-shadow:none!important;filter:saturate(.85) brightness(.84);transition:transform .22s,filter .22s}
.modules button::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,transparent 32%,#031221dd 100%)}
.modules button::after{content:attr(data-label)!important;z-index:2!important;opacity:1!important;left:10px!important;right:10px!important;bottom:8px!important;top:auto!important;transform:none!important;background:none!important;border:none!important;box-shadow:none!important;padding:0!important;font-size:clamp(13px,1.4vw,19px)!important;font-weight:800;line-height:1.2;color:#f6fbff!important;text-shadow:0 2px 6px #000!important;white-space:normal!important;max-width:none!important;min-width:0!important;letter-spacing:.015em}
.modules button:hover .moduleIcon,.modules button:focus-visible .moduleIcon{transform:scale(1.05);filter:saturate(1) brightness(1)}
.modules button:hover,.modules button:focus-visible{outline:2px solid #81cff2;outline-offset:1px}
.modules button span.sr-only{position:absolute!important}
.raceCarousel{order:-7;grid-column:1/-1!important;max-width:none!important;width:100%;margin:0 0 18px!important;border-color:#5188a8!important;background:linear-gradient(145deg,#0b2840,#071a2b)!important}
.raceCarousel h2{color:#e4f4ff!important}.raceStage{min-height:240px!important;border-color:#8bb6cc66!important}
.raceDots{gap:14px!important}.raceDot{width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;border-radius:100%!important}.raceDot.active{transform:scale(1.35)!important;background:#b7eaff!important;box-shadow:0 0 0 3px #79cdfb35,0 0 12px #80d5ff85!important}
.daywork{order:-6;grid-column:1!important}.streakpanel{order:-5;grid-column:2!important}.roadmap{order:-4;grid-column:1/-1!important;margin-bottom:44px!important}
.daywork,.streakpanel,.roadmap{border:1px solid #4269858c!important;border-radius:18px!important;background:linear-gradient(145deg,#0e293e,#071b2c)!important}
.daywork .heading h2,.streakpanel .heading h2,.roadmap .heading h2{color:#cceafd!important}
#athleteProfilePanel:not(.hide){position:fixed;z-index:600;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 24px));max-height:min(86dvh,850px);overflow-y:auto;box-shadow:0 0 0 150vmax #000b,0 25px 65px #000;border:1px solid #83b8d5}
#athleteProfilePanel .heading{position:sticky;top:-18px;z-index:2;background:#0b2338;padding:12px 0}
#athleteProfilePanel button[type=submit]{background:#17618a;border-color:#89ceed;color:#fff}
#tellModal:not(.hide){z-index:650}
/* No arrow controls; race remains draggable, touch-swipable and dot-selectable. */
.racePrev,.raceNext{display:none!important}
@media(max-width:760px){
.shell{display:flex;flex-direction:column;gap:0;padding-left:13px;padding-right:13px}
.shell>*{width:100%}
.top{padding:12px;gap:9px;margin-bottom:12px}.top .accountControls{width:100%;margin-left:0;justify-content:space-between;flex-wrap:wrap}.top .accountControls .status{min-height:38px}
.top h1{font-size:24px}
.hero{min-height:175px!important;padding:19px!important;order:-9}.hero h2{font-size:29px}.hero .stats strong{font-size:20px}
.modules{order:-8;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:0 0 15px!important}
.modules button{min-height:115px;max-height:155px}.modules .moduleIcon{min-height:115px;max-height:155px}.modules button::after{font-size:15px!important;bottom:9px!important}
.raceCarousel{order:-7;margin:0 0 15px!important}.raceStage{min-height:265px!important}
.daywork{order:-6}.streakpanel{order:-5}.roadmap{order:-4}
#athleteProfilePanel:not(.hide){width:calc(100vw - 22px);max-height:88dvh}
}
@media(min-width:761px) and (max-width:1050px){.modules{grid-template-columns:repeat(4,minmax(0,1fr))!important}.modules button{min-height:115px}.modules .moduleIcon{min-height:115px}}
@media(prefers-reduced-motion:reduce){.modules .moduleIcon{transition:none}}
