/* DEELA Books: mobile contrast and horizontal shelves */
@media (max-width: 720px) {
  #home .category-grid,
  #home .books-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    margin-inline: -2px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #64bcb7 #f0e4e1;
    touch-action: pan-x;
  }

  #home .category-grid button {
    flex: 0 0 142px;
    min-width: 142px;
    scroll-snap-align: start;
    color: #153c47;
    background: #fffaf8;
    border-color: #c9b8b5;
    box-shadow: 0 4px 12px rgba(55, 44, 43, .08);
  }

  #home .category-grid button:nth-child(2n) {
    background: #f5eff8;
  }

  #home .category-grid button:nth-child(3n) {
    background: #edf7f4;
  }

  #home .category-grid button strong {
    color: #153c47;
    font-size: 12px;
  }

  #home .category-grid button small {
    color: #52686b;
    font-size: 10px;
  }

  #home .books-grid .book-card {
    flex: 0 0 min(70vw, 270px);
    min-width: min(70vw, 270px);
    scroll-snap-align: start;
  }

  #home .book-info h3 {
    color: #153c47;
  }

  #home .book-info > p,
  #home .section-title p,
  #home .hero p,
  #home .hero-footer,
  #home .trust-bar small,
  #home .feature-banner p {
    color: #4b6367;
  }

  #home .eyebrow {
    color: #315b60;
  }

  #home .hero h1,
  #home .feature-banner h2,
  #home .section-title h2,
  #home .trust-bar b {
    color: #153c47;
  }

  #home .hero h1 em {
    color: #087f84;
    text-shadow: none;
  }

  #home .btn-outline {
    color: #17474f;
    background: #fffaf8;
    border-color: #9bb7b3;
  }

  #home .text-button {
    color: #086b73;
  }

  #home .category-grid::-webkit-scrollbar,
  #home .books-grid::-webkit-scrollbar {
    height: 5px;
  }

  #home .category-grid::-webkit-scrollbar-thumb,
  #home .books-grid::-webkit-scrollbar-thumb {
    background: #64bcb7;
    border-radius: 999px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #home .category-grid,
  #home .books-grid {
    scroll-behavior: auto;
  }
}

/* Contrast pass for the light DEELA theme, including owner and membership panels. */
:root {
  --muted: #40585c;
  --muted2: #52676a;
}
body {
  color: #123b45;
}
p,
small,
.field,
.field strong,
.field small,
.form-msg,
.owner-feature-copy strong,
.owner-feature-copy small,
.membership-feature-check,
.membership-plan li,
.membership-admin-plan,
.row-card small,
.metric small,
.footer p,
.footer button {
  color: #304f54;
}
h1, h2, h3, .panel h2, .panel h3, .page-heading h1,
.section-title h2, .book-info h3, .owner-feature-heading h3,
.owner-feature-copy strong, .row-card h3, .row-card strong,
.field > strong, .field > label {
  color: #123b45;
}
.btn-outline,
button.btn-outline,
.theme-preset-grid .btn-outline,
.field .btn-outline {
  color: #173f48 !important;
  background: #fffaf8;
  border-color: #9eb7b3;
}
.btn-outline:hover,
button.btn-outline:hover,
.theme-preset-grid .btn-outline:hover {
  color: #0d3740 !important;
  background: #eaf6f3;
}
.field input::placeholder,
.field textarea::placeholder,
.header-search input::placeholder {
  color: #5a6e71;
  opacity: 1;
}
.text-button,
.auth-link,
.footer button:hover {
  color: #075f69;
}
.form-msg.error {
  color: #8b2e32;
}
.form-msg.success {
  color: #145c43;
}
.membership-feature-check,
.owner-feature,
.owner-subtabs button,
.owner-tabs button,
.tab-bar button,
.filter,
.metric,
.row-card,
.small-card {
  color: #173f48;
}
.owner-feature-copy small,
.metric small,
.row-card p,
.row-card small {
  color: #435c60;
}

/* Compact the mobile home layout to match the approved catalog-first structure. */
@media (max-width: 720px) {
  #home .hero {
    display: none !important;
  }

  #home .trust-bar {
    margin-top: 8px;
    padding: 11px 9px;
    gap: 6px 4px;
    border-radius: 15px;
  }

  #home .trust-bar > div {
    min-height: 48px;
    padding-inline: 7px;
    gap: 7px;
  }

  #home .trust-bar > div > span {
    font-size: 20px;
  }

  #home .trust-bar b {
    font-size: 11px;
  }

  #home .trust-bar small {
    font-size: 9px;
    line-height: 1.55;
  }

  #home .section {
    padding-top: 32px;
  }

  #home .section-title {
    align-items: flex-start;
    margin-bottom: 12px;
  }
}


/* Restore the approved classic mobile home layout while keeping the current digital-only content. */
@media (max-width: 720px) {
  #home .hero {
    display: grid !important;
  }

  #home .category-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    margin-inline: -2px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    touch-action: pan-x;
  }

  #home .category-grid button {
    flex: 0 0 150px;
    min-width: 150px;
    min-height: 145px;
    scroll-snap-align: start;
    padding: 13px 8px;
  }

  #home .category-grid button strong {
    font-size: 13px;
  }

  #home .category-grid button small {
    font-size: 10px;
  }

  #home .books-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding: 2px 0 12px;
    margin-inline: 0;
    scroll-snap-type: none;
    touch-action: auto;
  }

  #home .books-grid .book-card {
    flex: initial;
    min-width: 0;
    width: 100%;
    scroll-snap-align: unset;
  }

  #home .books-grid::-webkit-scrollbar {
    display: none;
  }

  #home .trust-bar {
    padding: 13px 8px;
    gap: 10px 0;
  }

  #home .section {
    padding-top: 44px;
  }

  #home .section-title {
    margin-bottom: 15px;
  }
}
