/* ===== Mobile & tablet styles (loaded last on every page) ===== */
html, body { overflow-x: clip; }
body { overflow-wrap: break-word; }
a, button { -webkit-tap-highlight-color: transparent; }
.dot { position: relative; }
.dot::after { content: ""; position: absolute; inset: -12px -4px; }

/* Touch screens: no sticky hover effects */
@media (hover: none) {
  .card:hover, .bcard:hover, .info-card:hover, .info-item:hover, .btn:hover { transform: none; }
}

/* ---------- Phones and small tablets ---------- */
@media (max-width: 700px) {
  :root { --header-h: 64px; }
  .container { width: min(100% - 1.5rem, var(--container)); }
  .section { padding: 2.4rem 0; }
  .section-head { margin-bottom: 1.8rem; }
  h1 { font-size: clamp(1.75rem, 8vw, 2.3rem); }
  h2 { font-size: clamp(1.35rem, 6vw, 1.75rem); }

  /* Header & buttons */
  .brand { font-size: 1.02rem; gap: .5rem; }
  .brand img { width: 36px; height: 36px; }
  .site-header .menu-btn { width: 42px; height: 42px; }
  .btn-lg { padding: .8rem 1.3rem; font-size: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }

  /* Welcome page */
  .hero-art img { width: min(60vw, 240px); }

  /* Home: hero slider */
  .slide { padding: 2rem 0 3.6rem; }
  .slide-title { font-size: clamp(1.6rem, 7.5vw, 2.1rem); }
  .slide .lead { font-size: 1rem; }
  /* Photo slides: banner on top, text underneath (no cropping) */
  .slide-photo { flex-direction: column; align-items: stretch; min-height: 0; padding: 0 0 3.2rem; background: var(--c-dark); }
  .slide-photo-img { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 12 / 5; }
  .slide-shade { display: none; }
  .slide-photo .slide-inner { padding: 1.2rem 0 0; }
  .slide-photo.no-text { padding-bottom: 2.6rem; }

  /* Home: notice board and boxes */
  .board-head { padding: 1rem; }
  .board-head h2 { font-size: 1.05rem; }
  .notice-item a { padding: .9rem 1rem; gap: .8rem; }
  .notice-date { width: 50px; }
  .notice-arrow { display: none; }
  .access-card { min-height: 0; padding: 1.4rem; }

  /* Notes / PYQs pages */
  .page-hero { padding: 1.4rem 0 1.6rem; }
  .page-hero h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .crumbs { font-size: .8rem; }
  .grid { grid-template-columns: 1fr; gap: .8rem; }
  .bcard { padding: 1.1rem; }
  .fcard { padding: 1rem; }
  .f-ic { width: 40px; height: 40px; }
  .modal { padding: .5rem; }
  .modal-head { padding: .6rem .6rem .6rem 1rem; }
  .modal-head h2 { font-size: .92rem; }
  #previewModal .modal-box { width: 100%; height: 92dvh; border-radius: var(--radius); }

  /* Notices page: filter chips scroll sideways */
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; width: 100%; }
  .chips::-webkit-scrollbar { display: none; }
  .fchip { flex: none; min-height: 40px; }
  .result-count { margin-left: 0; }

  /* Login / signup */
  .auth-wrap { padding: 1.5rem .75rem 2.5rem; }
  .auth-card { padding: 1.4rem; }

  /* Info pages */
  .faq summary { padding: 1rem 2.6rem 1rem 1rem; }
  .cform { padding: 1.2rem; }

  /* Footer */
  .footer-top { padding: 2.4rem 0 1.6rem; }

  /* Admin panel */
  .panel-card { padding: 1.1rem; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .6rem; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions .btn { flex: 1; }
  .thumb { width: 72px; height: 32px; }

  .toast-wrap { bottom: 1rem; }
}