* {
  box-sizing: border-box;
}

:root {
  --bg: #f7f4ec;
  --surface: #ffffff;
  --text: #1e2c24;
  --muted: #66746c;
  --primary: #285943;
  --primary-dark: #1d4232;
  --accent: #d99c54;
  --border: #dfe5df;
  --alt: #eef3ee;
  --shadow: 0 16px 40px rgba(30, 44, 36, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 236, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  font-weight: 600;
  color: var(--muted);
}

nav a:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
}

.hero {
  padding: 84px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

h3 {
  line-height: 1.2;
}

.hero-copy,
.section-heading p,
.hero-card p,
.info-card p,
.game-card p {
  color: var(--muted);
}

.hero-copy {
  font-size: 1.15rem;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 30px 0 36px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  border-color: var(--border);
  background: var(--surface);
}

.btn.light {
  background: #fff;
  color: var(--primary);
}

.btn.full {
  width: 100%;
}

.stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stats div {
  display: flex;
  flex-direction: column;
}

.stats strong {
  font-size: 1.1rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.camp-scene {
  min-height: 290px;
  border-radius: 18px;
  background: linear-gradient(#bfd5cf, #e9d6af);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.moon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff7da;
  position: absolute;
  top: 36px;
  right: 42px;
}

.mountain {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 180px solid transparent;
  border-right: 180px solid transparent;
  border-bottom: 210px solid #476b5a;
}

.mountain-one {
  left: -50px;
}

.mountain-two {
  right: -120px;
  border-bottom-color: #355343;
  transform: scale(0.85);
}

.tent {
  position: absolute;
  width: 120px;
  height: 90px;
  background: var(--accent);
  bottom: 20px;
  left: 80px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.fire {
  position: absolute;
  bottom: 18px;
  right: 70px;
  font-size: 44px;
}

.section {
  padding: 88px 0;
}

.section.alt {
  background: var(--alt);
}

.section-heading {
  max-width: 690px;
  margin-bottom: 36px;
}

.planner-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  background: var(--surface);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.planner-form {
  display: grid;
  gap: 18px;
}

.planner-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.planner-form input,
.planner-form select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.planner-result {
  background: var(--alt);
  border-radius: 16px;
  padding: 24px;
}

.result-list {
  padding-left: 20px;
  margin-bottom: 0;
}

.checklist-grid,
.card-grid,
.game-grid {
  display: grid;
  gap: 20px;
}

.checklist-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card-grid {
  grid-template-columns: repeat(3, 1fr);
}

.game-grid {
  grid-template-columns: repeat(3, 1fr);
}

.check-card,
.info-card,
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.check-card label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  color: var(--muted);
}

.check-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.checklist-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

#progressText {
  color: var(--muted);
  font-weight: 700;
}

.icon {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 8px;
}

.game-card span {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
}

.cta {
  background: var(--primary);
  color: #fff;
  padding: 64px 0;
}

.cta .eyebrow {
  color: #cbe0d4;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cta h2 {
  margin-bottom: 0;
  max-width: 700px;
}

footer {
  background: #15241c;
  color: #d7e2dc;
  padding: 28px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-content p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero-grid,
  .planner-card {
    grid-template-columns: 1fr;
  }

  .checklist-grid,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .menu-btn {
    display: block;
  }

  nav {
    position: absolute;
    top: 72px;
    left: 4%;
    right: 4%;
    display: none;
    flex-direction: column;
    padding: 18px;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  nav.open {
    display: flex;
  }

  h1 {
    font-size: 3rem;
  }

  .hero {
    padding-top: 54px;
  }

  .checklist-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    gap: 18px;
  }
}


.planner-options {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.planner-options legend {
  padding: 0 6px;
  font-weight: 800;
}

.planner-options label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  margin: 8px 0;
  font-weight: 600;
  color: var(--muted);
}

.planner-options input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

/* Interactive desktop sidebar */
@media (min-width: 901px) {
  :root {
    --sidebar-closed: 76px;
    --sidebar-open: 236px;
  }

  body {
    padding-left: var(--sidebar-closed);
    transition: padding-left 220ms ease;
  }

  body.sidebar-pinned {
    padding-left: var(--sidebar-open);
  }

  .site-header.sidebar-header {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-closed);
    height: 100vh;
    z-index: 50;
    border-right: 1px solid rgba(0,0,0,0.07);
    border-bottom: none;
    background: rgba(247, 244, 236, 0.98);
    backdrop-filter: blur(12px);
    transition: width 220ms ease, box-shadow 220ms ease;
    overflow: hidden;
  }

  .site-header.sidebar-header:hover,
  .site-header.sidebar-header:focus-within,
  body.sidebar-pinned .site-header.sidebar-header {
    width: var(--sidebar-open);
    box-shadow: 10px 0 28px rgba(30, 44, 36, 0.08);
  }

  .sidebar-nav-wrap {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    padding: 26px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    min-height: 48px;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 28px;
  }

  .brand-short {
    width: 46px;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
  }

  .brand-full {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-header.sidebar-header:hover .brand-full,
  .site-header.sidebar-header:focus-within .brand-full,
  body.sidebar-pinned .brand-full {
    opacity: 1;
    transform: translateX(0);
  }

  .sidebar-pin {
    position: absolute;
    top: 84px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-header.sidebar-header:hover .sidebar-pin,
  .site-header.sidebar-header:focus-within .sidebar-pin,
  body.sidebar-pinned .sidebar-pin {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-pinned .sidebar-pin {
    transform: rotate(180deg);
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 9px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a:focus-visible {
    background: rgba(40, 89, 67, 0.08);
    color: var(--primary);
  }

  .nav-icon {
    width: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
  }

  .nav-label {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-header.sidebar-header:hover .nav-label,
  .site-header.sidebar-header:focus-within .nav-label,
  body.sidebar-pinned .nav-label {
    opacity: 1;
    transform: translateX(0);
  }

  .sidebar-hint {
    margin-top: auto;
    margin-bottom: 8px;
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 160ms ease;
  }

  .site-header.sidebar-header:hover .sidebar-hint,
  .site-header.sidebar-header:focus-within .sidebar-hint {
    opacity: 1;
  }

  body.sidebar-pinned .sidebar-hint {
    opacity: 0;
  }

  .menu-btn {
    display: none;
  }
}

/* Mobile navigation stays as a normal compact menu */
@media (max-width: 900px) {
  body,
  body.sidebar-pinned {
    padding-left: 0;
  }

  .sidebar-header {
    position: sticky;
    width: 100%;
    height: auto;
  }

  .sidebar-nav-wrap {
    width: min(1120px, 92%);
    margin: 0 auto;
  }

  .brand-short,
  .sidebar-pin,
  .sidebar-hint,
  .nav-icon {
    display: none;
  }

  .brand-full,
  .nav-label {
    opacity: 1;
    transform: none;
  }

  .sidebar-nav a {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header.sidebar-header,
  .brand-full,
  .nav-label,
  .sidebar-pin,
  .sidebar-hint {
    transition: none !important;
  }
}


/* Camp Finder */
.camp-finder-section {
  background: var(--bg);
}

.camp-finder-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.finder-main {
  min-width: 0;
}

.finder-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.finder-main > p {
  color: var(--muted);
}

.finder-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.finder-or {
  color: var(--muted);
  font-weight: 700;
}

.camp-search-form {
  display: flex;
  gap: 10px;
  flex: 1 1 340px;
  min-width: 0;
}

.camp-search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.finder-status {
  min-height: 24px;
  margin-top: 14px;
  margin-bottom: 0;
  font-weight: 700;
  color: var(--primary);
}

.finder-tips {
  background: var(--alt);
  border-radius: 16px;
  padding: 22px;
}

.finder-tips ul {
  margin-bottom: 0;
  padding-left: 20px;
  color: var(--muted);
}

.finder-tips li + li {
  margin-top: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 800px) {
  .camp-finder-card {
    grid-template-columns: 1fr;
  }

  .camp-search-form {
    flex-direction: column;
    flex-basis: 100%;
  }

  .camp-search-form .btn {
    width: 100%;
  }

  .finder-actions > .btn {
    width: 100%;
  }

  .finder-or {
    width: 100%;
    text-align: center;
  }
}

/* Camp Finder result list */
.camp-results {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.camp-results[hidden] {
  display: none;
}

.camp-results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.camp-results-header h3 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.camp-count {
  color: var(--muted);
  font-weight: 800;
}

.camp-list {
  display: grid;
  gap: 14px;
}

.camp-result-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.camp-rank {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  background: var(--alt);
  color: var(--primary);
  font-weight: 900;
}

.camp-result-info {
  min-width: 0;
}

.camp-result-info h4 {
  margin: 0 0 5px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.camp-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.camp-distance {
  font-weight: 800;
  color: var(--primary);
}

.camp-map-btn {
  white-space: nowrap;
}

.camp-empty,
.camp-error {
  padding: 20px;
  border-radius: 14px;
  background: var(--alt);
  color: var(--muted);
}

.camp-results-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Keep checklist boxes from shrinking beside long labels */
.check-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  flex: 0 0 18px;
}

@media (max-width: 700px) {
  .camp-result-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .camp-map-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}


.finder-country-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}


/* Games expand control */
.game-card[hidden] {
  display: none;
}

.games-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}


/* V15 checklist quantities + progress */
.packing-progress-card {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.packing-progress-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.packing-progress-top > div {
  display: grid;
  gap: 2px;
}

.packing-progress-top span {
  color: var(--muted);
  font-size: 0.9rem;
}

.packing-progress-track,
.mini-progress-track {
  overflow: hidden;
  background: var(--alt);
  border-radius: 999px;
}

.packing-progress-track {
  height: 12px;
}

.packing-progress-fill,
.mini-progress-fill {
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 180ms ease;
}

.check-items {
  display: grid;
  gap: 12px;
}

.check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.check-item:first-child {
  border-top: 0;
}

.check-main {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 0 !important;
  min-width: 0;
}

.check-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-main input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  flex: 0 0 18px !important;
  margin-top: 2px;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.quantity-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--alt);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.quantity-input {
  width: 46px;
  height: 34px;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  background: var(--surface);
  color: var(--text);
}

.remove-custom-item {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.84rem;
}

.custom-item-card {
  margin-top: 24px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.custom-item-card h3 {
  margin-bottom: 18px;
}

.custom-item-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.7fr) 110px auto;
  gap: 12px;
  align-items: end;
}

.custom-item-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.custom-item-form input,
.custom-item-form select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.save-status {
  color: var(--primary);
  font-weight: 700;
}

/* Saved trips */
.saved-trips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.saved-trip-card,
.saved-trip-empty {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.saved-trip-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

.saved-trip-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.saved-trip-top h3 {
  margin-bottom: 0;
}

.saved-trip-percent {
  white-space: nowrap;
  color: var(--primary);
}

.saved-trip-meta {
  margin: 14px 0 12px;
  color: var(--muted);
}

.mini-progress-track {
  height: 8px;
  margin-bottom: 18px;
}

.saved-trip-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Campground action buttons */
.camp-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 950px) {
  .custom-item-form {
    grid-template-columns: 1fr 1fr;
  }

  .custom-item-form .btn {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .saved-trips-grid {
    grid-template-columns: 1fr;
  }

  .custom-item-form {
    grid-template-columns: 1fr;
  }

  .check-item {
    grid-template-columns: 1fr;
  }

  .quantity-control {
    justify-self: start;
  }

  .camp-result-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
  }

  .camp-result-actions .btn {
    flex: 1 1 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .packing-progress-fill,
  .mini-progress-fill {
    transition: none;
  }
}


/* V16 checklist interaction fixes */
.remove-checklist-item {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.84rem;
}

.quantity-btn:active {
  transform: translateY(1px);
}

.quantity-btn:focus-visible,
.quantity-input:focus-visible,
.remove-checklist-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* V17 simplified quantity control */
.quantity-control {
  display: inline-grid;
  grid-template-columns: 38px 42px 38px;
  align-items: stretch;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
}

.quantity-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: var(--alt);
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: rgba(40, 89, 67, 0.12);
}

.quantity-value {
  min-width: 42px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Old native number input is no longer used. */
.quantity-input {
  display: none !important;
}

/* The sidebar no longer shows instructional hover text. */
.sidebar-hint {
  display: none !important;
}


/* V18: wide horizontal checklist layout */
#checklist .checklist-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 18px;
}

#checklist .check-card {
  width: 100%;
  padding: 22px 24px;
}

#checklist .check-card > h3 {
  margin-bottom: 16px;
}

#checklist .check-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

#checklist .check-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 66px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

#checklist .check-item:nth-child(-n + 2) {
  border-top: 0;
}

#checklist .check-main {
  min-width: 0;
  align-items: center !important;
}

#checklist .check-main span {
  display: block;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

#checklist .quantity-control {
  flex: 0 0 auto;
}

#checklist .remove-checklist-item {
  grid-column: auto;
  justify-self: end;
  white-space: nowrap;
  text-decoration: none;
  padding: 7px 9px;
  border-radius: 8px;
}

#checklist .remove-checklist-item:hover {
  background: var(--alt);
  color: var(--text);
}

/* Real hero photo */
.hero-photo-wrap {
  position: relative;
  margin-bottom: 20px;
}

.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.hero-photo-credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(20, 30, 24, 0.72);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.2;
}

.hero-photo-credit:hover {
  text-decoration: underline;
}

/* Hide the old illustration if any old markup survives. */
.camp-scene {
  display: none;
}

@media (max-width: 1150px) {
  #checklist .check-items {
    grid-template-columns: 1fr;
  }

  #checklist .check-item:nth-child(2) {
    border-top: 1px solid var(--border);
  }

  #checklist .check-item:first-child {
    border-top: 0;
  }
}

@media (max-width: 720px) {
  #checklist .check-card {
    padding: 18px;
  }

  #checklist .check-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #checklist .remove-checklist-item {
    grid-column: 1 / -1;
    justify-self: start;
    padding-left: 0;
  }

  .hero-photo {
    aspect-ratio: 16 / 10;
  }
}


/* V19 collapsible checklist sections */
.collapsible-card {
  overflow: hidden;
}

.collapsible-toggle {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.collapsible-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.collapsible-title-wrap h3 {
  margin: 0;
}

.collapsible-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.collapsible-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--alt);
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.collapsible-toggle[aria-expanded="false"] .collapsible-arrow {
  transform: rotate(-90deg);
}

.collapsible-content[hidden] {
  display: none !important;
}

.collapsible-content {
  margin-top: 14px;
}

.section-count {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.packing-progress-card .collapsible-toggle {
  padding: 20px;
  border-radius: 16px;
}

.packing-progress-card .collapsible-content {
  margin-top: 0;
  padding: 0 20px 20px;
}

.custom-item-card .collapsible-toggle {
  padding: 0;
  margin-bottom: 2px;
}

.custom-item-card .collapsible-content {
  margin-top: 16px;
}

#checklist .check-card > .collapsible-toggle {
  margin-bottom: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .collapsible-arrow {
    transition: none;
  }
}


/* V20 cleaner collapse controls */
.collapsible-arrow {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
}

.chevron-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.collapsible-toggle[aria-expanded="false"] .collapsible-arrow {
  transform: rotate(-90deg);
}

.collapsible-toggle:hover .collapsible-arrow {
  background: var(--alt);
}

.collapsible-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 10px;
}


/* V21 product polish */
.planner-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trip-summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.trip-summary-card[hidden] {
  display: none;
}

.trip-summary-card h3 {
  margin-bottom: 0;
}

.trip-summary-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trip-summary-details span {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--alt);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.checklist-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 18px;
}

.checklist-search-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.checklist-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.compact-btn {
  min-height: 42px;
  padding: 0 14px;
}

.checklist-search-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.88rem;
  min-height: 1.2em;
}

.quantity-zero {
  opacity: 0.62;
}

.quantity-zero input[type="checkbox"] {
  cursor: not-allowed;
}

.custom-item-status {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.saved-trip-progress-text,
.saved-trip-edited {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.saved-trip-edited {
  font-size: 0.82rem;
}

.camp-error p {
  margin-bottom: 14px;
}

/* Long-text robustness */
.check-main span,
.camp-result-info h4,
.saved-trip-card h3,
.trip-summary-card h3,
.info-card h3,
.game-card h3 {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.check-item,
.camp-result-card,
.saved-trip-card,
.trip-summary-card {
  min-width: 0;
}

.sidebar-nav a.active {
  background: rgba(40, 89, 67, 0.12);
  color: var(--primary);
  font-weight: 900;
}

.sidebar-nav a.active .nav-icon {
  transform: scale(1.04);
}

@media (max-width: 900px) {
  .planner-date-grid {
    grid-template-columns: 1fr;
  }

  .trip-summary-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-summary-details {
    justify-content: flex-start;
  }

  .checklist-toolbar {
    grid-template-columns: 1fr;
  }

  .checklist-toolbar-actions {
    justify-content: flex-start;
  }
}


/* V22: checklist toolbar without search */
.checklist-toolbar-no-search {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 18px;
}

.checklist-toolbar-no-search .checklist-toolbar-actions {
  width: 100%;
  justify-content: flex-end;
}


/* V24: quantity and packed status are independent */
.quantity-zero {
  opacity: 1;
}

.quantity-zero input[type="checkbox"] {
  cursor: pointer;
}


/* V28 — sharing, archived trips, improved saved-trip cards, feedback */
#savedTripsList {
  display: block;
}

.saved-trip-group + .saved-trip-group {
  margin-top: 34px;
}

.saved-trip-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.saved-trip-group-heading h3 {
  margin: 0;
  font-size: 1.45rem;
}

.saved-trip-group-heading > span {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--alt);
  color: var(--primary);
  font-weight: 900;
}

.saved-trip-card {
  position: relative;
}

.saved-trip-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.saved-trip-icon {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--alt);
  font-size: 1.55rem;
}

.saved-trip-heading {
  min-width: 0;
}

.saved-trip-heading .eyebrow {
  margin-bottom: 4px;
}

.saved-trip-heading h3 {
  margin: 0;
}

.saved-trip-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.saved-trip-ready,
.saved-trip-archived {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--alt);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.saved-trip-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 14px;
}

.saved-trip-detail-chips span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--alt);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.saved-trip-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.84rem;
}

.saved-trip-action-status {
  min-height: 1.1em;
  margin: 10px 0 0;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.archived-trip-card {
  background: rgba(255, 255, 255, 0.72);
}

.compact-empty {
  padding: 18px 20px;
}

/* Modal system */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 27, 21, 0.58);
  backdrop-filter: blur(3px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.site-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(12, 28, 20, 0.26);
}

.site-modal h2 {
  margin-bottom: 10px;
}

.modal-copy,
.modal-note {
  color: var(--muted);
}

.modal-note {
  margin-top: 14px;
  font-size: 0.82rem;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.shared-trip-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--alt);
}

.shared-trip-preview p {
  margin: 4px 0;
  color: var(--muted);
}

.shared-trip-preview span {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
}

.shared-trip-preview-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--surface);
  font-size: 1.55rem;
}

/* Structured feedback — no free-text or personal data */
.feedback-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 500;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 42, 29, 0.22);
  cursor: pointer;
  font-weight: 800;
}

.feedback-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.feedback-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.feedback-form legend,
.feedback-form > label {
  color: var(--text);
  font-weight: 800;
}

.feedback-choice-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.feedback-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-choice span {
  display: inline-flex;
  min-width: 100px;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
}

.feedback-choice input:checked + span {
  border-color: var(--primary);
  background: var(--alt);
  color: var(--primary);
}

.feedback-form select {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.feedback-status {
  min-height: 1.1em;
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}

@media (max-width: 700px) {
  .saved-trip-card-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .saved-trip-status-wrap {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .saved-trip-progress-row {
    flex-direction: column;
    gap: 4px;
  }

  .feedback-fab {
    right: 14px;
    bottom: 14px;
  }

  .site-modal {
    padding: 24px 20px;
  }
}


/* V29 — smaller feedback control + short-comment field */
.feedback-fab {
  right: 10px;
  bottom: 12px;
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 42, 29, 0.16);
}

.feedback-comment-wrap {
  position: relative;
  margin-top: 8px;
}

.feedback-comment-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 10px 58px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.feedback-char-count {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  pointer-events: none;
}

.optional-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}


@media (max-width: 700px) {
  .feedback-fab {
    right: 8px;
    bottom: 10px;
    padding: 8px 11px;
    font-size: 0.8rem;
  }
}


/* V32 — synchronized checkbox and quantity behavior */
.quantity-value-button {
  appearance: none;
  -webkit-appearance: none;
  border-top: 0;
  border-bottom: 0;
  cursor: pointer;
}

.quantity-value-button:hover {
  background: var(--alt);
}

.quantity-value-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}


/* V33 — improved share modal */
.share-link-label {
  display: block;
  margin-top: 18px;
  font-weight: 800;
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 8px;
}

.share-link-row input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--alt);
  color: var(--text);
}

.share-status {
  min-height: 1.1em;
  margin: 12px 0 0;
  color: var(--primary);
  font-weight: 800;
}

/* Offline status */
.offline-status {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 480;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(15, 42, 29, 0.14);
  font-size: 0.8rem;
  font-weight: 800;
}

.offline-status[hidden] {
  display: none;
}

/* Print only the useful checklist content */
@media print {
  @page {
    margin: 0.55in;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }

  .sidebar,
  .mobile-topbar,
  #home,
  #planner,
  #saved-trips,
  #guides,
  #games,
  #camp-finder,
  footer,
  .feedback-fab,
  .offline-status,
  .checklist-toolbar,
  .custom-item-card,
  .remove-checklist-item,
  .quantity-btn,
  .modal-backdrop {
    display: none !important;
  }

  #checklist {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #checklist .section-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #checklist .check-card,
  .packing-progress-card,
  .trip-summary-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    background: #fff !important;
  }

  #checklist .check-items {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  #checklist .check-item {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #checklist .quantity-control {
    border: 0 !important;
    background: transparent !important;
  }

  #checklist .quantity-value {
    border: 0 !important;
    background: transparent !important;
    color: #000 !important;
  }

  .collapsible-content[hidden] {
    display: block !important;
  }

  .collapsible-arrow,
  .section-count {
    display: none !important;
  }

  .collapsible-toggle {
    pointer-events: none;
  }
}

@media (max-width: 700px) {
  .share-link-row {
    grid-template-columns: 1fr;
  }
}
