#bbbm, #bbbm *, #bbbm-resume { box-sizing: border-box; }
  #bbbm {
    --navy: var(--brand-navy,#0B1E3D); --gold: var(--brand-gold,#C9A84C); --cream: var(--brand-cream,#F7F5F0); --green: #1A7A4A;
    --ink: var(--brand-navy,#0B1E3D); --muted: #4A5568; --line: rgba(11,30,61,.14); --white: #fff;
    position: fixed !important; inset: 0 !important; z-index: 2147483000 !important;
    display: none; font-family: 'Radio Canada', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink);
    -webkit-font-smoothing: antialiased;
  }
  #bbbm.bbbm-open { display: block !important; }
  #bbbm .bbbm-scrim { position: absolute; inset: 0; background: rgba(11,30,61,.74); opacity: 0; transition: opacity .2s ease-out; }
  #bbbm.bbbm-in .bbbm-scrim { opacity: 1; }

  #bbbm .bbbm-guard { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #bbbm .bbbm-dialog {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -48%); opacity: 0;
    width: min(1060px, calc(100vw - 48px)); height: min(780px, calc(100dvh - 48px));
    background: var(--cream); border-top: 4px solid var(--gold); border-radius: 0;
    box-shadow: 0 24px 64px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden;
    transition: opacity .22s ease-out, transform .22s ease-out;
  }
  #bbbm.bbbm-in .bbbm-dialog { opacity: 1; transform: translate(-50%, -50%); }

  /* Header */
  #bbbm .bbbm-head { position: relative; padding: 22px 76px 18px 32px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
  #bbbm .bbbm-step { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--muted); margin: 0 0 8px; }
  #bbbm .bbbm-step-bar { display: inline-flex; gap: 4px; }
  #bbbm .bbbm-step-bar i { display: block; width: 28px; height: 4px; background: var(--green); }
  #bbbm .bbbm-step-bar i + i { background: var(--gold); }
  #bbbm h2.bbbm-title {
    font-family: 'Newsreader', Georgia, serif !important; font-weight: 600 !important; font-size: 30px !important;
    line-height: 1.15 !important; letter-spacing: -0.015em; color: var(--navy) !important; margin: 0 !important; outline: none;
  }
  #bbbm h2.bbbm-title { text-wrap: balance; }
  #bbbm .bbbm-t-short, #bbbm .bbbm-mini { display: none; }
  #bbbm .bbbm-sub { margin: 6px 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 62ch; }
  #bbbm .bbbm-x {
    position: absolute; top: 14px; right: 16px; width: 48px; height: 48px; border: 0; background: transparent;
    color: var(--navy); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 2px;
    transition: background-color .15s ease;
  }
  #bbbm .bbbm-x:hover { background: rgba(11,30,61,.07); }
  #bbbm .bbbm-x svg { width: 22px; height: 22px; }

  /* Body */
  #bbbm .bbbm-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 300px 1fr; }
  #bbbm .bbbm-rail { padding: 24px 24px 24px 32px; border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
  #bbbm .bbbm-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  #bbbm .bbbm-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--white); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--navy); }
  #bbbm .bbbm-facts svg { width: 16px; height: 16px; flex: 0 0 auto; }
  #bbbm .bbbm-cover h3 { margin: 0 0 10px !important; font: 600 13px/1.3 'Radio Canada', system-ui, sans-serif !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; }
  #bbbm .bbbm-cover ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
  #bbbm .bbbm-cover li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
  #bbbm .bbbm-cover li svg { width: 20px; height: 20px; color: var(--green); margin-top: 1px; }
  #bbbm .bbbm-trust { padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
  #bbbm .bbbm-trust strong { color: var(--navy); font-weight: 600; }
  #bbbm .bbbm-stars { display: inline-flex; gap: 2px; vertical-align: -2px; margin-right: 6px; color: var(--gold); }
  #bbbm .bbbm-stars svg { width: 14px; height: 14px; }
  #bbbm .bbbm-later { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }

  /* Calendar */
  #bbbm .bbbm-cal { position: relative; min-height: 0; overflow-y: auto; background: var(--white); -webkit-overflow-scrolling: touch; }
  #bbbm .bbbm-cal iframe { display: block; width: 100%; height: 100%; min-height: 640px; border: 0; background: var(--white); }
  #bbbm .bbbm-skel { position: absolute; inset: 0; padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--white); transition: opacity .2s ease; }
  #bbbm .bbbm-skel.bbbm-gone { opacity: 0; pointer-events: none; }
  #bbbm .bbbm-skel b { display: block; background: linear-gradient(90deg, #eef0f4 0%, #f6f7f9 50%, #eef0f4 100%); background-size: 200% 100%; animation: bbbmShimmer 1.4s linear infinite; }
  #bbbm .bbbm-skel .bbbm-sk-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-content: start; }
  #bbbm .bbbm-skel .bbbm-sk-cal b { aspect-ratio: 1; }
  #bbbm .bbbm-skel .bbbm-sk-times { display: grid; gap: 12px; align-content: start; }
  #bbbm .bbbm-skel .bbbm-sk-times b { height: 52px; }
  #bbbm .bbbm-skel .bbbm-sk-label { grid-column: 1 / -1; font-size: 15px; color: var(--muted); }
  @keyframes bbbmShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
  #bbbm .bbbm-fallback { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 28px; background: var(--cream); border-top: 1px solid var(--line); font-size: 15px; display: none; }
  #bbbm .bbbm-fallback.bbbm-show { display: block; }
  #bbbm .bbbm-fallback a { color: var(--navy); font-weight: 600; text-underline-offset: 3px; }

  /* Mobile details panel (hidden on desktop) */
  #bbbm details.bbbm-more { display: none; }

  /* Leave-without-booking confirmation */
  #bbbm .bbbm-confirm {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--navy); color: #fff;
    padding: 20px 32px; display: none; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    box-shadow: 0 -8px 24px rgba(0,0,0,.18);
  }
  #bbbm .bbbm-confirm.bbbm-show { display: flex; }
  #bbbm .bbbm-confirm p { margin: 0; font-size: 16px; line-height: 1.45; max-width: 56ch; }
  #bbbm .bbbm-confirm p strong { color: #fff; }
  #bbbm .bbbm-confirm-btns { display: flex; gap: 10px; flex-wrap: wrap; }

  /* Buttons */
  #bbbm .bbbm-btn {
    min-height: 48px; padding: 12px 20px; border: 1.5px solid var(--gold); background: var(--gold); color: var(--navy);
    font: 700 15px/1.2 'Radio Canada', system-ui, sans-serif; cursor: pointer; border-radius: 2px;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }
  #bbbm .bbbm-btn:hover { background: #d8bb66; border-color: #d8bb66; }
  #bbbm .bbbm-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
  #bbbm .bbbm-btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
  #bbbm button:focus-visible, #bbbm a:focus-visible, #bbbm summary:focus-visible, #bbbm-resume:focus-visible { outline: 3px solid var(--gold) !important; outline-offset: 2px !important; }
  #bbbm .bbbm-confirm button:focus-visible { outline-color: #fff !important; }

  /* Booked */
  #bbbm .bbbm-done { position: absolute; inset: 0; z-index: 4; background: var(--cream); display: none; align-items: center; justify-content: center; text-align: center; padding: 32px; }
  #bbbm .bbbm-done.bbbm-show { display: flex; }
  #bbbm .bbbm-done-in { max-width: 520px; }
  #bbbm .bbbm-tick { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
  #bbbm .bbbm-tick svg { width: 32px; height: 32px; }
  #bbbm .bbbm-done h2 { font-family: 'Newsreader', Georgia, serif !important; font-weight: 600 !important; font-size: 32px !important; line-height: 1.15 !important; color: var(--navy) !important; margin: 0 0 10px !important; }
  #bbbm .bbbm-done h2:focus { outline: none; }
  #bbbm .bbbm-done p { margin: 0 0 8px; font-size: 16px; line-height: 1.55; color: var(--muted); }
  #bbbm .bbbm-done .bbbm-next { margin-top: 18px; font-size: 14px; color: var(--muted); }
  #bbbm .bbbm-progress { height: 3px; background: var(--line); margin-top: 10px; overflow: hidden; }
  #bbbm .bbbm-progress i { display: block; height: 100%; width: 0; background: var(--green); transition: width 2.6s linear; }
  #bbbm .bbbm-done.bbbm-show .bbbm-progress i { width: 100%; }

  /* Resume button */
  #bbbm-resume {
    position: fixed !important; left: 20px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 2147482000 !important;
    display: none; align-items: center; gap: 10px; min-height: 48px; padding: 12px 18px;
    background: var(--bbbm-navy, var(--brand-navy,#0B1E3D)); color: #fff; border: 0; border-left: 4px solid var(--brand-gold,#C9A84C); border-radius: 2px;
    font: 700 15px/1.2 'Radio Canada', system-ui, sans-serif; cursor: pointer; box-shadow: 0 10px 28px rgba(11,30,61,.3);
  }
  #bbbm-resume.bbbm-show { display: inline-flex; }
  #bbbm-resume svg { width: 18px; height: 18px; }

  /* Phones and small tablets: full-screen sheet, calendar first */
  @media (max-width: 860px) {
    #bbbm .bbbm-dialog {
      left: 0; top: 0; width: 100%; height: 100dvh; transform: translateY(24px);
      border-top-width: 3px; box-shadow: none;
    }
    #bbbm.bbbm-in .bbbm-dialog { transform: translateY(0); }
    #bbbm .bbbm-head { padding: calc(14px + env(safe-area-inset-top, 0px)) 64px 12px 16px; }
    #bbbm .bbbm-step { margin-bottom: 6px; font-size: 12px; }
    #bbbm .bbbm-step-bar i { width: 20px; }
    #bbbm h2.bbbm-title { font-size: 22px !important; }
    #bbbm .bbbm-t-long, #bbbm .bbbm-sub { display: none; }
    #bbbm .bbbm-t-short { display: inline; }
    #bbbm .bbbm-mini { display: block; margin: 4px 0 0; font-size: 14px; color: var(--muted); }
    #bbbm .bbbm-x { top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px; }
    #bbbm .bbbm-body { display: flex; flex-direction: column; overflow-y: auto; }
    #bbbm .bbbm-rail { display: none; }
    #bbbm .bbbm-cal { flex: 0 0 auto; overflow: visible; }
    #bbbm .bbbm-cal iframe { min-height: 700px; }
    #bbbm .bbbm-skel { position: absolute; grid-template-columns: 1fr; padding: 16px; }
    #bbbm .bbbm-skel .bbbm-sk-times { display: none; }
    #bbbm .bbbm-fallback { position: static; padding: 12px 16px; }
    #bbbm details.bbbm-more { display: block; background: var(--cream); border-top: 1px solid var(--line); padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    #bbbm details.bbbm-more summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--navy); list-style: none; }
    #bbbm details.bbbm-more summary::-webkit-details-marker { display: none; }
    #bbbm details.bbbm-more summary svg { width: 18px; height: 18px; transition: transform .15s ease; }
    #bbbm details.bbbm-more[open] summary svg { transform: rotate(180deg); }
    #bbbm .bbbm-more-in { display: flex; flex-direction: column; gap: 18px; padding-bottom: 8px; }
    #bbbm .bbbm-confirm { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    #bbbm .bbbm-confirm-btns { width: 100%; }
    #bbbm .bbbm-confirm-btns .bbbm-btn { flex: 1 1 auto; }
    #bbbm .bbbm-done h2 { font-size: 26px !important; }
    #bbbm-resume { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); justify-content: center; }
  }
  /* Laptop-height screens: a slimmer header so the calendar starts higher.
     The 30 minutes / Zoom details stay visible in the side panel. */
  @media (min-width: 861px) and (max-height: 880px) {
    #bbbm .bbbm-dialog { height: calc(100dvh - 24px); width: min(1100px, calc(100vw - 48px)); border-top-width: 3px; }
    #bbbm .bbbm-head { padding: 12px 72px 12px 28px; }
    #bbbm .bbbm-step { margin-bottom: 2px; font-size: 12px; }
    #bbbm .bbbm-step-bar i { width: 22px; height: 3px; }
    #bbbm h2.bbbm-title { font-size: 25px !important; }
    #bbbm .bbbm-sub { font-size: 15px; margin-top: 2px; max-width: none; }
    #bbbm .bbbm-sub-a, #bbbm .bbbm-sub-b { display: none; }
    #bbbm .bbbm-x { top: 6px; right: 10px; }
    #bbbm .bbbm-rail { padding: 18px 20px 18px 28px; gap: 16px; }
    #bbbm .bbbm-facts li { padding: 5px 9px; font-size: 13px; }
    #bbbm .bbbm-cover h3 { margin-bottom: 8px !important; }
    #bbbm .bbbm-cover ul { gap: 9px; }
    #bbbm .bbbm-cover li { font-size: 14px; }
    #bbbm .bbbm-trust { padding-top: 14px; font-size: 13px; }
    #bbbm .bbbm-later { font-size: 13px; }
  }
  /* Very short screens: title only. */
  @media (min-width: 861px) and (max-height: 700px) {
    #bbbm .bbbm-sub, #bbbm .bbbm-later { display: none; }
    #bbbm h2.bbbm-title { font-size: 22px !important; }
  }
  @media (prefers-reduced-motion: reduce) {
    #bbbm .bbbm-scrim, #bbbm .bbbm-dialog, #bbbm .bbbm-skel, #bbbm .bbbm-progress i { transition: none !important; }
    #bbbm .bbbm-skel b { animation: none !important; }
  }
  html.bbbm-lock, html.bbbm-lock body { overflow: hidden !important; }
