/* ==========================================================================
   GEAR HOUSE — phone app shell (≤760px). Loaded last on every page.
   Bottom tab bar, compact top bar with back button, "More" bottom sheet,
   compact footer, touch basics. Nothing here applies above 760px.
   ========================================================================== */

/* password show/hide (all sizes) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-eye { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--mist); background: none; border: 0; cursor: pointer; }
.pw-eye svg { width: 20px; height: 20px; }
.pw-eye[aria-pressed="true"] { color: var(--bone); }

/* Touch devices: no sticky hover lifts after a tap, a quick pressed state instead */
html { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .btn:hover, .product:hover, .pcard:hover, .ccard:hover, .lcard:hover, .role-tile:hover, .scard-studio:hover { transform: none; }
  .product:hover .product-visual img, .pcard:hover .pvis img, .hc-face:hover img, .hc-dept:hover > img, .poster:hover img,
  .ncard:hover .nvis img, .tile:hover img, .gallery button:hover img, .reel:hover img, .kit-photo-card:hover > img, .scard-studio:hover .ss-vis img { transform: none; }
  .btn:active, .icon-btn:active, .add-btn:active, .tabbar a:active, .mobile-menu > a:active { transform: scale(0.97); }
  .product:active, .pcard:active, .ccard:active, .lcard:active, .scard-studio:active { transform: scale(0.985); }
}

.product .plus .i-bag, .product .plus .i-check, .footer-mini, .lede-short, .join-signin,
.tabbar, .back-btn, .appbar-title, .sheet-backdrop, .sheet-grab, .mm-title, .mobile-menu > a.mm-extra, .more-sheet { display: none; }

@media (max-width: 760px) {
  :root { --tabbar-h: 58px; --safe-b: env(safe-area-inset-bottom, 0px); }

  /* iOS zooms into any field under 16px: keep them at 16 */
  input, select, textarea { font-size: 16px !important; }

  /* ---------- top app bar ---------- */
  .header { height: calc(var(--header-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .header .wrap { display: flex; justify-content: space-between; gap: 8px; }
  .crumbs { display: none !important; }   /* the back button replaces breadcrumbs */
  .header .brand .logo { height: 28px; }
  .header-actions { gap: 4px; }
  .header .icon-btn { width: 44px; height: 44px; border-color: transparent; background: none; }
  .header .gearlist-btn, .header .acct-wrap, .header .crew-cta, .header .lang-switch { display: none !important; }   /* tab bar and More sheet have them */
  .menu-btn { display: inline-grid; }
  .icon-btn svg { width: 20px; height: 20px; }

  /* pages below a tab: back + short title instead of the logo */
  .header.is-detail .brand { display: none; }
  .header.is-detail .back-btn { display: inline-grid; margin-left: -10px; flex: none; }
  .header.is-detail .appbar-title { display: block; flex: 1; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ---------- bottom tab bar ---------- */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(10,10,11,0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--smoke);
  }
  .tabbar a { display: grid; place-items: center; align-content: center; gap: 3px; color: var(--mist); font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; transition: color var(--t-fast); }
  .tabbar a.on { color: var(--bone); }
  .tabbar .tb-ico { position: relative; display: grid; place-items: center; width: 44px; height: 26px; border-radius: 13px; transition: background var(--t-fast); }
  .tabbar a.on .tb-ico { background: rgba(255,255,255,0.09); }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar .count {
    position: absolute; top: -4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #d80b2a; color: #fff; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
    transform: scale(0); transition: transform var(--t-fast) var(--ease-out);
  }
  .tabbar .count.show { transform: scale(1); }
  .tabbar .count.bump { animation: bump 400ms var(--ease-out); }

  /* room for the tab bar under the page, and things that float above it */
  body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
  .toast-wrap { bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); width: calc(100% - 32px); }
  .toast { width: 100%; }

  /* ---------- "More" sheet: grouped rows like an app's settings screen ---------- */
  .mobile-menu { display: none; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 1090; background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
  .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
  .sheet-grab { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--smoke-2, #3f4250); margin: 0 auto 8px; flex: none; }
  .more-sheet {
    display: flex; flex-direction: column; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 16px calc(16px + var(--safe-b)); background: #101116;
    border: 1px solid var(--smoke); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
    transform: translateY(105%); transition: transform var(--t-med) var(--ease-out);
  }
  .more-sheet.open { transform: none; }
  .ms-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
  .ms-head h2 { flex: 1; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
  .ms-head .lang-switch { height: 34px; margin-right: 8px; }
  .more-sheet .ms-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.08); }
  .more-sheet .ms-close svg { width: 16px; height: 16px; }
  .ms-group { border-radius: 14px; background: #1a1b22; overflow: hidden; flex: none; }
  .ms-group:empty { display: none; }
  .ms-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px 0 14px; font: inherit; font-size: 15.5px; color: var(--bone); background: none; border: 0; text-align: left; cursor: pointer; position: relative; }
  .ms-row + .ms-row::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; height: 1px; background: rgba(255,255,255,0.07); }
  .ms-row:active { background: rgba(255,255,255,0.06); }
  .ms-ico { display: grid; place-items: center; width: 24px; flex: none; color: var(--mist); }
  .ms-ico .ico { width: 19px; height: 19px; }
  .ms-l { flex: 1; min-width: 0; }
  .ms-l small { display: block; font-size: 12px; color: var(--mist); }
  .ms-chev { width: 16px; height: 16px; color: var(--mist-2, #6b6e7a); flex: none; }
  .ms-wa .ms-ico { color: #25d366; }
  .ms-crew .ms-ico { color: #d80b2a; }
  .ms-news { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px 0 14px; border-radius: 14px; background: #1a1b22; flex: none; }
  .ms-news input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--bone); }
  .ms-news input::placeholder { color: var(--mist); }
  .ms-news button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--bone); border-radius: 10px; }
  .ms-news button svg { width: 18px; height: 18px; }

  /* ---------- homepage: the tab bar replaces the floating section pill ---------- */
  .hn-bar { display: none; }

  /* list-row product cards (catalog): the square photo must not stretch wider than its 112px column */
  .product-grid .product-visual { width: 100%; height: auto; min-height: 0; align-self: center; }
  /* "+" sits at the right of the price line, clear of the brand/category row */
  /* small + on the price line (✓ once in the list); "per day · week" runs full width below */
  .product-grid .product .product-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; }
  .product-grid .product .price { display: contents; }
  .product-grid .product .price .v { grid-column: 1; grid-row: 1; }
  .product-grid .product .price .u { grid-column: 1 / -1; grid-row: 2; }
  .product-grid .product .plus { position: relative; top: auto; right: auto; grid-column: 2; grid-row: 1; width: 28px; height: 28px; border-radius: 8px; }
  .product-grid .product .plus .ico { width: 13px; height: 13px; }
  .product-grid .product .plus.added .i-plus { display: none; }
  .product-grid .product .plus.added .i-check { display: block; }
  .product-grid .product .plus::after { content: ""; position: absolute; inset: -8px; }   /* 44px tap area */

  /* ---------- catalog: filters as a bottom sheet ---------- */
  .filters {
    inset: auto 0 0 0; max-height: 86dvh; z-index: 1200; display: flex; flex-direction: column;
    padding: 10px 20px 0; overscroll-behavior: contain; background: #121318;
    border: 1px solid var(--smoke); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
    transform: translateY(105%); transition: transform var(--t-med) var(--ease-out);
  }
  .filters.open { transform: none; }
  .filters .filter-group { margin-bottom: 22px; flex: none; }
  .filters-head { margin-bottom: 14px; flex: none; }
  .filters .close-filters { width: 40px; height: 40px; border: 0; background: rgba(255,255,255,0.07); border-radius: 50%; }
  .filters-backdrop { display: block; position: fixed; inset: 0; z-index: 1150; background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
  .filters-backdrop.open { opacity: 1; pointer-events: auto; }
  .filters-foot { position: sticky; bottom: 0; margin: auto -20px 0; padding: 12px 20px calc(12px + var(--safe-b)); background: #121318; z-index: 1; }
  .filters-foot .btn { min-height: 50px; justify-content: center; }
  /* options as tappable chips instead of tiny checkboxes */
  .filter-group h4 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--bone-2); margin-bottom: 10px; }
  .filter-group #f-tier, .filter-group #f-brand, .filter-group #f-price { display: flex; flex-wrap: wrap; gap: 8px; }
  .filters .filter-group label { display: inline-flex; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--smoke); border-radius: 999px; background: rgba(255,255,255,0.03); font-size: 14.5px; color: var(--bone-2); }
  .filters .filter-group label input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
  .filters .filter-group label .n { margin-left: 0; font-size: 11px; color: var(--mist); }
  .filters .filter-group label:has(input:checked) { background: var(--bone); border-color: var(--bone); color: var(--ink); }
  .filters .filter-group label:has(input:checked) .n { color: rgba(0,0,0,0.55); }
  .filters #more-brands { flex-basis: 100%; min-height: 40px; margin-top: 4px !important; }

  /* catalog top: plain large title, swipeable category row, search + filter button, count + sort line */
  .page-head.cat-head { padding-top: calc(var(--header-h) + 18px); padding-bottom: 6px; }
  .cat-banner { min-height: 0; padding: 0; margin-top: 0; background: none; border-radius: 0; overflow: visible; }
  .cat-banner img, .cat-banner::before { display: none; }
  .cat-banner .display { font-size: 32px; letter-spacing: -0.03em; }
  .cat-banner .lede { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--mist); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .catalog-layout > div { min-width: 0; }   /* the scrolling chip row must not widen the column */
  .cat-sticky { position: sticky; top: var(--header-h); z-index: 40; margin: 0 calc(-1 * var(--gutter)) 4px; padding: 10px var(--gutter) 10px; background: rgba(10,10,11,0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .cat-sticky .toolbar { margin-bottom: 0 !important; }
  .cat-sticky .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 10px; padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
  .cat-sticky .chips::-webkit-scrollbar { display: none; }
  .cat-sticky .chip { flex: none; min-height: 38px; border-radius: 12px; }
  .cat-head .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 16px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
  .cat-head .chips::-webkit-scrollbar { display: none; }
  .cat-head .chip { flex: none; min-height: 38px; border-radius: 12px; }   /* same corners as the search box */
  .catalog-layout .toolbar { flex-wrap: nowrap; gap: 8px; margin-bottom: 6px; }
  .catalog-layout .toolbar .search { flex: 1; min-width: 0; max-width: none; min-height: 46px; border-radius: 12px; }
  .catalog-layout .toolbar > .flex { flex: none; width: auto; }
  .catalog-layout .toolbar .mobile-filter-btn { width: 46px; min-height: 46px; padding: 0; justify-content: center; border-radius: 12px; font-size: 0; gap: 0; }
  .catalog-layout .toolbar .mobile-filter-btn .ico { width: 19px; height: 19px; }
  .catalog-layout .toolbar .mobile-filter-btn .f-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; margin: 0; }
  .catalog-layout .toolbar:has(#result) { justify-content: space-between; align-items: center; margin-bottom: 14px; }
  .catalog-layout #result { font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none; }
  .catalog-layout #sort { min-height: 40px; padding: 0 22px 0 8px; border: 0; background-color: transparent; background-position: right 4px center; font-family: var(--font-body); letter-spacing: 0; text-transform: none; color: var(--bone-2); text-align: right; }

  /* ---------- minimal footer: a few links + the legal line (the More sheet has the rest) ---------- */
  .footer { padding: 22px 0 18px; }
  .footer-top, .footer-mid, .service-strip { display: none !important; }
  .footer-mini { display: flex; flex-wrap: wrap; gap: 0 14px; margin-bottom: 8px; }
  .footer-mini a { padding: 8px 0; font-size: 12.5px; color: var(--bone-2); }
  .footer-bottom { display: block; padding-top: 10px; font-family: var(--font-body); font-size: 11px; letter-spacing: 0; text-transform: none; line-height: 1.5; color: var(--mist); }
  .footer-bottom span + span { display: none; }

  /* ---------- join (crew sign-up): form first, pitch compact ---------- */
  .join-layout { grid-template-columns: minmax(0, 1fr); }   /* the swipeable steps row must not widen the page */
  section.page-head:has(+ section .join-layout) { padding-top: calc(var(--header-h) + 18px); padding-bottom: 18px; }
  .page-head:has(.join-signin) .display { font-size: 32px; margin-top: 0; }
  .lede-long { display: none; }
  .lede-short { display: block; margin-top: 8px !important; font-size: 15px; line-height: 1.5; color: var(--mist); }
  .join-signin { display: block; margin-top: 14px !important; padding: 12px 14px; border-radius: 14px; background: #1a1b22; font-size: 14px; color: var(--bone-2); }
  .join-signin a { color: var(--bone); font-weight: 600; border-bottom: 1px solid var(--mist-2, #6b6e7a); }
  .join-signin-foot { display: none; }
  .join-layout { gap: 18px; }
  .steps-list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
  .steps-list::-webkit-scrollbar { display: none; }
  .steps-list > div { flex: 0 0 72%; display: block; scroll-snap-align: start; padding: 14px; border-radius: 14px; background: #1a1b22; }
  .steps-list .n { display: block; padding: 0 0 6px; font-size: 11px; }
  .steps-list h3 { font-size: 15px; }
  .steps-list p { font-size: 13px; line-height: 1.45; }
  .join-pitch .info-strip { margin-top: 12px !important; padding: 0; border: 0; background: none; }
  .join-pitch .info-strip > div { display: flex; align-items: center; gap: 10px; padding: 2px 2px; border-radius: 0; background: none; border: 0; }
  .join-pitch .info-strip svg { width: 18px; height: 18px; flex: none; }
  .join-pitch .info-strip .t { margin: 0; font-size: 13.5px; font-weight: 500; }
  .join-pitch .info-strip .d { display: none; }
  /* form sections: grouped, no heavy boxes */
  #join-form { gap: 26px; }
  #join-form fieldset { padding: 0; border: 0; background: none; gap: 14px; }
  #join-form legend { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--mist); text-transform: uppercase; letter-spacing: 0.06em; }
  #join-form .row-2 { grid-template-columns: 1fr; gap: 14px; }
  #join-form .check { gap: 12px; padding: 12px 14px; border-radius: 14px; background: #1a1b22; font-size: 13px; line-height: 1.5; }
  #join-form .check input { width: 22px; height: 22px; margin-top: 0; }
  #join-form > .flex { display: block; }
  #j-submit { width: 100%; min-height: 52px; justify-content: center; }
}
