/* =====================================================================
   SugarPlumJelly Miami — v8 additions (phone layout)
   Pop-up cart without the map, a smaller baker photo, kind words as a
   list, and a shorter Instagram section. Computers look the same as v7.
   ===================================================================== */

/* The address button and the "Open in…" sheet only exist on phones */
.ev-addr { display: none; }

@media (max-width: 760px) {

  /* ---------- Pop-up cart: no map; the cart photo sits beside the title ---------- */
  .spot-grid { grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 0; align-items: start; }
  .spot-copy { display: contents; }
  .spot-copy .section-head { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
  .spot-map { grid-column: 2; grid-row: 1; width: 96px; max-width: none; margin: 4px 4px 0 0; }
  .spot-map .map-frame, .spot-map .map-card { display: none; }
  .spot-map .map-photo { position: static; width: 100%; transform: rotate(5deg); padding: 5px 5px 16px; }
  .events-title, .events, .events-empty { grid-column: 1 / -1; }

  /* each stop: time, then its address, which opens the maps-app sheet */
  .event { align-items: start; grid-template-columns: 68px 1fr; gap: 14px; }
  .event:hover { transform: none; }
  .ev-map, .ev-dir { display: none !important; }
  .ev-addr {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 2px 0 -6px; padding: 0;
    border: 0; background: none; color: var(--grape); font: 600 .95rem/1.3 var(--font-body, inherit); text-align: left;
    text-decoration: underline; text-decoration-color: rgba(143, 118, 169, .45); text-underline-offset: 3px;
    cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: opacity 120ms ease;
  }
  .ev-addr svg { width: 1.05em; height: 1.05em; flex: none; color: var(--lilac); }
  .ev-addr:active { opacity: .55; }
  .event.is-next .ev-addr { color: var(--moon-mist); text-decoration-color: rgba(252, 245, 232, .4); }
  .event.is-next .ev-addr svg { color: var(--moon-mist); }

  /* ---------- Meet the baker: photo at half size, next to the heading; no treat chips ---------- */
  .about-grid { grid-template-columns: minmax(0, 42%) 1fr; column-gap: 20px; row-gap: 0; align-items: center; }
  .about-copy { display: contents; }
  .about-portrait { grid-column: 1; grid-row: 1; max-width: 190px; justify-self: start; margin: 8px 0 26px 6px; }
  .about-copy .section-head { grid-column: 2; grid-row: 1; margin: 0 0 26px; }
  .about-copy .section-head h2 { font-size: clamp(1.9rem, 8.5vw, 2.5rem); }
  .about-text { grid-column: 1 / -1; }
  .portrait-frame { box-shadow: 0 0 0 6px var(--fantasy), 0 0 0 7px rgba(143, 118, 169, .35), var(--shadow-md); }
  .years-badge { width: 84px; height: 84px; right: -20%; bottom: -6%; }
  .years-badge strong { font-size: 1.75rem; }
  .years-badge span { font-size: .6rem; line-height: 1.15; }
  .about .chips { display: none; }
  [data-theme="dark"] .portrait-frame { box-shadow: 0 0 0 5px #120E1A, 0 0 0 6px rgba(193, 181, 201, .45), 0 0 40px rgba(96, 70, 110, .5); }

  /* ---------- Kind words: one list going down the page ---------- */
  .quotes {
    grid-auto-flow: row; grid-template-columns: 1fr; grid-auto-columns: auto; overflow: visible; scroll-snap-type: none;
    margin-inline: 0; padding: 0; gap: 0;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  }
  .quotes > li + li { border-top: 1px solid rgba(143, 118, 169, .2); }
  .quotes > li.q-more { display: none; }
  .quotes.is-all > li.q-more { display: block; }
  .quote, .quote:nth-child(n), .quote:hover { transform: none; background: none; box-shadow: none; border-radius: 0; margin: 0; padding: 20px 20px 18px; }
  .quote::before { display: none; }
  .quote blockquote { font-size: 1.12rem; line-height: 1.45; }
  .quote figcaption { margin-top: 12px; }
  .q-avatar { width: 40px; height: 40px; }
  .q-toggle { display: flex; margin: 18px auto 0; min-height: 44px; }
  [data-theme="dark"] .quotes { background: #1A1424; box-shadow: 0 0 0 1px rgba(193, 181, 201, .22); }
  [data-theme="dark"] .quotes > li + li { border-top-color: rgba(193, 181, 201, .16); }
  [data-theme="dark"] .quote { background: none; box-shadow: none; border: 0; }

  /* ---------- Instagram: three photos, then the big photo underneath ---------- */
  .insta-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .insta-grid .insta-tile:nth-child(n + 4) { display: none; }
  .insta-art { order: 1; max-width: 300px; margin-block: 8px 0; }
  .ia-photo { width: 62%; }
}
@media (min-width: 761px) { .q-toggle { display: none; } }

/* ---------- "Open in…" sheet: rises from the bottom, like a phone's own menu ---------- */
.maps-sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 460px; max-height: none; margin: 0 auto; padding: 0 10px calc(10px + env(safe-area-inset-bottom));
  border: 0; background: none; color: var(--ink); overflow: visible;
}
.maps-sheet::backdrop { background: rgba(20, 12, 28, 0); transition: background 240ms ease; }
.maps-sheet.is-open::backdrop { background: rgba(20, 12, 28, .4); }
.ms-panel { display: grid; gap: 8px; transform: translateY(110%); transition: transform 240ms cubic-bezier(.4, 0, 1, 1); }
.maps-sheet.is-open .ms-panel { transform: none; transition: transform 380ms cubic-bezier(.22, 1, .36, 1); }
.ms-head, .ms-group, .ms-cancel { background: var(--surface); border-radius: 16px; }
.ms-group { display: grid; overflow: hidden; }
.ms-head { padding: 14px 18px 12px; text-align: center; border-radius: 16px 16px 0 0; margin-bottom: -8px; border-bottom: 1px solid rgba(143, 118, 169, .2); }
.ms-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1.15; }
.ms-head p { margin: 2px 0 0; font-size: .85rem; color: var(--ink-soft); }
.ms-head + .ms-group { border-radius: 0 0 16px 16px; }
.ms-group a, .ms-group button, .ms-cancel {
  display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 18px; border: 0; background: none;
  color: var(--grape); font: 500 1.05rem/1.2 var(--font-body, inherit); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background 120ms ease;
}
.ms-group > * + * { border-top: 1px solid rgba(143, 118, 169, .2); }
.ms-cancel { width: 100%; font-weight: 700; background: var(--surface); }
.ms-group a:active, .ms-group button:active, .ms-cancel:active { background: rgba(143, 118, 169, .14); }
.ms-group a:focus-visible, .ms-group button:focus-visible, .ms-cancel:focus-visible { outline: 3px solid var(--grape); outline-offset: -3px; }
[data-theme="dark"] .ms-head, [data-theme="dark"] .ms-group, [data-theme="dark"] .ms-cancel { background: #221A2E; }
[data-theme="dark"] .ms-group a, [data-theme="dark"] .ms-group button, [data-theme="dark"] .ms-cancel { color: var(--silver); }
[data-theme="dark"] .ms-head, [data-theme="dark"] .ms-group > * + * { border-color: rgba(193, 181, 201, .16); }
@media (prefers-reduced-motion: reduce) {
  .ms-panel, .maps-sheet.is-open .ms-panel { transform: none; transition: opacity 200ms ease; opacity: 0; }
  .maps-sheet.is-open .ms-panel { opacity: 1; }
}

/* ---------- Hide the "Powered by Netlify" badge Netlify adds to free sites ---------- */
#nl-badge-frame, #nl-badge, #netlify-badge, .netlify-badge { display: none !important; }
