/* ============================================================================
   CATÁLOGO — vista Inicio (#inicio). Solo maqueta; componentes en base.css.
   Escritorio: barra (52) + barra lateral flotante que se puede ocultar + un
   único contenedor con scroll (.ct-main) que corre bajo la barra y el panel.
   Teléfono: título grande, listas agrupadas y barra de pestañas flotante.
   ========================================================================== */
#inicio { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: var(--canvas); color: var(--ink); }
#app[data-view="trabajo"] #inicio { display: none; }
.ct { position: absolute; inset: 0; }
.ct-svg { display: block; }
.ct-b { display: block; }
.ct-free { flex: none; display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); font-size: 10px; font-weight: 600; }
.ct-mi { font-family: var(--math); font-size: 14px; font-weight: 500; }

/* ------------------------------------------------------------ BARRA (52) */
.ct-desk { --ct-l: calc(var(--pl-w) + var(--gap-panel) + 16px); }
.ct-desk[data-side="off"] { --ct-l: 24px; }
.ct-tb { position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: var(--tb-h); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 0 12px; border-bottom: .5px solid var(--sep); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 .5px var(--glass-line), var(--float); }
.ct-tb-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ct-tb-r { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.ct-circ { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 17px; background: var(--glass2); color: var(--ink); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 .5px var(--glass-line), 0 1px 3px rgba(0, 0, 0, .06); }
.ct-circ:hover { background: var(--raised); }
.ct-circ[aria-pressed="false"] { color: var(--ink2); }
.ct-logo { display: flex; align-items: center; gap: 6px; flex: none; color: var(--ink); }
.ct-logo .brand-word { font-family: var(--math); font-size: 18px; line-height: 1; font-weight: 500; letter-spacing: .012em; white-space: nowrap; }
.ct-vsep { flex: none; width: 1px; height: 20px; background: var(--sep2); }
.ct-title { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; line-height: 17px; }
.ct-search { display: flex; align-items: center; gap: 8px; width: min(320px, 30vw); height: 34px; padding: 0 12px; border-radius: 17px; background: var(--glass2); color: var(--ink2); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 .5px var(--glass-line), 0 1px 3px rgba(0, 0, 0, .06); }
.ct-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--accent-soft); }
.ct-search input { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.ct-search input::placeholder { color: var(--ink2); }
.ct-vseg > button { width: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ct-new { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 34px; padding: 0 16px 0 12px; border: 0; border-radius: 17px; background: var(--accent-fill); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); white-space: nowrap; }
.ct-new:hover { filter: brightness(1.08); }

/* ------------------------------------------------- BARRA LATERAL (flotante) */
.ct-side { position: absolute; left: var(--gap-panel); top: calc(var(--tb-h) + var(--gap-panel)); bottom: calc(var(--sb-h) + var(--gap-panel)); z-index: 2; width: var(--pl-w); transition: transform .22s ease, opacity .22s ease, visibility 0s linear 0s; }
.ct-desk[data-side="off"] .ct-side { transform: translateX(calc(-100% - 16px)); opacity: 0; visibility: hidden; transition: transform .22s ease, opacity .22s ease, visibility 0s linear .22s; }
.ct-side-b { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 6px 8px; }
.ct-navs { display: flex; flex-direction: column; gap: 2px; }
.ct-side-h { display: flex; align-items: center; height: 28px; margin: 0; padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--ink2); }
.ct-navw { position: relative; }
.ct-nav { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; text-align: left; text-decoration: none; }
.ct-nav:hover { background: var(--sel); text-decoration: none; }
.ct-nav[aria-current="page"] { background: var(--accent-soft); font-weight: 500; }
.ct-nav .ic { color: var(--accent); }
.ct-nav.is-drop { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ct-nav-t { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; }
.ct-nav-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ct-nav-n { flex: none; min-width: 16px; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink2); }
.ct-nav-more { position: absolute; right: 4px; top: 2px; display: none; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: var(--raised); color: var(--ink2); box-shadow: 0 0 0 .5px var(--sep2); }
.ct-navw:hover .ct-nav-more, .ct-nav-more:focus-visible { display: inline-flex; }
.ct-navw:hover .ct-nav-n { visibility: hidden; }
.ct-nav-add { color: var(--ink2); }
.ct-nav-add .ic { color: var(--ink2); }
.ct-acct { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 12px; border-top: .5px solid var(--sep); }
.ct-acct-r { display: flex; align-items: flex-start; gap: 8px; }
.ct-acct-r > .ic { color: var(--ink2); }
.ct-acct-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-acct-h { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; line-height: 18px; }
.ct-acct-h .ic { color: var(--ink2); }
.ct-acct-s { font-size: 12px; line-height: 16px; color: var(--ink2); }
.ct-acct-s b { color: var(--ink); font-weight: 600; }
/* con sesión, el encabezado de la tarjeta es el botón del menú de cuenta (docs/fundadores.md) */
.ct-acct-r.is-menu { width: 100%; margin: -6px; padding: 6px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; box-sizing: content-box; }
.ct-acct-r.is-menu:hover, .ct-acct-r.is-menu[aria-expanded="true"] { background: var(--sel); }
.ct-acct-fd { display: flex; margin: 2px 0; }
.ct-m-fd { display: flex; margin: 2px 0 1px; }
/* la insignia en el menú de cuenta: «Fundador» y la fecha */
.ct-mfd { margin-left: 6px; }

/* ------------------------------------------------ CONTENIDO (único scroll) */
.ct-main { position: absolute; inset: 0; z-index: 1; overflow-x: hidden; overflow-y: auto; padding: calc(var(--tb-h) + 24px) 24px calc(var(--sb-h) + 32px) var(--ct-l); outline: none; transition: padding-left .22s ease; scroll-padding-top: calc(var(--tb-h) + 16px); }
.ct-content { container-type: inline-size; display: flex; flex-direction: column; gap: 32px; max-width: 1600px; }
.ct-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ct-sh { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.ct-sh h2 { margin: 0; font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-sh-n { font-size: 15px; color: var(--ink2); }
.ct-sh-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ct-sh-more { color: var(--ink2); }
.ct-pop { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px 0 12px; border: 0; border-radius: 8px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep2); font-size: 13px; white-space: nowrap; }
.ct-pop .ic { color: var(--ink2); }
.ct-pop:hover { box-shadow: 0 0 0 .5px var(--sep2), 0 1px 3px rgba(0, 0, 0, .08); }
.ct-lead { margin: -4px 0 0; max-width: 720px; font-size: 13px; line-height: 1.5; color: var(--ink2); }

/* plantillas */
.ct-tpls { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; }
.ct-tpl { display: flex; flex-direction: column; gap: 8px; min-height: 118px; min-width: 0; padding: 8px; border: 0; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); text-align: left; transition: box-shadow .15s; }
.ct-tpl:hover { box-shadow: 0 0 0 .5px var(--sep2), 0 4px 14px rgba(0, 0, 0, .08); }
.ct-tpl-th { flex: none; display: flex; align-items: center; justify-content: center; height: 64px; border-radius: 8px; background: var(--canvas); overflow: hidden; }
.ct-tpl-th .ct-svg, .ct-ex-th > svg, .ct-card-th > svg { width: 100%; height: 100%; }
.ct-tpl-blank { background: transparent; border: 1px dashed var(--sep2); color: var(--accent); }
.ct-tpl-t { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; min-width: 0; }
.ct-tpl-n { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12.5px; font-weight: 500; line-height: 16px; }
.ct-tpl-n.is-accent { color: var(--accent-text); font-weight: 600; }
.ct-tpl-d { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11.5px; line-height: 14px; color: var(--ink2); }

/* tabla «Mis ejercicios» */
.ct-table { --ct-cols: 64px minmax(0, 1fr) 188px 40px 80px 104px 28px; padding: 4px; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); }
.ct-tr { position: relative; display: grid; grid-template-columns: var(--ct-cols); column-gap: 16px; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 8px; }
.ct-th { min-height: 32px; margin-bottom: 4px; border-radius: 0; box-shadow: inset 0 -.5px 0 var(--sep); font-size: 11px; font-weight: 600; color: var(--ink2); }
.ct-th-b { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.ct-th-b:hover, .ct-th-b.is-on { color: var(--ink); }
.ct-sort-ic { display: inline-flex; }
.ct-sort-ic.is-up { transform: rotate(180deg); }
.ct-row + .ct-row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: .5px; background: var(--sep); }
.ct-row:hover { background: var(--sel); }
.ct-row:hover::before, .ct-row:hover + .ct-row::before, .ct-row.is-edit::before, .ct-row.is-edit + .ct-row::before { background: transparent; }
.ct-row.is-edit { align-items: start; padding-top: 12px; padding-bottom: 12px; background: var(--accent-soft); }
.ct-row.is-edit > [role="cell"]:not(.ct-c-nm) { min-height: 28px; display: flex; align-items: center; }
.ct-row.is-edit .ct-c-gh { justify-content: center; }
.ct-c-th { display: flex; align-items: center; }
.ct-th-s { display: block; width: 64px; height: 28px; border-radius: 6px; background: var(--canvas); box-shadow: inset 0 0 0 .5px var(--sep); overflow: hidden; }
.ct-c-nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ct-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; text-decoration: none; }
.ct-nm:hover { text-decoration: none; color: var(--accent-text); }
.ct-auto { flex: none; font-weight: 600; }
.ct-inf { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--ink2); }
.ct-fav { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--ink2); opacity: 0; }
.ct-fav[aria-pressed="true"] { opacity: 1; color: var(--accent); }
.ct-fav[aria-pressed="true"] svg { fill: currentColor; }
.ct-row:hover .ct-fav, .ct-fav:focus-visible { opacity: 1; }
.ct-fav:hover { background: var(--fill); }
.ct-c-tipo, .ct-c-un, .ct-c-mod { color: var(--ink2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-c-gh { text-align: center; font-size: 12.5px; }
.ct-more { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--ink2); }
.ct-more:hover { background: var(--fill); color: var(--ink); }
.ct-row[draggable="true"] { cursor: default; }
/* renombrar en línea */
.ct-ren { display: flex; flex-direction: column; gap: 8px; min-width: 0; width: 100%; }
.ct-ren-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ct-ren-in { width: 320px; max-width: 100%; min-width: 0; height: 28px; padding: 0 8px; border: 0; outline: none; border-radius: 8px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); font-size: 13px; font-weight: 500; }
.ct-ren-help { font-size: 12px; line-height: 16px; color: var(--ink2); }

@container (max-width: 1040px) {
  .ct-inf { display: none; }
}
@container (max-width: 860px) {
  .ct-table { --ct-cols: 64px minmax(0, 1fr) 150px 36px 92px 28px; }
  .ct-table .ct-c-un { display: none !important; }
}
@container (max-width: 640px) {
  .ct-table { --ct-cols: 64px minmax(0, 1fr) 84px 28px; }
  .ct-table .ct-c-tipo, .ct-table .ct-c-gh, .ct-table .ct-tr > [role="columnheader"]:nth-child(3) { display: none !important; }
  .ct-inf { display: none; }
}

/* cuadrícula */
.ct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.ct-card { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 8px 12px; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); }
.ct-card.ct-row::before { display: none; }
.ct-card:hover { background: var(--raised); box-shadow: 0 0 0 .5px var(--sep2), 0 4px 14px rgba(0, 0, 0, .08); }
.ct-card.is-edit { background: var(--raised); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.ct-card-th { display: block; height: 84px; margin-bottom: 6px; border-radius: 8px; background: var(--canvas); overflow: hidden; }
.ct-card-n { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 28px; padding: 0 0 0 4px; }
.ct-card-acts { margin-left: auto; flex: none; display: flex; align-items: center; gap: 2px; }
.ct-card-s { padding: 0 4px; font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-card .ct-ren { padding: 0 4px; }
.ct-card .ct-ren-in { width: 100%; }

/* ejemplos */
.ct-exs { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 12px; }
.ct-ex { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); transition: box-shadow .15s; }
.ct-ex:hover { box-shadow: 0 0 0 .5px var(--sep2), 0 4px 14px rgba(0, 0, 0, .08); }
.ct-ex-th { display: block; width: 96px; height: 70px; border-radius: 8px; background: var(--canvas); overflow: hidden; }
.ct-ex-b { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; }
.ct-ex-b h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 17px; }
.ct-ex-d { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink2); }
.ct-ex-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink2); }
.ct-ex-f .btn { padding: 0 14px; color: var(--ink); text-decoration: none; }

/* estados vacíos */
.ct-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 24px; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); text-align: center; }
.ct-empty > .ic { color: var(--ink2); }
.ct-empty-h { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.ct-empty-t { margin: 0; max-width: 460px; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.ct-empty-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }

/* barra de estado de Inicio */
.ct-sb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: var(--sb-h); display: flex; align-items: center; gap: 12px; padding: 0 8px 0 12px; border-top: .5px solid var(--sep); font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; }
.ct-sb-st { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.ct-sb-st .ic { color: var(--green); }
.ct-sb-st.is-err .ic { color: var(--red); }
.ct-sb-sep { width: 1px; height: 14px; background: var(--sep2); }
.ct-sb-fill { flex: 1 1 auto; }
.ct-sb-units { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 4px 0 8px; border: 0; border-radius: 6px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep2), 0 .5px 1.5px rgba(0, 0, 0, .06); font-size: 11.5px; font-weight: 500; color: var(--ink); }
.ct-sb-units .ic { color: var(--ink2); }

/* ============================================================== TELÉFONO */
.ct-phone { background: var(--desk); font-size: 17px; }
.ct-m-main { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; display: flex; flex-direction: column; gap: 16px; padding: max(12px, env(safe-area-inset-top, 0px)) 0 calc(env(safe-area-inset-bottom, 0px) + 8px + 62px + 32px); }
.ct-m-top { flex: none; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 16px; }
.ct-m-head { flex: none; display: flex; flex-direction: column; gap: 4px; margin-top: -12px; padding: 0 16px; }
.ct-m-head h1 { margin: 0; font-family: var(--disp); font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: .2px; }
.ct-m-head p { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink2); }
.ct-m-head b { color: var(--ink); font-weight: 600; }
.ct-m-ctl { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.ct-m-search { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 22px; color: var(--ink2); }
.ct-m-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), var(--float); }
.ct-m-search input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 17px; }
.ct-m-search input::placeholder { color: var(--ink2); }
.ct-m-seg > button { min-height: 32px; color: var(--ink); }
.ct-m-body { display: flex; flex-direction: column; gap: 16px; }
.ct-m-sec { display: flex; flex-direction: column; gap: 8px; }
.ct-m-sh { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 16px; }
.ct-m-sh h2 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--disp); font-size: 22px; line-height: 28px; font-weight: 700; }
.ct-m-link { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent-text); font-size: 15px; }
.ct-m-tpls { display: flex; gap: 12px; padding: 4px 16px 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
.ct-m-tpls::-webkit-scrollbar { display: none; }
.ct-m-tpl { flex: none; width: 96px; display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: transparent; text-align: left; scroll-snap-align: start; }
.ct-m-tpl-th { display: flex; align-items: center; justify-content: center; width: 96px; height: 78px; border-radius: 16px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); overflow: hidden; }
.ct-m-tpl-th.is-blank { color: var(--accent); }
.ct-m-tpl:active .ct-m-tpl-th { filter: brightness(.95); }
.ct-m-tpl-n { min-height: 32px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink); }
.ct-m-tpl-n.is-accent { color: var(--accent-text); font-weight: 600; }
.ct-m-list { flex: none; }
.ct-m-row { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 14px; column-gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 6px 16px; border: 0; background: var(--raised); color: var(--ink); font-size: 17px; text-align: left; text-decoration: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ct-m-row:hover { text-decoration: none; }
.ct-m-row:active { background: var(--sel); }
.ct-m-row > .ic:last-child { color: var(--ink2); }
.ct-m-list > li + li > .ct-m-row::before { content: ""; position: absolute; top: 0; left: 80px; right: 0; height: .5px; background: var(--sep); }
.ct-m-th { display: block; width: 52px; height: 30px; border-radius: 6px; background: var(--canvas); box-shadow: inset 0 0 0 .5px var(--sep); overflow: hidden; }
.ct-m-t { display: flex; flex-direction: column; min-width: 0; }
.ct-m-n { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ct-m-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; line-height: 22px; }
.ct-m-auto { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--fill); color: var(--ink2); font-size: 12px; font-weight: 600; }
.ct-m-star { flex: none; display: inline-flex; color: var(--accent); }
.ct-m-star svg { fill: currentColor; }
.ct-m-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; color: var(--ink2); }
.ct-m-s b { color: var(--ink); font-weight: 600; }
.ct-m-s2 { white-space: normal; }
/* filas de carpetas y preferencias (ícono de 22 en lugar de miniatura) */
.ct-m-frow { grid-template-columns: 22px minmax(0, 1fr) auto 14px; min-height: 44px; }
.ct-m-frow > .ic:first-child { color: var(--accent); }
.ct-m-list > li + li > .ct-m-frow::before, .ct-m-list > li + li > .ct-m-pref::before, .ct-m-list > li + li > .ct-m-danger::before { left: 50px; }
.ct-m-cnt { font-size: 17px; color: var(--ink2); }
.ct-m-add { grid-template-columns: 22px minmax(0, 1fr); color: var(--accent-text); }
.ct-m-add > .ic:first-child, .ct-m-add .ct-m-nm { color: var(--accent-text); }
.ct-m-acct { grid-template-columns: 22px minmax(0, 1fr); min-height: 64px; }
.ct-m-acct > .ic { color: var(--ink2); }
.ct-m-pref { grid-template-columns: minmax(0, 1fr) auto; min-height: 52px; }
.ct-m-list > li > .ct-m-pref::before { left: 16px !important; }
.ct-m-list > li + li > button.ct-m-row:not(.ct-m-frow):not(.ct-m-danger)::before { left: 16px; }
.ct-m-list > li > button.ct-m-row:not(.ct-m-frow):not(.ct-m-danger) { grid-template-columns: minmax(0, 1fr) auto 14px; min-height: 44px; }
.ct-m-val { font-size: 17px; color: var(--ink2); }
.ct-m-theme { min-width: 220px; }
.ct-m-danger { grid-template-columns: minmax(0, 1fr); min-height: 44px; }
.ct-m-danger .ct-m-nm { color: var(--red-text); }
.ct-m-cta { display: flex; flex-direction: column; padding: 4px 16px 0; }
.ct-m-back { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 10px; margin-bottom: -8px; }
.ct-m-fmore { color: var(--accent-text); background: transparent; }
.ct-m-foot { margin: 0; padding: 0 32px; font-size: 13px; line-height: 18px; color: var(--ink2); }
.ct-m-sec .ct-free { margin-left: auto; }
.ct-m-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 16px; padding: 28px 20px; border-radius: 22px; background: var(--raised); text-align: center; }
.ct-m-empty > .ic { color: var(--ink2); }
.ct-m-empty-h { margin: 4px 0 0; font-size: 17px; font-weight: 600; line-height: 22px; }
.ct-m-empty-t { margin: 0; font-size: 15px; line-height: 20px; color: var(--ink2); }
.ct-m-empty .m-btn { margin-top: 8px; }
/* barra de pestañas flotante + botón principal */
.ct-m-tabs { position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 5; display: flex; gap: 8px; height: 62px; }
.ct-m-tabbar { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border-radius: 31px; }
.ct-m-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 54px; padding: 0; border: 0; border-radius: 27px; background: transparent; color: var(--ink); }
.ct-m-tab span { font-size: 10px; line-height: 12px; font-weight: 500; }
.ct-m-tab[aria-current="page"] { background: var(--fill); color: var(--accent-text); }
.ct-m-tab[aria-current="page"] span { font-weight: 600; }
.ct-m-plus { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 31px; background: var(--accent-fill); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 .5px var(--glass-line), var(--float); }
.ct-m-plus:active { filter: brightness(.92); }

/* ============================================ «SIN GUARDAR» (borradores)
   Ejercicios nuevos que quedaron sin decidir: sección discreta en Inicio,
   entre las plantillas y Mis ejercicios. Escritorio: filas compactas en una
   tarjeta; teléfono: lista agrupada con Abrir · Guardar · Descartar (44 px). */
.ct-drafts .ct-sh h2, .ct-drafts .ct-sh-n { font-size: 13px; }
.ct-drafts .ct-sh h2 { color: var(--ink2); }
.ct-dr-list { display: flex; flex-direction: column; margin: 0; padding: 4px; list-style: none; border-radius: 12px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0, 0, 0, .05); }
.ct-draft { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 16px; align-items: center; min-height: 48px; padding: 4px 8px; border-radius: 8px; }
.ct-draft + .ct-draft::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; height: .5px; background: var(--sep); }
.ct-dr-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-dr-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--ink); }
.ct-dr-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink2); }
.ct-dr-a { display: flex; align-items: center; gap: 8px; }
/* «Descartar»: --red-text directo sobre --raised (con el relleno --fill, en oscuro bajaría a 3.65:1); el contorno lo hace botón */
.ct-dr-a .btn-danger, .ct-dr-a .btn-danger:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--sep2); }
.ct-dr-a .btn-danger:hover { box-shadow: inset 0 0 0 1.5px var(--red-text); }
@container (max-width: 560px) {
  .ct-draft { grid-template-columns: 64px minmax(0, 1fr); row-gap: 8px; padding: 8px; }
  .ct-dr-a { grid-column: 1 / -1; justify-content: flex-end; }
}
.ct-m-dlist > li { position: relative; }
.ct-m-dlist > li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.ct-m-draft { display: flex; flex-direction: column; gap: 10px; padding: 10px 16px 12px; background: var(--raised); color: var(--ink); }
.ct-m-dr-r { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; align-items: center; min-width: 0; }
.ct-m-dr-a { display: flex; gap: 8px; }
.ct-m-dbtn { flex: 1 1 0; min-width: 0; height: 44px; padding: 0 8px; border: 0; border-radius: 22px; background: var(--fill); color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-m-dbtn:active { background: var(--fill2); }
.ct-m-dbtn.is-danger, .ct-m-dbtn.is-danger:active { background: transparent; box-shadow: inset 0 0 0 1px var(--sep2); color: var(--red-text); }
.ct-m-dbtn.is-danger:active { box-shadow: inset 0 0 0 1.5px var(--red-text); }
