/**
 * Pulmo — calendário ampliado de Meus conteúdos (calendar-xl.js).
 * Overlay em tela cheia abaixo dos modais (z-index 950): a prévia de um conteúdo abre por cima.
 */

/* botão na barra do calendário */
.calendar-main .calendar-toolbar .calendar-toolbar-expand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  margin-left: auto;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 67, 67, 0.08) !important;
  color: #004343 !important;
  font: 800 0.84rem/1 'Plus Jakarta Sans', 'Lato', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.calendar-main .calendar-toolbar .calendar-toolbar-expand:hover { background: rgba(0, 67, 67, 0.14) !important; transform: translateY(-1px); }
html[data-theme="dark"] .calendar-main .calendar-toolbar .calendar-toolbar-expand { background: rgba(246, 195, 107, 0.12) !important; color: #f6c36b !important; }
.calendar-main .calendar-toolbar .calendar-toolbar-expand + .calendar-toolbar-settings-btn { margin-left: 0; }

html.calxl-open, html.calxl-open body { overflow: hidden; }

.calxl {
  --x-ink: #0f2a26;
  --x-text: #44524f;
  --x-muted: #6f7c78;
  --x-line: #e3e9e7;
  --x-surface: #ffffff;
  --x-surface-2: #f2f6f5;
  --x-surface-3: #e8efed;
  --x-primary: #004343;
  --x-gold: #e8a33d;
  --x-shadow: 0 1px 2px rgba(15, 42, 38, 0.05), 0 18px 40px -24px rgba(15, 42, 38, 0.32);
  --x-font: 'Plus Jakarta Sans', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --x-serif: 'Fraunces', Georgia, serif;
  --x-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* formatos (mesmas cores da home) */
  --t-post: #2f7fd1;
  --t-carousel: #0e8a7e;
  --t-reels: #e2574c;
  --t-teleprompter: #7a4fc0;
  --t-story: #e39a2d;
  /* status: mesmas cores dos selos do #calendar (theme-light.css .post-status-badge.status-*) */
  --s-published: #157a3c;   --sb-published: #e2f7ea;
  --s-scheduled: #004343;   --sb-scheduled: #e6f0f0;
  --s-pending: #a35b00;     --sb-pending: #fff4de;
  --s-draft: #8a847b;       --sb-draft: #ececec;
  --s-generating: #a35b00;  --sb-generating: #fff4de;

  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 20, 18, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--x-font);
  color: var(--x-ink);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.calxl.is-in { opacity: 1; }
html[data-theme="dark"] .calxl {
  --x-ink: #eef4f3;
  --x-text: #b6c4c1;
  --x-muted: #84958f;
  --x-line: #1f2e33;
  --x-surface: #0f1b20;
  --x-surface-2: #14232a;
  --x-surface-3: #1a2c33;
  --x-primary: #2f8f8c;
  --x-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --s-published: #4cd39a;   --sb-published: rgba(12, 158, 101, 0.2);
  --s-scheduled: #8dbdf5;   --sb-scheduled: rgba(73, 150, 236, 0.18);
  --s-pending: #f6c36b;     --sb-pending: rgba(170, 108, 3, 0.26);
  --s-draft: #b9b4ac;       --sb-draft: rgba(225, 225, 225, 0.1);
  --s-generating: #f6c36b;  --sb-generating: rgba(170, 108, 3, 0.26);
  background: rgba(0, 0, 0, 0.6);
}
.calxl *, .calxl *::before, .calxl *::after { box-sizing: border-box; }
.calxl [hidden] { display: none !important; }
.calxl svg { width: 18px; height: 18px; flex-shrink: 0; }
.calxl button { font-family: inherit; }

.calxl-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(1440px, 100%);
  padding: 20px 22px 18px;
  border-radius: 26px;
  background: var(--x-surface);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
  transform: translateY(10px) scale(0.99);
  transition: transform 0.35s var(--x-ease);
  overflow: hidden;
}
.calxl.is-in .calxl-box { transform: none; }
html[data-theme="dark"] .calxl-box { border: 1px solid var(--x-line); }

/* cabeçalho */
.calxl-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.calxl-title { display: flex; align-items: center; gap: 8px; }
.calxl-title h2 {
  min-width: 9.5em;
  white-space: nowrap;
  margin: 0;
  text-align: center;
  font: 600 1.6rem/1.1 var(--x-serif);
  letter-spacing: -0.02em;
  color: var(--x-ink);
  text-transform: capitalize;
}
/* semana: o intervalo ("27 de set – 3 de out de 2026") é mais longo que o mês, fonte menor para caber numa linha */
.calxl-box--week .calxl-title h2 { min-width: 13.5em; font-size: 1.22rem; letter-spacing: -0.01em; }

.calxl .calxl-round {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--x-surface-2) !important;
  color: var(--x-ink);
  cursor: pointer;
  transition: background 0.2s;
}
.calxl .calxl-round:hover { background: var(--x-surface-3) !important; }
.calxl .calxl-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--x-surface-2) !important;
  color: var(--x-ink);
  cursor: pointer;
}

/* barra: Mês/Semana + menu de formatos */
.calxl-bar { position: relative; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calxl-view { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--x-surface-2); }
.calxl .calxl-view button {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent !important;
  color: var(--x-text);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.calxl .calxl-view button.is-on { background: var(--x-surface) !important; color: var(--x-ink); box-shadow: 0 1px 2px rgba(15, 42, 38, 0.12), 0 4px 10px -6px rgba(15, 42, 38, 0.3); }
html[data-theme="dark"] .calxl .calxl-view button.is-on { background: var(--x-surface-3) !important; }

.calxl-menus { display: flex; align-items: center; gap: 8px; min-width: 0; }
.calxl-types { position: relative; min-width: 0; }
.calxl .calxl-types-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  max-width: 280px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--x-surface-2) !important;
  color: var(--x-ink);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.2s, background 0.2s;
}
.calxl .calxl-types-btn:hover,
.calxl-types.is-open .calxl-types-btn { box-shadow: inset 0 0 0 1.5px var(--x-line); background: var(--x-surface) !important; }
.calxl .calxl-types-btn.has-pick { box-shadow: inset 0 0 0 1.5px var(--x-primary); }
.calxl-types-btn svg { width: 16px; height: 16px; }
.calxl-types-btn svg:last-child { width: 15px; height: 15px; opacity: 0.6; transition: transform 0.2s; }
.calxl-types.is-open .calxl-types-btn svg:last-child { transform: rotate(180deg); }
.calxl-types-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calxl-types--status .calxl-types-btn b { background: var(--x-surface-3); color: var(--x-text); }
.calxl-types--status .calxl-types-btn.has-pick b { background: var(--x-primary); color: #fff; }
.calxl-types-dots { display: inline-flex; flex-shrink: 0; }
.calxl-types-dots i { width: 10px; height: 10px; margin-left: -3px; border-radius: 50%; background: var(--s); box-shadow: 0 0 0 2px var(--x-surface-2); }
.calxl-types-dots i:first-child { margin-left: 0; }
.calxl-types.is-open .calxl-types-dots i,
.calxl-types-btn:hover .calxl-types-dots i { box-shadow: 0 0 0 2px var(--x-surface); }
.calxl-types-opt .calxl-st-dot { flex: 0 0 10px; width: 10px; height: 10px; }
.calxl-types-btn b { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--x-primary); color: #fff; font-size: 0.7rem; }
.calxl-types-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 260px;
  padding: 8px;
  border-radius: 18px;
  background: var(--x-surface);
  box-shadow: 0 0 0 1px var(--x-line), 0 24px 50px -18px rgba(0, 0, 0, 0.45);
  animation: calxlPop 0.22s var(--x-ease) both;
}
.calxl .calxl-types-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent !important;
  color: var(--x-ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.calxl .calxl-types-opt:hover { background: var(--x-surface-2) !important; }
.calxl-types-opt > svg { width: 17px; height: 17px; color: var(--tc, var(--x-text)); }
.calxl-types-opt.calxl-filter--post { --tc: var(--t-post); }
.calxl-types-opt.calxl-filter--carousel { --tc: var(--t-carousel); }
.calxl-types-opt.calxl-filter--reels { --tc: var(--t-reels); }
.calxl-types-opt.calxl-filter--teleprompter { --tc: var(--t-teleprompter); }
.calxl-types-opt.calxl-filter--story { --tc: var(--t-story); }
.calxl-types-name { flex: 1; }
.calxl-types-n { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--x-surface-2); color: var(--x-muted); font-size: 0.72rem; font-weight: 800; text-align: center; }
.calxl-types-box { position: relative; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.8px var(--x-line); transition: background 0.15s, box-shadow 0.15s; }
.calxl-types-opt.is-on .calxl-types-box { background: var(--x-primary); box-shadow: none; }
.calxl-types-opt.is-on .calxl-types-box::after { content: ''; position: absolute; left: 6px; top: 2.5px; width: 4px; height: 8.5px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.calxl-types-foot { display: flex; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--x-line); }
.calxl .calxl-types-foot button {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--x-surface-2) !important;
  color: var(--x-text);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.calxl .calxl-types-foot button.is-primary { background: var(--x-primary) !important; color: #fff; }
.calxl .calxl-types-foot button:disabled { opacity: 0.45; cursor: default; }

/* grade do mês */
.calxl-grid-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.calxl-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.calxl-week span { padding: 0 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-muted); }
.calxl-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(96px, 1fr));
  gap: 6px;
  flex: 1;
  min-height: 0;
}
.calxl-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 8px 6px 6px;
  border-radius: 14px;
  background: var(--x-surface-2);
  overflow: hidden;
  transition: background 0.2s;
}
/* nada encolhe dentro do dia (encolher fazia um conteúdo passar por cima do outro) */
.calxl-cell > * { flex-shrink: 0; }
.calxl-cell.is-out { background: transparent; box-shadow: inset 0 0 0 1px var(--x-line); }
.calxl-cell.is-out .calxl-num { opacity: 0.45; }
.calxl-cell.is-past:not(.is-today) .calxl-num { color: var(--x-muted); }
.calxl-num {
  display: grid;
  place-items: center;
  align-self: flex-start;
  min-width: 26px;
  height: 26px;
  padding: 0 4px;
  margin: -2px 0 0 2px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--x-ink);
}
.calxl-cell.is-today { background: color-mix(in srgb, var(--x-gold) 14%, var(--x-surface-2)); box-shadow: inset 0 0 0 2px var(--x-gold); }
.calxl-cell.is-today .calxl-num { background: var(--x-gold); color: #fff; }

/* conteúdo no dia */
.calxl .calxl-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 0;
  padding: 4px 6px 4px 4px;
  border: 0;
  border-radius: 10px;
  background: var(--sb, var(--x-surface)) !important;
  color: var(--x-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 3px 0 0 var(--s), 0 1px 2px rgba(15, 42, 38, 0.06);
  transition: transform 0.2s var(--x-ease), box-shadow 0.2s;
}
.calxl .calxl-chip:hover { transform: translateY(-1px); box-shadow: inset 3px 0 0 var(--s), 0 8px 18px -10px rgba(15, 42, 38, 0.4); }
.calxl-chip-media {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--x-surface);
  color: var(--x-text);
}
.calxl-chip-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.calxl-chip-ic svg { width: 15px; height: 15px; }
.calxl-chip-media img + .calxl-chip-ic {
  position: absolute;
  right: 1px;
  bottom: 1px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--x-ink);
  color: var(--x-surface);
}
.calxl-chip-media img + .calxl-chip-ic svg { width: 9px; height: 9px; }
.calxl-chip-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.calxl-chip-text strong { font-size: 0.78rem; font-weight: 700; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calxl-chip-text span { display: flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 800; color: var(--s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calxl-st-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--s); }
.calxl-st--published { --s: var(--s-published); --sb: var(--sb-published); }
.calxl-st--scheduled { --s: var(--s-scheduled); --sb: var(--sb-scheduled); }
.calxl-st--pending { --s: var(--s-pending); --sb: var(--sb-pending); }
.calxl-st--draft { --s: var(--s-draft); --sb: var(--sb-draft); }
.calxl-st--generating { --s: var(--s-generating); --sb: var(--sb-generating); }
.calxl-st--draft .calxl-chip-media { background: repeating-linear-gradient(135deg, rgba(0, 67, 67, 0.08) 0 5px, transparent 5px 10px), var(--x-surface-2); }
.calxl .calxl-more {
  align-self: flex-start;
  height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: var(--x-surface) !important;
  color: var(--x-text);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.calxl .calxl-add {
  position: absolute;
  inset: 34px 8px 8px;
  display: grid;
  place-items: center;
  border: 2px dashed transparent;
  border-radius: 10px;
  background: transparent !important;
  color: var(--x-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, border-color 0.2s;
}
.calxl-cell:hover .calxl-add,
.calxl .calxl-add:focus-visible { opacity: 1; border-color: var(--x-line); }

/* lista do dia: popover no desktop (+N), painel fixo no celular */
.calxl-day {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calxl-day header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calxl-day h3 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--x-ink); text-transform: capitalize; }
.calxl-day-list { display: flex; flex-direction: column; gap: 8px; }
.calxl .calxl-chip--big { padding: 8px 10px 8px 8px; border-radius: 14px; }
.calxl-chip--big .calxl-chip-media { flex-basis: 52px; width: 52px; height: 52px; border-radius: 10px; }
.calxl-chip--big .calxl-chip-text strong { font-size: 0.9rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.calxl-chip--big .calxl-chip-text span { font-size: 0.76rem; }
.calxl-empty { margin: 0; color: var(--x-muted); font-size: 0.88rem; }
.calxl .calxl-day-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 2px dashed var(--x-line);
  border-radius: 14px;
  background: transparent !important;
  color: var(--x-text);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}
.calxl .calxl-day-add:hover { border-color: var(--x-primary); color: var(--x-primary); }
.calxl-day--pop {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: min(380px, calc(100% - 44px));
  max-height: calc(100% - 140px);
  padding: 16px;
  border-radius: 20px;
  background: var(--x-surface);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--x-line);
  overflow-y: auto;
  animation: calxlPop 0.3s var(--x-ease) both;
}
/* visão Semana: uma coluna por dia, capas grandes */
.calxl-weekview { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; min-height: 100%; }
.calxl-wcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px 8px 12px; border-radius: 18px; background: var(--x-surface-2); }
.calxl-wcol.is-today { background: color-mix(in srgb, var(--x-gold) 12%, var(--x-surface-2)); box-shadow: inset 0 0 0 2px var(--x-gold); }
.calxl-whead { display: flex; align-items: baseline; gap: 8px; padding: 0 4px; }
.calxl-whead span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-muted); }
.calxl-whead b { font: 600 1.35rem/1 var(--x-serif); color: var(--x-ink); }
.calxl-wcol.is-today .calxl-whead b { color: #b7791f; }
.calxl-wcol.is-past:not(.is-today) .calxl-whead b { color: var(--x-muted); }
.calxl-whead em { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--x-surface); color: var(--x-text); font-size: 0.7rem; font-style: normal; font-weight: 800; text-align: center; }
.calxl-wlist { display: flex; flex-direction: column; gap: 10px; }
.calxl .calxl-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--x-surface) !important;
  color: var(--x-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 42, 38, 0.08);
  transition: transform 0.2s var(--x-ease), box-shadow 0.2s;
}
.calxl .calxl-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(15, 42, 38, 0.45); }
.calxl-card-media { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--x-surface-3); color: var(--x-muted); }
.calxl-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.calxl-card-ph svg { width: 30px; height: 30px; opacity: 0.6; }
.calxl-st--draft .calxl-card-media { background: repeating-linear-gradient(135deg, rgba(0, 67, 67, 0.07) 0 8px, transparent 8px 16px), var(--x-surface-3); }
.calxl-card-type,
.calxl-card-time {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(10, 18, 16, 0.62);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.calxl-card-type { left: 6px; top: 6px; max-width: calc(100% - 12px); overflow: hidden; white-space: nowrap; }
.calxl-card-type svg { width: 12px; height: 12px; }
.calxl-card-time { right: 6px; bottom: 6px; }
.calxl-card-body { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; box-shadow: inset 0 3px 0 var(--s); }
.calxl-card-body strong { font-size: 0.8rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.calxl-card-body > span { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 800; color: var(--s); }
.calxl .calxl-wadd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border: 2px dashed var(--x-line);
  border-radius: 12px;
  background: transparent !important;
  color: var(--x-muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}
.calxl .calxl-wadd:hover { opacity: 1; border-color: var(--x-primary); color: var(--x-primary); }
.calxl-wcol.is-empty .calxl-wadd { height: 120px; flex-direction: column; }
.calxl-wnone { margin: 6px 4px; color: var(--x-muted); font-size: 0.78rem; }

@keyframes calxlPop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* celular: mês compacto (pontos) + lista do dia escolhido */
.calxl-dots { display: flex; justify-content: center; gap: 3px; margin-top: auto; }
.calxl-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--s); }

@media (max-width: 760px) {
  .calxl { padding: 0; }
  .calxl-box { width: 100%; border-radius: 0; padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 12px; overflow-y: auto; }
  /* cabeçalho fixo: o mês e a lista do dia rolam por baixo */
  .calxl-head {
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 10px;
    margin: 0 -14px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: var(--x-surface);
    box-shadow: 0 1px 0 var(--x-line), 0 10px 18px -16px rgba(0, 0, 0, 0.5);
  }
  .calxl-title { order: 0; flex: 1; min-width: 0; justify-content: space-between; }
  .calxl-title h2 { min-width: 0; font-size: 1.25rem; }
  /* fechar à direita, na mesma linha do mês */
  .calxl .calxl-close { order: 1; width: 38px; height: 38px; margin-left: 4px; flex-shrink: 0; }
  .calxl-grid-wrap { flex: 0 0 auto; }
  .calxl-week { gap: 4px; }
  .calxl-week span { padding: 0; text-align: center; }
  .calxl-grid { grid-template-rows: none; gap: 4px; }
  .calxl-cell { aspect-ratio: 1; align-items: center; padding: 6px 2px 6px; border-radius: 12px; cursor: pointer; }
  .calxl-num { margin: 0; align-self: center; font-size: 0.82rem; }
  .calxl-cell.is-sel { background: var(--x-ink); }
  .calxl-cell.is-sel .calxl-num { color: var(--x-surface); }
  .calxl-day { padding-top: 4px; }
  .calxl-bar { flex-wrap: wrap; gap: 8px; }
  .calxl .calxl-view button { padding: 0 13px; }
  .calxl-menus { flex: 1 1 100%; }
  .calxl-menus .calxl-types { flex: 1 1 0; }
  .calxl .calxl-types-btn { width: 100%; max-width: none; }
  .calxl-types-btn svg:last-child { margin-left: auto; }
  .calxl-box--week .calxl-title h2 { min-width: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; }
  .calxl-types-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, 0.5); }
  .calxl .calxl-types-opt { height: 48px; }
  /* semana no celular: um dia embaixo do outro, conteúdos em 2 colunas */
  .calxl-weekview { grid-template-columns: 1fr; gap: 8px; }
  .calxl-wcol { padding: 12px 10px; }
  .calxl-wcol.is-empty.is-past { display: none; }
  .calxl-whead span { text-transform: capitalize; letter-spacing: 0; font-size: 0.86rem; color: var(--x-ink); }
  .calxl-wlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .calxl-wlist .calxl-wadd, .calxl-wnone { grid-column: 1 / -1; }
  .calxl-wcol.is-empty .calxl-wadd { height: 44px; flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  .calxl, .calxl-box, .calxl-day--pop { transition: none; animation: none; }
}
