
:root {
  --fdny-red: #cc0000;
  --fdny-red-dark: #a30000;
  --ink: #171717;
  --muted: #5b616e;
  --line: #d9dde5;
  --surface: #ffffff;
  --soft-bg: #f4f6f8;
  --focus: #0b5fff;
  --shadow: 0 10px 28px rgba(0, 0, 0, .12);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--soft-bg); line-height: 1.5; padding-bottom: 74px; }
a { color: var(--fdny-red-dark); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 10000; background: #fff; color: #000; padding: 12px 16px; border: 3px solid #000; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.brand { color: var(--ink); font-weight: 900; text-decoration: none; font-size: 1.05rem; min-height: 44px; display: inline-flex; align-items: center; }
.primary-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px; }
.primary-nav a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 800; white-space: nowrap; }
.primary-nav a.active { background: var(--fdny-red); color: #fff; }
.app-shell { width: min(1120px, 100%); margin: 0 auto; padding: 18px 14px 32px; }
.hero-card, .page-header, .info-card, .session-card, .speaker-card, .location-card, .map-card, .controls, .empty-state { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-card { padding: 24px 18px; text-align: center; }
.main-event-logo { width: min(260px, 100%); height: auto; border-radius: 12px; }
h1 { font-size: clamp(1.75rem, 5vw, 2.7rem); line-height: 1.1; margin: 14px 0 8px; }
h2 { font-size: clamp(1.2rem, 3.5vw, 1.55rem); line-height: 1.2; margin: 0 0 8px; }
h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.25; }
p { margin-top: 0; }
.lead { color: var(--muted); font-size: 1.08rem; margin-bottom: 0; }
.page-header { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 16px; }
.page-header p { margin-bottom: 0; color: var(--muted); }
.page-event-logo { width: 96px; max-width: 26vw; height: auto; border-radius: 10px; }
.section-title { margin: 24px 0 12px; }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-card { display: block; padding: 18px; min-height: 112px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.action-card span { display: block; font-size: 1.2rem; font-weight: 900; margin-bottom: 6px; }
.action-card small { color: var(--muted); font-weight: 700; }
.next-card { margin: 16px 0; padding: 18px; }
.eyebrow { color: var(--fdny-red-dark); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; margin-bottom: 4px; }
.controls { padding: 16px; margin-bottom: 12px; }
.controls label { display: block; font-weight: 900; }
.search-input, select { width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 12px; font: inherit; border: 2px solid #aeb6c2; border-radius: 12px; background: #fff; color: var(--ink); }
.control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.result-count { color: var(--muted); font-weight: 800; margin: 8px 2px 12px; }
.card-list { display: grid; gap: 14px; }
.session-card { padding: 18px; border-left: 8px solid var(--fdny-red); }
.session-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.session-topline time { color: var(--fdny-red-dark); font-weight: 900; }
.type-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 12px; background: #eef1f5; color: #111; font-size: .85rem; font-weight: 900; }
.type-meal { background: #fff0bc; }
.type-skill { background: #dff5e7; }
.type-event { background: #e4efff; }
.session-meta { margin-bottom: 6px; }
.note { border-left: 4px solid var(--line); padding-left: 10px; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.button { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--fdny-red); color: #fff; }
.button.secondary { background: #fff; color: var(--fdny-red-dark); border-color: var(--fdny-red); }
.info-card { padding: 18px; }
.footer-note, .muted { color: var(--muted); }
.speaker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.speaker-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding: 14px; }
.speaker-img { width: 96px; height: 96px; object-fit: cover; object-position: top center; border-radius: 14px; background: #ddd; }
.map-card { overflow: hidden; margin-bottom: 18px; }
.map-heading { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.map-heading p { color: var(--muted); margin: 0; }
#map { width: 100%; height: min(70vh, 560px); min-height: 360px; background: #e5e8ef; }
.location-list { display: grid; gap: 12px; }
.location-card { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.location-card p { margin-bottom: 4px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.62); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-panel { width: min(760px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: 0 18px 60px rgba(0,0,0,.4); }
.modal-close { min-height: 44px; min-width: 44px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; font: inherit; font-weight: 900; padding: 8px 12px; margin-bottom: 12px; float: right; }
.speaker-modal-card { clear: both; }
.speaker-modal-img { width: 140px; height: 140px; object-fit: cover; object-position: top center; border-radius: 18px; float: left; margin: 0 16px 10px 0; background: #ddd; }
.empty-state { padding: 24px; text-align: center; }
.leaflet-container a { min-height: 24px; }
@media (max-width: 760px) {
  body { padding-bottom: 0; }
  .header-inner { display: block; padding-bottom: 8px; }
  .brand { margin-left: 4px; }
  .primary-nav { margin-top: 6px; padding-bottom: 4px; }
  .app-shell { padding: 14px 10px 24px; }
  .page-header { align-items: flex-start; }
  .page-event-logo { width: 72px; }
  .action-grid, .control-row, .speaker-grid { grid-template-columns: 1fr; }
  .speaker-card { grid-template-columns: 82px 1fr; }
  .speaker-img { width: 82px; height: 82px; }
  .session-card, .info-card, .location-card, .controls { padding: 14px; }
  .location-card { align-items: stretch; flex-direction: column; }
  #map { height: 420px; min-height: 320px; }
  .speaker-modal-img { float: none; display: block; margin: 0 0 12px; width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}


/* v8: mobile-safe speaker bio modal */
.modal-backdrop,
.dialog-backdrop,
.speaker-modal-backdrop {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  z-index: 9999;
}

.modal,
.dialog,
.speaker-modal,
[role="dialog"] {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@supports not (height: 100dvh) {
  .modal,
  .dialog,
  .speaker-modal,
  [role="dialog"] {
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 700px) {
  .modal-backdrop,
  .dialog-backdrop,
  .speaker-modal-backdrop {
    align-items: flex-start !important;
    padding: 12px;
  }

  .modal,
  .dialog,
  .speaker-modal,
  [role="dialog"] {
    width: min(100%, 96vw);
    max-height: calc(100dvh - 24px);
    margin: 0 auto;
    border-radius: 12px;
  }

  .modal-body,
  .dialog-body,
  .speaker-modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* v9: schedule date/time display */
.session-time,
.schedule-time,
.session-meta time {
  white-space: normal;
}

/* v10: date/time label wrap */
.session-time,
.schedule-time,
.session-meta,
.meta-row {
  white-space: normal;
}

/* v10: update modal position */
.modal-backdrop,
.dialog-backdrop,
.speaker-modal-backdrop {
  align-items: flex-start !important;
  padding-top: 96px !important;
}

@media (max-width: 700px) {
  .modal-backdrop,
  .dialog-backdrop,
  .speaker-modal-backdrop {
    padding-top: 16px !important;
  }
}