/* Owner-approved Ocean: presentation only. Existing app state and semantic colors remain authoritative. */
:root{--abyss-bg:#081522;--abyss-bg-rgb:8,21,34;--abyss-surface:#0c1b2b;--abyss-surface-rgb:12,27,43;--abyss-panel:#101f30;--abyss-panel-rgb:16,31,48;--abyss-raised:#16283b;--abyss-raised-rgb:22,40,59;--abyss-steel:#203e5a;--abyss-steel-rgb:32,62,90;--abyss-line:#26394d;--abyss-line-rgb:38,57,77;--abyss-edge:#56718d;--abyss-edge-rgb:86,113,141;--abyss-text:#f0f5fb;--abyss-text-rgb:240,245,251;--abyss-muted:#a6b7c9;--abyss-muted-rgb:166,183,201;--abyss-subtle:#98abc0;--abyss-subtle-rgb:152,171,192;--abyss-accent:#79bcff;--abyss-accent-rgb:121,188,255;--abyss-ice:#98ccff;--abyss-ice-rgb:152,204,255;--abyss-ink:#082139;--abyss-ink-rgb:8,33,57}
html:root:has(body[data-los-theme="midnight-carbon"]) body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;background:var(--abyss-bg)!important;color:var(--abyss-text)!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(button,a,input,textarea,select,summary){-webkit-tap-highlight-color:transparent}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--abyss-ice)!important;outline-offset:3px!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(h1,h2,h3){font-weight:500!important;letter-spacing:-.035em!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(.card,.contentCard,.tile,.losAppTile,.section-link,.hero,.worldApp,.inline-workout){background:var(--abyss-panel)!important;background-image:none!important;border-color:var(--abyss-line)!important;box-shadow:none!important;border-radius:18px!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:var(--abyss-surface)!important;border-color:var(--abyss-line)!important;border-radius:11px!important;color:var(--abyss-text)!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body button{background-image:none!important;box-shadow:none!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(.primary,.openApp,#submitSet,#send,#agreeWorkoutPlan,#startWorkout,#workoutV1LogSet){background:var(--abyss-ice)!important;background-image:none!important;color:var(--abyss-ink)!important;border-color:transparent!important;font-weight:600!important}
html:root:has(body[data-los-theme="midnight-carbon"]) body :is(.secondary,.button.secondary){background:var(--abyss-raised)!important;background-image:none!important;color:var(--abyss-text)!important;border-color:var(--abyss-line)!important}
/* LOS chrome and the existing launcher, including its list/grid toggle. */
html:root:has(body[data-los-surface="platform"]) body>header{height:76px;background:var(--abyss-bg)!important;padding-inline:28px;border-bottom:1px solid var(--abyss-line)!important}
html:root:has(body[data-los-surface="platform"]) .brandMark{border:0!important;border-radius:50%!important;background:var(--abyss-ice)!important;color:var(--abyss-ink)!important;width:34px;height:34px;box-shadow:none!important}
html:root:has(body[data-los-surface="platform"]) .workspaceLabel{font-size:10px;letter-spacing:.15em}
html:root:has(body[data-los-surface="platform"]) .menubar{background:var(--abyss-bg)!important;border-color:var(--abyss-line)!important}
html:root:has(body[data-los-surface="platform"]>iframe#app) body>iframe#app{height:calc(100% - 76px)!important}
html:root:has(body[data-los-surface="platform"]) .workspace>aside{width:210px;background:var(--abyss-bg)!important;border-right-color:var(--abyss-line)!important;padding:27px 15px}
html:root:has(body[data-los-surface="platform"]) .sideButton{border-radius:10px!important;padding:12px 13px;min-height:44px;font-size:13px;background:none!important;color:var(--abyss-muted)!important}
html:root:has(body[data-los-surface="platform"]) .sideButton.active{background:#1a3148!important;color:#e3f1ff!important;border-color:transparent!important}
html:root:has(body[data-los-surface="platform"]) .workspace>main{padding:36px 34px 28px;max-width:1400px}
html:root:has(body[data-los-surface="platform"]) #pageTitle{font-size:36px;line-height:1.15;margin-bottom:12px}
html:root:has(body[data-los-surface="platform"]) #appsPage .search{min-height:44px;border-radius:11px!important;background:var(--abyss-panel)!important;border-color:var(--abyss-line)!important}
html:root:has(body[data-los-surface="platform"]) #appsPage #appTiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
html:root:has(body[data-los-surface="platform"]) #appsPage #appTiles.listView{grid-template-columns:minmax(0,1fr)}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile{padding:22px;min-width:0;display:flex!important;flex-direction:column;min-height:230px}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile[hidden]{display:none!important}
html:root:has(body[data-los-surface="platform"]) #appsPage .appMain{grid-template-columns:1fr auto;gap:15px}
html:root:has(body[data-los-surface="platform"]) #appsPage .tileTop{grid-column:1;grid-row:1}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile .tileBody{grid-column:1/-1;grid-row:2}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile .appIcon{width:44px;height:44px;border:0!important;border-radius:13px!important;font-size:19px;font-weight:500;background:var(--abyss-steel)!important;color:#b9ddff!important}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile h2{font-size:23px;line-height:1.2;margin:0 0 8px;color:var(--abyss-text)!important}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile .tileBody p{color:var(--abyss-muted)!important;font-size:13px;line-height:1.7}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile .tileFooter{margin-top:auto;padding-top:20px;gap:10px;flex-wrap:wrap}
html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile .tileFooter .openApp{background:var(--abyss-raised)!important;color:#b6dcff!important;border:1px solid var(--abyss-line)!important;border-radius:11px!important;font-size:13px;padding:10px 12px;white-space:normal}
html:root:has(body[data-los-surface="platform"]) #appsPage .coachPin{font-size:12px;color:var(--abyss-muted)!important;gap:6px}
html:root:has(body[data-los-surface="platform"]) #appsPage .coachPin[aria-pressed=true]{color:var(--abyss-accent)!important}
html:root:has(body[data-los-surface="platform"]) #appsPage #coachSocial{grid-column:2;grid-row:1;color:var(--abyss-muted)!important}
html:root:has(body[data-los-surface="platform"]) #appsPage .listView .losAppTile{min-height:0}
html:root:has(body[data-los-surface="platform"]) #appsPage .listView .appMain{grid-template-columns:44px minmax(0,1fr) auto;column-gap:16px}
html:root:has(body[data-los-surface="platform"]) #appsPage .listView .tileBody{grid-row:1;grid-column:2}
html:root:has(body[data-los-surface="platform"]) #appsPage .listView #coachSocial{grid-column:3}
/* The approved Coach header remains truly centered. */
html:root:has(body[data-los-surface="coach"]) .los-conversation .los-appbar{background:var(--abyss-bg)!important;border-bottom-color:var(--abyss-line)!important;min-height:calc(72px + env(safe-area-inset-top))}
html:root:has(body[data-los-surface="coach"]) .los-conversation .los-appbar h1{font:500 19px Inter,system-ui,sans-serif!important;letter-spacing:-.5px!important;text-transform:none}
html:root:has(body[data-los-surface="coach"]) .los-conversation .los-appbar h1 span{color:var(--abyss-text)!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation .los-appbar summary{background:var(--abyss-panel)!important;border:1px solid var(--abyss-line)!important;border-radius:12px!important;color:var(--abyss-text)!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation .los-user-status{max-width:calc(50% - 74px);gap:6px;color:var(--abyss-muted)!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #losCoachHome{max-width:800px;padding-inline:20px!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #chat .bubble{line-height:1.8!important;padding:16px 18px!important;margin-block:12px!important;border:0!important;box-shadow:none!important;border-radius:18px!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #chat .bubble.assistant{background:transparent!important;color:#dce7f3!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #chat .bubble.user{background:#203c57!important;color:var(--abyss-text)!important;border-bottom-right-radius:4px!important;max-width:85%}
html:root:has(body[data-los-surface="coach"]) .los-conversation #chat .bubble.assistant:before{background:var(--abyss-steel)!important;color:var(--abyss-ice)!important;box-shadow:none!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #losCoachHome .composer{background:var(--abyss-panel)!important;border:1px solid #37516c!important;border-radius:18px!important;padding:8px!important;margin-top:10px;align-items:flex-end!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #message{background:transparent!important;border:0!important;border-radius:0!important;padding:10px!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation #send{border-radius:50%!important}
html:root:has(body[data-los-surface="coach"]) .los-conversation .inline-workout{padding:20px!important;border:1px solid #365571!important}
/* Gym: keep artwork, warm-ups, inputs and all execution controls. */
html:root:has(body[data-los-surface="gym"]) .los-appbar{background:var(--abyss-bg)!important;border-color:var(--abyss-line)!important;gap:12px}
html:root:has(body[data-los-surface="gym"]) .los-appbar h1{font:500 20px Inter,system-ui,sans-serif!important;letter-spacing:-.5px!important}
html:root:has(body[data-los-surface="gym"]) .los-appbar h1 span{color:var(--abyss-text)!important}
html:root:has(body[data-los-surface="gym"]) #splitLeave{margin-left:auto;font-size:12px;color:var(--abyss-muted)!important}
html:root:has(body[data-los-surface="gym"]) body.active-workout-v1 #sessionTop :is(.card,#liftingBody){background:var(--abyss-panel)!important;border-color:var(--abyss-line)!important;box-shadow:none!important;border-radius:19px!important}
html:root:has(body[data-los-surface="gym"]) body.active-workout-v1 #sessionTop :is(h2,#exerciseTitle,#workoutV1Exercise){letter-spacing:-.04em!important;font-weight:500!important}
html:root:has(body[data-los-surface="gym"]) body.active-workout-v1 #sessionTop .v2-stepper{background:var(--abyss-panel)!important;border-color:var(--abyss-line)!important;border-radius:14px!important}
html:root:has(body[data-los-surface="gym"]) body.active-workout-v1 #sessionTop .v2-stepper button{background:#243d54!important;color:var(--abyss-text)!important;border:0!important;border-radius:50%!important}
html:root:has(body[data-los-surface="gym"]) body.active-workout-v1 #sessionTop .v2-stepper input{background:transparent!important;border:0!important;font-weight:500!important;font-variant-numeric:tabular-nums}
/* Profile, Record, Documents and the approved vertical flows share the same surfaces. */
html:root:has(body[data-los-theme="midnight-carbon"]) :is(.topbar,.context-rail,.docTabs,.documentTabs){background:var(--abyss-bg)!important;border-color:var(--abyss-line)!important}
html:root:has(body[data-los-theme="midnight-carbon"]) :is(.section-link,.contentCard,.hero){border-radius:18px!important}
html:root:has(body[data-los-theme="midnight-carbon"]) :is(.app-layout,.context-rail) h1{font-weight:500!important}
/* Read-only agreement comments. This dialog is separate from approval and logging. */
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTipsButton{flex:none;display:grid;place-items:center;min-width:44px;width:44px;height:44px;min-height:44px;padding:0!important;border:1px solid var(--abyss-line)!important;border-radius:12px!important;background:var(--abyss-panel)!important;color:var(--abyss-ice)!important;font:500 19px Georgia,serif!important;box-shadow:none!important}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTips{width:min(540px,calc(100% - 28px));max-height:80dvh;overflow:auto;padding:24px!important;background:var(--abyss-panel)!important;color:var(--abyss-text)!important;border:1px solid #37516c!important;border-radius:22px!important;box-shadow:0 24px 80px #0008!important}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTips::backdrop{background:#030b15bb;backdrop-filter:blur(6px)}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTips .tips-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:18px}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTips h2{font-size:23px!important;margin:0 0 6px!important;line-height:1.2}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTips h3{font-size:16px!important;margin:22px 0 6px!important}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTips p{font-size:14px!important;line-height:1.75!important;color:var(--abyss-muted)!important;white-space:pre-wrap;overflow-wrap:anywhere}
html:root:has(body[data-los-theme="midnight-carbon"]) #losAgreementTipsClose{min-height:44px;flex:none;background:var(--abyss-raised)!important;color:var(--abyss-text)!important;border:1px solid var(--abyss-line)!important;border-radius:11px!important;padding:8px 12px!important}
@media(min-width:1100px){html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile{padding:25px;min-height:245px}}
@media(max-width:760px){html:root:has(body[data-los-surface="platform"]) .workspace>aside{width:100%;padding:8px 12px}html:root:has(body[data-los-surface="platform"]) .workspace>main{padding:27px 18px}html:root:has(body[data-los-surface="platform"]) #pageTitle{font-size:30px}html:root:has(body[data-los-surface="platform"]) #appsPage #appTiles{grid-template-columns:minmax(0,1fr)}html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile{min-height:0}html:root:has(body[data-los-surface="platform"]) #appsPage .appMain{grid-template-columns:44px minmax(0,1fr) auto;gap:12px}html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile .tileBody{grid-column:2;grid-row:1}html:root:has(body[data-los-surface="platform"]) #appsPage #coachSocial{grid-column:3}html:root:has(body[data-los-surface="platform"]) #appsPage .losAppTile h2{font-size:22px}html:root:has(body[data-los-surface="platform"]) #appsPage .coachPin{font-size:12px}html:root:has(body[data-los-surface="coach"]) .los-conversation #losCoachHome{padding-inline:12px!important}}
@media(prefers-reduced-motion:reduce){html:root:has(body[data-los-theme="midnight-carbon"]) body *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Developer Studio step boundaries: inset paint preserves card geometry and flow. */
html:root:has(body[data-los-theme="midnight-carbon"][data-los-surface="platform"]) .studioFlow:not(.connectionFlow)>.studioStep{box-shadow:inset 0 0 0 1px var(--abyss-edge)!important}
/* Coach-only static Ocean fade; replace the inherited carbon stripes, not layout. */
html:root:has(body[data-los-theme="midnight-carbon"][data-los-surface="coach"]) body[data-los-app="coach-one"][data-los-surface="coach"].los-conversation{background:linear-gradient(160deg,#142c43 0%,#0c1b2b 42%,#081522 100%)!important}
html:root:has(body[data-los-theme="midnight-carbon"][data-los-surface="coach"]) body.los-conversation #losCoachHome #chat .bubble{box-shadow:inset 0 0 0 1px #6688aa!important}
html:root:has(body[data-los-theme="midnight-carbon"][data-los-surface="coach"]) body.los-conversation #losCoachHome .composer{border-color:#6688aa!important}

/* Keep the sidebar narrow until the existing 680px stacked layout. */
@media(min-width:681px) and (max-width:760px){html:root:has(body[data-los-surface="platform"]) .workspace>aside{width:210px}}
#appsPage .educationStatus{font-size:13px;color:#aec3d6;padding:8px 0}.educationApps{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}.educationApps .contentCard{margin:0;min-width:0}.educationApps .openApp{display:inline-block;min-height:44px;padding:12px 16px;border-radius:14px;background:#203f58;color:#e6eef7;text-decoration:none}.educationApps .educationStatus{color:#aec3d6;font-size:14px}

/* Workspace navigation and email-first Studio; no application behavior changes. */
html:root:has(body[data-los-surface="platform"]) aside .sideButton>svg{width:23px;height:23px;flex:0 0 23px;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;opacity:.95}
.studioServices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:26px}.studioServices .studioService{min-width:0;margin:0;padding:24px}.studioServiceNumber{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:13px;background:#203f58;color:#a1d0ff;font-weight:700;margin-bottom:15px}.studioService h2{font-size:23px;line-height:1.25}.studioService form{margin-top:20px}.studioService label{display:block;margin:16px 0 0;font-size:14px}.studioService input,.studioService textarea,.studioService select{display:block;width:100%;max-width:100%;box-sizing:border-box;margin-top:8px;padding:12px;border:1px solid #3d617c;border-radius:12px;background:#081522;color:#e6eef7;font:inherit}.studioService textarea{resize:vertical}.studioService .studioServiceCredit{padding:12px 14px;border:1px solid #355570;border-radius:12px;font-size:13px;color:#c5d9eb}.studioService .studioServiceDetail{font-size:13px;line-height:1.5;color:#aec3d6}.studioService button{min-height:44px;padding:12px 16px;border-radius:13px}.studioService :focus-visible{outline:2px solid #a1d0ff;outline-offset:3px}@media(max-width:1000px){.studioServices{grid-template-columns:minmax(0,1fr)}}@media(max-width:680px){html:root:has(body[data-los-surface="platform"]) aside .sideButton>svg{width:21px;height:21px;flex-basis:21px}.studioServices .studioService{padding:19px}.studioService h2{font-size:21px}}
