/* One responsive Home composition for web and bundled iOS. Live data belongs to
   mode-atlas-home-page.js; safe areas and the native dock belong to iOS chrome. */
.ma-atlas-page{margin:0;background:var(--ma-app-bg);color:var(--ma-text);}
.ma-atlas-page .shell{width:min(1240px,100%);margin:auto;}
.atlas-home{padding:24px 24px 32px;max-width:1240px;margin:auto;}
.atlas-home-heading,.atlas-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px;}
.atlas-home-heading h1{font-size:clamp(1.6rem,3vw,2rem);font-weight:750;letter-spacing:-.035em;line-height:1.2;margin:4px 0;overflow-wrap:anywhere;}
.atlas-home-heading .ma-kicker{margin:0;color:var(--ma-muted);font-size:.65rem;letter-spacing:.08em;}
.atlas-home h2{margin:0;font-weight:750;line-height:1.2;letter-spacing:-.025em;}
.atlas-section-heading h2{font-size:1.15rem;}
.atlas-text-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:4px 0;border:0;background:none;color:var(--ma-text);font:650 .78rem/1.4 var(--ma-font-ui);text-decoration:none;cursor:pointer;}
.atlas-text-link:hover{text-decoration:underline;text-underline-offset:4px;}
.atlas-home-workspace{display:grid;grid-template-columns:var(--ma-home-columns,minmax(0,2.1fr) minmax(245px,1fr));gap:20px;}
body[data-ma-home-state="new"] .atlas-home-workspace,body[data-ma-home-state="starting"] .atlas-home-workspace{grid-template-columns:1fr;}
.atlas-home-learning{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;min-height:360px;background:var(--ma-feature);color:var(--ma-feature-text);border-radius:22px;overflow:hidden;}
.atlas-home-learning__copy{min-width:0;z-index:1;padding:32px 0 32px 30px;}
.atlas-home-learning .ma-kicker{color:var(--ma-feature-soft);font-size:.65rem;letter-spacing:.08em;}
.atlas-home-learning h2{font-size:clamp(1.8rem,3.2vw,2.7rem);line-height:1.08;letter-spacing:-.04em;color:inherit;margin:18px 0 14px;}
.atlas-home-learning p{max-width:30ch;color:var(--ma-feature-soft);font-size:.85rem;line-height:1.65;}
.atlas-home-learning .ma-button{--ma-button-bg:var(--ma-feature-button);--ma-button-bg-hover:var(--ma-feature-button);--ma-button-color:var(--ma-feature-button-text);--ma-button-border:transparent;margin:16px 0 12px;font-size:.85rem;max-width:100%;white-space:normal;}
.atlas-home-learning small{display:block;color:var(--ma-feature-soft);font-size:.7rem;line-height:1.5;}
.atlas-home-learning__art{align-self:stretch;position:relative;display:grid;place-items:center;min-width:0;overflow:hidden;}
.atlas-home-learning__art img{width:145%;max-width:none;height:auto;transform:translateX(-3%);}
.atlas-home-learning__art>span{position:absolute;bottom:24px;inset-inline:0;text-align:center;color:var(--ma-feature-soft);letter-spacing:.14em;font-size:.6rem;}
.atlas-home-personal{background:var(--ma-card);border:1px solid var(--ma-border);border-radius:22px;padding:22px;display:flex;flex-direction:column;min-width:0;}
.atlas-home [hidden]{display:none!important;}
.atlas-home-streak{display:flex;align-items:center;gap:12px;}
.atlas-home-streak>.ma-icon{width:36px;height:36px;padding:7px;background:var(--ma-status-warning-bg);color:var(--ma-warning);border-radius:12px;}
.atlas-home-streak>div{display:grid;gap:4px;}
.atlas-home-streak strong{font-size:1rem;}
.atlas-home-streak [data-ma-home-level]{font-size:.75rem;color:var(--ma-muted);}
.atlas-home-character{position:relative;display:grid;place-items:center;flex:1;min-height:190px;width:100%;padding:0;border:0;background:none;color:inherit;cursor:pointer;isolation:isolate;}
.atlas-home-character::before{content:'';position:absolute;width:150px;height:150px;border-radius:50%;background:var(--ma-control-active);z-index:-1;}
.atlas-home-character>[data-ma-home-avatar]{width:150px;height:210px;display:block;}
.atlas-home-character svg{display:block;width:100%;height:100%;}
.atlas-home-level{display:grid;gap:10px;font-size:.68rem;color:var(--ma-muted);}
.atlas-home-level progress{appearance:none;border:0;width:100%;height:5px;overflow:hidden;border-radius:5px;background:var(--ma-card-3);}
.atlas-home-level progress::-webkit-progress-bar{background:var(--ma-card-3);}
.atlas-home-level progress::-webkit-progress-value{background:var(--ma-atlas);}
.atlas-home-level progress::-moz-progress-bar{background:var(--ma-atlas);}
.atlas-home-personal__totals{display:flex;justify-content:space-between;gap:10px;font-size:.72rem;color:var(--ma-muted);margin-top:12px;flex-wrap:wrap;}
.atlas-home-personal__totals b{color:var(--ma-text);}
.atlas-home-lower{margin-top:28px;}
.atlas-home-routine{display:grid;grid-template-columns:1.2fr 1fr;gap:32px;margin-top:32px;}
.atlas-home-goals,.atlas-home-reviews,.atlas-home-week{min-width:0;padding-top:20px;border-top:1px solid var(--ma-border);}
.atlas-home-routine .atlas-section-heading{margin-bottom:8px;}
.atlas-home-reviews p{color:var(--ma-muted);font-size:.8rem;line-height:1.6;}
.atlas-home-review-link{display:flex;justify-content:space-between;align-items:center;min-height:44px;gap:12px;padding:8px 0;color:var(--ma-text);text-decoration:none;font-size:.8rem;}
.atlas-home-review-link span{color:var(--ma-muted);}
.atlas-home-week{margin-top:28px;}
.atlas-home-week__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
.atlas-home-week__stats>div{display:grid;gap:8px;}
.atlas-home-week__stats strong{font-size:1.5rem;font-weight:750;}
.atlas-home-week__stats span{font-size:.75rem;color:var(--ma-muted);}
.atlas-home .ma-routine-goal{min-width:0;grid-template-columns:minmax(0,1fr) 76px 4.5em;gap:8px;font-size:.75rem;}
.atlas-home .ma-routine-goal>span{grid-column:3;text-align:right;}.atlas-home .ma-routine-goal progress{grid-column:2;grid-row:1;}
.ma-atlas-page footer{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px 24px;color:var(--ma-muted);font-size:.7rem;}
html[data-ma-runtime="ios"] .atlas-home{padding:8px 6px 12px;}
html[data-ma-runtime="ios"] .atlas-home-heading>.atlas-text-link{display:none;}
@media(max-width:760px){
 .atlas-home{padding:16px 0 24px;}
 .atlas-home-workspace{grid-template-columns:1fr;gap:18px;}
 .atlas-home-learning{min-height:290px;grid-template-columns:1.2fr .9fr;}
 .atlas-home-learning__copy{padding:24px 0 24px 22px;}
 .atlas-home-learning h2{font-size:1.9rem;}.atlas-home-learning p{font-size:.78rem;}
 .atlas-home-learning__art img{width:165%;}
 .atlas-home-personal{display:grid;grid-template-columns:minmax(0,1fr) 120px;grid-template-rows:auto auto auto;gap:14px;padding:18px 20px;}
 .atlas-home-character{grid-column:2;grid-row:1/4;min-height:145px;}
 .atlas-home-character>[data-ma-home-avatar]{width:110px;height:155px;}
 .atlas-home-character::before{width:min(108px,100%);height:auto;aspect-ratio:1;}
 .atlas-home-level{align-self:end;}.atlas-home-personal__totals{margin:0;}
 .atlas-home-lower{margin-top:24px;}.atlas-home-routine{grid-template-columns:1fr;gap:22px;}
 body[data-ma-home-state="new"] .atlas-home-learning,body[data-ma-home-state="starting"] .atlas-home-learning{grid-template-columns:1fr;}
 body[data-ma-home-state="new"] .atlas-home-learning__copy,body[data-ma-home-state="starting"] .atlas-home-learning__copy{padding:28px;}
 body[data-ma-home-state="new"] .atlas-home-learning__art,body[data-ma-home-state="starting"] .atlas-home-learning__art{display:none;}

}
@media(max-width:360px){.atlas-home-heading h1{font-size:1.5rem;}.atlas-home-heading>.atlas-text-link{display:none;}.atlas-home-learning__copy{padding-left:18px;}.atlas-home-learning h2{font-size:1.6rem;}.atlas-home-personal{grid-template-columns:minmax(0,1fr) 95px;padding:16px;}.atlas-home-character>[data-ma-home-avatar]{width:95px;}.atlas-home .ma-routine-goal{grid-template-columns:minmax(0,1fr) 55px 4.5em;font-size:.68rem;}}
html[data-ma-large-text] .atlas-home-learning{grid-template-columns:1fr;}
html[data-ma-large-text] .atlas-home-learning__copy{padding:24px;}
html[data-ma-large-text] .atlas-home-learning__art{display:none;}
html[data-ma-large-text] .atlas-home-personal{display:flex;}
html[data-ma-large-text] .atlas-home .ma-routine-goal{grid-template-columns:minmax(0,1fr) 5em;}
html[data-ma-large-text] .atlas-home .ma-routine-goal progress{grid-column:1/-1;grid-row:2;}
html[data-ma-large-text] .atlas-home .ma-routine-goal>span{grid-column:2;}

body[data-effective-display-mode="phone"] .atlas-home{--ma-home-columns:1fr;max-width:680px;}
body[data-effective-display-mode="tablet"] .atlas-home{max-width:1000px;}

/* Native Home responds to the space left after system chrome and the dock.
   A wider display should reveal the next action, not enlarge the illustration. */
html[data-ma-runtime="ios"] .atlas-home{width:100%;max-width:1240px;container:atlas-home / inline-size;}
html[data-ma-runtime="ios"] .atlas-home-learning{min-height:0;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);}
html[data-ma-runtime="ios"] .atlas-home-learning__copy{padding:24px;}
html[data-ma-runtime="ios"] .atlas-home-learning h2{font-size:2rem;margin:12px 0;}
html[data-ma-runtime="ios"] .atlas-home-learning p{margin:10px 0;}
html[data-ma-runtime="ios"] .atlas-home-learning .ma-button{margin:12px 0 10px;}
html[data-ma-runtime="ios"] .atlas-home-learning__art{display:grid;}
html[data-ma-runtime="ios"] .atlas-home-learning__art img{width:100%;max-height:260px;object-fit:contain;transform:none;}
html[data-ma-runtime="ios"] .atlas-home-learning__art>span{display:none;}
html[data-ma-runtime="ios"] .atlas-home-lower{margin-top:20px;}
html[data-ma-runtime="ios"] .atlas-section-heading{margin-bottom:12px;}
@container atlas-home (max-width:740px){
 html[data-ma-runtime="ios"] .atlas-home-workspace{grid-template-columns:1fr;}
 html[data-ma-runtime="ios"] .atlas-home-personal{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:12px;padding:18px;}
 html[data-ma-runtime="ios"] .atlas-home-character{grid-column:2;grid-row:1/4;min-height:130px;}
 html[data-ma-runtime="ios"] .atlas-home-character>[data-ma-home-avatar]{width:90px;height:135px;}
 html[data-ma-runtime="ios"] .atlas-home-character::before{width:90px;height:90px;}
 html[data-ma-runtime="ios"] .atlas-home-routine{grid-template-columns:1fr;}
}
@container atlas-home (max-width:540px){
 html[data-ma-runtime="ios"] .atlas-home-learning{grid-template-columns:1fr;}
 html[data-ma-runtime="ios"] .atlas-home-learning__copy{padding:22px;}
 html[data-ma-runtime="ios"] .atlas-home-learning__art{display:none;}
 html[data-ma-runtime="ios"] .atlas-home-heading h1{font-size:1.6rem;}
}
@container atlas-home (min-width:741px){
 html[data-ma-runtime="ios"] .atlas-home-workspace{grid-template-columns:minmax(0,1.9fr) minmax(210px,.9fr);}
 html[data-ma-runtime="ios"] body:is([data-ma-home-state="new"],[data-ma-home-state="starting"]) .atlas-home-workspace{grid-template-columns:1fr;}
 html[data-ma-runtime="ios"] .atlas-home-personal{padding:18px;}
 html[data-ma-runtime="ios"] .atlas-home-character{min-height:140px;}
 html[data-ma-runtime="ios"] .atlas-home-character>[data-ma-home-avatar]{height:150px;width:110px;}
 html[data-ma-runtime="ios"] .atlas-home-character::before{width:110px;height:110px;}
}
html[data-ma-runtime="ios"][data-ma-large-text] .atlas-home-learning{grid-template-columns:1fr;}
html[data-ma-runtime="ios"][data-ma-large-text] .atlas-home-learning__art{display:none;}
html[data-ma-runtime="ios"][data-ma-large-text] .atlas-home-workspace{grid-template-columns:1fr;}
