/* Extended Suites · adaptación por ancho de pantalla. */
/* Se carga después de style.css para que los ajustes responsive prevalezcan. */


/* === Base, componentes heredados, portada y acceso === */
@media (max-width: 620px) {
  .assessment-shell { gap: 12px; padding: 21px 12px 24px; }
  .assessment-brand { min-height: 64px; }
  .assessment-brand img { width: 134px; height: 64px; }
  .assessment-card { padding: 23px 19px; }
  .assessment-intro h1 { font-size: 1rem; }
  .assessment-fields { grid-template-columns: 1fr; gap: 12px; }
  .assessment-quiz progress { margin-bottom: 26px; }
  .assessment-quiz legend { font-size: 1rem; }
  .assessment-actions { flex-wrap: wrap; }
  .assessment-actions > button { flex: 1; }
  .assessment-review li { align-items: start; }
}
@media(max-width:620px){.sync-menu{position:fixed;top:103px;left:12px;right:12px;width:auto;max-width:none}.sync-menu-scroll{max-height:calc(100vh - 222px)}}

@media(max-width:620px){.advanced-search-menu{position:fixed;top:103px;left:12px;right:12px;width:auto;max-width:none}}

@media(max-width:1180px){.app-frame{grid-template-columns:44px 205px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.top-links{gap:10px}.top-user{max-width:185px}.top-user-name{max-width:112px}.kpi-grid{gap:12px}.kpi{padding:16px}.kpi-value{margin-top:37px}.spark{width:50px}.main-grid{grid-template-columns:1fr;align-items:start;gap:14px}.chart-card,.ranking-card{width:100%;height:auto}.workspace{padding-left:16px;padding-right:16px}.social-panel-body{grid-template-columns:minmax(275px,.8fr) minmax(390px,1.35fr)}.digital-impact-body{grid-template-columns:minmax(300px,.8fr) minmax(400px,1.3fr)}.topic-analysis-grid{grid-template-columns:minmax(270px,.65fr) minmax(500px,1.55fr)}}

@media(max-width:900px){.app-frame{grid-template-columns:44px minmax(0,1fr)}.sidebar{display:none}.top-user{width:36px;padding:4px}.top-user-name,.top-user-chevron{display:none}.kpi-grid{grid-template-columns:repeat(3,1fr)}.chart-area{height:360px}.ranking-card{min-height:0}.social-panel-body,.digital-impact-body,.topic-analysis-grid{grid-template-columns:1fr}.engagement-panel,.digital-sites-panel{border-right:0;border-bottom:1px solid #e7e7ea;padding-bottom:16px}.engagement-list{grid-template-columns:repeat(2,minmax(0,1fr))}.engagement-item:last-child{grid-column:1/-1}.topic-perception-summary{grid-template-columns:160px minmax(120px,1fr)}.narrative-evolution-body{grid-template-columns:210px minmax(0,1fr)}.narrative-donut{width:148px}}

@media(max-width:620px){.app-frame{width:100%;height:auto;min-height:100vh;margin:0;border-radius:0;border:0;grid-template-columns:1fr;padding-bottom:54px}.icon-rail{position:fixed;z-index:30;top:auto;bottom:0;left:0;right:0;height:54px;width:100%;padding:7px 14px;flex-direction:row;justify-content:center;border-top:1px solid var(--line)}main{height:auto;overflow:visible;overscroll-behavior:auto}.mini-logo,.icon-rail button{display:none}.icon-rail nav{display:flex;gap:18px}.topbar{padding:0 15px}.top-links button:not(#topTheme),.top-user{display:none}.toolbar{padding:0 15px}.workspace{min-height:auto;overflow:visible;padding:12px 15px 25px}.kpi-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;padding-bottom:4px}.kpi{flex:0 0 190px;scroll-snap-align:start}.main-grid{margin-top:12px}.chart-card{padding:14px}.chart-area.daily-chart-area{height:315px;aspect-ratio:auto;overflow-x:auto;overflow-y:hidden}.daily-chart-area svg{width:720px;height:315px;min-width:720px;max-width:none}.legend{justify-content:flex-start;overflow-x:auto}.filter-panel{grid-template-columns:1fr;margin:10px 15px}.lower-grid{grid-template-columns:1fr}.social-panel-head,.digital-impact-head,.topic-section-head{display:block}.social-panel-head small,.digital-impact-head small,.topic-section-head small{display:block;margin-top:2px;text-align:left}.engagement-list{grid-template-columns:1fr}.engagement-item:last-child{grid-column:auto}.social-chart-wrap,.digital-bubble-panel{overflow-x:auto}.social-chart{width:610px;min-width:610px}.digital-bubble-chart{width:620px;min-width:620px}.topic-perception-summary{grid-template-columns:1fr}.main-axes-list{grid-template-columns:1fr}.narrative-panel-head>div,.keyword-cloud-head>div{display:block}.keyword-cloud-head{display:flex;flex-wrap:wrap}.keyword-cloud-head .cloud-sentiment-legend{order:3;width:100%;margin:5px 0 0}.narrative-evolution-body{grid-template-columns:1fr}.narrative-share{border-right:0;border-bottom:1px solid #eceef2;padding-bottom:14px}.narrative-share-legend{max-width:290px}.keyword-cloud-panel{overflow-x:auto}.mention-wordcloud{width:720px;min-width:720px;height:330px;min-height:330px}.cloud-word{max-width:28%}.cloud-word.size-4{font-size:1.3rem}.cloud-word.size-5{font-size:1.6rem}.cloud-word.size-6{font-size:1.8rem}.axis-detail-drawer{width:100vw}.sentiment-modal-overlay{padding:10px}.sentiment-results-modal{max-height:calc(100vh - 20px)}.date-btn{font-size:11px}}

@media(max-width:620px){.keyword-cloud-panel{overflow:hidden}.mention-wordcloud{width:100%;min-width:0;height:300px;min-height:300px;padding:6px}}

@media(max-width:900px){
  .app-frame{position:relative}
  .sidebar{display:block;position:fixed;z-index:100005;top:0;bottom:0;left:44px;width:min(280px,calc(100vw - 60px));height:100vh;height:100dvh;padding:66px 14px 22px;transform:translateX(-110%);opacity:0;pointer-events:none;box-shadow:18px 0 44px rgba(25,27,38,.22);transition:transform .24s ease,opacity .2s ease}
  .app-frame.mobile-menu-open{overflow:visible}
  .app-frame.mobile-menu-open .sidebar{transform:translateX(0);opacity:1!important;pointer-events:auto!important;padding-left:14px;padding-right:14px}
  .mobile-sidebar-backdrop{display:block;position:fixed;z-index:100004;inset:0 0 0 44px;border:0;background:rgba(18,19,25,.48);opacity:0;pointer-events:none;backdrop-filter:blur(2px);transition:opacity .2s ease}
  .app-frame.mobile-menu-open .mobile-sidebar-backdrop{opacity:1;pointer-events:auto}
  .icon-rail #sidebarToggle{position:fixed;z-index:100007;top:12px;left:5px;display:grid;margin:0;background:#3f4146;color:#fff;box-shadow:0 5px 15px rgba(30,32,66,.22)}
  .app-frame.mobile-menu-open #sidebarToggle{background:#6eaa61}
  .app-frame.mobile-menu-open #sidebarToggle svg{transform:rotate(90deg)}
  body.mobile-nav-open{overflow:hidden}
  .sidebar .account{margin-bottom:20px}
}

@media(max-width:620px){
  .app-frame{padding-bottom:82px}
  .icon-rail{
    z-index:100006;
    left:10px;
    right:10px;
    bottom:max(8px,env(safe-area-inset-bottom));
    width:auto;
    height:62px;
    padding:8px 14px;
    display:grid;
    grid-template-columns:repeat(4,46px);
    justify-content:center;
    align-items:center;
    gap:12px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:18px;
    background:rgba(24,23,25,.97);
    box-shadow:0 12px 30px rgba(30,25,26,.24),0 2px 7px rgba(20,18,19,.15);
  }
  .icon-rail nav,.icon-rail .sinNav{
    display:contents!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
  }
  .icon-rail nav a{
    position:relative;
    width:44px;
    height:44px;
    margin:0;
    border-radius:13px;
    color:rgba(255,255,255,.8);
    transition:background-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
  }
  .icon-rail nav a svg{
    width:23px;
    height:23px;
    stroke-width:1.55;
  }
  .icon-rail nav a:hover,.icon-rail nav a:focus-visible{
    background:rgba(255,255,255,.11);
    color:#fff;
    outline:0;
  }
  .icon-rail nav a:active{transform:scale(.94)}
  .icon-rail nav a.active{
    background:#fff;
    color:var(--brand-accent);
    box-shadow:none;
  }
  .icon-rail nav a.active::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:-5px;
    width:4px;
    height:4px;
    border-radius:50%;
    background:var(--brand-accent);
    transform:translateX(-50%);
  }
  .dark .icon-rail{
    border-color:rgba(255,255,255,.11);
    background:rgba(37,38,47,.97);
    box-shadow:0 12px 30px rgba(0,0,0,.36),0 2px 8px rgba(0,0,0,.25);
  }
  .sidebar{left:0;width:min(292px,86vw);padding-top:66px;border-right:1px solid #dedee2}
  .mobile-sidebar-backdrop{inset:0}
  .icon-rail #sidebarToggle{top:8px;left:10px;width:38px;height:38px;border-radius:8px}
  .icon-rail #sidebarToggle svg{width:25px;height:25px}
  .topbar{height:48px;padding:0 12px 0 59px}
  .page-title{min-width:0}.page-title strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}
  .top-links{gap:6px}.top-links #topTheme{display:grid;width:32px;height:32px;padding:0;place-items:center}
  .toolbar{height:auto;min-height:79px;display:flex;flex-wrap:wrap;align-content:center;gap:6px;padding:6px 12px}
  .toolbar button{height:31px;padding:0 9px;white-space:nowrap}
  .toolbar #filterButton{order:1;flex:0 0 auto}
  .toolbar .daily-topic-sync-trigger{order:2;min-width:0;flex:1 1 118px;justify-content:center;margin-left:0;font-size:.68rem}
  .toolbar #syncDropdown{order:3;margin-left:auto}
  .toolbar #advancedSearchDropdown{order:4}
  .toolbar .sync-dropdown .botones-rapidos{margin-left:0}
  .toolbar .date-btn{order:5;flex:1 0 100%;justify-content:center;margin:0;font-size:.68rem}
  .sync-menu,.advanced-search-menu{top:132px}
  main{width:100%;min-width:0}
  .workspace{width:100%;padding:12px 12px 28px}
  .kpi-grid{scroll-padding-left:2px}
  .kpi{flex-basis:184px}
  .chart-card,.ranking-card,.social-interaction-panel,.digital-impact-panel,.topic-perception-panel,.main-axes-panel,.narrative-evolution-panel,.keyword-cloud-panel{max-width:100%}
  .daily-legend{overflow-x:auto;overflow-y:hidden;padding-bottom:4px;scrollbar-width:thin}
  .main-axis-card>header{flex-direction:column}
  .axis-metrics{width:100%;justify-content:flex-end}
  .topic-section-head{padding:9px 12px}
  .toast{right:12px;bottom:86px;max-width:calc(100vw - 24px)}
}

@media (max-width: 1100px) {
  .landing-intro, .landing-path { grid-template-columns: 130px minmax(0, 1fr); }
  .landing-intro-aside, .landing-path-art { grid-column: 2; }
  .landing-intro-aside { justify-items: start; text-align: left; }
}

@media (max-width: 760px) {
  .landing-header { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 72px; }
  .landing-brand img { width: 112px; height: 49px; }
  .landing-nav { display: none; }
  .landing-mobile-menu { display: block; }
  .landing-mobile-menu summary { display: flex; align-items: center; gap: 6px; padding: 7px 4px; color: var(--landing-ink); font-size: .8rem; list-style: none; cursor: pointer; }
  .landing-mobile-menu summary::-webkit-details-marker { display: none; }
  .landing-mobile-menu summary::after { content: "☰"; color: var(--landing-accent); font-size: .95rem; }
  .landing-mobile-menu nav { position: absolute; top: calc(100% - 1px); right: 0; left: 0; display: grid; gap: 2px; padding: 12px 16px 16px; border-top: 1px solid var(--landing-line); border-bottom: 1px solid var(--landing-line); background: var(--landing-panel); box-shadow: 0 12px 25px rgba(30,30,33,.09); }
  .landing-mobile-menu nav a { padding: 9px 4px; color: var(--landing-ink); }
  .landing-mobile-menu nav a + a { border-top: 1px solid var(--landing-line); }
  .landing-hero { min-height: 690px; align-items: flex-start; }
  .landing-hero-photo { object-position: 66% center; }
  .landing-hero-shade { background: linear-gradient(180deg, rgba(20,16,16,.78) 0%, rgba(20,16,16,.52) 52%, rgba(20,16,16,.35) 100%); }
  .landing-hero-inner { width: 100%; padding: 68px 24px 110px; }
  .landing-hero h1 { max-width: 620px; }
  .landing-hero-lead { max-width: 360px; }
  .landing-hero-footer { right: 24px; left: 24px; }
  .landing-intro, .landing-path { grid-template-columns: 1fr; gap: 28px; }
  .landing-intro-aside, .landing-path-art { grid-column: 1; }
  .landing-intro-aside { display: none; }
  .landing-steps-heading { grid-template-columns: 1fr; margin-top: 30px; }
  .landing-steps-heading .landing-kicker { grid-column: 1; }
  .landing-steps-grid { grid-template-columns: 1fr; margin-top: 36px; }
  .landing-step, .landing-step + .landing-step { min-height: 170px; padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--landing-line); }
  .landing-step:last-child { border-bottom: 0; }
  .landing-step h3 { margin-top: 18px; }
  .landing-path-art { min-height: 270px; }
  .landing-footer { grid-template-columns: 1fr 1fr; align-items: start; }
  .landing-footer p { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 450px) {
  .landing-header { padding-inline: 16px; }
  .landing-mobile-menu summary { font-size: .75rem; }
  .landing-header-access { min-height: 36px; padding: 8px 10px; gap: 10px; }
  .landing-hero { min-height: 670px; margin: 8px; }
  .landing-hero-inner { padding: 48px 22px 98px; }
  .landing-eyebrow { gap: 7px; margin-bottom: 24px; font-size: .64rem; }
  .landing-eyebrow-divider { display: none; }
  .landing-hero h1 { font-size: clamp(2.25rem, 10vw, 2.9rem); }
  .landing-hero-lead { margin-top: 22px; font-size: .85rem; }
  .landing-hero-actions { gap: 12px; margin-top: 24px; }
  .landing-button-light { min-width: 145px; }
  .landing-hero-footer { right: 22px; left: 22px; }
  .landing-section { padding: 72px 20px; }
  .landing-section-label { gap: 9px; }
  .landing-intro-copy h2, .landing-steps-heading h2, .landing-path h2 { font-size: 2rem; }
  .landing-path-tags { gap: 7px; }
  .landing-final { padding: 75px 20px; }
  .landing-final h2 { font-size: 2.3rem; }
  .landing-footer { padding: 30px 20px; }
}

@media (max-width: 760px) {
  .landing-hero-photo { object-position: center 68%; }
  .landing-hero-shade { background: linear-gradient(180deg,rgba(20,16,16,.88) 0%,rgba(20,16,16,.68) 38%,rgba(20,16,16,.08) 73%,rgba(20,16,16,.4) 100%); }
  .landing-showcase-inner { grid-template-columns: 1fr; gap: 36px; }
  .landing-showcase-copy .landing-section-label { margin-bottom: 30px; }
  .landing-showcase-copy h2 { font-size: 2rem; }
  .landing-preview-panel { min-height: 365px; }
  .landing-mobile-menu summary::after { content: none; }
  .landing-mobile-menu summary .landing-icon { width: 17px; height: 17px; color: var(--landing-accent); }
}

@media (max-width: 460px) {
  .landing-preview-top { padding: 11px 16px; }
  .landing-preview-status { display: none; }
  .landing-preview-tabs { justify-content: space-between; gap: 8px; padding-inline: 16px; }
  .landing-preview-tabs button { font-size: .72rem; }
  .landing-preview-panel { min-height: 400px; padding: 22px 18px; }
  .landing-preview-panel h3 { font-size: 1.3rem; }
  .landing-preview-question { padding: 12px; }
}

@media (max-width: 800px) {
  .auth-shell { padding: 0; }
  .auth-card { grid-template-columns: 1fr; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .auth-photo { min-height: 240px; }
  .auth-photo > img { object-position: center 30%; }
  .auth-photo-shade { background: linear-gradient(180deg,rgba(20,16,16,.08),rgba(20,16,16,.62)); }
  .auth-photo-brand { top: 18px; left: 20px; width: 128px; height: 55px; }
  .auth-photo-brand img { width: 108px; height: 42px; }
  .auth-photo-copy { right: 24px; bottom: 19px; left: 24px; }
  .auth-photo-copy > span, .auth-photo-copy p { display: none; }
  .auth-photo-copy h2 { max-width: 440px; margin: 0; font-size: 1.7rem; }
  .auth-content { min-height: 580px; padding: 20px 24px 25px; }
  .auth-panel-wrap { margin: 50px auto; }
}

@media (max-width: 420px) {
  .auth-photo { min-height: 195px; }
  .auth-photo-copy h2 { max-width: 280px; font-size: 1.35rem; }
  .auth-content { min-height: 560px; padding-inline: 20px; }
  .auth-content-top { font-size: .68rem; }
  .auth-content-top a { font-size: .7rem; }
  .auth-panel-wrap { margin: 45px auto; }
  .auth-panel h1 { font-size: 1.95rem; }
}


/* === Catálogo y detalles de cursos === */
@media (max-width: 1180px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .learning-hero { grid-template-columns: 1fr; }
  .learning-hero-art { height: 250px; }
}

@media (max-width: 620px) {
  .learning-view { gap: var(--course-space); }
  .learning-hero,
  .course-panel { border-radius: 6px; }
  .learning-hero-copy { padding: 16px; }
  .learning-breadcrumb { margin-bottom: 17px; }
  .learning-hero p { margin: 14px 0 18px; }
  .learning-hero-art { height: 190px; }
  .course-panel-header { align-items: flex-start; flex-direction: column; gap: var(--course-space); padding: var(--course-padding); }
  .course-grid { grid-template-columns: 1fr; gap: var(--course-space); padding: var(--course-padding); }
  .course-card-content { min-height: 0; }
}

@media (max-width: 900px) {
  .course-detail { grid-template-columns: 1fr; }
  .detail-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .detail-sidebar { grid-template-columns: 1fr; }
  .lesson-media { aspect-ratio: 16 / 9; }
  .image-lesson-stage, .image-lesson-quiz { padding: 14px; }
  .image-lesson-actions { flex-wrap: wrap; }
  .image-lesson-actions > button { flex: 1 1 auto; }
  .lesson-media-scenario { aspect-ratio: 4 / 3; }
  .scenario-media-overlay { inset: auto 12px 12px; width: auto; }
  .scenario-media-overlay h2 { font-size: 1.08rem; }
  .scenario-media-overlay p { font-size: .68rem; }
  .scenario-stage { padding: 14px; }
  .scenario-thread { max-height: 250px; }
  .scenario-message { max-width: 96%; }
  .detail-title-row { flex-direction: column; }
  .detail-overview-card { grid-template-columns: 1fr; }
  .course-mentor { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-title-row h1 { font-size: var(--course-detail-heading); }
  .detail-tab-panel,
  .detail-box { padding: var(--course-padding); }
}


/* === Dashboard de aprendizaje === */
@media (max-width: 1180px) { .dash-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }

@media (max-width: 900px) { .dash-layout { grid-template-columns: 1fr; } .dash-side-column { grid-template-columns: repeat(2,minmax(0,1fr)); } .dash-agenda-panel { grid-row: span 2; } }

@media (max-width: 620px) { .learning-dashboard { gap: 12px; } .dash-welcome { display: grid; min-height: 220px; align-content: end; gap: 12px; padding: 16px; background-position: 62% center; } .dash-welcome h1 { font-size: 1.35rem; } .dash-welcome .dash-outline-link { justify-self: start; } .dash-focus { grid-template-columns: 1fr; } .dash-focus-image { min-height: 145px; height: 145px; } .dash-focus-content { padding: 14px; } .dash-focus-content h2 { font-size: 1.2rem; } .dash-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .dash-metric { min-height: 104px; padding: 10px; } .dash-metric-top { align-items: flex-start; font-size: .7rem; } .dash-metric-icon { width: 23px; height: 23px; } .dash-metric-value strong { font-size: 1.3rem; } .dash-module-grid, .dash-side-column { grid-template-columns: 1fr; } .dash-agenda-panel { grid-row: auto; } .dash-panel-header { flex-wrap: wrap; } .dash-chart { max-height: 180px; } }

@media (max-width: 900px) {
  body.course-template .icon-rail #sidebarToggle,
  body.course-template .app-frame.mobile-menu-open #sidebarToggle { background: var(--course-accent); border-radius: 6px; }
}

@media (max-width: 620px) {
  body.course-template { background: #f8f7f6; }
  body.course-template .app-frame { padding-bottom: 100px; background: #f8f7f6; }
  body.course-template main { background: #f8f7f6; }
  body.course-template .topbar { height: 64px; min-height: 64px; padding: 0 16px 0 72px; border-color: #e3e3e5; background: var(--system-topbar-bg); box-shadow: none; }
  body.course-template .topbar .page-title strong { color: #292628; font-size: 1rem; }
  body.course-template .topbar .page-title svg { display: none; }
  body.course-template .topbar .top-links { gap: 8px; }
  body.course-template .topbar .top-user { display: grid; width: 42px; min-width: 42px; max-width: 42px; height: 42px; padding: 4px; place-items: center; border-color: #ebe6e6; border-radius: 50%; background: #fff; }
  body.course-template .topbar .top-user-avatar { width: 30px; height: 30px; }
  body.course-template .topbar .top-user-name,
  body.course-template .topbar .top-user-chevron { display: none; }
  body.course-template .topbar #topTheme { width: 42px; height: 42px; padding: 9px; border: 1px solid #ebe6e6; border-radius: 50%; background: #fff; }
  body.course-template .topbar #topTheme svg { width: 21px; height: 21px; }
  body.course-template > .app-frame > main > .toolbar { position: sticky; top: 64px; z-index: 100000; display: flex; height: 52px; min-height: 52px; padding: 4px 16px; }
  body.course-template .toolbar .context-toolbar-action { min-height: 44px; height: 44px; }
  body.course-template .toolbar .context-toolbar-back,
  body.course-template .toolbar .context-toolbar-icon { width: 44px; }
  body.course-template .icon-rail .sinNav { display: none !important; }
  body.course-template .icon-rail { left: 12px; right: 12px; bottom: max(10px,env(safe-area-inset-bottom)); width: auto; height: 70px; padding: 6px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; border: 1px solid #2b2829; border-radius: 22px; background: #1b191b; box-shadow: 0 12px 28px rgba(31,20,23,.24); }
  body.course-template .icon-rail nav a { display: flex; width: 100%; height: 56px; flex-direction: column; gap: 2px; border-radius: 17px; color: #e5dfe0; font-size: .62rem; }
  body.course-template .icon-rail nav:not(.sinNav) a:first-child,
  body.course-template .icon-rail nav:not(.sinNav) a:last-child,
  body.course-template .icon-rail nav:not(.sinNav) a.mobile-profile-link { display: flex; }
  body.course-template .icon-rail nav:not(.sinNav) a > span { display: block; line-height: 1; }
  body.course-template .icon-rail nav a svg { width: 21px; height: 21px; }
  body.course-template .icon-rail nav a.active { background: transparent; color: #e5dfe0; box-shadow: none; }
  body.course-template .icon-rail nav a[data-dock-active="true"] { background: #fff; color: var(--course-accent); box-shadow: none; }
  body.course-template .icon-rail nav a::after { display: none; }
  body.course-template .icon-rail #sidebarToggle,
  body.course-template .app-frame.mobile-menu-open #sidebarToggle { top: 11px; left: 16px; width: 38px; height: 38px; border: 1px solid #ebe6e6; border-radius: 50%; background: #fff; color: #292628; box-shadow: none; }
  body.course-template .icon-rail #sidebarToggle svg { width:28px; height:28px; }
  body.course-template .sidebar { width: min(330px,90vw); padding-top: 80px; border-color: #eee7e8; background: #fff; }
  body.course-template .sidebar .side-nav a { min-height: 44px; padding: 8px 12px; border-radius: 10px; }
  body.course-template .workspace { padding: 14px 16px 118px; }
  body.course-template.dark,
  body.course-template.dark main,
  body.course-template.dark .app-frame { background: #201d1e; }
  body.course-template.dark .topbar { border-color: var(--line); background: #222325; }
  body.course-template.dark .sidebar { border-color: #3b3537; background: #292526; }
  body.course-template.dark .topbar .page-title strong { color: #f4eeee; }
  body.course-template.dark .topbar #topTheme,
  body.course-template.dark .topbar .top-user,
  body.course-template.dark .icon-rail #sidebarToggle { border-color: #4a4244; background: #352e30; color: #f4eeee; }
  body.course-template.dark .icon-rail { border-color: #4a4244; background: #100e0f; }
  body.course-template .dash-focus, body.course-template .dash-focus-image { height: auto; }
  body.course-template .dash-focus-image { height: 145px; }
}

@media (max-width: 360px) {
  .dash-module-content h3 { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .dash-module { min-height: 122px; }
  .dash-module > img, .dash-module-placeholder { min-height: 122px; }
}


/* === Foro === */
@media (max-width: 900px) {
  .forum-layout { grid-template-columns: 1fr; }
  .forum-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forum-thread-layout { grid-template-columns: 1fr; }
  .forum-thread-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .forum-hero { min-height: 210px; flex-direction: column; padding: var(--course-padding); }
  .forum-hero-content { flex-direction: column; }
  .forum-hero-icon { width: 42px; height: 42px; }
  .forum-hero-icon svg { width: 24px; height: 24px; }
  .forum-hero h1 { font-size: var(--course-detail-heading); }
  .forum-hero::after { background: linear-gradient(90deg, rgba(77, 13, 24, .96), rgba(85, 17, 28, .78)); }
  .forum-toolbar { flex-direction: column-reverse; }
  .forum-tabs { width: 100%; gap: 8px; overflow-x: auto; flex-wrap: nowrap; }
  .forum-tabs button { flex: none; }
  .forum-layout,
  .forum-sidebar,
  .forum-thread-side,
  .forum-member-grid { grid-template-columns: 1fr; }
  .forum-post-header { flex-wrap: wrap; }
  .forum-document-card { grid-template-columns: 32px minmax(0, 1fr) 30px; }
}


/* === Mi perfil === */
@media (max-width: 1100px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .profile-hero { min-height: 275px; flex-direction: column; padding: var(--course-padding); }
  .profile-hero::after { background: linear-gradient(90deg, rgba(52, 10, 20, .96), rgba(74, 17, 29, .8)); }
  .profile-hero-content { gap: var(--course-space); }
  .profile-avatar { width: 68px; height: 68px; font-size: 1.2rem; }
  .profile-hero h1 { font-size: var(--course-detail-heading); }
  .profile-tabs { flex-wrap: nowrap; gap: 8px; overflow-x: auto; }
  .profile-tabs button { flex: none; }
  .profile-stat-grid,
  .profile-side-column,
  .profile-course-grid { grid-template-columns: 1fr; }
  .profile-stat-card { min-height: 0; }
  .profile-course-row { grid-template-columns: 64px minmax(0, 1fr); }
  .profile-course-row img { width: 64px; height: 56px; }
  .profile-course-row em { grid-column: 2; width: fit-content; }
  .profile-activity-list > div { grid-template-columns: 26px minmax(0, 1fr); }
  .profile-activity-list time { grid-column: 2; margin-top: -7px; }
}

/* === Experiencia móvil de la plataforma === */
@media (max-width: 620px) {
  body.course-template { --app-canvas: #f7f5f3; --app-ink: #292528; --app-line: #e9e3e1; }
  body.course-template .app-frame,
  body.course-template main { background: var(--app-canvas); }
  body.course-template .topbar { position: sticky; top: 0; z-index: 100001; }
  body.course-template .icon-rail #sidebarToggle svg path { stroke: currentColor; }
  body.course-template .icon-rail nav a[data-dock-active="true"] { background: #fff; color: #9e1c2b; }
  body.course-template .icon-rail nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  body.course-template .workspace { max-width: 620px; margin: 0 auto; }
  body.course-template .workspace :is(button,a) { -webkit-tap-highlight-color: transparent; }

  /* Inicio: la siguiente lección manda y las cifras se leen de un vistazo. */
  .learning-dashboard { --dash-blue: #78656a; gap: 16px; }
  .dash-welcome { min-height: 225px; border: 0; border-radius: 18px; padding: 20px; background-position: 61% center; box-shadow: 0 8px 20px rgba(47,33,35,.08); }
  .dash-welcome h1 { max-width: 290px; font-size: 1.43rem; line-height: 1.13; }
  .dash-welcome p { max-width: 275px; font-size: .77rem; line-height: 1.4; }
  .dash-welcome .dash-outline-link { min-height: 42px; padding-inline: 14px; border-radius: 21px; }
  .dash-focus { grid-template-columns: 106px minmax(0,1fr); min-height: 174px; border-color: var(--app-line); border-radius: 17px; box-shadow: 0 5px 16px rgba(47,33,35,.05); }
  body.course-template .dash-focus-image { height: 100%; min-height: 174px; }
  .dash-focus-content { gap: 5px; padding: 11px 12px; }
  .dash-focus-content .dash-eyebrow { margin: 0; font-size: .58rem; line-height: 1.3; }
  .dash-focus-content h2 { font-size: .98rem; line-height: 1.22; }
  .dash-focus-content p { display: -webkit-box; overflow: hidden; font-size: .68rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .dash-focus-progress { font-size: .66rem; }
  .dash-focus-content .dash-primary-button { min-height: 36px; margin-top: 1px; padding: 6px 9px; border-radius: 18px; font-size: .66rem; }
  .dash-metrics { gap: 9px; }
  .dash-metric { min-height: 137px; gap: 7px; padding: 13px; border: 0; border-radius: 16px; box-shadow: none; }
  .dash-metric:nth-child(4n+1) { background: #f5e5e7; }
  .dash-metric:nth-child(4n+2) { background: #eee8dc; }
  .dash-metric:nth-child(4n+3) { background: #e8ede5; }
  .dash-metric:nth-child(4n+4) { background: #eee8e7; }
  .dash-metric-top { gap: 6px; font-size: .67rem; line-height: 1.3; }
  .dash-metric-icon { width: 25px; height: 25px; border-radius: 8px; background: rgba(255,255,255,.6); }
  .dash-metric-value strong { font-size: 1.5rem; }
  .dash-metric small { font-size: .65rem; line-height: 1.3; }
  .dash-panel,.dash-module { border-color: var(--app-line); border-radius: 16px; box-shadow: none; }
  .dash-chart-legend .knowledge { background: #78656a; }
  .dash-chart .knowledge-line { stroke: #78656a; }

  /* Cursos: mosaico corto que deja ver opciones sin una lista interminable. */
  .learning-view { gap: 16px; }
  .learning-hero,.course-panel { border-color: var(--app-line); border-radius: 17px; box-shadow: none; }
  .learning-hero { min-height: 0; grid-template-columns: minmax(0,1fr) 38%; background: #f1e9e6; }
  .learning-hero-copy { justify-content: center; padding: 16px 12px 16px 16px; }
  .learning-breadcrumb { gap: 4px; margin-bottom: 8px; font-size: .62rem; }
  .learning-breadcrumb strong { padding: 3px 6px; }
  .learning-hero h1 { font-size: 1.18rem; line-height: 1.15; }
  .learning-hero p { display: -webkit-box; overflow: hidden; margin: 8px 0; font-size: .7rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .learning-hero-link { font-size: .7rem; }
  .learning-hero-art { height: auto; min-height: 180px; }
  .course-panel-header { align-items: center; flex-direction: row; padding: 15px; }
  .course-panel h2 { font-size: 1.04rem; }
  .course-count { padding: 6px 8px; white-space: nowrap; font-size: .62rem; }
  .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 10px; }
  .course-card { border-color: var(--app-line); border-radius: 6px; box-shadow: none; }
  .course-cover { aspect-ratio: 1.22; }
  .course-card-content { min-height: 0; padding: 10px; }
  .course-category { margin-bottom: 5px; font-size: .58rem; }
  .course-card h3 { font-size: .77rem; line-height: 1.3; -webkit-line-clamp: 3; }
  .course-card p { margin: 6px 0 12px; font-size: .67rem; line-height: 1.35; -webkit-line-clamp: 2; }
  .course-card-footer { gap: 3px; font-size: .61rem; line-height: 1.3; }
  .course-tags { gap: 3px; margin-top: 9px; }
  .course-tags span { padding: 3px 5px; font-size: .56rem; }

  /* Curso y conversación: controles táctiles, módulos y composición ligera. */
  .course-detail { gap: 14px; }
  .lesson-media { overflow: hidden; border-radius: 17px; }
  .detail-title-row h1 { font-size: 1.16rem; }
  .detail-overview-card,.detail-box,.detail-tab-panel { border-radius: 15px; }
  .detail-tabs { overflow-x: auto; scrollbar-width: none; }
  .detail-tabs::-webkit-scrollbar { display: none; }
  .detail-tabs button { min-height: 42px; white-space: nowrap; }
  .detail-sidebar { gap: 10px; }
  .detail-box { border-color: var(--app-line); }
  .forum-hero,.profile-hero { border: 0; border-radius: 17px; box-shadow: 0 8px 20px rgba(47,33,35,.08); }
  .forum-hero { min-height: 174px; padding: 14px; gap: 8px; }
  .forum-hero::after { background: linear-gradient(90deg,rgba(35,24,27,.93),rgba(45,25,29,.4)); }
  .forum-hero-content { flex-direction: row; gap: 9px; }
  .forum-hero-icon { width: 36px; height: 36px; }
  .forum-hero-icon svg { width: 21px; height: 21px; }
  .forum-hero h1 { font-size: 1.08rem; }
  .forum-hero p { margin-top: 5px; font-size: .72rem; line-height: 1.35; }
  .forum-join { min-height: 36px; align-self: flex-end; padding: 6px 12px; border-radius: 18px; }
  .forum-primary-button { min-height: 42px; border-radius: 21px; }
  .forum-toolbar { gap: 6px; }
  .forum-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; overflow: visible; }
  .forum-tabs button { min-width: 0; min-height: 38px; padding: 4px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--panel); font-size: .71rem; line-height: 1.2; }
  .forum-tabs button[aria-selected="true"] { border-color: var(--course-accent); background: var(--course-accent-soft); color: var(--course-accent-ink); }
  .forum-post-card,.forum-side-card,.forum-information-panel,.forum-thread-question,.forum-reply { border-color: var(--app-line); border-radius: 15px; box-shadow: none; }
  .forum-post-card { padding: 14px; gap: 9px; }
  .forum-post-card h2 { font-size: .96rem; }
  .forum-replies-preview .forum-reply { padding: 10px; }
  .forum-replies-preview .forum-reply-body { -webkit-line-clamp: 2; }
  .forum-open-thread { min-height: 42px; font-size: .74rem; }
  .forum-thread-buttons button { min-height: 42px; padding: 8px 10px; }
  .forum-reply-actions button { min-height: 42px; }
  .forum-avatar { width: 36px; height: 36px; }
  .forum-reply-form { scroll-margin-bottom: 100px; }
  .forum-compose-shell { border-radius: 15px; }
  .forum-reply-tools button { width: 42px; height: 42px; }
  .forum-reply-tools button[type="submit"] { width: 42px; height: 42px; }
  .topic-accessibility,.topic-motion { background: #9b7176; }

  /* Perfil: identidad primero, progreso en tarjetas compactas. */
  .profile-hero { min-height: 235px; padding: 18px; }
  .profile-hero::after { background: linear-gradient(90deg,rgba(35,24,27,.9),rgba(49,28,32,.27)); }
  .profile-hero-content { align-items: center; }
  .profile-avatar { width: 62px; height: 62px; }
  .profile-edit-button { min-height: 40px; border-radius: 20px; }
  .profile-tabs { scrollbar-width: none; }
  .profile-tabs::-webkit-scrollbar { display: none; }
  .profile-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .profile-stat-card { display: flex; min-height: 145px; flex-direction: column; gap: 8px; padding: 12px; border: 0; border-radius: 15px; box-shadow: none; }
  .profile-stat-card:nth-child(3n+1) { background: #f3e5e6; }
  .profile-stat-card:nth-child(3n+2) { background: #ece9df; }
  .profile-stat-card:nth-child(3n+3) { background: #e8ece5; }
  .profile-stat-card > div { gap: 4px; }
  .profile-stat-card strong { font-size: 1.05rem; }
  .profile-stat-card small { font-size: .64rem; }
  .profile-stat-card .profile-text-button { margin-top: auto; font-size: .67rem; }
  .profile-stat-card .profile-progress { background: rgba(255,255,255,.75); }
  .profile-badge-dots span:nth-child(n) { background: #fff; color: #a21e2e; }
  .profile-panel,.profile-section-panel { border-color: var(--app-line); border-radius: 15px; box-shadow: none; }
  .profile-course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
  .dash-focus { grid-template-columns: 90px minmax(0,1fr); }
  .dash-focus-content p { display: none; }
}

/* === Ajustes de lectura y navegación táctil === */
@media (max-width: 620px) {
  .dash-focus-content .dash-eyebrow,
  .course-category,
  .course-card-footer,
  .course-tags span { font-size: .72rem; }
  .dash-focus-content .dash-primary-button,
  .forum-join,
  .profile-edit-button { min-height: 44px; font-size: .75rem; }
  .dash-focus-content p { font-size: .72rem; }
  .dash-focus-content h2 { font-size: 1rem; }
  .course-grid { grid-template-columns: 1fr; gap: 10px; }
  .course-card { display: grid; grid-template-columns: 35% minmax(0,1fr); min-height: 164px; }
  .course-cover { height: 100%; aspect-ratio: auto; }
  .course-card-content { justify-content: center; padding: 11px 12px; }
  .course-card h3 { font-size: .84rem; }
  .course-card p { margin: 6px 0 12px; font-size: .75rem; }
  .course-card-footer span:first-child { display: none; }
  .course-tags { margin-top: 7px; }
  .course-tags span:nth-child(n+3) { display: none; }
  .detail-tabs { display: flex; overflow-x: auto; gap: 4px; }
  .detail-tabs button { width: auto; min-height: 44px; padding: 8px 6px; border-radius: 6px; font-size: .75rem; }
  .lesson-task { min-height: 44px; grid-template-columns: 32px minmax(0,1fr); align-items: center; }
  .lesson-task input,.task-check { width: 32px; height: 32px; }
  .course-download { min-height: 36px; }
  .profile-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .profile-tabs button { min-height: 42px; padding: 0 3px; font-size: .7rem; }
  .profile-stat-card:nth-child(3) { grid-column: 1 / -1; min-height: 112px; }
  .profile-stat-card:nth-child(3) .profile-stat-content { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
  .course-card { grid-template-columns: 34% minmax(0,1fr); }
  .course-card-content { padding: 9px; }
  .course-card p { -webkit-line-clamp: 2; }
  .course-material { grid-template-columns: 32px minmax(0,1fr); }
  .course-material .course-download { grid-column: 2; justify-self: start; }
}

/* === Paleta móvil en tema oscuro === */
@media (max-width: 620px) {
  body.course-template.dark { --app-canvas: #201d1e; --app-line: #40383a; }
  body.course-template.dark .app-frame,
  body.course-template.dark main { background: var(--app-canvas); }
  body.course-template.dark .dash-metric:nth-child(n),
  body.course-template.dark .profile-stat-card:nth-child(n) { border-color: #45393c; background: #30292b; color: #f3eded; }
  body.course-template.dark .dash-metric:nth-child(2n),
  body.course-template.dark .profile-stat-card:nth-child(2n) { background: #37302d; }
  body.course-template.dark .dash-metric :is(small,.dash-metric-value span),
  body.course-template.dark .profile-stat-card small { color: #c7bfc0; }
  body.course-template.dark .dash-metric-icon,
  body.course-template.dark .profile-stat-icon { background: transparent; }
  body.course-template.dark .learning-hero { background: #30292b; }
  body.course-template.dark .course-card,
  body.course-template.dark .course-panel,
  body.course-template.dark .profile-panel,
  body.course-template.dark .forum-post-card { border-color: var(--app-line); }
  body.course-template.dark .profile-badge-dots span:nth-child(n) { background: #4a383d; color: #f4a0aa; }
}

/* === Dock móvil: navegación iconográfica === */
@media (max-width: 620px) {
  body.course-template .icon-rail {
    left: 14px;
    right: 14px;
    height: 70px;
    padding: 7px 8px;
    gap: 0;
    border-color: rgba(255,255,255,.08);
    border-radius: 999px;
    background: #171719;
    box-shadow: 0 8px 22px rgba(27,20,22,.2);
  }
  body.course-template .icon-rail nav:not(.sinNav) a {
    display: grid;
    width: 100%;
    height: 54px;
    padding: 0;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    color: #e3e0e1;
  }
  body.course-template .icon-rail nav:not(.sinNav) a:first-child,
  body.course-template .icon-rail nav:not(.sinNav) a:last-child { display: grid; }
  body.course-template .icon-rail nav.module-rail-nav a > span { display: none; }
  body.course-template .icon-rail nav:not(.sinNav) a[data-dock-active="true"] {
    background: transparent;
    color: #e3e0e1;
  }
  body.course-template .icon-rail nav:not(.sinNav) a:hover,
  body.course-template .icon-rail nav:not(.sinNav) a:focus-visible { background: transparent; }
  body.course-template .icon-rail nav:not(.sinNav) a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  body.course-template.dark .icon-rail { border-color: rgba(255,255,255,.1); background: #101012; }
}

/* === Navegación de cinco módulos y páginas secundarias === */
@media (max-width: 900px) {
  body.course-template .side-module a { min-height: 44px; }
}
@media screen and (max-width: 620px) {
  body.course-template .icon-rail { grid-template-columns: repeat(5,minmax(0,1fr)); padding: 7px; }
  body.course-template .icon-rail #railTheme { display: none; }
  body.course-template .icon-rail .module-rail-nav a { display: grid; min-width: 0; width: 100%; height: 54px; place-items: center; }
  body.course-template .icon-rail nav.module-rail-nav a:nth-child(1) { order: 1; }
  body.course-template .icon-rail nav.module-rail-nav a:nth-child(2) { order: 2; }
  body.course-template .icon-rail nav.module-rail-nav a:nth-child(3) { order: 3; }
  body.course-template .icon-rail nav.module-rail-nav a:nth-child(4) { order: 4; }
  body.course-template .icon-rail nav.module-rail-nav a:nth-child(5) { order: 5; }
  body.course-template .icon-rail nav.module-rail-nav a > svg.ui-icon { display: block; width: 50px; height: 50px; max-width: 100%; padding: 13px; border-radius: 50%; stroke: currentColor; stroke-width: 1.8; transition: background-color .18s ease,color .18s ease,transform .18s ease; }
  body.course-template .icon-rail nav.module-rail-nav a[data-dock-active="true"] > svg.ui-icon { background: #fff; color: var(--brand-accent); }
  body.course-template .icon-rail .module-rail-nav a:active > svg.ui-icon { transform: scale(.94); }
  body.course-template .module-page { gap: 10px; }
  .certificate-viewer-head { min-height: 142px; align-items: end; padding: 14px; background-position: center, 62% center; }
  .certificate-viewer-head[data-certificate-kind="certificate-service"] { background-position: center, 57% center; }
  .certificate-viewer-head h1 { font-size: 1.1rem; }
  .certificate-page-count { align-self: center; }
  .certificate-switcher { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .certificate-switcher a { justify-content: center; min-width: 0; font-size: .69rem; }
  .certificate-stage { padding: 10px; }
  .certificate-sheet::before { inset: 9px; }
  .certificate-sheet::after { inset: 13px; }
  .certificate-sheet-inner { padding: 5% 7% 3%; }
  .certificate-logo { width: 76px; height: 29px; }
  .certificate-emblem { width: 50px; height: 50px; margin: 1% 0; }
  .certificate-eyebrow { font-size: .37rem; }
  .certificate-sheet h2 { font-size: 1.5rem; }
  .certificate-subtitle { margin-bottom: 3%; font-size: .95rem; }
  .certificate-intro, .certificate-completion, .certificate-message { font-size: .51rem; }
  .certificate-recipient { font-size: 2rem; }
  .certificate-divider { margin-bottom: 2%; }
  .certificate-sheet h3 { font-size: .98rem; }
  .certificate-course { font-size: .47rem; }
  .certificate-message { margin-top: 2%; }
  .certificate-seal { width: 45px; height: 45px; border-width: 3px; box-shadow: 0 0 0 2px #c6a45c; }
  .certificate-seal span { font-size: 1rem; }
  .certificate-seal small { font-size: .34rem; }
  .certificate-date { margin-bottom: 2%; font-size: .43rem; }
  .certificate-signatures > div { gap: 1px; padding-top: 3px; }
  .certificate-signatures span { font-size: .76rem; white-space: nowrap; }
  .certificate-signatures small { font-size: .4rem; }
  .certificate-folio { margin-top: 2%; font-size: .35rem; }
  .module-page-header { display: grid; min-height: 0; gap: 12px; padding: 16px; border: 0; border-radius: 16px; box-shadow: 0 8px 20px rgba(47,33,35,.06); }
  .module-page-header h1 { font-size: 1.28rem; }
  .module-page-header p { font-size: .75rem; }
  .module-page-header :is(.module-primary,.module-secondary) { justify-self: start; }
  .module-page-header--courses { min-height: 164px; align-content: end; background-position: center, 54% center; }
  .module-columns, .module-location-layout, .module-resource-grid { grid-template-columns: 1fr; }
  .module-card, .module-course-card, .module-thread-list > a, .module-resource, .module-empty { border-color: var(--app-line); border-radius: 15px; box-shadow: none; }
  .forum-collection-hero { min-height: 196px; align-items: flex-start; }
  .forum-collection-hero .forum-hero-content { align-items: flex-start; }
  .forum-collection-hero-count { min-width: 0; padding: 6px 9px; }
  .forum-collection-hero-count strong { font-size: 1rem; }
  .forum-collection-layout { grid-template-columns: 1fr; gap: 10px; }
  .forum-collection-panel,.forum-collection-aside { padding: 14px; border-radius: 15px; }
  .forum-collection-empty { min-height: 210px; padding: 17px; }
  .module-card, .module-empty { padding: 15px; }
  .module-location-layout .module-map { min-height: 220px; border-radius: 15px; }
  .module-course-card { grid-template-columns: 90px minmax(0,1fr); gap: 10px; min-height: 124px; padding: 10px 30px 10px 10px; }
  .module-course-card img { width: 90px; height: 96px; border-radius: 10px; }
  .module-course-card h2 { font-size: .84rem; }
  .module-course-card p { margin-bottom: 7px; font-size: .7rem; }
  .module-course-progress { display: grid; gap: 5px; }
  .module-course-progress > span { width: 100%; }
  .module-scale { gap: 5px; }
  .module-scale > span { flex-basis: 100%; }
  .module-scale label span { width: 38px; height: 38px; }
  .module-data-list > div { grid-template-columns: 90px minmax(0,1fr); }
  .module-address-fields { grid-template-columns: 1fr; }
  .module-preferences > label, .module-preference-theme { min-height: 64px; }
  .module-profile-page .profile-hero { min-height: 184px; padding: 14px; }
  .module-profile-page .profile-hero-content { align-items: flex-start; }
  .module-profile-page .profile-avatar { width: 54px; height: 54px; font-size: 1rem; }
  .module-profile-page .profile-badges span:last-child { display: none; }
  .profile-interior-heading { padding: 0 1px; }
  .profile-interior-heading h2 { font-size: .95rem; }
  .profile-detail-card-head { gap: 9px; }
  .module-profile-page .profile-detail-card:first-child .module-data-list > div:nth-child(2) { grid-template-columns: 1fr; gap: 3px; }
  .profile-location-layout, .profile-activity-grid, .profile-preference-layout { grid-template-columns: 1fr; }
  .profile-location-layout .module-map { min-height: 210px; }
  .profile-location-card { min-height: 0; }
}
@media (max-width: 350px) {
  body.course-template .icon-rail nav.module-rail-nav a > svg.ui-icon { width: 46px; height: 46px; padding: 11px; }
}

/* Evaluaciones en pantallas compactas */
@media (max-width: 760px) {
  .evaluation-hub, .evaluation-detail { gap: 10px; }
  .evaluation-hero { grid-template-columns: 1fr; align-items: end; min-height: 168px; padding: 18px; background-position: 57% center; }
  .evaluation-hero h1 { font-size: 1.5rem; }
  .evaluation-hero-note { display: none; }
  .evaluation-tabs { gap: 0; padding: 0 6px; }
  .evaluation-tabs a { padding: 12px 10px; font-size: .72rem; }
  .evaluation-tabs a::after { left: 10px; right: 10px; }
  .evaluation-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .evaluation-metric { min-height: 86px; padding: 10px 11px; }
  .evaluation-metric-label { font-size: .61rem; }
  .evaluation-metric-value { flex-wrap: wrap; gap: 4px 6px; margin-top: 10px; }
  .evaluation-metric-value strong { font-size: 1.25rem; }
  .evaluation-metric-value small { font-size: .61rem; }
  .evaluation-metric-value .evaluation-progress { width: 100%; flex-basis: 100%; margin: 3px 0 0; }
  .evaluation-list-panel, .evaluation-learning-history { padding: 12px; }
  .evaluation-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
  .evaluation-search-label { grid-column: 1 / -1; }
  .evaluation-filters :is(select,input) { height: 44px; }
  .evaluation-row { grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 9px 11px; padding: 13px; }
  .evaluation-row-main { grid-column: 1 / -1; }
  .evaluation-row-icon { width: 38px; height: 38px; }
  .evaluation-row h3 { font-size: .81rem; }
  .evaluation-row p { font-size: .74rem; }
  .evaluation-kind { display: none; }
  .evaluation-status { grid-column: 1; align-self: center; }
  .evaluation-row-date { grid-column: 2; grid-row: 2; text-align: right; }
  .evaluation-row-progress { grid-column: 1; grid-row: 3; align-self: center; }
  .evaluation-row-button { grid-column: 2; grid-row: 3; min-height: 44px; padding: 8px 12px; }
  .evaluation-learning-history, .evaluation-detail-layout { grid-template-columns: 1fr; }
  .evaluation-detail-head { display: grid; grid-template-columns: 43px minmax(0,1fr); gap: 9px; padding: 14px; }
  .evaluation-detail-icon { width: 43px; height: 43px; }
  .evaluation-detail-head h1 { font-size: 1.13rem; }
  .evaluation-detail-head > .evaluation-status { grid-column: 2; }
  .evaluation-detail-main, .evaluation-detail-aside { padding: 15px; }
  .evaluation-form-footer { align-items: stretch; flex-direction: column; }
  .evaluation-form-footer > span { max-width: none; }
  .evaluation-form-footer button { min-height: 44px; }
}
@media (max-width: 360px) {
  .evaluation-metric-label { gap: 5px; font-size: .57rem; }
  .evaluation-metric-value small { font-size: .58rem; }
  .evaluation-row-button { padding-inline: 8px; }
}

/* Lucide conserva el mismo trazo; en móvil crece el área táctil. */
@media (max-width: 760px) {
  body.course-template .icon-rail nav.module-rail-nav a > svg.ui-icon {
    width: 50px;
    height: 50px;
    padding: 13px;
    stroke-width: 1.75;
  }
  body.course-template :is(.forum-reply-tools,.course-comment-tools) button { min-width: 44px; min-height: 44px; }
  body.course-template :is(.forum-reply-tools,.course-comment-tools,.course-submit-button) svg.ui-icon { width: 18px; height: 18px; }
}
@media (max-width: 360px) {
  body.course-template .icon-rail nav.module-rail-nav a > svg.ui-icon { width: 46px; height: 46px; padding: 11px; }
}

/* Etiquetas discretas bajo los iconos del dock. */
@media (max-width: 620px) {
  body.course-template .icon-rail nav.module-rail-nav a:nth-child(n) { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: 100%; height: 54px; box-shadow: none !important;}
  body.course-template .icon-rail nav.module-rail-nav a > span { display: block; font-size: .55rem; line-height: 1; }
  body.course-template .icon-rail nav.module-rail-nav a > svg.ui-icon { width: 34px; height: 34px; padding: 7px; }
}

@media (max-width: 760px) { body.course-template .course-submit-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; } }
@media (max-width: 900px) { body.course-template .app-frame.mobile-menu-open #sidebarToggle svg { transform: none; } }
