/*
 * Mobile app shell — bottom nav, list-style home, category browse.
 * Loaded after style.css so these rules win at mobile widths.
 */

.mnav, .mhome-search, .subcat-rail { display: none; }

.cat-browse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 30px 0 10px; }
.cat-browse__i { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 24px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.cat-browse__ic { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; margin-bottom: 6px; border-radius: 15px; background: rgba(14, 186, 27, .1); }
.cat-browse__ic img { width: 32px; height: 32px; object-fit: contain; }
.cat-browse__ic em { font-style: normal; font-weight: 700; font-size: 20px; color: var(--green); }
.cat-browse__i b { font-family: var(--sans-head); font-size: 20px; font-weight: 600; line-height: 1.35; }
.cat-browse__n { font-size: 15px; color: var(--muted); }
.cat-browse__s { font-size: 14px; line-height: 1.6; color: var(--muted-2); }
.cat-browse__i:hover { border-color: var(--green); }

@media (max-width: 900px) {
  body { padding-bottom: 72px; }

  .mnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9350;
    display: flex; align-items: stretch; gap: 2px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line-2);
    box-shadow: 0 -6px 26px rgba(7, 26, 22, .07);
  }
  .mnav__i {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
    padding: 7px 2px 4px; color: var(--muted); text-align: center;
  }
  .mnav__ic { display: flex; }
  .mnav__t { font-size: 12px; line-height: 1.25; }
  .mnav__i.is-on { color: var(--green); }
  .mnav__i.is-on .mnav__t { font-weight: 700; }

  .mhome-search {
    display: flex; align-items: center; gap: 10px; width: 100%;
    margin: 16px 0 0; padding: 13px 17px;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--muted);
    font-family: var(--sans); font-size: 16px; text-align: left; cursor: pointer;
  }
  .home-banner { margin-top: 16px; }

  .cat-tiles { display: flex; gap: 8px; margin-top: 22px; }
  .cat-tile { flex: 1 1 0; min-width: 0; align-items: center; gap: 8px; padding: 0; display: flex; flex-direction: column; background: none; text-align: center; }
  .cat-tile .tile-icon, .cat-tile .dot {
    display: flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; margin: 0; border-radius: 17px;
    background: rgba(14, 186, 27, .1); color: var(--green); font-size: 19px; font-weight: 700;
  }
  .cat-tile .tile-icon img { width: 32px; height: 32px; object-fit: contain; }
  .cat-tile h3 { margin: 0; font-size: 13px; line-height: 1.3; font-weight: 600; }
  .cat-tile > span { display: none; }

  .home-section { margin-top: 30px; }
  .home-section .section-head { margin-bottom: 2px; }
  .home-section .section-head h2 { font-size: 21px; line-height: 1.4; }
  .home-section .section-head .pill-link { display: none; }

  .recent-grid { display: flex; flex-direction: column; gap: 0; }
  .recent-grid .recent-main, .recent-grid .recent-mid,
  .recent-mini a { flex-direction: row; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .recent-mini { gap: 0; }
  .recent-grid .thumb, .recent-mini .thumb { width: 84px; flex: none; border-radius: 13px; }
  .recent-main .thumb, .recent-mid .thumb, .recent-mini .thumb { aspect-ratio: 1 / 1; }
  .recent-main .tt, .recent-mid .tt, .recent-mini .tt { font-size: 16.5px; line-height: 1.45; font-weight: 600; }
  .recent-mid .badge { display: none; }
  .recent-mini .tx { gap: 4px; }

  .cat-cards { display: flex; flex-direction: column; gap: 0; }
  .cat-card,
  .cat-cards .cat-card:nth-child(even) {
    flex-direction: row-reverse; align-items: center; gap: 13px;
    margin: 0; padding: 13px 0; border-radius: 0;
    background: none; box-shadow: none; border-bottom: 1px solid var(--line);
  }
  .cat-card:hover { transform: none; box-shadow: none; }
  .cat-card .thumb { width: 84px; flex: none; margin: 0; aspect-ratio: 1 / 1; border-radius: 13px; }
  .cat-card .badge { display: none; }
  .cat-card .tt { flex: 1; min-width: 0; font-size: 16.5px; line-height: 1.45; }

  .subcat-rail { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 26px; }
  .subcat-rail a { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
  .subcat-rail b { font-family: var(--sans-head); font-size: 15.5px; font-weight: 600; line-height: 1.35; }
  .subcat-rail span { font-size: 12.5px; color: var(--muted); }

  .cat-browse { grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 6px; }
  .cat-browse__i { padding: 15px 14px 17px; border-radius: 16px; gap: 4px; }
  .cat-browse__ic { width: 44px; height: 44px; border-radius: 14px; margin-bottom: 4px; }
  .cat-browse__ic img { width: 27px; height: 27px; }
  .cat-browse__i b { font-size: 16.5px; }
  .cat-browse__n { font-size: 12.5px; }
  .cat-browse__s { display: none; }
}
