/* ===========================================================================
   Calendario de Pruebas — Móvil & Tablet
   Patrón calendario comprimible (estilo Google Calendar). Light only.
   Reutiliza tokens de styles.css (--primary, --surface, --subj-*, etc.)
   La vista "tablet" (≥700px) también se usa en escritorio.
   =========================================================================== */

:root { --safe-bottom: env(safe-area-inset-bottom, 0px); }

html, body, #root { height: 100%; }
body { overflow: hidden; }

.mapp {
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 480px at 90% -12%, var(--bg-grad-1), transparent 60%),
    radial-gradient(700px 420px at -10% 112%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  overflow: hidden;
  position: relative;
}

/* ============================ Header (phone) ========================= */
.mhead {
  flex-shrink: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}
.mhead-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.mh-iconbtn {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 13px;
  display: grid; place-items: center;
  color: var(--text-2);
  background: transparent;
  transition: background .15s var(--ease), transform .1s;
}
.mh-iconbtn:hover { background: var(--surface-sunken); color: var(--text); }
.mh-iconbtn:active { transform: scale(.92); }
.mh-iconbtn svg { width: 21px; height: 21px; }
.mh-iconbtn .fdot { position: absolute; transform: translate(11px,-11px); width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--surface); }

.mh-title { flex: 1; min-width: 0; line-height: 1.1; cursor: pointer; }
.mh-title .t1 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 6px; }
.mh-title .t1 .chev { width: 17px; height: 17px; color: var(--text-muted); transition: transform .25s var(--ease); }
.mhead.expanded .mh-title .t1 .chev { transform: rotate(180deg); }
.mh-title .t2 { font-size: 11.5px; font-weight: 500; color: var(--text-muted); margin-top: 1px; }

.mh-avatar {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(150deg, #f59e0b, #ef4444);
  cursor: pointer;
}
.mh-avatar.utp { background: linear-gradient(150deg, var(--primary), #7c5cf0); }

/* active filter pill row */
.mfilters { display: flex; gap: 8px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; }
.mfilters::-webkit-scrollbar { display: none; }
.mfilter-chip {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 7px 13px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}
.mfilter-chip.on { background: var(--primary-weak); border-color: transparent; color: var(--primary); }
.mfilter-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.mfilter-chip .x { display: grid; place-items: center; opacity: .7; }
.mfilter-chip svg { width: 14px; height: 14px; }

/* ============================ Tablet header ========================= */
.mhead.tablet .mhead-row { padding: 12px 18px; gap: 14px; }
.mhead.tablet .mh-title .t1 { font-size: 20px; }
.mhead.tablet .mhead-row2 {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 12px;
}
.mhead.tablet .mhead-row2 .spacer { flex: 1; }
.mhead.tablet .seg2 {
  display: inline-flex; background: var(--surface-sunken);
  border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; gap: 2px;
}
.mhead.tablet .seg2 button { padding: 7px 14px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.mhead.tablet .seg2 button svg { width: 15px; height: 15px; }
.mhead.tablet .seg2 button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 600; }
.mhead.tablet .tbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; min-width: 38px; padding: 0 12px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  font-size: 12.5px; font-weight: 600;
}
.mhead.tablet .tbtn svg { width: 16px; height: 16px; }
.mhead.tablet .tbtn.icon { padding: 0; width: 38px; }
.mhead.tablet .tbtn.on { background: var(--primary-weak); border-color: transparent; color: var(--primary); }

/* ============================ Period banner ========================= */
.mbanner {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; font-size: 12.5px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mbanner.active { background: var(--ok-bg); color: var(--ok-text); }
.mbanner.urgent { background: var(--holiday-bg); color: var(--holiday-text); }
.mbanner.locked { background: var(--plan-bg); color: var(--plan-text); }
.mbanner .cd { font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: .02em; }
.mbanner .sub { font-weight: 500; opacity: .82; }

/* ============================ Month nav ============================= */
.mnav { display: flex; align-items: center; gap: 6px; padding: 12px 14px 8px; }
.mnav .arrow {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
}
.mnav .arrow:active { transform: scale(.92); }
.mnav .arrow svg { width: 18px; height: 18px; }
.mnav .mtitle { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; text-transform: capitalize; flex: 1; padding-left: 4px; cursor: pointer; }
.mnav .mtitle .yr { color: var(--text-muted); font-weight: 500; }
.mnav .today-btn {
  padding: 8px 14px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}
.mnav .today-btn:active { transform: scale(.96); }

/* ============================ Calendar block ======================= */
.mcal {
  flex-shrink: 0;
  background: var(--surface);
  margin: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.mcal-wd { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mcal-wd div { text-align: center; padding: 8px 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.mcal-wd div.we { color: var(--text-faint); }

.mcal-body { display: flex; flex-direction: column; }
.mweek {
  display: grid; grid-template-columns: repeat(7, 1fr);
  overflow: hidden;
  max-height: 60px;
  opacity: 1;
  transition: max-height .34s var(--ease), opacity .22s var(--ease);
}
/* Estado 2: comprimido → solo la semana activa visible */
.mcal.collapsed .mweek { max-height: 0; opacity: 0; pointer-events: none; }
.mcal.collapsed .mweek.active { max-height: 60px; opacity: 1; pointer-events: auto; }
.mcal.collapsed .mweek.active .mday { animation: stripPulse .34s var(--ease); }
@keyframes stripPulse { from { transform: translateY(-2px); opacity: .6; } to { transform: none; opacity: 1; } }

.mday {
  position: relative;
  min-height: 56px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 2px 6px;
  cursor: pointer;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  transition: background .12s;
}
.mday:nth-child(7n) { border-right: none; }
.mweek:last-child .mday { border-bottom: none; }
.mday.out { background: var(--surface-sunken); }
.mday.we { background: linear-gradient(var(--surface-2), var(--surface-2)); }
.mday.holiday { background: var(--holiday-bg); }
.mday.plan { background: var(--plan-bg); }
.mday:active { background: var(--surface-sunken); }
.mday-num {
  width: 30px; height: 30px; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--text); border-radius: 50%;
  transition: background .14s, color .14s;
}
.mday.out .mday-num { color: var(--text-faint); font-weight: 500; }
.mday.we .mday-num { color: var(--text-2); }
.mday.today .mday-num { background: var(--primary); color: #fff; box-shadow: var(--shadow-glow); }
.mday.sel .mday-num { box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary); font-weight: 700; }
.mday.sel.today .mday-num { box-shadow: var(--shadow-glow); }
.mday-dots { display: flex; gap: 3px; height: 6px; align-items: center; }
.mday-dot { width: 6px; height: 6px; border-radius: 50%; }
.mday-dot.more { width: auto; height: auto; font-size: 8.5px; font-weight: 800; color: var(--text-muted); border-radius: 0; line-height: 1; }
/* multi-select checkbox */
.mday .mcheck {
  position: absolute; top: 5px; right: 5px;
  width: 19px; height: 19px; border-radius: 6px;
  border: 2px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; transition: all .14s;
}
.mday .mcheck svg { width: 12px; height: 12px; opacity: 0; color: #fff; }
.mday.picked .mcheck { background: var(--primary); border-color: var(--primary); }
.mday.picked .mcheck svg { opacity: 1; }
.mday.pickable:active { background: var(--primary-weak); }

/* ============================ Collapse toggle ====================== */
.mcal-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 6px 12px 0;
  padding: 7px; border-radius: 0 0 var(--r-lg) var(--r-lg);
  color: var(--text-muted); font-size: 11.5px; font-weight: 600;
  width: calc(100% - 24px);
}
.mcal-toggle:active { color: var(--text); }
.mcal-toggle svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }

/* ============================ Day list (Estado 2) ================== */
.mscroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mdaylist { padding: 14px 12px calc(96px + var(--safe-bottom)); animation: listIn .3s var(--ease); }
@keyframes listIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mdl-head { display: flex; align-items: baseline; gap: 9px; padding: 4px 4px 12px; }
.mdl-head .d-day { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; text-transform: capitalize; }
.mdl-head .d-rel { font-size: 12.5px; font-weight: 600; color: var(--primary); }
.mdl-head .d-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-muted); }

.mdl-banner {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border-radius: var(--r-md); margin-bottom: 14px; font-weight: 600;
}
.mdl-banner.holiday { background: var(--holiday-bg); color: var(--holiday-text); border: 1px solid var(--holiday-line); }
.mdl-banner.plan { background: var(--plan-bg); color: var(--plan-text); border: 1px solid var(--plan-line); }
.mdl-banner .bi { font-size: 20px; }
.mdl-banner .bt { font-size: 13.5px; font-weight: 700; }
.mdl-banner .bs { font-size: 12px; opacity: .85; font-weight: 500; }

.mtests { display: flex; flex-direction: column; gap: 10px; }
.mtest {
  display: flex; min-height: 48px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs);
  transition: transform .12s, box-shadow .14s;
}
.mtest:active { transform: scale(.99); box-shadow: var(--shadow-sm); }
.mtest .bar { width: 6px; flex-shrink: 0; background: var(--cln); }
.mtest .body { flex: 1; min-width: 0; padding: 12px 13px; }
.mtest .row1 { display: flex; align-items: center; gap: 8px; }
.mtest .time { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--cln); background: var(--cbg); padding: 3px 9px; border-radius: var(--r-pill); flex-shrink: 0; }
.mtest .time svg { width: 12px; height: 12px; }
.mtest .title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; margin: 9px 0 9px; line-height: 1.25; }
.mtest .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.mtest .mtag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: var(--r-pill); background: var(--surface-sunken); color: var(--text-2); }
.mtest .mtag .sd { width: 8px; height: 8px; border-radius: 50%; }
.mtest .mtag svg { width: 12px; height: 12px; opacity: .7; }
.mtest .acts { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px 8px 8px 0; }
.mtest .acts button { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--text-muted); background: var(--surface-sunken); }
.mtest .acts button.del:active { color: var(--danger); background: var(--danger-bg); }
.mtest .acts button svg { width: 16px; height: 16px; }

.mempty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.mempty .ei { width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 22px; background: var(--primary-weak); color: var(--primary); display: grid; place-items: center; }
.mempty .ei svg { width: 34px; height: 34px; }
.mempty .et { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.mempty .es { font-size: 13px; line-height: 1.5; max-width: 260px; margin: 0 auto; }

.mday-add {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin-top: 14px; padding: 14px;
  border-radius: var(--r-lg); border: 1.5px dashed var(--border-strong);
  font-size: 13.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-weak);
}
.mday-add:active { transform: scale(.99); }
.mday-add svg { width: 18px; height: 18px; }

/* Expanded month: hint area below toggle (Estado 1) */
.mmonth-hint { padding: 16px 16px calc(40px + var(--safe-bottom)); text-align: center; color: var(--text-faint); font-size: 12px; font-weight: 500; }
.mmonth-hint .lg { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.mmonth-hint .lg span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.mmonth-hint .lg i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* ============================ FAB ================================== */
.mfab {
  position: absolute; right: 18px;
  bottom: calc(20px + var(--safe-bottom));
  width: 58px; height: 58px; border-radius: 19px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--primary), #6a5cf0);
  color: #fff;
  box-shadow: 0 8px 22px var(--primary-glow), var(--shadow-lg);
  z-index: 25;
  transition: transform .16s var(--ease-out), filter .16s;
}
.mfab:active { transform: scale(.92); }
.mfab svg { width: 26px; height: 26px; }
.mfab[disabled] { display: none; }

/* ============================ Drawer =============================== */
.scrim {
  position: absolute; inset: 0; background: rgba(20,18,35,.4);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 50; animation: fade .2s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.mdrawer {
  position: absolute; top: 0; left: 0; bottom: 0; width: 84%; max-width: 330px;
  background: var(--surface); z-index: 60;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: drawerIn .3s var(--ease-out);
  overflow-y: auto;
}
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: none; } }
.mdrawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--border); }
.mdrawer-head .bm { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(150deg, var(--primary), #7c5cf0); display: grid; place-items: center; box-shadow: var(--shadow-glow); }
.mdrawer-head .bm svg { width: 22px; height: 22px; }
.mdrawer-head .t1 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.mdrawer-head .t2 { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.mdrawer-sect { padding: 14px 14px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.mdrawer-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 13px 16px; font-size: 14px; font-weight: 600; color: var(--text-2);
}
.mdrawer-item:active { background: var(--surface-sunken); }
.mdrawer-item .di { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-sunken); display: grid; place-items: center; color: var(--primary); flex-shrink: 0; }
.mdrawer-item .di svg { width: 19px; height: 19px; }
.mdrawer-item .da { margin-left: auto; color: var(--text-faint); }
.mdrawer-item.on .di { background: var(--primary); color: #fff; }
.mdrawer-foot { margin-top: auto; padding: 14px 16px calc(16px + var(--safe-bottom)); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 11px; }
.mdrawer-foot .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(150deg,#f59e0b,#ef4444); }
.mdrawer-foot .av.utp { background: linear-gradient(150deg, var(--primary), #7c5cf0); }
.mdrawer-foot .n { font-size: 13.5px; font-weight: 700; }
.mdrawer-foot .r { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.mdrawer-foot .badge { margin-left: auto; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); background: var(--primary-weak); color: var(--primary); }

/* ============================ Bottom sheets ======================== */
.msheet-scrim {
  position: absolute; inset: 0; background: rgba(20,18,35,.42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 70; display: flex; flex-direction: column; justify-content: flex-end;
  animation: fade .2s var(--ease);
}
.msheet {
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: sheetIn .34s var(--ease-out);
  will-change: transform;
}
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
.msheet-grip { display: flex; justify-content: center; padding: 10px 0 4px; touch-action: none; cursor: grab; flex-shrink: 0; }
.msheet-grip .bar { width: 42px; height: 5px; border-radius: 999px; background: var(--border-strong); }
.msheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 6px 20px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.msheet-head .ht { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.msheet-head .hs { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.msheet-head .close { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-muted); background: var(--surface-sunken); flex-shrink: 0; }
.msheet-head .close svg { width: 18px; height: 18px; }
.msheet-body { padding: 18px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.msheet-foot {
  display: flex; gap: 10px; padding: 14px 20px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.msheet-foot .btn { flex: 1; justify-content: center; padding: 13px; font-size: 14px; }

/* sheet form (reuses .field/.input from styles.css but full width + bigger touch) */
.msheet .field-row { display: flex; gap: 12px; }
.msheet .field-row .field { flex: 1; min-width: 0; }
.msheet .input, .msheet .select, .msheet .textarea { padding: 13px 14px; font-size: 15px; border-radius: var(--r-md); }
.msheet .field label { font-size: 13px; margin-bottom: 8px; }
@media (max-width: 460px) {
  .msheet .field-row.stack { flex-direction: column; gap: 0; }
}

/* big buttons inside sheets */
.btn.lg { padding: 13px 18px; font-size: 14px; border-radius: var(--r-md); }

/* 2-col checkbox grid for cursos/departamentos */
.mcheck-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mcheck-grid label {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.mcheck-grid label.on { background: var(--primary-weak); border-color: transparent; color: var(--primary); }
.mcheck-grid label input { accent-color: var(--primary); width: 17px; height: 17px; }

/* selector list (curso / asignatura sheet) */
.msel-list { display: flex; flex-direction: column; }
.msel-opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 6px;
  border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 500; color: var(--text-2);
  cursor: pointer;
}
.msel-opt:last-child { border-bottom: none; }
.msel-opt .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.msel-opt .ck { margin-left: auto; color: var(--primary); opacity: 0; }
.msel-opt.sel { color: var(--primary); font-weight: 700; }
.msel-opt.sel .ck { opacity: 1; }

/* ============================ Multi-select bar ===================== */
.mmultibar {
  position: absolute; left: 12px; right: 12px;
  bottom: calc(16px + var(--safe-bottom));
  background: var(--text); color: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  z-index: 40; padding: 12px 12px 12px 16px;
  animation: barUp .26s var(--ease-out);
}
@keyframes barUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.mmultibar .mb-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mmultibar .mb-count { font-size: 14px; font-weight: 700; }
.mmultibar .mb-cancel { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; opacity: .85; padding: 6px 10px; border-radius: var(--r-pill); }
.mmultibar .mb-cancel:active { background: rgba(255,255,255,.14); }
.mmultibar .mb-acts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mmultibar .mb-acts::-webkit-scrollbar { display: none; }
.mmultibar .mb-acts button {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
  padding: 10px 13px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.12); color: var(--surface);
}
.mmultibar .mb-acts button:active { background: rgba(255,255,255,.22); }

/* ============================ Toasts =============================== */
.mtoast-wrap { position: absolute; left: 0; right: 0; bottom: calc(90px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 90; pointer-events: none; }
.mtoast {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--text); color: var(--surface); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: toastIn .28s var(--ease-out);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================ Tablet / desktop ===================== */
@media (min-width: 700px) {
  .mcal { margin: 0 18px; max-width: 980px; align-self: center; width: calc(100% - 36px); }
  .mday { min-height: 74px; padding: 10px 4px 8px; }
  .mweek { max-height: 80px; }
  .mcal.collapsed .mweek.active { max-height: 80px; }
  .mday-num { width: 34px; height: 34px; font-size: 16px; }
  .mday-dot { width: 7px; height: 7px; }
  .mnav { padding: 14px 18px 10px; max-width: 980px; align-self: center; width: 100%; }
  .mnav .mtitle { font-size: 22px; }
  .mcal-toggle { max-width: 980px; align-self: center; }
  .mdaylist { max-width: 720px; margin: 0 auto; padding: 18px 18px calc(110px + var(--safe-bottom)); }
  .mbanner { justify-content: center; }
  .mdl-head .d-day { font-size: 22px; }
  .mtest .title { font-size: 16px; }
  .msheet { max-width: 560px; margin: 0 auto; border-radius: 22px; margin-bottom: 24px; }
  .msheet-scrim { justify-content: center; padding: 24px; }
  .mfab { right: 26px; bottom: calc(26px + var(--safe-bottom)); }
  /* center the reused PruebaModal/AdminModal content area on big screens (already centered) */
}

/* The reused PruebaModal / AdminModal use .modal-scrim (position:fixed) from styles.css.
   On phones make them read as full-width sheets near the bottom. */
@media (max-width: 560px) {
  .modal-scrim { padding: 0 !important; align-items: flex-end !important; }
  .modal { max-width: 100% !important; width: 100% !important; border-radius: 22px 22px 0 0 !important; max-height: 94vh !important; animation: sheetIn .34s var(--ease-out) !important; }
  .modal.wide { max-width: 100% !important; }
}
