/* ───────── Tipografías (incluidas en la app, licencia SIL OFL) ───────── */
@font-face { font-family: 'Big Shoulders Display'; font-weight: 600; font-display: swap; src: url('/fonts/big-shoulders-display-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 800; font-display: swap; src: url('/fonts/big-shoulders-display-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-display: swap; src: url('/fonts/big-shoulders-display-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('/fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url('/fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('/fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }

:root {
  /* Tinta de imprenta y papel */
  --ink: #1B1F3B;
  --paper: #FFFEFB;
  --paper-2: #F2F1EC;
  --line: rgba(27, 31, 59, .14);
  --muted: #676A7E;
  --red: #D7263D;           /* domingos y "no disponible" */
  --warn: #C9561F;
  --month: #7D3F4E;         /* lo cambia la app según el mes */

  /* Formatos */
  --f-trio: #E0A100;
  --f-cepa: #1E9E74;
  --f-full_banda: #D6336C;
  --f-none: #8A8D9C;

  /* Alias usados por los componentes */
  --fg: var(--ink);
  --surface: var(--paper);
  --surface-2: var(--paper-2);
  --accent: var(--ink);
  --accent-fg: var(--paper);
  --danger: var(--red);
  --shadow: 0 24px 60px rgba(27, 31, 59, .28);

  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--month);
  color: var(--ink);
  font: 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  transition: background-color .45s ease;
}
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.g { stroke: none; }
.muted { color: var(--muted); }
em { font-style: normal; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.f-trio { --fc: var(--f-trio); }
.f-cepa { --fc: var(--f-cepa); }
.f-full_banda { --fc: var(--f-full_banda); }
.f-none { --fc: var(--f-none); }

/* Pared de color liso según el mes */
.wall, .login { background-color: var(--month); transition: background-color .45s ease; }

/* ───────── Botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1.5px solid transparent;
  background: var(--paper-2); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.warn { background: color-mix(in srgb, var(--red) 9%, var(--paper)); color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: transparent; border: 0; color: var(--ink);
}
.icon-btn:hover { background: var(--paper-2); }
.danger-icon { color: var(--red); }
.link { color: var(--ink); font-weight: 600; margin-left: 6px; white-space: nowrap; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ───────── Avatares ───────── */
.av {
  --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; object-fit: cover;
  background: hsl(var(--h, 30) 42% 42%); color: #fff; font-size: calc(var(--s) * .4); font-weight: 600;
  box-shadow: 0 0 0 2px var(--paper);
}
.av.xs { --s: 20px; font-size: 8.5px; }
.av.sm { --s: 28px; }
.av.md { --s: 40px; }
.av.lg { --s: 54px; }
.av.plus { background: var(--paper-2); color: var(--muted); }

/* ───────── Login: hoja de taco de calendario ───────── */
.boot { height: 100dvh; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%); text-align: center; padding: 0 28px 30px; border-radius: 14px;
  background: var(--paper); box-shadow: var(--shadow); overflow: hidden;
}
.login-art { display: block; width: calc(100% + 56px); height: auto; margin: 0 -28px 22px; background: var(--month); }
.login h1 { font: 900 34px/1 var(--display); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .01em; }
.login p { margin: 0 0 22px; }
.alert {
  margin: -6px 0 18px; padding: 12px 14px; border-radius: 10px; text-align: left; font-size: 14px;
  background: color-mix(in srgb, var(--red) 10%, var(--paper)); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
}
.google-btn { width: 100%; background: #fff; color: #1f1f1f; border-color: #dadce0; }
.dev-login { display: grid; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 13px; }
.dev-login input { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); }

/* ───────── Pared: afiche + hoja colgada ───────── */
.wall {
  height: 100dvh; display: grid; grid-template-rows: auto 1fr;
  padding: env(safe-area-inset-top) 0 0;
}

.poster {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px;
  padding: 14px 18px 22px;
}
.nav {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--paper); background: transparent;
  display: grid; place-items: center; color: var(--paper); transition: background .15s, color .15s;
}
.nav svg { width: 22px; height: 22px; stroke-width: 2.6; }
@media (hover: hover) { .nav:hover { background: var(--paper); color: var(--month); } }
.nav:active { transform: scale(.94); }
.month-name {
  margin: 0; text-align: center; line-height: .82; min-width: 0;
  font: 900 clamp(46px, 8.4vw, 116px)/.82 var(--display);
  text-transform: uppercase; letter-spacing: -.005em; color: var(--paper);
  display: flex; align-items: baseline; justify-content: center; gap: .12em; flex-wrap: wrap;
}
/* el año va calado, como tinta de serigrafía con solo contorno */
.month-name .year {
  font-weight: 800; color: transparent; -webkit-text-stroke: 2px var(--paper); letter-spacing: .01em;
}
.me-btn { background: none; border: 0; padding: 0; border-radius: 50%; margin-left: 8px; }
.me-btn .av { box-shadow: 0 0 0 2.5px var(--paper); }

.hanger {
  position: relative; min-height: 0; display: grid;
  padding: 0 14px calc(14px + env(safe-area-inset-bottom));
}
/* Anillado espiral */
.rings {
  position: absolute; z-index: 2; top: -13px; left: 7%; right: 7%;
  display: flex; justify-content: space-between; pointer-events: none;
}
.rings i {
  position: relative; width: 9px; height: 28px; border-radius: 6px;
  background: linear-gradient(90deg, #2A2E48 0%, #A7ABC0 45%, #E9EAF0 55%, #3A3F5C 100%);
  box-shadow: 1px 2px 2px rgba(0, 0, 0, .25);
}
.rings i::after { /* perforación en el papel */
  content: ''; position: absolute; left: 50%; bottom: 3px; width: 12px; height: 12px; margin-left: -6px; z-index: -1;
  border-radius: 50%; background: color-mix(in srgb, var(--month) 55%, var(--ink));
}

.page {
  min-height: 0; display: grid; grid-template-rows: auto 1fr;
  background: var(--paper); border-radius: 4px 4px 10px 10px;
  box-shadow: 0 2px 0 rgba(27, 31, 59, .12), 0 18px 40px rgba(27, 31, 59, .22);
  padding: 22px 0 0; overflow: hidden; transform-origin: top center;
}
.page.flip-next { animation: flipNext .42s cubic-bezier(.2, .75, .25, 1); }
.page.flip-prev { animation: flipPrev .42s cubic-bezier(.2, .75, .25, 1); }
@keyframes flipNext { from { transform: perspective(1400px) rotateX(-28deg); opacity: .25; } }
@keyframes flipPrev { from { transform: perspective(1400px) rotateX(18deg) translateY(-10px); opacity: .25; } }

.weekdays {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 0 8px; border-bottom: 2px solid var(--ink);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.weekdays div { padding: 0 10px; }
.weekdays .sun { color: var(--red); }

.grid {
  display: grid; min-height: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(var(--weeks, 5), minmax(0, 1fr));
}

.cell {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  padding: 6px 7px 7px; display: flex; flex-direction: column; gap: 5px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; outline: none; transition: background .12s;
}
.cell:nth-child(7n) { border-right: 0; }
.cell:not(.blank):hover { background: color-mix(in srgb, var(--month) 14%, var(--paper)); }
.cell:focus-visible { box-shadow: inset 0 0 0 3px var(--ink); }
.cell.blank { cursor: default; background: var(--paper-2); }
.cell.blank:hover { background: var(--paper-2); }

.num {
  font: 800 clamp(20px, 2.3vw, 32px)/1 var(--display); color: var(--ink);
  width: 1.45em; height: 1.45em; margin: -2px 0 0 -3px; display: grid; place-items: center;
  border-radius: 50%; flex: none; font-variant-numeric: tabular-nums;
}
.cell.sun .num { color: var(--red); }
.cell.past .num { opacity: .38; }
.cell.today .num { background: var(--month); color: var(--paper); opacity: 1; }


.evs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
.ev {
  flex: 1 1 0; min-height: 22px; max-height: 120px; width: 100%; padding: 0; border: 0; border-radius: 6px;
  position: relative; overflow: hidden; text-align: left; display: flex; align-items: flex-end;
  background: color-mix(in srgb, var(--fc) 20%, var(--paper));
  box-shadow: inset 4px 0 0 var(--fc);
  transition: transform .1s, filter .15s;
}
.ev:hover { filter: brightness(1.05) saturate(1.1); }
.ev:active { transform: scale(.97); }
.ev.has-img {
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(10,12,28,.85) 100%), var(--img) center / cover, var(--paper-2);
  box-shadow: inset 0 -4px 0 var(--fc);
  color: #fff;
}
.ev-txt {
  display: flex; gap: 6px; align-items: baseline; width: 100%; padding: 4px 7px 6px 10px;
  font-size: 12.5px; line-height: 1.2; min-width: 0;
}
.ev.has-img .ev-txt { padding-left: 7px; }
.ev-txt b { font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.ev-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.more {
  flex: none; align-self: flex-start; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700;
  background: var(--ink); color: var(--paper);
}
.blk { display: grid; flex: none; min-width: 0; color: var(--red); font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.blk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.today-pill {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 5;
  transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px rgba(27, 31, 59, .35);
}

/* ───────── Overlays ───────── */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: flex-end;
  background: rgba(20, 22, 40, 0); transition: background .2s;
}
.overlay.show { background: rgba(20, 22, 40, .5); }
.overlay.hide { background: rgba(20, 22, 40, 0); pointer-events: none; }
.overlay.center { align-items: center; padding: 20px; }
.overlay > * {
  background: var(--paper); box-shadow: var(--shadow); width: 100%;
  transform: translateY(24px); opacity: 0; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s;
}
.overlay.show > * { transform: none; opacity: 1; }
.overlay.hide > * { transform: translateY(24px); opacity: 0; }

.sheet {
  max-width: 560px; max-height: 88dvh; overflow-y: auto; border-radius: 18px 18px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
}
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet h2, .form-head h2, .detail h2 { font: 900 30px/1 var(--display); text-transform: uppercase; letter-spacing: .005em; margin: 0; }
.sec { font-size: 14px; font-weight: 600; color: var(--muted); margin: 22px 0 10px; }
.empty { margin: 0; }
.hint { font-size: 14px; margin: 6px 0 14px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 24px; }

.day-evs { display: grid; gap: 8px; }
.day-ev {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: var(--paper);
}
.day-ev:hover { background: var(--paper-2); }
.day-ev-img {
  width: 60px; height: 46px; border-radius: 8px; flex: none;
  background: color-mix(in srgb, var(--fc) 28%, var(--paper)); box-shadow: inset 4px 0 0 var(--fc);
}
.day-ev-img.has-img { background: var(--img) center / cover; box-shadow: inset 0 -4px 0 var(--fc); }
.day-ev-txt { display: grid; min-width: 0; flex: 1; }
.day-ev-txt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-ev-txt .muted { font-size: 13px; }
.chev { color: var(--muted); }

.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.people li { display: flex; align-items: center; gap: 10px; }
.people-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.people-inline span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--paper-2); font-size: 14px; }

.notice {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  background: var(--paper-2); color: var(--muted);
}

.dialog { max-width: 400px; border-radius: 16px; padding: 22px; }
.dialog p { margin: 0 0 20px; font-size: 16px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Pantalla completa en celular, ventana en escritorio */
.overlay.full > * { height: 100dvh; max-width: 640px; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 700px) {
  .overlay.full { align-items: center; padding: 28px; }
  .overlay.full > * { height: auto; max-height: calc(100dvh - 56px); border-radius: 18px; }
}

/* ───────── Detalle del evento: tipo afiche ───────── */
.detail { overflow-y: auto; }
.detail .cover { flex: none; background: var(--paper-2); }
.detail .cover img { display: block; width: 100%; max-height: 46dvh; object-fit: cover; }
.detail .cover.none {
  height: calc(90px + env(safe-area-inset-top));
  background-color: var(--fc);
}
.detail-body { padding: 22px 22px 8px; flex: 1; }
.detail h2 { font-size: 44px; line-height: .92; margin: 12px 0 18px; overflow-wrap: anywhere; }
.chip {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--fc, var(--paper-2)); color: #fff;
}
.chip:not([class*="f-"]) { color: var(--ink); }
.facts { margin: 0; display: grid; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.comments { white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; max-width: 65ch; }
.detail .actions, .form .actions {
  position: sticky; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.detail .actions .btn.primary { min-width: 120px; }

/* ───────── Formulario ───────── */
.form { margin: 0; }
.form-head {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px; background: var(--month); color: var(--paper);
}
.form-head .icon-btn { color: var(--paper); }
.form-head .icon-btn:hover { background: rgba(255, 255, 255, .15); }
.form-head h2 { font-size: 30px; }
.form-head .muted { color: var(--paper); opacity: .85; font-size: 14px; font-weight: 500; }
.form-body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 18px; align-content: start; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink); }
.req { color: var(--red); font-style: normal; }
.field input, .field textarea, .add-user input, .add-user select, .users select {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--paper); outline: none;
  font-size: 16px; /* evita zoom en iOS */
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field textarea:focus, .add-user input:focus { border-color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: grid; place-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 500; font-size: 15px;
  border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; white-space: nowrap; transition: .12s;
}
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.cover-pick { display: flex; gap: 14px; align-items: center; }
.cover-prev {
  width: 120px; height: 90px; border-radius: 10px; overflow: hidden; flex: none; background: var(--paper-2);
  display: grid; place-items: center; color: var(--muted); border: 1.5px dashed var(--line);
}
.cover-prev:not(.empty) { border-style: solid; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.cover-prev svg { width: 28px; height: 28px; }
.cover-btns { display: grid; gap: 8px; }

.unavail, .form-err { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.unavail { background: color-mix(in srgb, var(--red) 8%, var(--paper)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--red) 25%, transparent); }
.unavail svg { color: var(--red); }
.form-err { background: color-mix(in srgb, var(--red) 12%, var(--paper)); border: 1.5px solid var(--red); font-weight: 600; }

/* ───────── Menú y usuarios ───────── */
.me-row { display: flex; gap: 14px; align-items: center; margin: 4px 0 6px; }
.me-row b { font-size: 17px; }
.me-row .chip { margin-top: 6px; }
.legend { display: grid; gap: 10px; font-size: 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 10px; }
.legend > span:nth-child(-n+4) { display: inline-flex; }
@media (min-width: 420px) { .legend { grid-template-columns: 1fr 1fr; } }
.dot { width: 14px; height: 14px; border-radius: 4px; background: var(--fc); flex: none; }
.legend-wide { grid-column: 1 / -1; }
.legend-name { color: var(--red); font-weight: 600; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; margin-top: 6px;
  border: 0; border-radius: 12px; background: var(--paper-2); text-align: left; font-weight: 600;
}
.menu-item:hover { background: color-mix(in srgb, var(--month) 25%, var(--paper)); }
.add-user { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-bottom: 18px; }
.add-user select { width: auto; }
.users li { gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.u-txt { display: grid; flex: 1; min-width: 0; }
.u-txt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-txt .muted { font-size: 13px; }
.users select { width: auto; min-height: 40px; padding: 4px 8px; font-size: 14px; }
.rm-spacer { width: 40px; flex: none; }
.myblocks li { justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mb-date { display: grid; min-width: 0; }
.mb-date .muted { font-size: 13px; }

/* ───────── Aviso ───────── */
#toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); z-index: 50;
  transform: translate(-50%, -20px); width: max-content; max-width: calc(100% - 32px); text-align: center;
  opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); transition: .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--red); color: #fff; }

/* ───────── Celular ───────── */
@media (max-width: 640px) {
  .poster { grid-template-columns: auto 1fr auto auto; gap: 4px; padding: 12px 10px 20px; }
  .nav { width: 38px; height: 38px; }
  .nav svg { width: 19px; height: 19px; }
  .month-name { font-size: clamp(38px, 12.5vw, 62px); flex-direction: column; align-items: center; gap: 2px; }
  .month-name .year { font-size: .42em; line-height: 1; margin-bottom: 3px; -webkit-text-stroke: 1.4px var(--paper); order: -1; }
  .me-btn { margin-left: 4px; }
  .me-btn .av { --s: 34px; }
  .hanger { padding: 0 6px calc(8px + env(safe-area-inset-bottom)); }
  .rings { left: 5%; right: 5%; top: -12px; }
  .rings i { width: 7px; height: 24px; }
  .rings i:nth-child(n+9) { display: none; }
  .page { padding-top: 18px; }
  .weekdays { font-size: 11px; text-align: center; padding-bottom: 6px; }
  .weekdays div { padding: 0; }
  .cell { padding: 4px 3px; gap: 3px; align-items: center; }
  .num { font-size: 19px; margin: 0; }
  .evs { width: 100%; }
  .ev { border-radius: 5px; min-height: 18px; }
  .ev:not(.has-img) { box-shadow: inset 3px 0 0 var(--fc); }
  .ev-txt { padding: 2px 3px 3px 5px; font-size: 10px; display: block; }
  .ev.has-img .ev-txt { padding-left: 3px; }
  .ev-txt b { display: none; }
  .ev-txt span {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    white-space: normal; hyphens: auto; line-height: 1.12;
  }
  .more { align-self: center; font-size: 10.5px; padding: 0 6px; }
  .blk { width: 100%; text-align: center; font-size: 9.5px; line-height: 1.15; }
  .av.xs { --s: 15px; font-size: 6.5px; }
  .today-pill { bottom: calc(18px + env(safe-area-inset-bottom)); }
  .facts div { grid-template-columns: 96px 1fr; }
  .detail h2 { font-size: 38px; }
  .add-user { grid-template-columns: 1fr auto; }
  .add-user .btn { grid-column: 1 / -1; }
  .detail .actions .btn:not(.primary) span { display: none; }
  .detail .actions .btn:not(.primary) { padding: 0 14px; }
  .detail .actions .btn.primary { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
