/* Approved Compact v3 Hero and rail, with simplified homepage categories.
   UI-only: business adapter, contract, fixture and assets stay unchanged.
   No viewport-height Hero and no clipping of CTA text to force a fixed height. */

/* One row at every breakpoint; desktop shows all ten fixture categories.
   Narrow widths keep usable cards and expose horizontal scrolling. */
.category-rail { min-width: 0; }
.category-grid {
  --card-width: 144px;
  display: grid;
  grid-template-columns: none;
  grid-template-rows: auto;
  grid-auto-flow: column;
  grid-auto-columns: var(--card-width);
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 5px;
  overscroll-behavior-x: contain;
  padding: 5px 4px 8px;
  margin: -5px -4px -4px;
  scrollbar-width: thin;
  scrollbar-color: #b8bec6 transparent;
}
.category-card {
  scroll-snap-align: start;
  scroll-margin-inline: 5px;
  padding: 0 8px 9px;
  min-height: 0;
}
.category-image {
  aspect-ratio: auto;
  height: 88px;
  flex: 0 0 88px;
  margin: 0 -8px 7px;
}
.category-title {
  font-size: 12px;
  line-height: 1.45;
  padding-right: 14px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-height: 2.9em;
}
.category-card .card-arrow { bottom: 9px; right: 6px; font-size: 14px; }
.category-rail-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding-top: 7px;
  min-height: 46px;
}
#category-rail-hint { margin-right: auto; font-size: 12px; color: var(--muted); }
.rail-nav {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 19px;
}
.rail-nav:disabled { opacity: .35; cursor: default; }
.rail-nav:not(:disabled):hover { background: var(--yellow-soft); }
@media (min-width: 1280px) {
  .category-grid { --card-width: calc((100% - 89px) / 10); }
}
@media (min-width: 1600px) {
  .category-title { font-size: 13px; }
  .category-image { height: 96px; flex-basis: 96px; }
}

/* Desktop: a 360px target with content-driven growth for zoom/long text. */
@media (min-width: 1101px) {
  .hero { grid-template-columns: minmax(0,1fr) 350px; align-items: stretch; }
  .hero-main {
    grid-template-columns: 50% 50%;
    min-height: 360px;
    padding-bottom: 42px;
  }
  .hero-copy { padding: 18px 12px 6px 28px; }
  .hero .eyebrow { font-size: 14px; padding: 4px 12px; }
  .hero h1 { font-size: clamp(30px,2.5vw,42px); line-height: 1.18; margin: 9px 0; }
  .hero-copy>p { font-size: 14px; }
  .hero ul { margin: 10px 0 12px; font-size: 13px; line-height: 1.55; }
  .hero-ctas { flex-direction: row; width: auto; flex-wrap: wrap; gap: 8px; }
  .hero-ctas .button { min-height: 44px; }
  .hero-switch { left: 28px; bottom: 8px; }
  .hero-art { min-height: 0; }
  .hero-detail { height: 86%; width: 88%; bottom: 0; }
  .hero-mascot { height: 90%; width: 59%; left: 0; bottom: 0; }
  .art-caption { font-size: 21px; top: 18px; }
  .quick-actions {
    grid-template-columns: 100px minmax(0,1fr);
    grid-template-rows: auto auto;
    padding: 12px 14px 12px 0;
    gap: 12px 8px;
    align-content: center;
  }
  .guide-mascot { grid-row: 2; height: 154px; align-self: start; object-position: top; }
  .speech { grid-row: 1; grid-column: 2; font-size: 12px; padding: 10px 12px 14px; }
  .guide-arrow { font-size: 32px; bottom: -19px; right: 10px; }
  .quick-buttons { grid-row: 2; grid-column: 2; gap: 5px; }
  .quick-button { min-height: 50px; padding: 7px 9px; font-size: 12px; }
  .quick-button small { font-size: 10px; }
}

/* Tablet: no duplicated tall vertical banner. Keep all four shortcuts visible. */
@media (min-width: 601px) and (max-width: 1100px) {
  .hero-main { min-height: 280px; grid-template-columns: 56% 44%; padding-bottom: 40px; }
  .hero-copy { padding: 16px 12px 8px 20px; }
  .hero .eyebrow { font-size: 13px; padding: 4px 10px; }
  .hero h1 { font-size: 30px; line-height: 1.18; margin: 8px 0; }
  .hero-copy>p { font-size: 13px; }
  .hero-copy ul { display: none; }
  .hero-ctas { margin-top: 12px; flex-direction: row; width: auto; gap: 6px; }
  .hero-ctas .button { min-height: 42px; padding: 8px 10px; font-size: 12px; }
  .hero-switch { left: 20px; bottom: 8px; }
  .hero-mascot { height: 89%; width: 59%; }
  .hero-detail { height: 86%; width: 95%; bottom: 0; }
  .art-caption { font-size: 18px; top: 13px; right: 12px; }
  .quick-actions {
    padding: 10px 20px;
    grid-template-columns: 65px 175px minmax(0,1fr);
    grid-template-rows: auto;
    gap: 10px;
    align-items: center;
  }
  .guide-mascot { grid-row: 1; grid-column: 1; height: 104px; align-self: center; }
  .speech { grid-row: 1; grid-column: 2; font-size: 12px; padding: 9px 12px; }
  .guide-arrow { font-size: 29px; right: -22px; top: 10px; bottom: auto; transform: rotate(-45deg); }
  .quick-buttons { grid-row: 1; grid-column: 3; grid-template-columns: 1fr 1fr; gap: 5px; }
  .quick-button { min-height: 46px; padding: 7px; font-size: 11px; gap: 5px; }
  .quick-button>.icon:first-child { width: 20px; height: 20px; }
  .quick-button>.icon:last-child { display: none; }
  .quick-button small { font-size: 10px; }
  .catalog-toolbar { align-items: center; }
  .category-filters { flex-wrap: nowrap; gap: 5px; min-width: 0; }
  .filter { padding: 7px 10px; font-size: 12px; }
}

/* Retain v2's compact mobile Hero rather than restoring v1's 870px stack.
   Make only the catalogue one row, with visible controls and swipe affordance. */
@media (max-width: 600px) {
  .category-grid { --card-width: 144px; }
  .category-image { height: 88px; flex-basis: 88px; }
  .category-title { font-size: 12px; }
  .category-filters { display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding: 4px; margin: -4px; scrollbar-width: thin; }
  .filter { flex: 0 0 auto; min-height: 40px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
  .catalog-toolbar>.text-link { margin-top: 3px; }
}

/* Owner preference: centered slide selector, in its reserved bottom area. */
.hero-switch { left: 50%; transform: translateX(-50%); max-width: none; flex-wrap: nowrap; white-space: nowrap; }
@media (min-width: 1280px) {
  .hero-ctas { transform: translateY(32px); }
  .hero-switch { top: var(--hero-cta-center); bottom: auto; transform: translate(-50%, -50%); }
}
@media (max-width: 600px) {
  .hero-art { bottom: 44px; height: 100px; }
}
