/* Corazones Solidarios · Villa La Tela
   Estilo "accesible": contraste alto, objetivos táctiles de 44 px, foco visible,
   modo claro y oscuro con las mismas variables. Paleta: azul compasivo + naranja de acción. */

:root {
  color-scheme: light;
  --bg: #f2f8fa;
  --surface: #ffffff;
  --surface-2: #e9f2f6;
  --ink: #12303c;
  --muted: #476070;
  --line: #d0e0e8;
  --field-line: #6f8b9a;
  --primary: #0e7490;
  --primary-strong: #0b5d75;
  --primary-ink: #ffffff;
  --primary-soft: #dcf0f6;
  --accent: #c2410c;
  --accent-strong: #9a3412;
  --accent-soft: #ffeedd;
  --green: #166534;
  --green-soft: #dcf5e4;
  --amber: #854d0e;
  --amber-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --hero: #0e7490;
  --hero-ink: #ffffff;
  --shadow: 0 6px 22px #12303c14;
  --radius: 18px;
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0a1820;
  --surface: #11252f;
  --surface-2: #183341;
  --ink: #e8f3f7;
  --muted: #9fb7c3;
  --line: #254452;
  --field-line: #6a8a9a;
  --primary: #3ac1de;
  --primary-strong: #7fdcef;
  --primary-ink: #04222b;
  --primary-soft: #12404e;
  --accent: #fb923c;
  --accent-strong: #fdba74;
  --accent-soft: #3b2412;
  --green: #86efac;
  --green-soft: #12351f;
  --amber: #fcd34d;
  --amber-soft: #3a2f0f;
  --danger: #fca5a5;
  --danger-soft: #401a1c;
  --hero: #12404e;
  --hero-ink: #e8f3f7;
  --shadow: 0 6px 22px #00000066;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0a1820;
    --surface: #11252f;
    --surface-2: #183341;
    --ink: #e8f3f7;
    --muted: #9fb7c3;
    --line: #254452;
    --field-line: #6a8a9a;
    --primary: #3ac1de;
    --primary-strong: #7fdcef;
    --primary-ink: #04222b;
    --primary-soft: #12404e;
    --accent: #fb923c;
    --accent-strong: #fdba74;
    --accent-soft: #3b2412;
    --green: #86efac;
    --green-soft: #12351f;
    --amber: #fcd34d;
    --amber-soft: #3a2f0f;
    --danger: #fca5a5;
    --danger-soft: #401a1c;
    --hero: #12404e;
    --hero-ink: #e8f3f7;
    --shadow: 0 6px 22px #00000066;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 2.5rem; font-weight: 600; line-height: 1.16; letter-spacing: -.03em; margin-bottom: 10px; }
h2 { font-size: 1.15rem; line-height: 1.35; margin-bottom: 8px; }
h3 { font-size: 1rem; margin-bottom: 5px; }
p { margin-bottom: 14px; }
svg { width: 21px; height: 21px; flex: none; vertical-align: middle; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--primary); color: var(--primary-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.subtle { color: var(--muted); font-size: .875rem; }
.flex-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.footnote { font-size: .8rem; color: var(--muted); margin: 22px 0 0; }
.eyebrow, .nav-label { text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; font-weight: 700; color: var(--muted); }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 30px 18px 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.workspace { min-width: 0; }
main { padding: 32px 40px 60px; max-width: 1280px; margin: auto; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 40px; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .context { font-size: .875rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.mobile-brand, .mobile-nav { display: none; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-bottom: 34px; }
.brand-logo { width: 56px; height: 56px; border-radius: 14px; background: #fff; border: 1px solid var(--line); object-fit: contain; flex: none; }
.auth-top .brand-logo { width: 64px; height: 64px; }
.brandmark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--accent); color: var(--bg); border-radius: 13px; flex: none; }
:root:not([data-theme='dark']) .brandmark { color: #fff; }
.brandmark svg { width: 25px; height: 25px; fill: currentColor; stroke: none; }
.brand strong { font-size: 1rem; line-height: 1.2; display: block; }
.brand small { display: block; font-size: .75rem; color: var(--muted); margin-top: 5px; letter-spacing: .06em; }

.nav-label { padding: 0 12px; margin-bottom: 10px; }
.navlink { padding: 12px; min-height: 46px; display: flex; gap: 12px; align-items: center; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: .9375rem; font-weight: 600; margin: 3px 0; }
.navlink:hover { background: var(--surface-2); color: var(--ink); }
.navlink.active { background: var(--primary-soft); color: var(--primary-strong); }
.badge-count { margin-left: auto; background: var(--accent); color: #fff; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
:root[data-theme='dark'] .badge-count { color: #1b0f05; }

/* ---------- Controles de arriba: modo claro/oscuro y menú del perfil ---------- */
.top-controls { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--primary-soft); color: var(--primary-strong); border-radius: 50%; flex: none; }
.avatar.mini { width: 28px; height: 28px; font-size: .75rem; }
.avatar.big { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-btn { list-style: none; cursor: pointer; position: relative; border: 2px solid transparent; }
.avatar-btn::-webkit-details-marker { display: none; }
.avatar-btn:hover { border-color: var(--primary); }
.dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; }
.menu-head small { color: var(--muted); font-size: .8rem; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 9px; border: 0; background: none; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--ink); text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }

/* ---------- Componentes ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head p { color: var(--muted); margin-bottom: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.section-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 3px 0 0; font-size: .875rem; color: var(--muted); }
.rotation-head { margin-top: 34px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 22px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }

.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary-strong); font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: normal; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.rose { background: var(--accent-soft); color: var(--accent-strong); }
.pill.gray { background: var(--surface-2); color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 17px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; text-align: center; line-height: 1.35; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.soft { background: var(--primary-soft); color: var(--primary-strong); border-color: transparent; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { font-size: .8rem; padding: 8px 13px; min-height: 40px; }
.btn.full { width: 100%; margin-top: 14px; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--primary); outline-offset: 3px; }
.linkbtn { border: 0; padding: 8px 0; background: none; font-size: .875rem; color: var(--primary-strong); font-weight: 700; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.icon-btn { width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; }
.icon-btn:hover { background: var(--surface-2); }

/* Jornada */
.event-card { background: var(--hero); color: var(--hero-ink); border-color: transparent; display: flex; align-items: center; gap: 24px; padding: 28px; margin-bottom: 26px; position: relative; overflow: hidden; }
.date-tile { text-align: center; background: #ffffff1c; border: 1px solid #ffffff38; border-radius: 13px; padding: 12px 20px; flex: none; }
.date-tile span { display: block; text-transform: uppercase; font-size: .75rem; letter-spacing: .12em; opacity: .85; }
.date-tile strong { display: block; font-family: Georgia, serif; font-size: 2.7rem; line-height: 1.15; font-weight: 600; }
.event-details { flex: 1; min-width: 0; }
.event-details h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 10px; }
.event-details p { opacity: .92; margin: 0 0 12px; font-size: .9375rem; }
.event-card .pill { background: #ffffff1f; color: inherit; border: 1px solid #ffffff38; }
.event-heart { width: 70px; height: 70px; stroke-width: 1; margin-right: 6px; transform: rotate(-12deg); opacity: .35; }
.shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; align-items: start; }
.shift { position: relative; }
.shift.selected { border: 2px solid var(--primary); padding: 23px; }
.shift-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.iconbox { background: var(--amber-soft); color: var(--amber); width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; }
.iconbox.blue { background: var(--primary-soft); color: var(--primary-strong); }
.shift h3 { font-size: 1.1rem; margin-bottom: 2px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 10px; overflow: hidden; margin: 14px 0 7px; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 10px; }
.roster-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 20px 0 10px; }
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.roster li { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: .9375rem; }
.roster li > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.roster em { color: var(--muted); font-style: normal; font-size: .8rem; }
.roster-empty { margin: 0; }

.list-row { display: flex; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row p { margin: 4px 0 0; font-size: .875rem; color: var(--muted); }
.list-row h3 { margin: 0; }
.list-row .btn { flex: none; }
.check-icon { width: 33px; height: 33px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.check-icon.done { background: var(--green-soft); color: var(--green); }
.quantity { display: flex; align-items: center; gap: 6px; flex: none; }
.quantity button { width: 40px; min-height: 44px; border: 1px solid var(--field-line); background: var(--surface); border-radius: 8px; font-size: 1.15rem; }
.quantity output { min-width: 24px; text-align: center; font-weight: 700; font-size: .9rem; }

.notice { padding: 15px 18px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-strong); font-size: .875rem; display: flex; gap: 11px; align-items: flex-start; margin-bottom: 18px; }
.notice p { margin: 0; }
.notice.amber { background: var(--amber-soft); color: var(--amber); }
.notice.rose { background: var(--accent-soft); color: var(--accent-strong); }
.notice.green { background: var(--green-soft); color: var(--green); }

/* Formularios */
label.field { display: block; font-size: .875rem; font-weight: 700; margin: 0 0 16px; }
label.field input, label.field select, label.field textarea { display: block; width: 100%; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); padding: 11px 12px; margin-top: 7px; color: var(--ink); min-height: 46px; font-weight: 400; }
label.field textarea { resize: vertical; line-height: 1.6; min-height: 110px; }
label.field small { display: block; font-weight: 400; color: var(--muted); margin-top: 6px; font-size: .8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; margin: 16px 0; }
.checkbox-label input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; margin-top: 2px; }
.bulk-card { margin-bottom: 24px; }
.bulk-actions { margin-top: 0; align-items: flex-end; }
label.field.bulk-field { flex: 1; min-width: 220px; margin: 0; }
.error { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 11px 13px; font-size: .875rem; font-weight: 600; margin-bottom: 14px; }

/* Panel de administración */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 20px; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 2rem; line-height: 1.2; }
.stat span { font-size: .875rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { border: 1px solid var(--field-line); padding: 10px 16px; min-height: 44px; background: var(--surface); color: var(--ink); border-radius: 999px; font-weight: 700; font-size: .875rem; }
.tab.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person-top { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.person h3 { margin: 0; }
.person p { font-size: .875rem; color: var(--muted); margin: 4px 0 12px; overflow-wrap: anywhere; }
.person-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person-controls select { padding: 9px; max-width: 220px; min-height: 44px; border: 1px solid var(--field-line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: .875rem; }
.empty { text-align: center; padding: 40px 18px; }
.empty svg { width: 34px; height: 34px; color: var(--primary); margin-bottom: 12px; }

/* Fraternidades y perfil */
.frat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; margin-bottom: 26px; }
.frat-top { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.frat-top .grow { flex: 1; min-width: 150px; }
.frat-top h2 { margin: 0 0 2px; }
.frat-top p { margin: 0; }
.frat-photo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; }
.frat-photo.placeholder { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); font-weight: 800; font-size: 1.6rem; }
.new-frat { margin-bottom: 26px; }
.order-readonly { padding-left: 24px; margin: 0 0 18px; }
.order-readonly li { margin: 6px 0; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.profile-head h2, .profile-head p { margin: 0; }

/* Calendario */
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekday { text-align: center; font-size: .8rem; color: var(--muted); font-weight: 700; padding-bottom: 10px; }
.day { min-height: 76px; border: 1px solid transparent; border-radius: 10px; padding: 8px; background: var(--surface-2); color: var(--ink); text-align: left; font-size: .875rem; display: flex; flex-direction: column; gap: 5px; }
.day.event { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); cursor: pointer; }
.day.chosen { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.day.blank { background: transparent; }
.day small { font-size: .75rem; line-height: 1.2; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.cal-head h2 { text-transform: capitalize; margin: 0; }
.schedule-row { display: flex; align-items: center; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.schedule-row:last-child { border: 0; }
.schedule-date { width: 45px; flex: none; text-align: center; font-size: .8rem; color: var(--muted); }
.schedule-date strong { display: block; font-size: 1.4rem; color: var(--ink); line-height: 1.2; }
.schedule-row .grow { flex: 1; min-width: 0; }
.schedule-row p { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.order-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 9px; }
.order-number { border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); font-size: .8rem; font-weight: 700; flex: none; }
.order-row .icon-btn { width: 40px; min-height: 40px; flex: none; }

/* Mensaje de WhatsApp */
.message-preview { background: var(--surface-2); border-radius: 14px; padding: 22px; }
.message-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 0 14px 14px 14px; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.6; }

/* Ingreso y registro */
.auth-layout { max-width: 1020px; margin: 0 auto; padding: 40px 26px 70px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 10px; }
.auth-top .brand { margin: 0; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.auth-story { padding: 30px 0; }
.auth-story h1 { font-size: 3rem; margin-bottom: 22px; }
.auth-story p { color: var(--muted); }
.auth-story .steps { border-left: 3px solid var(--accent); padding-left: 22px; margin: 28px 0; }
.auth-story .steps p { padding: 5px 0; }
.auth-story .steps strong { display: block; color: var(--ink); font-size: 1rem; }
.auth-card { padding: 30px; }
.auth-card h2 { font-family: Georgia, serif; font-size: 1.7rem; font-weight: 600; }
.auth-card .subtle { margin-bottom: 23px; }
.pending-card { max-width: 560px; margin: 38px auto; text-align: center; padding: 34px; }
.pending-card .iconbox { margin: 0 auto 22px; width: 65px; height: 65px; }
.pending-card h1 { font-size: 2.2rem; }
.timeline { text-align: left; margin: 25px 0; }
.timeline p { border-left: 3px solid var(--line); padding: 0 0 20px 20px; margin: 0; font-size: .875rem; color: var(--muted); }
.timeline strong { color: var(--ink); display: block; }
.timeline p:last-child { padding-bottom: 0; }

/* Avisos y diálogos */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 100; background: var(--ink); color: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 20px; max-width: calc(100% - 32px); font-size: .9rem; font-weight: 600; pointer-events: none; }
dialog { border: 1px solid var(--line); border-radius: 20px; max-width: 480px; width: calc(100% - 32px); padding: 26px; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #0a182099; }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1120px) {
  .shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding: 25px 14px; }
  .topbar { padding: 12px 25px; }
  main { padding: 28px 25px 60px; }
  .two-col { grid-template-columns: 1fr; }
  .event-heart { display: none; }
  .page-head { flex-wrap: wrap; }
  .auth-grid { gap: 25px; }
}

/* ---------- Celular ---------- */
@media (max-width: 720px) {
  h1 { font-size: 2.05rem; }
  .shell { display: block; }
  .sidebar, .topbar { display: none; }
  .mobile-brand { display: flex; align-items: center; justify-content: space-between; background: var(--surface); padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
  .mobile-brand .brand { margin: 0; }
  .brand-logo, .auth-top .brand-logo { width: 46px; height: 46px; border-radius: 12px; }
  .brandmark { width: 36px; height: 36px; border-radius: 11px; }
  .brand strong { font-size: .9rem; }
  .avatar { width: 38px; height: 38px; }
  main { padding: 24px 16px 108px; }
  .page-head { margin-bottom: 22px; gap: 15px; }
  .page-head p { font-size: .9rem; }
  .event-card { padding: 20px; gap: 16px; margin-bottom: 24px; }
  .date-tile { padding: 10px 14px; }
  .date-tile strong { font-size: 2.2rem; }
  .event-details h2 { font-size: 1.15rem; }
  .event-details p { font-size: .8rem; }
  .event-card .pill { font-size: .75rem; padding: 4px 8px; }
  .shifts { grid-template-columns: 1fr; gap: 12px; margin-bottom: 25px; }
  .card { padding: 19px; border-radius: 16px; }
  .shift.selected { padding: 18px; }
  .two-col, .stack { gap: 18px; }
  .section-head h2 { font-size: 1.05rem; }
  .list-row { gap: 10px; }
  .list-row .btn.small { max-width: 112px; font-size: .75rem; padding: 8px 10px; min-height: 44px; }
  .list-row h3 { font-size: .9rem; }
  .list-row p { font-size: .8rem; }
  .btn.small { min-height: 44px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; padding: 8px 6px max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 20; box-shadow: 0 -4px 18px #00000012; }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 2px; min-height: 52px; text-decoration: none; font-size: .72rem; color: var(--muted); border-radius: 10px; font-weight: 700; min-width: 0; text-align: center; }
  .mobile-nav a span { overflow-wrap: normal; hyphens: manual; line-height: 1.15; }
  .mobile-nav a.active { color: var(--primary-strong); background: var(--primary-soft); }
  .toast { bottom: 94px; font-size: .8rem; width: max-content; max-width: calc(100% - 32px); }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { gap: 8px; }
  .stat { padding: 13px; }
  .stat strong { font-size: 1.7rem; }
  .stat span { font-size: .75rem; }
  .person-top { flex-wrap: wrap; }
  .person-controls select { max-width: 100%; width: 100%; }
  .day { min-height: 70px; padding: 6px 3px; border-radius: 8px; font-size: .8rem; }
  .day small { font-size: .72rem; overflow-wrap: anywhere; }
  .calendar-grid { gap: 4px; }
  .cal-head h2 { font-size: 1rem; }
  .auth-layout { padding: 22px 16px 45px; }
  .auth-top { margin-bottom: 15px; }
  .auth-grid { grid-template-columns: 1fr; gap: 10px; }
  .auth-story { padding: 15px 2px 5px; }
  .auth-story h1 { font-size: 2.2rem; margin-bottom: 13px; }
  .auth-story .steps { display: none; }
  .auth-story > p { font-size: .9rem; }
  .auth-card { padding: 23px; }
  .pending-card { padding: 25px 20px; margin: 20px auto; }
  .pending-card h1 { font-size: 1.9rem; }
  .message-preview { padding: 14px; }
  .message-bubble { padding: 15px; font-size: .875rem; }
  .order-row { gap: 6px; padding: 9px; }
  .frat-grid { grid-template-columns: 1fr; }
  .menu { min-width: 240px; }
}

@media (max-width: 360px) {
  main { padding-left: 12px; padding-right: 12px; }
  .event-card { gap: 12px; padding: 16px; }
  .brand strong { font-size: .85rem; }
  .person { grid-template-columns: 32px minmax(0, 1fr); }
  .mobile-nav a { font-size: .68rem; }
}

@media (prefers-reduced-motion: no-preference) {
  main { animation: appear .2s ease-out; }
  .btn, .navlink, .menu a, .menu button, .icon-btn { transition: background-color .15s, border-color .15s, color .15s; }
  @keyframes appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
