/* mobile.css — v10.74 site-wide phone foundation (loaded last on each page).
   Scope: the site Menu sheet, safe areas, input sizing (no iOS focus-zoom),
   48px tap targets on phones, tables-as-cards, and pausing decorative motion. */

/* ── Site menu button: hidden on desktop, replaces the nav pills below 768px ── */
.lsm-btn { display: none; align-items: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 16px; border-radius: 12px; border: 2px solid rgba(244,239,230,.55); background: transparent; color: #F4EFE6; font: 700 1rem/1 'Source Sans 3', system-ui, sans-serif; cursor: pointer; flex: 0 0 auto; }
.lsm-btn-light { border-color: #1F3D3B; color: #1F3D3B; }
.lsm-btn:focus-visible, .lsm-row:focus-visible, .lsm-close:focus-visible { outline: 3px solid #E0AC5E; outline-offset: 2px; }
@media (max-width: 767.98px) {
  [data-lsm-source] { display: none !important; }
  .lsm-btn { display: inline-flex; margin-left: auto; }
}
.lsm-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(15,26,31,.55); }
.lsm-sheet { position: fixed; top: 0; left: 0; right: 0; z-index: 2001; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; background: #F4EFE6; color: #1B2A33; border-radius: 0 0 18px 18px; box-shadow: 0 18px 40px rgba(0,0,0,.3); padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.lsm-sheet[hidden], .lsm-backdrop[hidden] { display: none; }
.lsm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding: 6px 4px; border-bottom: 1.5px solid rgba(31,61,59,.18); }
.lsm-title { font: 600 1.1rem/1.2 'Fraunces', Georgia, serif; }
.lsm-close { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; min-width: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid #1F3D3B; background: #fff; color: #1F3D3B; font: 700 1rem/1 'Source Sans 3', system-ui, sans-serif; cursor: pointer; }
.lsm-list { list-style: none; margin: 8px 0 0; padding: 0; }
.lsm-list li + li { margin-top: 8px; }
.lsm-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 8px 14px; border: 1.5px solid rgba(31,61,59,.2); border-radius: 14px; background: #fff; color: #1B2A33; font: 700 1.08rem/1.2 'Source Sans 3', system-ui, sans-serif; text-align: left; cursor: pointer; }
.lsm-row.is-current { border: 2.5px solid #1F3D3B; background: #E8F1EC; }
.lsm-ic { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 10px; background: #1F3D3B; color: #F4EFE6; }
.lsm-label { flex: 1 1 auto; min-width: 0; }
.lsm-here { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 800; color: #12302D; }
html.lsm-open, html.lsm-open body { overflow: hidden; }

/* ── Inputs: >= 16px so iOS never auto-zooms on focus ── */
@media (max-width: 1024px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select, textarea { font-size: max(16px, 1em) !important; }
}

/* ── Tables → stacked label/value cards on phones ── */
@media (max-width: 767.98px) {
  table.lsm-stack, table.lsm-stack tbody, table.lsm-stack tr, table.lsm-stack td { display: block; width: 100%; }
  table.lsm-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  table.lsm-stack tr { margin: 0 0 12px; padding: 6px 12px; border: 1.5px solid rgba(31,61,59,.16); border-radius: 12px; background: #fff; }
  table.lsm-stack td { display: grid; grid-template-columns: minmax(96px, 40%) 1fr; gap: 10px; align-items: center; padding: 8px 0 !important; border-bottom: 1px solid rgba(31,61,59,.1) !important; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  table.lsm-stack td:last-child { border-bottom: 0 !important; }
  table.lsm-stack td::before { content: attr(data-label); font: 700 .8rem/1.2 'Source Sans 3', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #3F5550; }
  table.lsm-stack td[data-label=""] { grid-template-columns: 1fr; }
  table.lsm-stack td[data-label=""]::before { display: none; }
  .table-wrap, .vi-table-wrap { overflow-x: visible !important; }
}

/* ── Decorative motion: pause off-screen; respect reduced motion ── */
.lsm-offscreen .flame-flicker, .lsm-offscreen .lamp-glow, .lsm-offscreen [class*="flame"] { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .lsm-backdrop, .lsm-sheet { transition: none !important; }
}
