:root {
  --sgc-mobile-gutter: 14px;
  --sgc-mobile-control-height: 44px;
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
body,
.site-main,
main,
.admin-app,
.admin-main-column,
.admin-content,
.container,
.footer-main,
.page-hero,
.page-hero-inner,
.admin-card,
.admin-form-card,
.admin-table-card,
.admin-form-body,
.admin-card-body {
  min-width: 0;
  max-width: 100%;
}
img,
video,
canvas,
iframe,
svg {
  max-width: 100%;
}
img,
video {
  height: auto;
}
main,
section,
article,
form,
fieldset,
figure,
pre,
code {
  min-width: 0;
}
pre,
code,
td,
th,
p,
li,
label,
small,
strong,
h1,
h2,
h3,
h4,
.page-title,
.breadcrumb,
.admin-breadcrumb,
.profile-v3-email,
.profile-v3-bio,
.career-long-text,
.membership-account-number {
  overflow-wrap: anywhere;
  word-break: normal;
}
input,
select,
textarea,
button,
.btn,
.admin-btn,
.admin-action {
  max-width: 100%;
  min-width: 0;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  box-sizing: border-box;
}
textarea { resize: vertical; }
button,
a,
input,
select,
textarea { touch-action: manipulation; }
.table-wrap,
.table-responsive,
.notice-board-table-wrap,
.admin-table-wrap,
.alumni-table-wrap,
.directory-table-wrap,
.listing-table-wrap,
.data-table-wrap,
.event-registration-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.admin-table-wrap table,
.table-wrap table,
.table-responsive table,
.notice-board-table-wrap table,
.alumni-table-wrap table,
.directory-table-wrap table,
.listing-table-wrap table,
.data-table-wrap table,
.event-registration-table-wrap table {
  max-width: none;
}
.quick-links,
.content-grid,
.feature-grid,
.stats,
.home-metric-grid,
.home-discover-grid,
.home-updates-grid,
.campus-gallery-grid,
.events-feature-grid,
.news-card-grid,
.alumni-short-grid,
.alumni-directory-cards,
.profile-info-grid,
.profile-v3-grid,
.profile-v3-data-grid,
.developer-details-grid,
.developer-v2-content-grid,
.admin-stats-grid,
.admin-kpi-grid,
.admin-dashboard-grid,
.admin-dashboard-main-grid,
.notification-control-grid,
.admin-form-grid,
.campus-admin-photo-grid,
.registration-builder-fields,
.registration-builder-field-grid,
.registration-file-list,
.about-top-grid,
.about-mission-vision-grid,
.about-feature-grid,
.membership-overview-grid,
.membership-benefits-grid,
.membership-payment-grid,
.membership-form-grid,
.membership-review-grid,
.career-detail-layout,
.career-form-grid,
.career-card-grid,
.committee-general-grid {
  min-width: 0;
}
@media (max-width: 1024px) {
  .container { width: calc(100% - 32px); }
  .about-top-grid { grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr); }
  .about-mission-vision-grid,
  .about-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-feature-grid,
  .news-card-grid,
  .career-card-grid,
  .alumni-short-grid,
  .alumni-directory-cards,
  .campus-gallery-grid,
  .committee-general-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-content { min-width: 0; }
  .admin-page-heading,
  .admin-card-header-new,
  .admin-table-toolbar,
  .event-registration-config-head,
  .event-registration-export-bar { min-width: 0; }
}
@media (max-width: 760px) {
  .container,
  .footer-main {
    width: calc(100% - 28px);
    max-width: 100%;
  }
  .page-hero,
  .career-listing-hero,
  .events-listing-hero,
  .news-listing-hero,
  .gallery-listing-hero,
  .directory-page-hero,
  .membership-page-hero {
    max-width: 100%;
  }
  .page-hero-inner,
  .career-detail-hero-inner,
  .events-page-hero-inner,
  .membership-page-hero-inner {
    width: 100%;
    min-width: 0;
    padding-top: 28px;
    padding-bottom: 30px;
  }
  .about-top-grid,
  .about-mission-vision-grid,
  .about-feature-grid,
  .profile-overview-layout,
  .profile-v3-grid,
  .profile-edit-v3-grid,
  .developer-details-grid,
  .developer-v2-content-grid,
  .event-detail-card,
  .career-detail-layout,
  .career-form-grid,
  .membership-overview-grid,
  .membership-benefits-grid,
  .membership-payment-grid,
  .membership-form-grid,
  .membership-review-grid,
  .notification-control-grid,
  .campus-edit-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .about-top-grid > *,
  .about-mission-vision-grid > *,
  .about-feature-grid > *,
  .profile-overview-layout > *,
  .profile-v3-grid > *,
  .profile-edit-v3-grid > *,
  .career-detail-layout > *,
  .membership-form-grid > *,
  .membership-review-grid > * { min-width: 0; max-width: 100%; }

  .page-hero h1,
  .page-hero h2,
  .career-listing-hero h1,
  .events-listing-hero h1,
  .news-listing-hero h1,
  .gallery-listing-hero h1,
  .directory-page-hero h1,
  .membership-page-hero h1 {
    font-size: clamp(25px, 7vw, 34px);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .page-hero p,
  .career-listing-hero p,
  .events-listing-hero p,
  .news-listing-hero p,
  .gallery-listing-hero p,
  .directory-page-hero p,
  .membership-page-hero p { max-width: 100%; }

  .events-feature-grid,
  .news-card-grid,
  .career-card-grid,
  .alumni-short-grid,
  .alumni-directory-cards,
  .campus-gallery-grid,
  .committee-general-grid,
  .content-grid,
  .feature-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .events-feature-grid > *,
  .news-card-grid > *,
  .career-card-grid > *,
  .alumni-short-grid > *,
  .alumni-directory-cards > *,
  .campus-gallery-grid > *,
  .committee-general-grid > * { min-width: 0; max-width: 100%; }

  .admin-app,
  .admin-main-column,
  .admin-content,
  .admin-topbar,
  .admin-topbar-left,
  .admin-topbar-right,
  .admin-page-heading,
  .admin-heading-actions,
  .admin-form-grid,
  .admin-filters,
  .admin-card-header,
  .admin-card-body,
  .admin-table-toolbar,
  .admin-form-actions,
  .admin-command-actions,
  .admin-inline-form { min-width: 0; max-width: 100%; }
  .admin-content { overflow-x: clip; }
  .admin-heading-actions,
  .admin-form-actions,
  .admin-command-actions,
  .event-registration-export-actions,
  .profile-edit-v3-submit-row > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-heading-actions > *,
  .admin-form-actions > *,
  .admin-command-actions > *,
  .event-registration-export-actions > * { min-width: 0; max-width: 100%; }

  .admin-form-grid,
  .admin-managed-list .admin-filters,
  .registration-builder-fields,
  .registration-builder-field-grid,
  .smtp-diagnostic-grid,
  .smtp-detail-list,
  .campus-upload-layout,
  .campus-edit-form-grid,
  .campus-admin-photo-grid,
  .event-poster-editor { grid-template-columns: minmax(0, 1fr) !important; }
  .admin-search,
  .registration-search,
  .site-search-field { width: 100%; min-width: 0; max-width: 100%; }
  .admin-search input,
  .registration-search input,
  .site-search-field input { min-width: 0; width: 100%; }
  .admin-table-wrap { overflow-x: auto !important; }
  .admin-table { min-width: 680px; }

  .form-row,
  .form-two,
  .auth-field-pair,
  .auth-form-grid,
  .php-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .auth-screen .auth-split-page { width: 100%; max-width: 100%; min-width: 0; }
  .auth-screen .auth-form-panel,
  .auth-screen .auth-form-content { width: 100%; max-width: 100%; min-width: 0; }
  .auth-screen .auth-visual-panel { width: 100%; max-width: 100%; min-width: 0; }
  .form-row > *, .form-two > *, .auth-field-pair > *, .auth-form-grid > * { width: 100%; min-width: 0; }

  .profile-edit-v3-photo-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-edit-v3-control-grid,
  .profile-edit-v3-field-grid,
  .profile-v3-data-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-edit-v3-field-wide,
  .profile-edit-v3-about-card { grid-column: auto; }
  .profile-edit-v3-photo-controls,
  .profile-edit-v3-photo-card,
  .profile-edit-v3-privacy-card { min-width: 0; max-width: 100%; }

  .event-feature-footer,
  .event-detail-actions,
  .career-form-actions,
  .career-my-post-actions,
  .membership-hero-actions,
  .membership-apply-banner,
  .home-membership-actions,
  .home-join-banner,
  .notification-item-actions { flex-wrap: wrap; min-width: 0; }
  .event-feature-footer > *,
  .event-detail-actions > *,
  .career-form-actions > *,
  .career-my-post-actions > *,
  .membership-hero-actions > *,
  .home-membership-actions > * { min-width: 0; max-width: 100%; }

  .campus-lightbox-dialog { width: 100%; max-width: 100vw; }
  .modal-dialog,
  .modal-content,
  .dialog,
  .popup-dialog,
  .app-modal-card { width: calc(100vw - 24px); max-width: calc(100vw - 24px); min-width: 0; }
  .app-toast { width: calc(100% - 20px); max-width: 100%; }
}

@media (max-width: 560px) {
  :root { --sgc-mobile-gutter: 12px; }
  .container,
  .footer-main { width: calc(100% - 24px); }
  .admin-content { padding-inline: 10px; }
  .admin-topbar { flex-wrap: wrap; gap: 8px; }
  .admin-topbar-left { flex: 1 1 100%; }
  .admin-topbar-right { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .admin-breadcrumb { max-width: calc(100vw - 95px); }
  .admin-page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .admin-heading-actions { width: 100%; }
  .admin-heading-actions > * { flex: 1 1 130px; }

  .about-feature-grid,
  .about-mission-vision-grid,
  .events-feature-grid,
  .news-card-grid,
  .career-card-grid,
  .alumni-short-grid,
  .alumni-directory-cards,
  .campus-gallery-grid,
  .committee-general-grid,
  .content-grid,
  .feature-grid,
  .home-discover-grid,
  .home-metric-grid,
  .quick-links,
  .stats,
  .profile-info-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .home-campus-feature { grid-template-columns: minmax(0, 1fr) !important; }
  .home-campus-photo { grid-column: auto; width: 100%; }
  .home-campus-decoration { display: none; }

  .about-intro-card,
  .about-logo-card,
  .about-mission-card,
  .about-vision-card,
  .about-value-card,
  .career-card-body,
  .alumni-short-card,
  .campus-gallery-card-copy,
  .profile-v3-card { min-width: 0; max-width: 100%; }
  .career-card-meta,
  .career-card-footer,
  .alumni-card-v2-badges { flex-wrap: wrap; }

  .btn,
  .admin-btn,
  .profile-v3-btn,
  .profile-edit-v3-submit-row .profile-v3-btn { min-height: 42px; white-space: normal; }
  .hero-actions,
  .footer-bottom,
  .footer-policy-links,
  .profile-v3-actions,
  .profile-edit-v3-header .profile-v3-actions { flex-wrap: wrap; }
  .hero-actions > *,
  .profile-v3-actions > * { min-width: 0; max-width: 100%; }
  .event-feature-meta,
  .event-feature-details,
  .career-card-meta,
  .membership-section-heading,
  .events-results-heading { min-width: 0; flex-wrap: wrap; }
  .career-detail-sidebar,
  .career-detail-main,
  .membership-main-content,
  .membership-application-wrap,
  .membership-wizard-card { width: 100%; max-width: 100%; min-width: 0; }
  .membership-terms,
  .membership-confirm-line { overflow-wrap: anywhere; }
  .membership-wizard-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .membership-wizard-step { min-width: 0; white-space: normal; }
  .membership-wizard-step strong { font-size: 10px; }
  .campus-lightbox-stage { min-width: 0; }
}

@media (max-width: 390px) {
  .container,
  .footer-main { width: calc(100% - 20px); }
  .admin-content { padding-inline: 8px; }
  .admin-topbar-right { gap: 5px; }
  .admin-top-icon { flex: 0 0 34px; width: 34px; height: 34px; }
  .admin-stats-grid,
  .admin-kpi-grid,
  .admin-heading-actions { grid-template-columns: minmax(0, 1fr) !important; }
  .home-join-banner > .btn,
  .home-membership-actions .btn,
  .event-detail-actions .btn,
  .career-form-actions .btn { width: 100%; }
  .auth-screen .auth-form-content { padding-inline: 10px; }
  .auth-screen .auth-form-panel { padding-inline: 12px; }
  .profile-edit-v3-heading h1,
  .profile-overview-heading h1 { font-size: 23px; }
}
@media (hover: none) {
  .admin-nav-link:hover,
  .admin-top-icon:hover,
  .admin-btn:hover,
  .admin-action:hover,
  .quick-card:hover,
  .event-feature-card:hover,
  .event-listing-card:hover,
  .alumni-short-card:hover,
  .campus-gallery-card:hover,
  .listing-card:hover,
  .btn:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
