@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Nunito:ital,wght@0,400;0,600;0,700;1,400&family=Special+Elite&display=swap');

/* ── Reset & tokens ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Night sky / surfaces ── */
  --bg:           #13110c;   /* night sky on the ridge */
  --surface:      #1e1a11;   /* old hardwood table */
  --surface2:     #262013;   /* worn plank */
  --surface3:     #312a19;   /* sun-bleached plank hover */
  --card:         #1e1a11;   /* alias for surface */

  /* ── Wood grain borders ── */
  --border:       #3d3018;   /* woodgrain crack */
  --border-light: #5a4a28;   /* lighter grain */

  /* ── Greens ── */
  --pine:         #3d6b22;   /* deep pine needle */
  --pine-light:   #5a8f35;   /* canopy green */
  --accent:       #3d6b22;   /* alias → pine */
  --accent-light: #5a8f35;

  /* ── Campfire ambers ── */
  --ember:        #c97c18;   /* deep campfire ember */
  --flame:        #e8960f;   /* bright flame */
  --accent2:      #c97c18;   /* alias → ember */

  /* ── Neutrals ── */
  --ash:          #8a7a56;   /* cold ash / dried grass */
  --parchment:    #ede4c8;   /* aged field journal */
  --cream:        #f5f0e0;   /* fresh journal page */
  --muted:        #8a7a56;   /* alias → ash */
  --text:         #ede4c8;   /* alias → parchment */

  /* ── Status ── */
  --danger:       #9e3535;
  --success:      #4a7c28;

  /* ── Misc ── */
  --radius: 8px;
  --font: 'Nunito', system-ui, sans-serif;
  --font-sketch: 'Amatic SC', cursive;
  --font-handwritten: 'Special Elite', monospace;
}

/* ── Keyframes ────────────────────────────────────────────────────────── */
@keyframes campfire-glow {
  0%   { box-shadow: 0 0 4px rgba(201,124,24,0.2), 2px 2px 6px rgba(10,8,5,0.4); border-color: var(--ember); }
  100% { box-shadow: 0 0 14px rgba(232,150,15,0.55), 2px 2px 6px rgba(10,8,5,0.4); border-color: var(--flame); }
}

@keyframes flame-flicker {
  0%, 100% { text-shadow: 0 0 6px rgba(232,150,15,0.5); }
  33%       { text-shadow: 0 0 12px rgba(232,150,15,0.8), 0 0 4px rgba(201,124,24,0.4); }
  66%       { text-shadow: 0 0 8px rgba(201,124,24,0.6); }
}

@keyframes strike-grow {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes landing-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.03); }
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes card-scale-up {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

@keyframes card-scale-down {
  from { transform: scale(1);    opacity: 1; }
  to   { transform: scale(0.95); opacity: 0; }
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 0% 60%, rgba(40,65,20,0.28) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 100% 10%, rgba(180,90,10,0.15) 0%, transparent 65%),
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(10,8,5,0.6) 0%, transparent 100%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Wood grain — JS canvas fallback only ────────────────────────────── */
/* src/woodgrain.js generates the real texture and overrides this via    */
/* el.style.backgroundImage. This CSS gradient shows on first paint      */
/* until the canvas data-URL is ready (avoids flash of no-texture).      */
:root {
  --wood-grain:
    repeating-linear-gradient(
      175deg,
      transparent             0px,
      transparent             6px,
      rgba(0,0,0,0.35)        6px,
      rgba(0,0,0,0.35)        7px,
      transparent             7px,
      transparent            16px,
      rgba(180,130,40,0.20)  16px,
      rgba(180,130,40,0.20)  18px,
      transparent            18px,
      transparent            26px,
      rgba(0,0,0,0.22)       26px,
      rgba(0,0,0,0.22)       27px
    );
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.5rem;
  background-color: var(--surface);
  background-image: var(--wood-grain);
  border-bottom: 2px solid var(--border-light);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}

.site-logo {
  font-size: 1.7rem;
}

.logout-link {
  margin-left: .4rem;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  padding: .3rem .7rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: color .15s, border-color .15s;
}

.logout-link:hover {
  color: var(--text);
  border-color: var(--muted);
}

.site-title {
  font-family: var(--font-sketch);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--flame);
  letter-spacing: .06em;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
  line-height: 1;
  transition: text-shadow .3s;
}

.site-title:hover {
  animation: flame-flicker 1.8s ease-in-out infinite;
}

/* ── App shell ───────────────────────────────────────────────────────── */
#app {
  max-width: 780px;
  width: 100%;        /* prevents flex-body auto-margin shrink-to-content */
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  box-sizing: border-box;
}

/* ── Step nav (trail markers) ────────────────────────────────────────── */
.step-nav {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  padding: .65rem .5rem .75rem;
  margin: 0 -1rem 1.75rem;  /* bleed to app edges */
  scrollbar-width: none;
  position: relative;
  background-color: var(--surface);
  background-image: var(--wood-grain);
  border-top: 1px solid var(--border);
  border-bottom: 2px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03);
}

.step-nav::after {
  content: '';
  position: absolute;
  bottom: .3rem;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-nav::-webkit-scrollbar {
  display: none;
}

.step-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 60px;
  gap: .25rem;
  opacity: .35;
  transition: opacity .25s;
  position: relative;
  z-index: 1;
}

.step-pip.active {
  opacity: 1;
}

.step-pip.done {
  opacity: .65;
}

/* Any pip that's interactive (done in new-trip mode, all non-active in edit mode) */
.step-pip[role="button"] {
  cursor: pointer;
}

.step-pip[role="button"]:hover {
  opacity: 1;
}

.step-pip[role="button"]:hover .pip-label {
  text-decoration: underline;
}


.pip-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font);
}

.step-pip.active .pip-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.step-pip.done .pip-num {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #1a1000;
}

.pip-label {
  font-size: .6rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Step headings ───────────────────────────────────────────────────── */
#step-body h2 {
  font-family: var(--font-sketch);
  font-size: clamp(2.4rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--flame);
  margin-bottom: 1.1rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,.45), 0 0 20px rgba(201,124,24,0.15);
  letter-spacing: .05em;
  line-height: 1.1;
}

/* ── Form inputs ─────────────────────────────────────────────────────── */
label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

input[type=text],
input[type=date],
input[type=email] {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .6rem .9rem;
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  text-transform: none;
  letter-spacing: normal;
}

input[type=text]:focus,
input[type=date]:focus,
input[type=email]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.date-row {
  display: flex;
  gap: 1rem;
}

.date-row label {
  flex: 1;
}

.hint {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-style: italic;
  text-transform: none;
  letter-spacing: normal;
}

/* ── Option cards (style / food) — like trail signs ─────────────────── */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.option-card {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 12px 8px 12px 10px / 10px 12px 8px 12px;
  /* organic hand-cut plank shape */
  padding: .9rem .8rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  transition: border-color .25s, background .25s,
              transform .3s cubic-bezier(0.34, 1.28, 0.64, 1),
              box-shadow .3s;
  position: relative;
  box-shadow: 2px 3px 8px rgba(10, 8, 5, 0.5);
}

.option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border);
  border-radius: 12px 8px 0 0;
  transition: background .25s;
}

.option-card:hover {
  border-color: var(--ember);
  transform: translateY(-3px) rotate(0.8deg);
  box-shadow: 5px 6px 14px rgba(10, 8, 5, 0.6);
}

.option-card:nth-child(even):hover {
  transform: translateY(-3px) rotate(-0.8deg);
}

.option-card:hover::before {
  background: var(--accent2);
}

.option-card.selected {
  border-color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 8%, var(--surface2));
  animation: campfire-glow 2.5s ease-in-out infinite alternate;
}

.option-card.selected::before {
  background: var(--accent2);
}

.option-label {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}

.option-desc {
  font-size: .78rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Chip grid (amenities / owns / activities) — merit badge style ───── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .4rem .85rem;
  font-size: .85rem;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text);
  transition: border-color .2s, background .2s, color .2s,
              transform .25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow .2s;
  letter-spacing: .01em;
}

.chip:hover {
  border-color: var(--pine-light);
  color: var(--cream);
  transform: scale(1.05);
}

.chip.selected {
  border: 1px dashed rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 2px var(--pine);
  /* stitched scout merit badge */
  background: var(--pine);
  color: #fff;
  font-weight: 600;
  transform: scale(1.06);
}

/* ── Party counter ───────────────────────────────────────────────────── */
.counter-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .25rem;
}

.counter-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-family: var(--font);
}

.counter-btn:hover {
  border-color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 15%, var(--surface2));
}

#party-count {
  font-size: 2.2rem;
  font-weight: 700;
  min-width: 2ch;
  text-align: center;
  color: var(--accent2);
  font-family: var(--font-sketch);
  letter-spacing: .04em;
  line-height: 1;
}

.check-group {
  display: flex;
  gap: 1.5rem;
  margin-top: .75rem;
}

.check-label {
  flex-direction: row;
  align-items: center;
  gap: .5rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  font-size: .95rem;
  cursor: pointer;
}

.check-label input {
  width: auto;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Review card — like a torn notepad page ──────────────────────────── */
.review-card {
  background: #fcf8eb;
  /* vintage notepad paper */
  color: #2c2818 !important;
  /* dark wood tone text */
  border: 1px solid #d4cbb0;
  border-left: 6px solid var(--accent2);
  border-radius: 4px;
  padding: 1.25rem 1.25rem 1.25rem 2.8rem;
  /* left margin for notepad line */
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 1rem;
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.15);
  font-family: var(--font-handwritten);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0) 95%, rgba(74, 61, 34, 0.08) 95%),
    linear-gradient(90deg, transparent 2.2rem, rgba(224, 112, 112, 0.25) 2.2rem, rgba(224, 112, 112, 0.25) 2.3rem, transparent 2.3rem);
  background-size: 100% 1.6rem, 100% 100%;
  line-height: 1.6rem;
}

.review-row {
  display: flex;
  gap: 1rem;
  font-size: .88rem;
  line-height: 1.6;
}

.review-row span {
  color: #7c7050;
  min-width: 140px;
  flex-shrink: 0;
  font-style: italic;
}

.review-row strong {
  color: #2c2818 !important;
  font-weight: 600;
}

/* ── Step controls ───────────────────────────────────────────────────── */
.step-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.step-error {
  color: var(--danger);
  font-size: .85rem;
  flex: 1;
  font-style: italic;
}

.btn {
  padding: .6rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: .02em;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(92, 138, 46, .3);
}

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn:hover:not(:disabled) {
  opacity: .88;
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

/* ── Checklist header ────────────────────────────────────────────────── */
.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}

.checklist-header h1 {
  font-family: var(--font-sketch);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--flame);
  letter-spacing: .05em;
  text-shadow: 2px 2px 0 rgba(0,0,0,.45), 0 0 20px rgba(201,124,24,0.15);
  line-height: 1.1;
}

.checklist-actions {
  display: flex;
  gap: .5rem;
}

/* ── Priority filter bar ─────────────────────────────────────────────── */
.priority-filter-bar {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.filter-label {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

.filter-pills {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: .22rem .65rem;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}

.filter-pill:hover { border-color: var(--ash); color: var(--parchment); }

.filter-pill.active {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--bg);
  font-weight: 700;
}

.checklist-item[data-priority="nice_to_have"] { opacity: .6; }
.checklist-item[data-priority="nice_to_have"]:hover { opacity: 1; }
.checklist-item.priority-hidden { display: none !important; }

/* ── LGBTQIA+ Safety card ─────────────────────────────────────────────── */
.lgbtq-safety-card {
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}
.lgbtq-toggle {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; padding: .85rem 1rem;
  background: none; border: none; cursor: pointer;
  text-align: left; color: var(--text);
  font-family: inherit; font-size: .92rem;
}
.lgbtq-toggle:hover { opacity: .85; }
.lgbtq-badge {
  font-weight: 700; font-size: .8rem; letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
  padding: .2rem .55rem; border-radius: 4px;
}
.lgbtq-headline { flex: 1; font-size: .9rem; color: var(--muted); }
.lgbtq-chevron  { font-size: .7rem; flex-shrink: 0; color: var(--muted); }

/* Level-specific background tints */
.lgbtq-affirming .lgbtq-toggle { background: color-mix(in srgb, #22c55e 10%, var(--surface)); }
.lgbtq-affirming .lgbtq-badge  { background: #22c55e22; color: #16a34a; }
.lgbtq-mixed     .lgbtq-toggle { background: color-mix(in srgb, #eab308 10%, var(--surface)); }
.lgbtq-mixed     .lgbtq-badge  { background: #eab30822; color: #ca8a04; }
.lgbtq-caution   .lgbtq-toggle { background: color-mix(in srgb, #f97316 10%, var(--surface)); }
.lgbtq-caution   .lgbtq-badge  { background: #f9731622; color: #ea580c; }
.lgbtq-risk      .lgbtq-toggle { background: color-mix(in srgb, #ef4444 10%, var(--surface)); }
.lgbtq-risk      .lgbtq-badge  { background: #ef444422; color: #dc2626; }

.lgbtq-body {
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.lgbtq-details { margin: 0 0 .75rem; font-size: .9rem; line-height: 1.55; }
.lgbtq-tips  { margin: 0 0 .75rem; padding-left: 1.4rem; }
.lgbtq-tips li, .lgbtq-resources ul li { font-size: .88rem; line-height: 1.5; margin-bottom: .3rem; }
.lgbtq-resources { font-size: .88rem; margin-bottom: .75rem; }
.lgbtq-resources ul { margin: .3rem 0 0; padding-left: 1.4rem; }
.lgbtq-disclaimer {
  font-size: .75rem; color: var(--muted); margin: .75rem 0 0;
  border-top: 1px solid var(--border); padding-top: .6rem; line-height: 1.45;
}
.lgbtq-disclaimer a { color: var(--muted); }

/* ── Forecast banner — campsite bulletin ─────────────────────────────── */
.forecast-banner {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface2));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: .65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.25rem;
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

.forecast-source {
  color: var(--muted);
  margin-left: auto;
  font-style: italic;
}

/* ── Checklist sections — wooden trail signs ─────────────────────────── */
.checklist-section {
  margin-bottom: 1.75rem;
  position: relative;
}

.section-heading {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-handwritten);
  font-size: .8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--parchment);
  margin-bottom: .75rem;
  padding: .35rem 1.1rem .35rem .65rem;
  background-color: var(--surface2);
  background-image: var(--wood-grain-img, var(--wood-grain));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--ember);
  /* slightly irregular right edge — hand-cut plank */
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 30%, calc(100% - 4px) 70%, 100% 100%, 0 100%);
  box-shadow: 1px 2px 6px rgba(0,0,0,.35);
}

/* vertical post below the sign */
.section-heading::after {
  content: '';
  position: absolute;
  top: 100%;
  left: calc(.65rem + 1px);
  width: 2px;
  height: .5rem;
  background: linear-gradient(to bottom, var(--border-light), transparent);
}

.section-heading::before {
  content: '▸';
  font-size: .6rem;
  color: var(--ember);
  opacity: .85;
  font-family: var(--font);
}

/* ── Checklist items ─────────────────────────────────────────────────── */
.checklist-list {
  list-style: none;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .35rem;
  /* faint woodgrain scratch instead of dashed line */
  border-bottom: 1px solid transparent;
  background-image: linear-gradient(to right, transparent 0%, rgba(61,48,24,0.35) 20%, rgba(61,48,24,0.35) 80%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: bottom;
  transition: background-color .12s;
  border-radius: 4px;
}

.checklist-item:hover {
  background-color: var(--surface3);
}

.checklist-item[data-status="packed"] {
  background-color: color-mix(in srgb, var(--surface3) 60%, transparent);
}

.checklist-item[data-status="packed"] .item-label {
  color: var(--ash);
  text-decoration: line-through;
  text-decoration-color: var(--pine-light);
  text-decoration-thickness: 1.5px;
  position: relative;
}

/* L→R strikethrough grow animation on pack */
.checklist-item[data-status="packed"] .item-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--pine-light);
  animation: strike-grow .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  pointer-events: none;
}

.checklist-item[data-status="skip"] .item-label {
  opacity: .25;
}

.status-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: .1rem;
  flex-shrink: 0;
  transition: transform .1s;
}

.status-btn:hover {
  transform: scale(1.2);
}

.buy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--border-light);
  margin-left: auto;
  transition: color .15s, filter .15s;
  flex-shrink: 0;
}

.buy-btn:hover {
  color: var(--ember);
}

.buy-btn.active {
  color: var(--flame);
  filter: drop-shadow(0 0 3px rgba(232,150,15,0.5));
}

.item-label {
  flex: 1;
  font-size: .92rem;
  line-height: 1.3;
}

.qty {
  font-size: .72rem;
  color: var(--accent2);
  font-weight: 700;
  margin-left: .25rem;
  background: color-mix(in srgb, var(--accent2) 15%, transparent);
  padding: .05rem .3rem;
  border-radius: 3px;
}

/* ── Custom item row ─────────────────────────────────────────────────── */
.add-custom-row {
  display: flex;
  gap: .5rem;
  margin-top: .9rem;
}

.add-custom-row input {
  flex: 1;
}

#custom-add {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .55rem 1rem;
  cursor: pointer;
  font-size: .9rem;
  font-family: var(--font);
  font-weight: 600;
  transition: border-color .2s;
}

#custom-add:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* ── Field group ─────────────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}

.field-label {
  font-size: .88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── PlaceAutocompleteElement theme ──────────────────────────────────── */
.pac-wrap {
  width: 100%;
}

.pac-wrap gmp-placeautocomplete,
#pac-element {
  width: 100%;
  --gmp-input-background: var(--surface2);
  --gmp-input-border-color: var(--border);
  --gmp-input-color: var(--text);
  --gmp-input-font-family: var(--font);
  --gmp-input-font-size: 1rem;
  --gmp-input-border-radius: var(--radius);
  --gmp-input-padding: .6rem .9rem;
}

/* ── Legacy autocomplete dropdown (fallback) ─────────────────────────── */
.pac-container {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.pac-item {
  color: var(--text);
  padding: .45rem .75rem;
  cursor: pointer;
  font-size: .9rem;
}

.pac-item:hover,
.pac-item-selected {
  background: var(--surface3);
}

.pac-item-query {
  color: var(--accent2);
}

/* ── Print ───────────────────────────────────────────────────────────── */
/* ── Print ───────────────────────────────────────────────────────────── */
@media print {

  .site-header,
  .checklist-actions,
  .add-custom-row,
  .status-btn,
  .buy-btn,
  .forecast-source,
  .step-nav,
  .step-controls,
  .guest-cta-banner,
  #ai-section,
  .vehicle-photo-wrap,
  .grocery-note {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-family: var(--font), Georgia, serif;
  }

  #app {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .checklist-header {
    border-bottom: 2px solid #000 !important;
    margin-bottom: 1.5rem !important;
  }

  .checklist-header h1 {
    color: #000 !important;
    font-family: var(--font), Georgia, serif;
    font-size: 2rem !important;
  }

  .forecast-banner {
    border: 1px solid #000 !important;
    background: #f9f9f9 !important;
    color: #000 !important;
    padding: 0.5rem !important;
  }

  /* Two-column layout for checklist items */
  #checklist-body {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem 2rem !important;
  }

  .checklist-section {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 1.25rem !important;
  }

  .section-heading {
    color: #000 !important;
    border: 1px solid #000 !important;
    border-left: 4px solid #000 !important;
    background: #f5f5f5 !important;
    display: block !important;
    font-size: 0.8rem !important;
    padding: 0.2rem 0.5rem !important;
  }

  .checklist-item {
    border-bottom: 1px dashed #ccc !important;
    padding: 0.3rem 0 !important;
    color: #000 !important;
  }

  .checklist-item[data-status="packed"] .item-label {
    text-decoration: none !important;
    opacity: 1 !important;
  }

  .checklist-item[data-status="skip"] {
    display: none !important;
  }

  .item-label {
    font-size: 0.85rem !important;
  }

  .qty {
    border: 1px solid #000 !important;
    background: #eee !important;
    color: #000 !important;
  }

  .custom-section:has(#custom-list:empty) {
    display: none !important;
  }

  /* Vehicle Card printing */
  .vehicle-card {
    grid-column: span 2 !important;
    break-inside: avoid !important;
  }

  .vehicle-card-inner {
    border: 1px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
    padding: 0.5rem !important;
  }

  .vehicle-name {
    color: #000 !important;
  }

  .vehicle-meta {
    color: #444 !important;
  }

  /* Meal Panel printing */
  .meal-panel {
    margin-top: 2rem !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .meal-panel-heading {
    font-size: 1.2rem !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
    padding-bottom: 0.25rem !important;
  }

  .meal-schedule {
    border: 1px solid #000 !important;
  }

  .meal-schedule-row {
    border-bottom: 1px solid #000 !important;
  }

  .meal-schedule-cell {
    color: #000 !important;
    border-right: 1px solid #000 !important;
  }

  .meal-theme-tag {
    background: #eee !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
  }

  .meal-note-display {
    color: #333 !important;
  }

  /* Grocery List print styles */
  .grocery-section {
    margin-top: 1.5rem !important;
    break-inside: avoid !important;
  }

  .grocery-heading {
    font-size: 1.1rem !important;
    color: #000 !important;
  }

  .grocery-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .grocery-item {
    border: none !important;
    padding: 0 !important;
  }

  .grocery-item.checked {
    display: none !important;
    /* Hide already checked groceries */
  }

  .grocery-check {
    display: none !important;
    /* Hide checkbox for print */
  }

  .grocery-label {
    font-size: 0.85rem !important;
    color: #000 !important;
  }

  .grocery-label::before {
    content: "⬜ " !important;
    /* Print an empty checkbox */
  }
}

/* ── Landing page ────────────────────────────────────────────────────── */
.landing,
#landing-section {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  box-sizing: border-box;
}

.landing-hero {
  text-align: center;
  padding: 4.5rem 1rem 3.5rem;
}

.landing-headline {
  font-family: var(--font-sketch);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: .03em;
}

/* First line: amber "Pack smart." — set via <span> in HTML if desired,
   or the whole headline gets ember color as fallback */
.landing-headline {
  color: var(--flame);
  text-shadow: 2px 2px 0 rgba(0,0,0,.5), 0 0 30px rgba(201,124,24,0.2);
}

.landing-headline .hl-green {
  color: var(--pine-light);
  text-shadow: 2px 2px 0 rgba(0,0,0,.5), 0 0 20px rgba(61,107,34,0.25);
}

.landing-sub {
  font-size: 1.15rem;
  color: var(--ash);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.landing-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-lg {
  padding: .85rem 2rem;
  font-size: 1.1rem;
}

.btn-lg.btn-primary {
  animation: landing-pulse 2.4s ease-in-out infinite;
}

.btn-lg.btn-primary:hover {
  animation: none;
}

/* Rope / trail divider */
.landing-trail-divider {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 2.5rem 0;
  color: var(--border-light);
  font-size: .85rem;
  letter-spacing: .2em;
}

.landing-trail-divider::before,
.landing-trail-divider::after {
  content: '';
  flex: 1;
  border-top: 1px dotted var(--border-light);
}

.landing-section-title {
  font-family: var(--font-sketch);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--flame);
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}

.landing-how {
  padding: 2rem 0 3rem;
}

/* Trail marker steps — tall narrow posts */
.landing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.landing-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.landing-step-sign {
  background-color: var(--surface2);
  background-image: var(--wood-grain-img, var(--wood-grain));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border-light);
  border-bottom: 2px solid var(--border);
  /* pointed bottom like a trail signpost */
  clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
  padding: 1.5rem 1.2rem 2.2rem;
  width: 100%;
  box-shadow: 2px 3px 8px rgba(0,0,0,.4);
}

/* Post below each sign */
.landing-step::after {
  content: '';
  display: block;
  width: 4px;
  height: 1.5rem;
  background: linear-gradient(to bottom, var(--border-light), var(--border));
  border-radius: 0 0 2px 2px;
}

.step-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: .6rem;
}

.landing-step h3 {
  font-family: var(--font-handwritten);
  font-size: 1rem;
  color: var(--parchment);
  margin-bottom: .4rem;
  letter-spacing: .04em;
}

.landing-step p {
  color: var(--ash);
  font-size: .875rem;
  line-height: 1.5;
}

/* Feature cards with hand-torn paper top edge */
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  /* hand-torn top edge via clip-path */
  clip-path: polygon(
    0% 6px, 5% 0%, 10% 5px, 18% 1px, 26% 7px, 33% 2px,
    42% 6px, 51% 0%, 59% 5px, 67% 2px, 76% 8px, 85% 1px,
    93% 5px, 100% 3px, 100% 100%, 0% 100%
  );
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}

.feature-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: .6rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: .4rem;
  font-family: var(--font-handwritten);
}

.feature-card p {
  font-size: .875rem;
  color: var(--ash);
  line-height: 1.55;
}

.landing-bottom-cta {
  text-align: center;
  padding: 1rem 0 2rem;
}

/* ── Dashboard ───────────────────────────────────────────────────────── */
.dashboard {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.dashboard-title {
  font-family: var(--font-sketch);
  font-size: 2rem;
  color: var(--accent2);
}

.dashboard-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.trip-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px 6px 14px 8px / 8px 14px 6px 14px;
  /* organic carved wood shape */
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  box-shadow: 2px 2px 8px rgba(10, 8, 5, 0.4);
  position: relative;
}

.trip-card::after {
  content: '🌲';
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 1rem;
  opacity: 0.25;
}

.trip-card:hover {
  border-color: var(--accent2);
  transform: translateY(-3px) rotate(0.6deg);
  /* swing wooden tags */
  box-shadow: 4px 4px 12px rgba(10, 8, 5, 0.5);
}

.trip-card:nth-child(even):hover {
  transform: translateY(-3px) rotate(-0.6deg);
}

.trip-card-name {
  font-family: var(--font-sketch);
  font-size: 1.4rem;
  color: var(--accent2);
}

.trip-card-dest {
  color: var(--text);
  font-size: .95rem;
}

.trip-card-dates {
  color: var(--muted);
  font-size: .85rem;
}

.trip-nights {
  margin-left: .4rem;
  color: var(--accent);
}

.trip-card-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}

.trip-open {
  flex: 1;
}

.trip-edit {
  padding: .45rem .7rem;
  font-size: .85rem;
}

.trip-delete {
  padding: .45rem .7rem;
  font-size: .9rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

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

.wizard-edit-bar {
  background: var(--accent2);
  color: #fff;
  text-align: center;
  padding: .45rem 1rem;
  font-size: .85rem;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: .5rem;
}

.wizard-edit-bar a {
  color: #fff;
  font-weight: 600;
}

/* ── Guest CTA ───────────────────────────────────────────────────────── */
.guest-cta-banner {
  background: linear-gradient(135deg, #2a3a1a 0%, #1e2c10 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: .9rem 1.2rem;
  margin: 1rem 1.5rem;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.5;
}

.guest-cta-banner a {
  color: var(--accent2);
  font-weight: 700;
}

.guest-cta-banner a:hover {
  text-decoration: underline;
}

.guest-cta-main {
  margin-bottom: .7rem;
}

.guest-share-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.guest-share-label {
  font-size: .85rem;
  color: var(--muted);
  white-space: nowrap;
}

.guest-share-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  padding: .35rem .6rem;
  font-size: .82rem;
  font-family: monospace;
}

.btn-sm {
  padding: .35rem .7rem;
  font-size: .82rem;
}

.guest-feature-hint {
  font-size: .82rem;
  color: var(--muted);
  margin-top: .4rem;
}

.guest-feature-hint a {
  color: var(--accent2);
}

/* ── Misc shared ─────────────────────────────────────────────────────── */
.loading-msg {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: .4rem .9rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
  transition: color .15s, border-color .15s;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.checklist-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ── Header profile — carved-wood nameplate ──────────────────────────── */
.header-profile-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--parchment);
  padding: .28rem .75rem;
  border-radius: 20px;
  font-size: .82rem;
  background: var(--surface2);
  border: 1px solid transparent;
  border-top-color: var(--border-light);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
  transition: box-shadow .2s, color .15s;
}

.header-profile-link:hover {
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
}

.header-avatar {
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.header-display-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── AI Summary card ─────────────────────────────────────────────────── */
.ai-summary-card {
  border-left: 3px solid var(--accent2);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .85rem 1rem;
  margin-bottom: .75rem;
}

.ai-summary-header {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .5rem;
}

.ai-summary-icon {
  font-size: 1rem;
}

.ai-summary-header strong {
  font-size: .9rem;
}

.ai-summary-header .ai-refresh {
  margin-left: auto;
}

.ai-summary-text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text);
}

.ai-summary-loading {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 0;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: .75rem;
}

#ai-section:not(:empty) {
  margin-bottom: .5rem;
}

/* ── AI Suggestions ──────────────────────────────────────────────────── */
.ai-suggestions-section {
  border-top: 2px solid var(--accent2);
}

.ai-suggestions-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}

.ai-suggestions-header .section-heading {
  margin: 0;
}

.ai-badge {
  font-size: .7rem;
  background: var(--accent2);
  color: #fff;
  border-radius: 10px;
  padding: .15rem .55rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.ai-refresh {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: .2rem .4rem;
  border-radius: 4px;
  margin-left: auto;
}

.ai-refresh:hover {
  color: var(--accent2);
  background: var(--border);
}

.ai-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: .2rem .4rem;
  border-radius: 4px;
}

.ai-dismiss:hover {
  color: var(--text);
  background: var(--border);
}

.ai-subtitle {
  color: var(--muted);
  font-size: .875rem;
  margin: 0 0 1rem;
}

.ai-suggestion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ai-suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .7rem .9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.ai-suggestion-info {
  flex: 1;
  min-width: 0;
}

.ai-suggestion-label {
  display: block;
  font-weight: 600;
  margin-bottom: .2rem;
}

.ai-suggestion-reason {
  font-size: .82rem;
  color: var(--muted);
}

.ai-add-btn {
  flex-shrink: 0;
  align-self: center;
}

.ai-suggestions-loading {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.2rem 0;
  color: var(--muted);
  font-size: .9rem;
}

.ai-status-msg {
  transition: opacity .2s ease;
}

.ai-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: ai-spin .7s linear infinite;
  flex-shrink: 0;
}

/* ai-spin defined in keyframes block above */

.ai-upgrade-section {
  border-top: 1px dashed var(--border);
}

.ai-upgrade-prompt {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .75rem 0;
}

.ai-upgrade-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.ai-upgrade-text {
  flex: 1;
  min-width: 0;
}

.ai-upgrade-text p {
  margin: .2rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}

/* ── Vehicle step form elements ──────────────────────────────────────── */
.step-optional {
  font-size: .8em;
  color: var(--muted);
  font-weight: 400;
}

.step-hint {
  color: var(--muted);
  font-size: .88rem;
  margin: -.4rem 0 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .95rem;
  padding: .5rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .15s, background .15s;
}

.checkbox-item:hover {
  border-color: var(--accent);
  background: var(--card);
}

.checkbox-item input[type=checkbox] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Vehicle card on checklist ───────────────────────────────────────── */
.vehicle-card {
  margin-bottom: 1rem;
}

.vehicle-card-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1rem .5rem .5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.vehicle-photo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
}

.vehicle-photo {
  width: 120px;
  height: 72px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
  display: block;
}

.vehicle-photo-note {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: .6rem;
  color: rgba(255, 255, 255, .55);
  pointer-events: none;
}

.vehicle-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  padding: .25rem .5rem;
}

.vehicle-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.vehicle-name {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-meta {
  font-size: .82rem;
  color: var(--accent2);
}

/* ── Meal Plan — Wizard Step ─────────────────────────────────────────── */
.step-subhead {
  color: var(--muted);
  font-size: .9rem;
  margin: -.25rem 0 1.25rem;
  line-height: 1.5;
}

/* Planner grid — header + one row per day */
.meal-planner-header,
.meal-planner-row {
  display: grid;
  grid-template-columns: 110px repeat(3, 1fr);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.meal-planner-header {
  border-top: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.meal-planner-row {
  background: var(--card);
}

.meal-planner-row:nth-child(even) {
  background: color-mix(in srgb, var(--card) 55%, var(--bg) 45%);
}

.meal-planner-row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.meal-planner-header-cell {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: .6rem .85rem;
}

.meal-planner-day-cell {
  padding: .75rem .85rem;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}

.meal-planner-day-text {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.meal-planner-slot-cell {
  padding: .6rem .75rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

.meal-planner-slot-cell:last-child {
  border-right: none;
}

/* Custom styled select */
.meal-select-wrapper {
  position: relative;
}

.meal-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: .7rem;
}

.meal-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  font-size: .82rem;
  padding: .4rem 1.8rem .4rem .65rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

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

/* Notes input — shown only when a theme is chosen */
.meal-note-input {
  width: 100%;
  box-sizing: border-box;
  font-size: .78rem;
  padding: .3rem .55rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  transition: border-color .15s, background .15s;
  font-family: inherit;
}

.meal-note-input::placeholder {
  color: var(--muted);
  opacity: .65;
}

.meal-note-input:focus {
  outline: none;
  border-color: var(--accent);
  border-style: solid;
  background: var(--bg);
}

@media (max-width: 600px) {
  .meal-planner-header {
    display: none;
  }

  .meal-planner-header,
  .meal-planner-row {
    grid-template-columns: 1fr;
    border-top: 1px solid var(--border);
  }

  .meal-planner-row {
    border-top: none;
  }

  .meal-planner-day-cell {
    background: var(--bg);
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: .45rem .85rem;
  }

  .meal-planner-slot-cell {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: .55rem .85rem;
  }

  .meal-planner-slot-cell:last-child {
    border-bottom: none;
  }
}


/* ── Meal Plan — Checklist Panel ─────────────────────────────────────── */
.meal-panel {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.meal-panel-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  padding: .75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

/* Schedule grid */
.meal-schedule {
  overflow-x: auto;
  padding: .5rem 0;
}

.meal-schedule-row {
  display: grid;
  grid-template-columns: 110px repeat(3, 1fr);
  min-width: 440px;
}

.meal-schedule-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: .25rem;
}

.meal-schedule-cell {
  padding: .45rem .85rem;
  font-size: .85rem;
  vertical-align: top;
  border-right: 1px solid var(--border);
}

.meal-schedule-cell:last-child {
  border-right: none;
}

.meal-schedule-header .meal-schedule-cell {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.meal-day-col {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}

.meal-theme-tag {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.meal-note-display {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  font-style: italic;
  margin-top: .15rem;
  word-break: break-word;
}

.meal-slot-empty {
  color: var(--border);
}

/* Grocery section */
.grocery-section {
  border-top: 1px solid var(--border);
  padding: .85rem 1.1rem 1rem;
}

.grocery-heading {
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 .25rem;
}

.grocery-note {
  font-size: .8rem;
  color: var(--muted);
  margin: 0 0 .85rem;
}

.grocery-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .35rem .75rem;
}

.grocery-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .45rem;
  border-radius: 5px;
  transition: background .12s;
}

.grocery-item:hover {
  background: var(--bg);
}

.grocery-item.checked .grocery-label {
  text-decoration: line-through;
  color: var(--muted);
}

.grocery-check {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.grocery-label {
  font-size: .875rem;
  cursor: pointer;
  line-height: 1.4;
  transition: color .12s;
}

/* ── Sharing Feature Styles ─────────────────────────────────────────── */

/* Role Badges for Dashboard Cards */
.trip-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.trip-badge {
  font-size: .75rem;
  font-weight: 600;
  border-radius: 20px;
  padding: .2rem .65rem;
  letter-spacing: .02em;
}

.badge-contributor {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent2);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.badge-visitor {
  background: var(--border);
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

/* Share Modal Overlay */
.camp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in .3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* modal-fade-in defined in keyframes block above */

.camp-modal-overlay.fade-out {
  animation: modal-fade-out .25s ease forwards;
}

/* modal-fade-out defined in keyframes block above */

/* Glassmorphic Modal Card */
.camp-modal-card {
  background: rgba(30, 26, 20, 0.9);
  border: 1px solid rgba(212, 137, 26, 0.25);
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  padding: 1.75rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transform: scale(0.92);
  opacity: 0;
  animation: card-scale-up .35s cubic-bezier(0.34, 1.56, 0.64, 1) .05s forwards;
  box-sizing: border-box;
}

/* card-scale-up defined in keyframes block above */

.camp-modal-overlay.fade-out .camp-modal-card {
  animation: card-scale-down .2s ease forwards;
}

/* card-scale-down defined in keyframes block above */

.camp-modal-card .field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.1rem;
}

.camp-modal-card .field label {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.btn-full {
  width: 100%;
  display: block;
}

.camp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.camp-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 700;
}

.camp-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color .15s ease;
}

.camp-modal-close:hover {
  color: var(--accent2);
}

.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* Permissions card / radio layout */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .4rem;
}

.role-option {
  cursor: pointer;
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: .75rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
  height: 100%;
  box-sizing: border-box;
}

.role-option input[type="radio"]:checked+.role-card {
  border-color: var(--accent);
  background: rgba(212, 137, 26, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}

.role-option:hover .role-card {
  border-color: var(--accent2);
}

.role-icon {
  font-size: 1.3rem;
  margin-bottom: .3rem;
}

.role-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .2rem;
}

.role-desc {
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Share Messages */
.share-error {
  background: rgba(224, 112, 112, 0.1);
  border: 1px solid rgba(224, 112, 112, 0.3);
  color: #f7a1a1;
  padding: .6rem .8rem;
  border-radius: 6px;
  font-size: .85rem;
  margin-top: 1rem;
}

.share-success {
  background: rgba(142, 207, 142, 0.1);
  border: 1px solid rgba(142, 207, 142, 0.3);
  color: #aae0aa;
  padding: .6rem .8rem;
  border-radius: 6px;
  font-size: .85rem;
  margin-top: 1rem;
}

/* Active shares list section */
.shares-list-section h4 {
  margin: 0 0 .75rem;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

#shares-list-container {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-height: 150px;
  overflow-y: auto;
}

.share-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .85rem;
  gap: .5rem;
}

.share-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: .15rem;
}

.share-item-email {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-item-role {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.share-item-role.role-contributor {
  color: var(--accent2);
}

.share-item-role.role-visitor {
  color: var(--muted);
}

.revoke-btn:hover {
  color: #e07070 !important;
}

/* Visitor / Read-only View Restriction */
.is-visitor .status-btn,
.is-visitor .buy-btn,
.is-visitor .grocery-check,
.is-visitor .grocery-label {
  pointer-events: none;
  cursor: default;
  opacity: 0.85;
}

.is-visitor .add-custom-row,
.is-visitor .grocery-note,
.is-visitor #ai-section {
  display: none !important;
}

/* ── Site footer ─────────────────────────────────────────────────────── */
.site-footer {
  background-color: var(--surface);
  background-image: var(--wood-grain);
  border-top: 2px solid var(--border-light);
  box-shadow: 0 -2px 10px rgba(0,0,0,.4);
  text-align: center;
  padding: .85rem 1.5rem;
  font-size: .8rem;
  color: var(--ash);
  margin-top: auto;   /* flex child — always pushed to bottom of body */
}

.site-footer a {
  color: var(--ash);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: color .15s, border-color .15s;
}

.site-footer a:hover {
  color: var(--parchment);
  border-color: var(--ash);
}

.site-footer-sep {
  margin: 0 .6rem;
  opacity: .4;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .btn-lg.btn-primary {
    animation: none;
  }
}