/* ============================================================
   diazordonez.com — base styles
   Plain CSS, no framework, no build step.
   Edit the tokens in :root to restyle the whole site at once.
   ============================================================ */

:root {
  /* Color */
  --bg:           #ffffff;
  --bg-alt:       #f6f5f2;
  --text:         #1c1b19;
  --text-muted:   #5e5b56;
  --accent:       #1d5fd1;
  --accent-text:  #ffffff;
  --border:       #e3e0da;
  --danger:       #b3261e;

  /* Type */
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-serif, Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap:    68rem;
  --narrow:  42rem;
  --radius:  10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #14130f;
    --bg-alt:      #1c1a16;
    --text:        #f0ede7;
    --text-muted:  #a8a29a;
    --accent:      #6ea8fe;
    --accent-text: #14130f;
    --border:      #302d27;
    --danger:      #f2887f;
  }
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

/* Anything marked hidden stays hidden, even if a class gives it a display */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.wrap.narrow { max-width: var(--narrow); }

.section { padding-block: clamp(3rem, 8vw, 6rem); }

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

/* A page intro with less space underneath (Oyster Log) */
.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

/* Page buttons (Map, Oysters): a row of buttons on big
   screens, a ☰ dropdown menu on phones */
.nav { display: flex; gap: 0.5rem; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.25rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
}

@media (max-width: 40rem) {
  .nav-toggle { display: flex; }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.25rem 1.25rem 0.75rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  }

  .nav.is-open { display: flex; }

  /* In the dropdown the buttons become plain rows */
  .nav .btn {
    padding: 0.8rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 1.05rem;
  }

  .nav .btn:last-child { border-bottom: 0; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(4rem, 12vw, 8rem); }

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 { max-width: 18ch; }

.lede {
  max-width: 52ch;
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: inherit;
  cursor: pointer;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.btn--primary:hover {
  filter: brightness(1.08);
  color: var(--accent-text);
}

/* Compact variant — used by the header buttons */
.btn--sm {
  padding: 0.45rem 1.05rem;
  font-size: 0.9rem;
  border-radius: 8px;
  white-space: nowrap;
}

/* Marks the button for the page you're already on */
.btn.is-current {
  border-color: var(--accent);
  color: var(--accent);
}

/* Signed in on this device: no need for the Log in button */
.is-signed-in .header-login { display: none; }

/* Sign out sits in the header menu, only while signed in */
.nav-signout { display: none; }
.is-signed-in .nav .nav-signout { display: inline-flex; }
@media (max-width: 40rem) {
  .is-signed-in .nav .nav-signout { display: block; color: var(--danger); }
  /* Signed out, the last row is the one before it: no line under that */
  :root:not(.is-signed-in) .nav .btn:nth-last-child(2) { border-bottom: 0; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Shorten header button labels on small screens */
.sm-only { display: none; }

@media (max-width: 34rem) {
  .lg-only { display: none; }
  .sm-only { display: inline; }
  .btn--sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
  .brand { font-size: 1rem; }
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  padding: 1.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card p { margin-bottom: 0; color: var(--text-muted); }

/* Homepage: the Map and Oyster Log cards */
.home-cards { margin-top: 0; }

.home-card {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.home-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.home-card .home-card__emoji { margin: 0 0 0.4rem; font-size: 1.8rem; line-height: 1; }

.home-card__title { margin: 0 0 0.35rem; font-size: 1.4rem; }

.home-card .home-card__line { color: var(--text); font-weight: 500; }

.home-card .home-card__more { margin-top: 0.35rem; font-size: 0.9rem; }

.home-card .home-card__more:empty { display: none; }

/* ---------- Our Map (/map) ---------- */

/* The map page fills the screen under the header, like an app */
.page-map {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.map-app {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 22rem 1fr;
}

.map-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
}

.map-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 0.75rem;
  padding: 1.25rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.map-panel__title { margin: 0; font-size: 1.6rem; }

.map-panel__count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.map-search {
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.map-search:focus { outline: none; border-color: var(--accent); }

/* One scrollable row of filters, like Mapstr */
.chips {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chips[hidden] { display: none; }

/* Second row: the # labels — smaller and quieter than the main filters */
.chips--labels { margin-top: 0.45rem; }

.chips--labels .chip {
  padding: 0.2rem 0.65rem;
  background: var(--bg-alt);
  font-size: 0.8rem;
}

.chip {
  padding: 0.3rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}

/* Hover only where there's a mouse; on iPhones it sticks after a tap */
@media (hover: hover) {
  .chip:hover { border-color: var(--accent); color: var(--text); }
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.place-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  overflow-y: auto;
}

.place {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: none;
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

@media (hover: hover) {
  .place:hover { background: var(--bg-alt); }
}

.place.is-selected {
  background: color-mix(in srgb, var(--pin) 16%, var(--bg));
}

.place__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--pin);
  border: 2px solid var(--pin);
  border-radius: 50%;
  font-size: 1.1rem;
}

/* "Want to go" places are hollow until we've been */
.place--want .place__badge {
  background: var(--bg);
  border-style: dashed;
}

.place__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.place__name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place__meta { color: var(--text-muted); font-size: 0.83rem; }

.place__rating { flex: none; font-size: 0.8rem; }

/* Stars that can be partly filled (4.5 = four and a half) */
.stars {
  position: relative;
  display: inline-block;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.stars::before { content: "☆☆☆☆☆"; }

.stars__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--fill);
  overflow: hidden;
}

.place-list__empty {
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.map-canvas {
  min-height: 0;
  background: var(--bg-alt);
  isolation: isolate; /* keeps Leaflet's layers under the header */
}

/* Dark mode: turn the light map tiles into a dim, dark map */
@media (prefers-color-scheme: dark) {
  .map-canvas .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.85) saturate(0.6);
  }
}

/* Map/List switch — phones only */
.view-toggle { display: none; }

/* Pins: a teardrop in the category color with its emoji inside */
.pin-wrap { background: none; border: 0; }

.pin {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--pin);
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.pin-wrap:hover .pin { transform: rotate(-45deg) scale(1.12); }

.pin--want {
  background: #ffffff;
  border: 3px solid var(--pin);
}

/* Bubbles: nearby pins grouped together, showing how many */
.bubble-wrap { background: none; border: 0; }

.bubble {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--pin);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--pin) 35%, transparent),
              0 2px 8px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.bubble-wrap:hover .bubble { transform: scale(1.1); }

.pin__emoji {
  font-size: 17px;
  line-height: 1;
  transform: rotate(45deg);
}

/* Leaflet, restyled to match the site */
.leaflet-container { font-family: var(--font-body); }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg);
  color: var(--text);
}

.leaflet-popup-content-wrapper { border-radius: var(--radius); }

.leaflet-popup-content {
  max-height: var(--popup-max, none);
  margin: 1rem 1.1rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.5;
}

.leaflet-container a.leaflet-popup-close-button { color: var(--text-muted); }

.popup p { margin: 0 0 0.45rem; }

.popup__cat {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.popup__name { margin: 0; font-size: 1.25rem; }

.popup .popup__city { color: var(--text-muted); font-size: 0.85rem; }

.popup .popup__rating {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.3rem 0 0.55rem;
  font-size: 1.05rem;
}

.popup__score { color: var(--text-muted); font-size: 0.85rem; }

.popup .popup__note { white-space: pre-line; }

.leaflet-container a.popup__oysters {
  display: block;
  margin: 0.2rem 0 0.4rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

/* Photos: a swipeable row at the top of the popup */
.popup__gallery {
  position: relative;
  margin: -0.2rem 0 0.75rem;
}

.popup__photos {
  display: flex;
  gap: 0.4rem;
  height: 150px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 8px;
}

.popup__photos::-webkit-scrollbar { display: none; }

.popup__photo {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}

.popup__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-alt);
}

.popup__photo-count {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  padding: 0.1rem 0.55rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.75rem;
  pointer-events: none;
}

.tag {
  display: inline-block;
  margin: 0 0.3rem 0.3rem 0;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.popup .popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.popup .btn { color: var(--text); }
.popup .btn:hover { color: var(--accent); }
.popup .btn--primary,
.popup .btn--primary:hover { color: var(--accent-text); }

.leaflet-bar a,
.leaflet-bar a:hover {
  background: var(--bg);
  border-bottom-color: var(--border);
  color: var(--text);
}

.leaflet-bar a:hover { background: var(--bg-alt); }

.locate-btn { font-size: 1.15rem; }

/* Live location: blue while on; filled in while the map follows you */
.leaflet-bar a.locate-btn.is-live { color: #2f6fd6; }

.leaflet-bar a.locate-btn.is-following {
  background: #2f6fd6;
  color: #ffffff;
}

.live-dot { animation: live-pulse 2s ease-in-out infinite; }

@keyframes live-pulse {
  0%, 100% { stroke-width: 3; }
  50% { stroke-width: 6; }
}

.leaflet-container .leaflet-control-attribution {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--text-muted);
}

.leaflet-control-attribution a { color: var(--text-muted); }

@media (max-width: 48rem) {
  /* Phones: search + filters on top, then either the map or the list */
  .map-app { display: flex; flex-direction: column; }

  .map-panel { flex: none; border-right: 0; }

  .map-panel__head { padding: 0.85rem 1rem 0.7rem; }
  .map-panel__title { font-size: 1.3rem; }
  .map-search { margin-top: 0.6rem; }

  .chips { margin-top: 0.6rem; }

  .map-app[data-view="map"] .place-list { display: none; }
  .map-app[data-view="map"] .map-canvas { flex: 1; }

  .map-app[data-view="list"] .map-panel { flex: 1; min-height: 0; }
  .map-app[data-view="list"] .place-list { padding-bottom: 5rem; }
  .map-app[data-view="list"] .map-canvas { display: none; }

  .view-toggle {
    display: block;
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    z-index: 1000;
    padding: 0.7rem 1.4rem;
    background: var(--text);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    color: var(--bg);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: pre;
    transform: translateX(-50%);
    cursor: pointer;
  }

  /* Out of the way while a place's card is open */
  .map-app.has-popup .view-toggle { display: none; }
}

/* ---------- Our Map: exploring nearby places ---------- */

/* Other places: small round dots, quieter than our own pins */
.dot-wrap { background: none; border: 0; }

.dot {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  background: var(--pin);
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  line-height: 1;
}

/* Center the small dot inside its 24px tap area */
.dot-wrap--tap { display: grid; place-items: center; }

/* A place picked from "Search the map": bigger, so it's easy to spot */
.dot--found {
  width: 32px;
  height: 32px;
  border-width: 3px;
  font-size: 16px;
}

.map-hint {
  padding: 0.3rem 0.75rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.map-app.has-popup .map-hint { display: none; } /* out of the card's way */

.popup .popup__hours {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.popup .popup__links { display: flex; gap: 1rem; font-size: 0.9rem; }

.leaflet-container .popup__links a { color: var(--accent); }

.place-list__more { padding: 0.75rem 0.5rem 0.25rem; }

.place-list__label {
  margin: 0.25rem 0.25rem 0.2rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.place-list__found { margin: 0.25rem -0.5rem 0; padding: 0; list-style: none; }

.place__badge--found {
  background: var(--bg-alt);
  border-color: var(--border);
}

/* ---------- Our Map on Google Maps ---------- */

/* Markers: Google pins the bottom middle of each one to its spot */
.gpin { width: 36px; height: 44px; cursor: pointer; }
.gpin.is-draft { cursor: grab; }
.gpin.is-draft .pin { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin) 40%, transparent), 0 3px 10px rgba(0, 0, 0, 0.4); }
.gbubble, .gdot, .gdot-live { transform: translateY(50%); cursor: pointer; }

/* Search results: small pins like Google's own */
.dot--result {
  width: 26px;
  height: 26px;
  border-width: 2px;
  font-size: 13px;
}

/* You are here */
.live-dot-g {
  display: block;
  width: 18px;
  height: 18px;
  background: #2f6fd6;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  animation: live-pulse-g 2s ease-in-out infinite;
}

@keyframes live-pulse-g {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 111, 214, 0.45), 0 1px 4px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(47, 111, 214, 0), 0 1px 4px rgba(0, 0, 0, 0.35); }
}

/* The ◎ button, styled like Google's own map buttons */
.gctl { margin: 0 10px 10px 0; }

.gctl__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: 2px;
  box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 1.3rem;
  text-decoration: none;
}

.gctl__btn.is-live { color: #2f6fd6; }
.gctl__btn.is-following { background: #2f6fd6; color: #ffffff; }

/* Cards (Google's info window), in the site's colors */
.gm-style .gm-style-iw-c {
  padding: 0 0 0 1rem !important;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text);
}

.gm-style .gm-style-iw-d {
  padding: 0 1rem 0.9rem 0;
  overflow: auto !important;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}

.gm-style .gm-style-iw-tc::after { background: var(--bg); }

.gm-style .gm-style-iw-ch { padding-top: 0.6rem; }

.gm-style .gm-ui-hover-effect > span { background-color: var(--text-muted) !important; }

.gm-style .popup {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
}

.gm-style .popup a { color: var(--accent); }
.gm-style .popup .btn--primary { color: #ffffff; }
.gm-style .popup .btn:not(.btn--primary) { color: var(--text); }

/* Google rating, open now, hours */
.popup__votes { margin-left: 0.3rem; color: var(--text-muted); font-size: 0.85rem; }

.popup .popup__closed { color: #c5221f; font-weight: 600; }

.popup details.popup__hours summary { cursor: pointer; }
.popup__hours-line { display: block; }
.popup__hours-line:first-of-type { margin-top: 0.25rem; }

.popup__open { font-weight: 600; }
.popup__open.is-open { color: #188038; }
.popup__open.is-closed { color: #c5221f; }

@media (prefers-color-scheme: dark) {
  .popup .popup__closed, .popup__open.is-closed { color: #f28b82; }
  .popup__open.is-open { color: #81c995; }
}

/* Google's info on our own cards, set apart from ours */
.popup__google:not(:empty) { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.popup .popup__rating--google { margin: 0 0 0.4rem; font-size: 0.9rem; gap: 0.35rem; }
.popup__source { margin-right: 0.35rem; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }

/* "Search Google Maps for …" */
.place--search .place__name { color: var(--accent); }

/* ---------- Our Map: edit mode ---------- */

/* One-time "connect Google Maps" box (signed-in editors only) */
.gm-setup {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.gm-setup p { margin: 0; }

.gm-setup__title { font-weight: 600; }

.gm-setup__text { margin-top: 0.2rem !important; color: var(--text-muted); font-size: 0.85rem; }

.gm-setup__form { display: grid; gap: 0.4rem; margin-top: 0.6rem; }

.gm-setup__status { margin-top: 0.4rem !important; font-size: 0.85rem; }
.gm-setup__status:empty { display: none; }

.editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.editor-bar__who { flex: 1; margin: 0; font-size: 0.85rem; font-weight: 600; }

.editor-bar__link { font-size: 0.85rem; }

.editor-bar__notice {
  width: 100%;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.editor-bar__notice:empty { display: none; }
.editor-bar__notice.is-error { color: var(--danger); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--danger { color: var(--danger); }
.btn--danger:hover { border-color: var(--danger); color: var(--danger); }

/* While the form is open it takes over the panel */
.map-panel.is-editing .map-panel__head,
.map-panel.is-editing .place-list { display: none; }

.place-editor {
  position: relative; /* keeps the hidden photo picker inside the form */
  flex: 1;
  min-height: 0;
  padding: 1.1rem 1.25rem 2rem;
  overflow-y: auto;
}

.place-editor.is-busy { cursor: progress; }

.place-editor__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.place-editor__title { margin: 0; font-size: 1.5rem; }

.field { margin-top: 1.1rem; }

.field__label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.field__hint {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px+ stops phones zooming in on tap */
}

.input:focus { outline: none; border-color: var(--accent); }

textarea.input { resize: vertical; line-height: 1.5; }

.choice-row,
.label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.label-row--suggest { margin-top: 0.4rem; }

.chip--on,
.chip--on:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.where__search,
.label-add {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.label-add { margin-top: 0.6rem; }

.where__results {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.where__results:not(:empty) {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.where__results .where__result:last-child { border-bottom: 0; }

.where__result {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.where__result.is-active { background: var(--bg-alt); }

@media (hover: hover) {
  .where__result:hover { background: var(--bg-alt); }
}

.where__result-name { font-weight: 600; }

.where__result-addr { color: var(--text-muted); font-size: 0.8rem; }

.where__empty {
  padding: 0.5rem 0.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.where__tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

.where__see { display: none; } /* phones only */

.where__spot {
  margin: 0.6rem 0 0;
  padding: 0.5rem 0.7rem;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 0.9rem;
}

.where__spot.is-empty { color: var(--text-muted); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.photo-grid[hidden] { display: none; }

.photo-thumb {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.photo-thumb.is-new img { outline: 2px dashed var(--accent); outline-offset: -2px; }

.photo-thumb__remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  background: rgba(0, 0, 0, 0.65);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.8rem;
  cursor: pointer;
}

.photo-add { cursor: pointer; }

.place-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}

.place-editor__actions .btn--danger { margin-left: auto; }

.place-editor__status { margin: 0.75rem 0 0; font-size: 0.9rem; }
.place-editor__status:empty { display: none; }
.place-editor__status.is-error { color: var(--danger); }

/* The pin being placed or moved */
.leaflet-marker-draggable .pin { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin) 40%, transparent), 0 3px 10px rgba(0, 0, 0, 0.4); }

/* While editing, tapping the map drops the pin */
.map-app.is-editing .map-canvas .leaflet-container { cursor: crosshair; }

@media (max-width: 48rem) {
  .map-app[data-view="map"] .place-editor { display: none; }
  .where__see { display: inline-block; }
}

/* ---------- Oyster Log (/oysters) ---------- */

.oyster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

/* The globe stays in view while the list scrolls (big screens) */
.globe-panel {
  position: sticky;
  top: 5rem;
  text-align: center;
}

.globe {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  aspect-ratio: 1;
  touch-action: pan-y; /* up/down still scrolls the page on phones */
  cursor: grab;
}

.globe:active { cursor: grabbing; }

/* Zooming in: the globe stays a round window you can move around in */
.globe { position: relative; }
.globe.is-zoomed { touch-action: none; } /* one finger moves the map, two zoom */
.globe__svg.is-zoomed { clip-path: circle(50% at 50% 50%); }

.globe-zoom {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.globe-zoom__btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.globe-zoom__btn:disabled { opacity: 0.35; cursor: default; }
.globe-zoom__btn[hidden] { display: none; }

.globe__svg { display: block; width: 100%; height: 100%; overflow: visible; }

.globe__ocean {
  fill: color-mix(in srgb, var(--accent) 9%, var(--bg));
}

.globe__grid {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 16%, var(--bg));
  stroke-width: 0.6;
}

.globe__land {
  fill: color-mix(in srgb, var(--text) 16%, var(--bg));
  stroke: var(--bg);
  stroke-width: 0.5;
}

.globe__rim {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}

.globe__pin { cursor: pointer; outline: none; }

.globe__pin-hit { fill: transparent; }

.globe__pin-dot {
  fill: var(--accent);
  stroke: #ffffff;
  stroke-width: 2;
  transition: r 0.15s ease;
}

.globe__pin:hover .globe__pin-dot,
.globe__pin:focus-visible .globe__pin-dot,
.globe__pin.is-selected .globe__pin-dot { r: 9; }

.globe__pin:focus-visible .globe__pin-hit { stroke: var(--accent); stroke-width: 2; }

.globe__label rect {
  fill: var(--bg);
  stroke: var(--border);
}

.globe__label text {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}

.globe-hint { margin: 0.5rem 0 0; color: var(--text-muted); font-size: 0.8rem; }

.oyster-stats { margin: 0.25rem 0 0; font-size: 0.9rem; font-weight: 600; }
.oyster-stats:empty { display: none; }

.oyster-panel .editor-bar { margin: 0 0 1rem; }

.oyster-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.oyster-toolbar .field__label { margin: 0; }

.input--sm { width: auto; padding: 0.4rem 0.7rem; font-size: 0.95rem; }

.oyster-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.oyster {
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 5rem;
}

.oyster.is-selected { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }

.oyster__row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.9rem 0.5rem;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.oyster__rank {
  flex: none;
  width: 2rem;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
}

.oyster__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }

.oyster__name { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }

.oyster__origin { color: var(--text-muted); font-size: 0.85rem; }

.oyster__score {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.oyster__num { color: var(--text-muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.oyster__detail { padding: 0 0.5rem 1.25rem 3.4rem; }

.oyster__people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
}

.oyster__person { display: inline-flex; align-items: center; gap: 0.3rem; }

.scale-bars { display: grid; gap: 0.45rem; margin-bottom: 0.9rem; }

.scale {
  display: grid;
  grid-template-columns: 6.5rem 1fr 6.5rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.scale__label { font-weight: 600; }

.scale__bar {
  height: 8px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.scale__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.scale__ends { color: var(--text-muted); font-size: 0.8rem; }

.oyster__flavors { margin: 0 0 0.75rem; }

.oyster__subhead {
  margin: 1rem 0 0.4rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tastings { margin: 0; padding: 0; list-style: none; }

.tasting {
  position: relative;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tasting p { margin: 0; }

.tasting__meta { font-size: 0.85rem; font-weight: 600; padding-right: 4.5rem; }

.tasting__score { margin-top: 0.5rem; }

.tasting__who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.5rem; font-size: 0.9rem; }

.tasting__scales, .tasting__flavors { color: var(--text-muted); font-size: 0.8rem; }

.tasting__note { font-size: 0.9rem; font-style: italic; }

.tasting__edit { position: absolute; top: 0.5rem; right: 0.5rem; }

.oyster__actions { margin: 0.5rem 0 0; }

.oyster-list__empty { padding: 2rem 0.5rem; color: var(--text-muted); text-align: center; }

/* Oyster type: a small colored dot + name (also the globe's color key) */
.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.type-tag::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  background: var(--type);
  border-radius: 50%;
}

.globe-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  margin: 0.4rem 0 0;
}

.globe-legend:empty { display: none; }

.globe-legend .type-tag { margin: 0; }

.type-chip::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.35rem;
  background: var(--type);
  border-radius: 50%;
}

.oyster-toolbar__item { display: inline-flex; margin-right: auto; }

/* Alondra vs Lorenzo */
.versus {
  max-width: 24rem;
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}

.versus p { margin: 0; }

.versus__title {
  margin-bottom: 0.5rem !important;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.versus__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.versus__col + .versus__col { border-left: 1px solid var(--border); padding-left: 0.75rem; }

.versus__name { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; }

.versus__avg { display: flex; align-items: center; gap: 0.2rem; font-size: 0.85rem; }

.versus__fav { color: var(--text-muted); font-size: 0.8rem; }

.versus__split {
  margin-top: 0.6rem !important;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.tasting__photos {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
  overflow-x: auto;
}

.tasting__photo { flex: none; }

.tasting__photo img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 8px;
}

/* The logging form pops up over the page */
.form-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.form-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }

.dialog-form { position: relative; padding: 1.25rem 1.25rem 1.5rem; }

.dialog-form__group {
  margin: 1.25rem 0 0;
  padding: 0.25rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dialog-form__legend {
  padding: 0 0.4rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
}

.dialog-form__chooser { margin-top: 0.1rem; }

.dialog-form .where__spot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

.person__tried { margin-top: 0.4rem; }

.person__tried[aria-pressed="false"] { text-decoration: line-through; }

.scale-pick__row { display: flex; gap: 0.35rem; }

.scale-pick__btn { flex: 1; padding-block: 0.45rem; text-align: center; }

.scale-pick__ends {
  display: flex;
  justify-content: space-between;
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (max-width: 48rem) {
  .oyster-layout { grid-template-columns: 1fr; }

  .globe-panel { position: static; }

  .globe { max-width: 22rem; }

  .oyster__detail { padding-left: 0.5rem; }

  .scale { grid-template-columns: 5.5rem 1fr 5rem; }

  /* The form takes the whole screen on phones */
  .form-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .dialog-form { padding: 1rem 1rem 2rem; }

  .dialog-form__group { padding-inline: 0.75rem; }
}

/* ---------- Trips (/trips) ---------- */

.trips { padding-bottom: clamp(3rem, 8vw, 5rem); }

.trips .editor-bar { margin: 0 0 1rem; }

/* The ornament tracker */
.ornaments {
  margin-bottom: 1.25rem;
  padding: 1rem 1.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ornaments p { margin: 0; }

.ornaments__count { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; }

.ornaments__bar {
  height: 10px;
  margin: 0.6rem 0 0.5rem;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.ornaments__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.ornaments__note { color: var(--text-muted); font-size: 0.9rem; }

/* "All places": the ornament checklist */
.ornament-checklist { margin-top: 0.75rem; }

.ornament-checklist summary {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.ornament-checklist__hint { color: var(--text-muted); font-weight: 400; }

.ornament-places {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.ornament-place {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.ornament-place__name { flex: 1; font-weight: 500; }

.ornament-place__trips { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.ornament-toggle {
  min-width: 6.2rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ornament-toggle.is-got {
  background: color-mix(in srgb, #2e8b57 16%, var(--bg));
  border: 1px solid transparent;
  color: color-mix(in srgb, #2e8b57 75%, var(--text));
}

.ornament-toggle.is-changed { outline: 2px solid var(--accent); outline-offset: 1px; }

.ornament-photo-btn { padding: 0.25rem 0.5rem; }

/* Appears once ornaments have been ticked: save them all at once */
.ornament-save {
  position: sticky;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.ornament-save__count { flex: 1; font-size: 0.9rem; font-weight: 600; }

.trip-toolbar { margin-bottom: 0.5rem; }

.trip-year { margin-top: 1.5rem; }

.trip-year__title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 1.5rem;
}

.trip-year__count {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
}

.trip-year__trips { border-top: 1px solid var(--border); }

/* Each year folds up: tap the year to open or close it */
.trip-year { border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.trip-year__head { display: flex; align-items: center; cursor: pointer; list-style: none; }
.trip-year__head::-webkit-details-marker { display: none; }
.trip-year__head .trip-year__title { flex: 1; margin-bottom: 0; }
.trip-year__head::after,
.year__fold::after {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  margin: 0 0.35rem 0 0.75rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg); /* pointing right: closed */
  transition: transform 0.15s ease;
}
.trip-year[open] > .trip-year__head::after,
.year[open] > .year__fold::after { transform: rotate(45deg); } /* pointing down: open */
.trip-year[open] > .trip-year__head { margin-bottom: 0.5rem; }

.trip {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  gap: 0.25rem 1rem;
  align-items: start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 6rem;
  transition: background 0.4s ease;
}

.trip.is-flash { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }

/* Most trips only have a year: no empty date column */
.trip--nodate { grid-template-columns: 1fr auto; }
.trip--nodate .trip__edit { grid-column: 2; }

.trip__stops { margin: 0.4rem 0 0; padding: 0; list-style: none; }

.trip__stop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.45rem; font-size: 0.9rem; }

.trip__stop-mark { width: 1rem; color: var(--text-muted); text-align: center; }

.trip__stop-note { color: var(--text-muted); font-size: 0.8rem; }

.trip__stop-note::before { content: "· "; }

.trip p { margin: 0; }

.trip__when { padding-top: 0.2rem; color: var(--text-muted); font-size: 0.85rem; }

.trip__place { margin: 0; font-size: 1.15rem; }

.trip__reason {
  display: inline-block;
  margin-top: 0.25rem !important;
  padding: 0.05rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.trip__note { margin-top: 0.35rem !important; color: var(--text-muted); font-size: 0.9rem; }

.trip__ornament {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  max-width: 12rem;
}

.ornament-badge {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.ornament-badge.is-got {
  background: color-mix(in srgb, #2e8b57 16%, var(--bg));
  color: color-mix(in srgb, #2e8b57 75%, var(--text));
}

.ornament-badge.is-need {
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.trip__photo img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  border-radius: 8px;
}

.trip__edit { grid-column: 3; justify-self: end; margin-top: 0.25rem; }

.trip-list__empty { padding: 2rem 0; color: var(--text-muted); text-align: center; }

.trip-when { display: grid; grid-template-columns: 1fr 7rem; gap: 0.5rem; }

.stop-list { margin: 0 0 0.6rem; padding: 0; list-style: none; }

.stop { margin-bottom: 0.6rem; }

.stop__row { display: flex; align-items: center; gap: 0.5rem; }

.stop__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--accent);
  border-radius: 50%;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.stop__note { width: calc(100% - 2.1rem); margin: 0.35rem 0 0 2.1rem; }

.stop .where__results { margin-left: 2.1rem; }

.trip-form__ornaments { margin-top: 1rem; }

.trip-reasons { margin-top: 0.5rem; }

@media (max-width: 40rem) {
  /* Phones: date on top, ornament under the name */
  .trip { grid-template-columns: 1fr auto; }
  .trip__when { grid-column: 1 / -1; padding-top: 0; }
  .trip__ornament { max-width: 8rem; }
  .trip__edit { grid-column: 2; }
  .ornament-place__trips { display: none; }
}

/* ---------- Watch List (/watch) ---------- */

.watch { padding-bottom: clamp(3rem, 8vw, 5rem); }

.watch .editor-bar { margin: 0 0 1rem; }

.watch-add { position: relative; width: 100%; }

.watch-add__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 20;
  max-height: 22rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.watch-add__results:not(:empty) { border: 1px solid var(--border); }

.watch-add__result {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.watch-add__result:last-child { border-bottom: 0; }

@media (hover: hover) {
  .watch-add__result:hover { background: var(--bg-alt); }
}

.watch-add__result img,
.watch-add__noposter {
  flex: none;
  width: 2.2rem;
  height: 3.3rem;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-alt);
}

.watch-add__noposter { display: grid; place-items: center; }

.watch-add__text { display: flex; flex-direction: column; min-width: 0; }

/* One-time TMDB setup (signed-in editors only, until it's done) */
.watch-setup {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.watch-setup__title { margin: 0 0 0.5rem; font-size: 1.25rem; }

.watch-setup__steps { margin: 0.5rem 0 0.9rem; padding-left: 1.25rem; }

.watch-setup__steps li { margin-bottom: 0.35rem; }

.watch-setup__form { display: flex; gap: 0.5rem; }

.watch-setup__status { margin: 0.6rem 0 0; font-size: 0.9rem; }
.watch-setup__status:empty { display: none; }

.watch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.watch-toolbar .chips { width: auto; margin: 0; }

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.watch-card {
  position: relative;
  display: flex;
  gap: 0.9rem;
  padding: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: 6rem;
  transition: box-shadow 0.4s ease;
}

.watch-card.is-flash { box-shadow: 0 0 0 3px var(--accent); }

.watch-card__poster {
  flex: none;
  width: 5.5rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg);
}

.watch-card__poster img { width: 100%; height: 100%; object-fit: cover; }

.watch-card__noposter { display: grid; place-items: center; height: 100%; font-size: 1.8rem; }

.watch-card__body { flex: 1; min-width: 0; }

.watch-card__body p { margin: 0; }

.watch-card__title { margin: 0; padding-right: 2rem; font-size: 1.15rem; }

.watch-card__year { color: var(--text-muted); font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; }

.watch-card__type { margin-top: 0.15rem !important; color: var(--text-muted); font-size: 0.8rem; }

.watch-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.watch-status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--text-muted);
}

.watch-status--on::before { background: #2e9e5b; }
.watch-status--soon::before { background: #d39b22; }
.watch-status--gone::before { background: var(--danger); }
.watch-status--off { color: var(--text-muted); font-weight: 500; }

.watch-where { margin-top: 0.55rem; }

.watch-logos { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.watch-service {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem 0.15rem 0.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
}

.watch-service img { width: 1.4rem; height: 1.4rem; border-radius: 50%; }

.watch-where__none { color: var(--text-muted); font-size: 0.85rem; }

.watch-where__links { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem !important; }

.watch-where__link { font-size: 0.85rem; font-weight: 600; }

.watch-add__result--manual .where__result-name { color: var(--accent); }

/* Our theaters */
.theaters {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.theaters__top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }

.theaters__title { flex: 1; margin: 0; font-size: 1.2rem; }

.theaters__ask { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; }

.theaters__hint { margin: 0.25rem 0 0.5rem; color: var(--text-muted); font-size: 0.85rem; }

.theaters__list { margin: 0; padding: 0; list-style: none; }

.theater {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
}

.theater__name { font-weight: 600; }

.theater__delay { color: var(--text-muted); font-size: 0.85rem; }

.theater__start { min-width: 6.5rem; text-align: right; font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.theaters__form { margin-top: 0.75rem; }

.theaters__row { display: grid; grid-template-columns: 1fr 4.5rem auto auto; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }

.theaters__row .input--sm { width: 100%; }

.theaters__actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

.watch-card__note { margin-top: 0.4rem !important; font-size: 0.85rem; font-style: italic; }

.watch-card__actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.35rem;
}

.watch-card__remove { padding: 0.15rem 0.55rem; }

/* "Right movie? ✓ Yes · Fix" on titles matched by name */
.watch-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem !important;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.watch-confirm__q { color: var(--text-muted); font-size: 0.85rem; }

.watch-confirm .btn { padding: 0.2rem 0.65rem; font-size: 0.8rem; }

.watch-list__empty { grid-column: 1 / -1; padding: 2rem 0; color: var(--text-muted); text-align: center; }

.watch-credit { margin-top: 2rem; }

/* ---------- Log in (GitHub key) ---------- */

.signin {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.signin ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.signin li { margin-bottom: 0.4rem; }

.signin__status { margin: 0.9rem 0 0; }
.signin__status:empty { display: none; }
.signin__status.is-error { color: var(--danger); }

/* ---------- Misc ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-line { margin-top: 1.5rem; }

.fine { font-size: 0.875rem; color: var(--text-muted); }

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-inner p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Our Year (/our-year) ---------- */

/* Both blue: Lorenzo a light blue label, Alondra a solid dark blue one */
:root { --lorenzo: #1d5fd1; --alondra: #133f99; }
@media (prefers-color-scheme: dark) {
  :root { --lorenzo: #6ea8fe; --alondra: #2f5fc4; }
}

.who {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--who, var(--text-muted)) 14%, transparent);
  color: var(--who, var(--text-muted));
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.who--lorenzo { --who: var(--lorenzo); }
.who--alondra { --who: var(--alondra); background: var(--alondra); color: #ffffff; }

.our-year { padding-bottom: 4rem; }
.our-year .editor-bar { margin: 0 0 1.25rem; }

/* A year */
.year { margin-bottom: 2rem; }

.year__head { display: flex; align-items: baseline; gap: 0.6rem; }

.year__title { margin: 0; font-size: 1.6rem; }
.year__label {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.year__group {
  margin: 1.4rem 0 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.year--next .year__group { margin-top: 0.6rem; }

/* Next year: a fold you tap to open */
.year__fold { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; cursor: pointer; list-style: none; }
.year__fold::-webkit-details-marker { display: none; }
.year__fold::after { margin-left: auto; }
.year__hint { color: var(--text-muted); font-size: 0.85rem; }
.year--next[open] .year__hint { display: none; }
.year--next[open] .year__fold { margin-bottom: 0.4rem; }

.year__summary { margin: 0.35rem 0 0.9rem; color: var(--text-muted); font-size: 0.95rem; line-height: 2; }

.year--next { padding: 1rem 1.1rem; border: 1px dashed var(--border); border-radius: var(--radius); }
.year--next .year__title { font-size: 1.2rem; }
.year--next .year__summary { margin-bottom: 0; }
.year--next .celebrations { margin-top: 0.6rem; gap: 0.5rem; }
.year--next .celebration { padding: 0.6rem 0.85rem; }

.years__heading {
  margin: 2.5rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.years__empty { color: var(--text-muted); }

.year__remove { margin-top: 0.75rem; }

/* The four celebrations */
.celebrations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0.75rem;
}

.celebration {
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.celebration__top { display: flex; align-items: center; gap: 0.65rem; }
.celebration__emoji { font-size: 1.5rem; line-height: 1; }
.celebration__text { flex: 1; min-width: 0; }
.celebration__text p { margin: 0; }
.celebration__name { font-weight: 600; }
.celebration__date { color: var(--text-muted); font-size: 0.85rem; }

.celebration__swap {
  padding: 0.15rem 0.45rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.celebration__photos {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.celebration__photo { position: relative; flex: none; }

.celebration__photo img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 8px;
}

.celebration__add { margin-top: 0.75rem; }

/* A just-saved photo still on its way to the website */
.celebration__photo img.is-waiting { background: var(--bg-alt); animation: photo-wait 1.2s ease-in-out infinite alternate; }
@keyframes photo-wait { from { opacity: 0.4; } to { opacity: 1; } }

/* ---------- Watch List: 🏆 Ranked ---------- */

.watch-grid.is-ranked { display: block; }

.ranked__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.9rem;
}

.ranked__hint { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.ranked__sort { margin: 0; }

.ranked__list { margin: 0; padding: 0; list-style: none; }

.ranked-row {
  display: grid;
  grid-template-columns: 1.6rem 2.6rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: var(--bg);
}

.ranked-row.is-flash { box-shadow: 0 0 0 3px var(--accent); }

.ranked-row__place { color: var(--text-muted); font-size: 1.1rem; font-weight: 700; text-align: center; }

.ranked-row__poster img,
.ranked-row__poster .watch-card__noposter {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 3.9rem;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-alt);
}

.ranked-row__body { min-width: 0; }
.ranked-row__body p { margin: 0; }
.ranked-row__title { font-weight: 600; line-height: 1.3; }
.ranked-row__scores { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem !important; }

.ranked-row__score { font-size: 1.5rem; font-weight: 700; color: var(--accent); }

/* Edit mode: ✎ ✕ under the score */
.ranked-row__actions { grid-column: 3 / -1; display: flex; justify-content: flex-end; gap: 0.35rem; }

.watch-card__rank { margin-top: 0.6rem; }

.rank-add { position: relative; margin-bottom: 1rem; }

.rank-form {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.rank-form__top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.rank-form__poster { width: 2.6rem; height: 3.9rem; object-fit: cover; border-radius: 6px; }
.rank-form__title { margin: 0; font-weight: 600; }

.rank-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.rank-form__row .input--sm { width: auto; min-width: 8rem; }
.rank-form__note { margin: 0.25rem 0 0; }
.rank-form__actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* Our Year: every year folds up (this year starts open) */
.year { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.year[open] > .year__fold { margin-bottom: 0.25rem; }
.year__fold .year__head { margin: 0; }

/* N/A: celebrations we didn't do that year (edit mode) */
.celebration__na { font-size: 0.75rem; font-weight: 600; }
.year__skipped { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.75rem 0 0; }
.year__skipped-label { color: var(--text-muted); font-size: 0.8rem; }
.year__skipped-chip { font-size: 0.8rem; padding: 0.2rem 0.6rem; }
