/* Shared layout adjustments; leave private content and server permissions intact. */
.page, .panel, .section, .field, .table-wrap, .post-card, .chat-layout > * { min-width:0; }
.panel, .post-card, .profile-head, .public-footer { overflow-wrap:anywhere; }
img, video, iframe, audio { max-width:100%; }
.pagination-controls { flex-wrap:wrap; }
@media (max-width:1000px) {
  .report-form { grid-template-columns:minmax(0,1fr); }
  .panel-switcher { flex-wrap:wrap; }
}
@media (max-width:700px) {
  html { scroll-padding-top:84px; }
  .page, .page.narrow { width:auto; margin:0; padding:24px 16px 40px; }
  .page h1 { font-size:clamp(26px,7vw,34px); line-height:1.2; }
  .page h2 { font-size:23px; }
  .panel, .profile-head { padding:18px; }
  .section-title { align-items:stretch; flex-direction:column; gap:16px; }
  .section-title .toolbar, .toolbar { flex-wrap:wrap; min-width:0; }
  .toolbar input, .toolbar select { max-width:100%; min-width:0; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size:16px !important; min-height:44px; max-width:100%; }
  .button { min-height:44px; white-space:normal; text-align:center; }
  .panel-switcher { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; }
  .panel-switcher .button { min-width:0; padding:10px; }
  .grid.stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .stat { padding:16px; }
  .stat strong { font-size:30px; }
  .stat span { font-size:13px; }
  .edit-grid, .edit-grid--two, .investment-edit-grid, .doc-grid, .post-list { grid-template-columns:minmax(0,1fr); }
  .edit-form, .investment-edit-card, .report-form { padding:16px; }
  .report-options, .report-options--profile, .report-date-range__fields { grid-template-columns:minmax(0,1fr); }
  .report-options label { display:flex; align-items:flex-start; gap:10px; padding:8px 0; }
  .report-options label input { flex:0 0 auto; margin-top:3px; }
  .admin-card, .admin-post-card { flex-direction:column; align-items:stretch; gap:14px; }
  .admin-post-actions, .admin-permission-form { flex-wrap:wrap; min-width:0; }
  .admin-permission-form { align-items:stretch; }
  .profile-head { display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
  .profile-head h1, [data-user-email] { overflow-wrap:anywhere; }
  body[data-page="profile"] table { min-width:0; table-layout:fixed; }
  body[data-page="profile"] td, body[data-page="profile"] th { overflow-wrap:anywhere; padding:12px 10px; }
  body[data-page="profile"] td:first-child { width:40%; }
  /* Directory: each table row becomes a labelled card, keeping the same controls. */
  .users-table-wrap { border:0; background:transparent; overflow:visible; }
  .users-table { display:block; min-width:0; }
  .users-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .users-table tbody { display:grid; gap:16px; }
  .users-table tr { display:block; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
  .users-table td { display:block; padding:10px 0; border:0; overflow-wrap:anywhere; }
  .users-table td + td { border-top:1px solid var(--line); }
  .users-table td[data-label]::before { content:attr(data-label); display:block; font-weight:800; font-size:12px; color:var(--muted); margin-bottom:7px; text-transform:uppercase; }
  .users-table .admin-status-select, .users-table select { width:100%; min-width:0; }
  .users-table .toolbar { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  .users-table .toolbar .button { width:100%; }
  .chat-heading { flex-wrap:wrap; }
  .chat-heading h2 { white-space:normal; }
  .chat-scroll { height:clamp(240px,45dvh,420px); }
  .chat-message header { flex-wrap:wrap; }
  .chat-profile { padding:16px; max-height:calc(100dvh - 24px); }
  .chat-profile header { align-items:flex-start; }
  .chat-profile dl { grid-template-columns:minmax(0,1fr); gap:6px; }
  .chat-profile dd { margin-bottom:10px; }
  .public-hero, .interior-hero, .offering-hero { min-height:0; padding:64px 20px; }
  .public-hero h1, .interior-hero h1, .offering-hero h1 { font-size:clamp(34px,10vw,48px); }
  .public-hero .hero-quote { font-size:clamp(23px,6vw,30px); }
  .hero-actions { flex-wrap:wrap; }
  .hero-actions .button { width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* Mobile hero asset */
@media(max-width:700px){.public-hero,.interior-hero,.offering-hero{background-image:linear-gradient(rgba(7,6,20,.52),rgba(7,6,20,.52)),url("/assets/site/comunidad.jpg?v=20261027-original");}}
