/* Six editable tracks. Narrow pages share the same margins and reading measure. */
.portal-mobile-label { display:none }
.portal-shell:has(> [data-layout="mobile"]) {
  min-height:100svh;
  background-image:linear-gradient(180deg,#f3f7f9 0,#fff 28rem);
}
.portal-stage[data-layout="mobile"] {
  --row-unit:clamp(.5rem,2.05vw,.625rem);
  width:min(calc(100% - 2rem),32rem);
  column-gap:0;
}
.portal-stage[data-layout="mobile"] .portal-item {
  line-height:1.5; letter-spacing:-.015em; font-family:"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
}
.portal-stage[data-layout="mobile"] .portal-item > .portal-surface { margin:0; }
.portal-stage[data-layout="mobile"] .portal-item img.portal-media { object-fit:contain!important; }
.portal-stage[data-layout="mobile"] .portal-text { text-wrap:pretty; }
[data-layout="mobile"] [data-mobile-style] { --ink:#172e43; --accent:#116778; }
[data-layout="mobile"] [data-mobile-style] > .portal-surface { color:var(--ink); border:0!important; box-shadow:none!important; }
[data-layout="mobile"] [data-mobile-style="brand"] > .portal-surface { color:#123751; font-size:1.38rem; font-weight:800; letter-spacing:-.055em; text-align:left; }
[data-layout="mobile"] [data-mobile-style="top-link"] > .portal-surface { color:#405670; font-size:.84rem; font-weight:650; text-align:right; }
[data-layout="mobile"] [data-mobile-style="line"] > .portal-surface { height:1px; margin-block:auto; background:#cddbe3!important; }
[data-layout="mobile"] [data-mobile-style="logo"] { display:grid; align-items:center; justify-content:center; }
[data-layout="mobile"] [data-mobile-style="logo"] .portal-surface { width:auto; min-width:6rem; padding:.5rem .75rem; background:transparent; }
[data-layout="mobile"] [data-mobile-style="logo"] img { max-height:1.65rem; max-width:9rem; }
[data-layout="mobile"] [data-mobile-style="headline"] > .portal-surface { font-size:clamp(1.65rem,6.8vw,2.2rem); letter-spacing:-.055em; line-height:1.17; font-weight:800; text-align:left; }
[data-layout="mobile"] [data-mobile-style="section"] > .portal-surface { font-size:1.25rem; letter-spacing:-.038em; line-height:1.35; font-weight:760; text-align:left; }
[data-layout="mobile"] [data-mobile-style="title"] > .portal-surface { font-size:1.03rem; line-height:1.4; font-weight:720; text-align:left; }
[data-layout="mobile"] [data-mobile-style="body"] > .portal-surface { color:#40576a; font-size:.92rem; line-height:1.6; font-weight:460; text-align:left; }
[data-layout="mobile"] [data-mobile-style="meta"] > .portal-surface { color:#536e80; font-size:.79rem; line-height:1.45; font-weight:550; text-align:left; }
[data-layout="mobile"] [data-mobile-style="eyebrow"] > .portal-surface { color:var(--accent); font-size:.75rem; line-height:1.4; letter-spacing:.065em; font-weight:750; text-align:left; }
[data-layout="mobile"] [data-mobile-style="panel"] > .portal-surface { background:#f0f5f7!important; border-radius:.85rem; }
[data-layout="mobile"] [data-mobile-style="paper"] > .portal-surface { background:#fff!important; outline:1px solid #d7e2e8; outline-offset:-1px; border-radius:.85rem; }
[data-layout="mobile"] :is([data-mobile-style="title"],[data-mobile-style="body"],[data-mobile-style="section"],[data-mobile-style="meta"],[data-mobile-style="eyebrow"],[data-mobile-style="headline"]) > .portal-surface { background:transparent!important; }
[data-layout="mobile"] [data-mobile-style="inset"] > .portal-surface,
[data-layout="mobile"] [data-inset] > .portal-surface { padding-inline:.95rem; }
[data-layout="mobile"] [data-mobile-style="badge"] > .portal-surface { background:#dcecef!important; border-radius:999px; color:#175164; text-align:center; font-size:.77rem; font-weight:700; }
[data-layout="mobile"] :is([data-mobile-style="action"],[data-mobile-style="tab"],[data-mobile-style="nav"],[data-mobile-style="resource"]) { padding:.18rem; }
[data-layout="mobile"] :is([data-mobile-style="action"],[data-mobile-style="tab"],[data-mobile-style="nav"],[data-mobile-style="resource"]) > .portal-surface {
  border-radius:.65rem; padding:.4rem .65rem; font-size:.86rem; line-height:1.35; font-weight:650; background:#fff!important; box-shadow:inset 0 0 0 1px #cbdbe2!important; color:#234657; text-align:center;
}
[data-layout="mobile"] [data-mobile-style="action"] > .portal-surface,
[data-layout="mobile"] .is-current[data-mobile-style="tab"] > .portal-surface { background:#174e61!important; color:white; box-shadow:none!important; }
[data-layout="mobile"] [data-mobile-style="nav"] > .portal-surface,
[data-layout="mobile"] [data-mobile-style="resource"] > .portal-surface { flex-direction:row; align-items:center; justify-content:space-between; text-align:left; gap:.25rem; }
[data-layout="mobile"] :is([data-mobile-style="nav"],[data-mobile-style="resource"]) > .portal-surface::after { content:'›'; font-size:1.25rem; font-weight:450; color:#5b7b88; }
[data-layout="mobile"] .portal-mobile-label { display:block; }
[data-layout="mobile"] .portal-surface:has(> .portal-mobile-label) > :is(img,.portal-text) { display:none; }
[data-layout="mobile"] [data-mobile-style="media"] > .portal-surface { border-radius:.7rem; overflow:hidden; }
[data-layout="mobile"] [data-mobile-style="media"] img { background:transparent; }
[data-layout="mobile"] [data-mobile-style="rule"] > .portal-surface { height:1px; background:#cfdee4!important; align-self:center; }
[data-layout="mobile"] [data-mobile-style="footer"] > .portal-surface { background:#eaf1f4!important; border-radius:.75rem; }
[data-layout="mobile"] [data-mobile-style="footnote"] > .portal-surface { padding:0 1rem; font-size:.75rem; font-weight:500; line-height:1.5; color:#526575; text-align:left; }
[data-layout="mobile"] [data-mobile-style="link-card"] { padding:.2rem; }
[data-layout="mobile"] [data-mobile-style="link-card"] .portal-card { border:1px solid #ccdce4!important; background:#fff!important; padding:.65rem; align-items:flex-start; flex-direction:column; box-shadow:none!important; }
[data-layout="mobile"] [data-mobile-style="link-card"] .portal-card-name { font-size:1rem; font-weight:750; color:#214454; flex:0 0 auto; }
[data-layout="mobile"] [data-mobile-style="link-card"] .portal-card-button { font-size:.76rem; min-height:2.7rem; background:transparent; border:0; justify-content:flex-start; padding:0; }
[data-layout="mobile"] [data-mobile-style="dot"] > .portal-surface { text-align:center; background:transparent!important; color:#5f8394; }
[data-layout="mobile"] .is-current[data-mobile-style="dot"] > .portal-surface { color:#0c5065; background:transparent!important; outline:0; box-shadow:none!important; }
[data-layout="mobile"] .portal-region { border:1px solid #c5d5df; border-radius:.65rem; background:white; }
[data-layout="mobile"] .portal-region-grid .portal-item { font-size:.78rem; }
[data-layout="mobile"] .portal-region-grid .portal-surface { overflow:hidden; }
.portal-dialog:has([data-layout="mobile"]) { padding:.6rem; border-radius:1rem; }
.portal-dialog [data-layout="mobile"] { width:100%; }

[data-layout="mobile"] [data-mobile-style="separator"] .portal-text { font-size:0; border-top:1px solid #dce6eb; width:100%; }

.portal-mobile-icon { display:none; }
.portal-catalog-summary { display:none; }
[data-layout="mobile"] [data-mobile-style="catalog-heading"] > .portal-surface { padding-left:.8rem; text-align:left; }
[data-layout="mobile"] .portal-surface:has(> .portal-catalog-summary) > .portal-text { display:none; }
[data-layout="mobile"] .portal-catalog-summary { display:grid; gap:.35rem; }
[data-layout="mobile"] .portal-catalog-summary strong { font-size:1.13rem; font-weight:750; line-height:1.24; color:#193e52; }
[data-layout="mobile"] .portal-catalog-summary > span { font-size:.82rem; font-weight:460; line-height:1.48; color:#4b6170; word-break:keep-all; }
[data-layout="mobile"] .portal-mobile-icon {
  --icon-width:4.1rem; --icon-height:2.5rem;
  display:grid; place-items:center; flex:none;
  width:var(--icon-width); height:var(--icon-height);
}
[data-layout="mobile"] .portal-icon-art {
  display:block; width:min(var(--icon-width),calc(var(--icon-height) * var(--art-ratio)));
  aspect-ratio:var(--art-ratio); border-radius:.24rem; background-position:center; background-size:contain; background-repeat:no-repeat;
}
[data-layout="mobile"] :is([data-mobile-style="launcher"],[data-mobile-style="chapter-link"]) { padding:.22rem; }
[data-layout="mobile"] :is([data-mobile-style="launcher"],[data-mobile-style="chapter-link"]) > .portal-surface {
  background:#fff!important; box-shadow:inset 0 0 0 1px #d5e1e8!important;
  border-radius:.8rem; align-items:center; justify-content:center; gap:.45rem;
  color:#203c51; font-weight:650; line-height:1.25; letter-spacing:-.025em;
}
[data-layout="mobile"] [data-mobile-style="launcher"] > .portal-surface {
  flex-direction:column; padding:.28rem; text-align:center; font-size:clamp(.75rem,3.3vw,.88rem);
}
[data-layout="mobile"] [data-mobile-style="chapter-link"] > .portal-surface {
  flex-direction:row; justify-content:flex-start; text-align:left; padding:.42rem .5rem; font-size:.83rem;
}
[data-layout="mobile"] :is([data-mobile-style="chapter-link"],[data-mobile-style="resource"]) .portal-mobile-icon {
  --icon-width:2rem; --icon-height:2rem;
}
[data-layout="mobile"] [data-mobile-style="resource"] .portal-mobile-label { flex:1; }
[data-layout="mobile"] [data-mobile-style="resource"] > .portal-surface { gap:.65rem; }
[data-layout="mobile"] .portal-mobile-label { min-width:0; word-break:keep-all; overflow-wrap:anywhere; }
[data-layout="mobile"] :is([data-mobile-style="launcher"],[data-mobile-style="chapter-link"]) > a:is(:hover,:focus-visible) {
  box-shadow:inset 0 0 0 2px #4a8190!important; background:#f5fafb!important;
}
