/* Mobile home only: header and bottom navigation remain untouched. */
@media (max-width: 759px) {
  .home-screen { gap:22px; padding-bottom:88px; }
  /* Restore the original About Uniar card directly below the home banner. */
  .mobile-about-link { display:flex; }

  .home-event-banner { min-height:260px; grid-template-columns:1.05fr .95fr; gap:0; padding:22px 18px 0; border:0; border-radius:30px; background:radial-gradient(circle at 82% 22%,rgba(95,158,255,.35),transparent 30%),linear-gradient(135deg,#fff 0%,#edf4ff 62%,#cfe1ff 100%); box-shadow:0 18px 42px rgba(31,87,180,.13); }
  .home-event-banner .hero-copy { position:relative; z-index:2; padding-bottom:20px; }
  .home-event-banner .hero-copy::before { content:"\631 \648 \6cc \62f \627 \62f"; display:inline-flex; align-items:center; height:27px; padding:0 11px; border-radius:99px; color:#2369df; background:#e8f1ff; font-size:.68rem; font-weight:900; }
  .home-event-banner .hero-copy h1 { margin:12px 0 9px; font-size:clamp(1.25rem,5.6vw,1.65rem); line-height:1.65; }
  .home-event-banner .hero-copy h1 .hero-title-brand,.home-event-banner .hero-title-icon { display:none; }
  .home-event-banner .hero-copy p { max-height:48px; overflow:hidden; color:#5c6d8d; font-size:.75rem; line-height:1.9; }
  .home-event-banner .hero-copy .primary-button { min-height:42px; margin-top:12px; padding-inline:17px; font-size:.76rem; }
  .home-event-banner .hero-copy .primary-button__arrow { display:none; }
  .home-event-banner .hero-visual { position:relative; min-height:190px; overflow:visible; }
  .home-event-banner .hero-visual img { width:155%; transform:translate(-3%,5px); opacity:.92; }

  .home-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 2px; }
  .home-section-heading h2 { display:flex; align-items:center; gap:7px; margin:0; color:#10265b; font-size:1.05rem; }
  .home-section-heading h2 svg { width:21px; color:#1f72f5; }
  .home-section-heading button { border:0; color:#1e71ee; background:transparent; font:inherit; font-size:.72rem; font-weight:800; }
  .home-quick-heading { margin-bottom:-10px; }

  /* A true four-column grid: columns share only the space left after its gaps. */
  .feature-grid { width:100%; max-width:100%; min-width:0; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(6px,2vw,10px); overflow:clip; }
  .feature-card,.feature-ai { position:relative!important; width:100%; min-width:0!important; max-width:100%; min-height:0!important; height:auto!important; aspect-ratio:1 / 1.12; display:flex!important; flex-direction:column; align-items:center; justify-content:center; gap:0!important; overflow:hidden; padding:8px 3px!important; border:0; border-radius:clamp(20px,5vw,24px)!important; text-align:center; box-shadow:0 8px 20px rgba(34,72,132,.08)!important; }
  /* Replace the older illustration layer only in this compact quick-access row. */
  #features .feature-card::before { display:none!important; }
  #features .feature-card > img { display:block!important; }
  .feature-card img,.feature-ai img { width:clamp(42px,13vw,54px)!important; height:clamp(42px,13vw,54px)!important; flex:0 0 auto; object-fit:contain; padding:0!important; border-radius:0!important; box-shadow:none!important; }
  .feature-card strong,.feature-ai strong,.feature-card small,.feature-ai small,.feature-card .arrow,.feature-ai .ai-arrow,.feature-ai .ai-badge,.feature-ai::after { display:none!important; }
  .home-quick-label { position:static; width:100%; min-width:0; display:block; margin-top:8px; overflow:hidden; color:#15295c; font-size:clamp(.57rem,2.3vw,.68rem); font-weight:900; letter-spacing:-.015em; line-height:1.35; white-space:nowrap; text-overflow:ellipsis; }
  /* RTL visual order, from the right: anonymous chat, classmates, study buddy, AI. */
  #anonymousChatCard { order:1; } #searchCard { order:2; } #studyCard { order:3; } #aiCard { order:4; } #eventsCard,#marketCard { display:none!important; }

  .home-today { padding:18px 15px 6px; border-radius:25px; background:#fff; box-shadow:0 12px 32px rgba(39,77,136,.08); }
  .home-today__list { margin-top:11px; }
  .home-today__item { width:100%; display:grid; grid-template-columns:auto 1fr 18px; align-items:center; gap:10px; padding:12px 0; border:0; border-bottom:1px solid #eaf0f8; color:#13265a; background:transparent; text-align:right; font:inherit; }
  .home-today__item:last-child { border-bottom:0; }
  .home-today__item--post { grid-template-columns:auto 48px minmax(0,1fr) 18px; }
  .home-today__image { width:48px; height:48px; overflow:hidden; border-radius:12px; background:#edf4ff; }
  .home-today__image img { width:100%; height:100%; object-fit:cover; }
  .home-today__item svg { width:18px; color:#89a0c8; }
  .home-today__copy { min-width:0; }
  .home-today__copy b,.home-today__copy small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .home-today__copy b { font-size:.8rem; }
  .home-today__copy small { margin-top:4px; color:#71809a; font-size:.66rem; }
  .home-today__type { padding:6px 9px; border-radius:99px; color:#8260d7; background:#f3edff; font-size:.62rem; font-weight:800; }
  .home-today__type.is-event { color:#216be8; background:#eaf2ff; }
  .home-empty { margin:17px 0 12px; color:#7c89a0; font-size:.76rem; line-height:1.8; }

  .home-suggestions__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .home-suggestion { min-height:132px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:12px; border:0; border-radius:22px; color:#14275b; background:#fff; box-shadow:0 10px 26px rgba(35,75,139,.08); font:inherit; text-align:center; }
  .home-suggestion b { font-size:.76rem; }
  .home-suggestion small { color:#70809e; font-size:.64rem; line-height:1.7; }
  .home-suggestion--study > svg { width:39px; height:39px; padding:9px; border-radius:14px; color:#2875f4; background:#e8f1ff; }
  .home-suggestion__avatars { height:42px; display:flex; direction:ltr; }
  .home-suggestion__avatars span { width:40px; height:40px; margin-left:-8px; display:grid; place-items:center; border:2px solid #fff; border-radius:50%; color:#fff; background:linear-gradient(135deg,#91b7ff,#2b6ce8); background-size:cover; background-position:center; font-size:.7rem; font-weight:900; }
  .home-suggestion__avatars span.has-image { color:transparent; }
  .trust-card { display:none; }
}

@media (max-width:390px) {
  .feature-grid { gap:6px; }
  .feature-card,.feature-ai { aspect-ratio:1 / 1.14; min-height:0!important; height:auto!important; padding:7px 2px!important; }
  .feature-card img,.feature-ai img { width:clamp(40px,13vw,49px)!important; height:clamp(40px,13vw,49px)!important; }
  .home-quick-label { margin-top:6px; font-size:clamp(.55rem,2.25vw,.62rem); }
  .home-event-banner { min-height:244px; padding-inline:14px; }
  .home-event-banner .hero-copy h1 { font-size:1.17rem; }
  .home-event-banner .hero-visual img { width:164%; }
}
