:root {
  --bg: #030303;
  --panel: rgba(24, 24, 27, 0.94);
  --panel-soft: rgba(34, 34, 38, 0.88);
  --ink: #f7f7f7;
  --muted: #a7a7aa;
  --line: rgba(255, 255, 255, 0.08);
  --teal: #f7f7f7;
  --teal-2: #d8d8dc;
  --coral: #c8c8cc;
  --coral-soft: rgba(255, 255, 255, 0.07);
  --amber: #f7f7f7;
  --glass: linear-gradient(145deg, rgba(31, 31, 35, 0.94), rgba(18, 18, 20, 0.9));
  --glass-strong: linear-gradient(145deg, rgba(28, 28, 32, 0.98), rgba(15, 15, 17, 0.96));
  --glass-dark: linear-gradient(145deg, rgba(14, 14, 16, 0.98), rgba(28, 28, 31, 0.94));
  --glass-border: rgba(0, 0, 0, 0.42);
  --glass-inset: 0 0 0 0 transparent;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 8px 20px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.26);
  --page-bg:
    linear-gradient(145deg, #080809 0%, #030303 44%, #000000 100%),
    var(--bg);
  --control-bg: linear-gradient(145deg, rgba(35, 35, 39, 0.94), rgba(18, 18, 20, 0.9));
  --active-glass: linear-gradient(145deg, rgba(44, 44, 49, 0.92), rgba(24, 24, 27, 0.94));
  --active-strong: linear-gradient(145deg, #ffffff, #dcdce0);
  --hero-bg:
    linear-gradient(145deg, #050505 0%, #111113 46%, #000000 100%);
  --copy: #d2d2d5;
  --chip-text: #e2e2e4;
  --metric-bg: linear-gradient(145deg, rgba(36, 36, 40, 0.92), rgba(20, 20, 22, 0.86));
  --notice-bg: linear-gradient(145deg, rgba(38, 38, 42, 0.94), rgba(20, 20, 22, 0.88));
  --notice-color: #ededed;
  --error-bg: linear-gradient(145deg, rgba(42, 42, 46, 0.94), rgba(20, 20, 22, 0.86));
  --error-color: #f2f2f2;
  --ok-bg: linear-gradient(145deg, rgba(42, 42, 46, 0.94), rgba(20, 20, 22, 0.86));
  --ok-color: #f1f1f1;
  --primary-bg: linear-gradient(145deg, #ffffff, #dfdfe2);
  --primary-color: #050505;
  --primary-border: transparent;
  --danger-bg: linear-gradient(145deg, #38383c, #141416);
  --danger-color: #ffffff;
  --focus-ring: rgba(255, 255, 255, 0.2);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f3f4;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-soft: rgba(247, 247, 247, 0.9);
  --ink: #09090a;
  --muted: #7a7a7e;
  --line: rgba(0, 0, 0, 0.08);
  --teal: #09090a;
  --teal-2: #2a2a2c;
  --coral: #3b3b3d;
  --coral-soft: rgba(0, 0, 0, 0.06);
  --amber: #09090a;
  --glass: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(247, 247, 247, 0.72));
  --glass-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 245, 0.82));
  --glass-dark: linear-gradient(145deg, #050505, #202020);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-inset: 0 0 0 0 transparent;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.08);
  --page-bg:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.85), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.68), transparent 24%),
    linear-gradient(145deg, #ececec 0%, #f7f8f8 48%, #e7e8e8 100%);
  --control-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 244, 244, 0.82));
  --active-glass: linear-gradient(145deg, rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.9));
  --active-strong: linear-gradient(145deg, #050505, #202020);
  --hero-bg:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.74), transparent 34%),
    linear-gradient(145deg, #050505 0%, #1f211f 54%, #050505 100%);
  --copy: #3f3f42;
  --chip-text: #303033;
  --metric-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 244, 244, 0.72));
  --notice-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(244, 244, 244, 0.72));
  --notice-color: #2b2b2d;
  --error-bg: linear-gradient(145deg, rgba(245, 245, 245, 0.98), rgba(255, 255, 255, 0.78));
  --error-color: #121214;
  --ok-bg: linear-gradient(145deg, rgba(245, 245, 245, 0.98), rgba(255, 255, 255, 0.78));
  --ok-color: #121214;
  --primary-bg: linear-gradient(145deg, #050505, #202020);
  --primary-color: #ffffff;
  --primary-border: rgba(0, 0, 0, 0.12);
  --danger-bg: linear-gradient(145deg, #111111, #2b2b2d);
  --danger-color: #ffffff;
  --focus-ring: rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page-bg);
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

select option,
select optgroup {
  background: #232327;
  color: #f7f7f7;
}

:root[data-theme="light"] select option,
:root[data-theme="light"] select optgroup {
  background: #ffffff;
  color: #09090a;
}

button {
  border: 0;
}

code,
pre {
  font-family: "Cascadia Code", Consolas, monospace;
}

.app-shell {
  min-height: 100vh;
}

.copyright {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 0 22px 24px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}

.copyright a {
  color: var(--ink);
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-strong);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18), var(--glass-inset);
  backdrop-filter: blur(24px) saturate(1.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: visible;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: white;
  box-shadow: none;
  font-weight: 900;
}

.brand-mark img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:root[data-theme="dark"] .brand-mark .logo-dark,
:root[data-theme="light"] .brand-mark .logo-light {
  display: block;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.brand-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  backdrop-filter: blur(16px) saturate(1.25);
}

.auth-card .theme-toggle {
  justify-self: end;
  margin-left: 0;
}

:root[data-theme="dark"] .theme-toggle {
  background: linear-gradient(145deg, #ffffff, #dcdce0);
  color: #050505;
}

:root[data-theme="light"] .theme-toggle {
  background: linear-gradient(145deg, #050505, #202020);
  color: #ffffff;
}

.search {
  position: relative;
  min-width: 0;
}

.search .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  outline: none;
  background: var(--glass);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(18px) saturate(1.3);
  color: var(--ink);
}

.search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--line);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--glass-inset);
}

.nav-tabs {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tab-button,
.primary-button,
.ghost-button,
.danger-button,
.chip,
.faculty-pill,
.city-button,
.university-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.tab-button {
  position: relative;
  padding: 0 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.nav-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.tab-button.active {
  border-color: var(--primary-border);
  background: var(--active-strong);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  color: var(--primary-color);
}

.primary-button,
.ghost-button,
.danger-button {
  min-width: max-content;
  padding: 0 13px;
  font-weight: 750;
}

.primary-button {
  border: 1px solid var(--primary-border);
  background: var(--primary-bg);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  color: var(--primary-color);
}

.ghost-button {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(16px) saturate(1.25);
  color: var(--ink);
}

.danger-button {
  border: 1px solid var(--primary-border);
  background: var(--danger-bg);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  color: var(--danger-color);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.chip:hover,
.faculty-pill:hover,
.city-button:hover,
.university-card:hover,
.student-card:hover,
.post-card:hover,
.moderation-card:hover {
  transform: translateY(-1px);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar,
.search input,
.ghost-button,
.faculty-pill,
.chip,
.city-button,
.university-card,
.stat-box,
.filter-panel,
.profile-card,
.composer,
.profile-form,
.post-card,
.moderation-card,
.empty-state,
.field input,
.field select,
.field textarea,
.composer-actions select,
.student-card,
.file-control,
.auth-card,
.auth-points span,
.auth-tabs button,
.remember-row,
.terms-row,
.link-button,
.moderation-toolbar,
.mobile-explore-controls,
.rollup-panel,
.faculty-section {
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.system-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px auto 0;
  width: min(1500px, calc(100% - 44px));
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--notice-bg);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.25);
  color: var(--notice-color);
}

.system-banner a {
  margin-left: auto;
  color: #d7e9ff;
  font-weight: 800;
  text-decoration: none;
}

.system-banner button {
  margin-left: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--primary-bg);
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 900;
}

.app-grid {
  display: grid;
  grid-template-columns: 250px minmax(520px, 1fr) 380px;
  gap: 18px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 20px 22px 34px;
}

.city-panel,
.main-panel,
.people-panel,
.feed-main,
.feed-side,
.profile-form,
.profile-grid > aside {
  min-width: 0;
}

.city-panel,
.people-panel,
.feed-side,
.profile-grid > aside {
  align-self: start;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-head.compact {
  margin-top: 4px;
}

.section-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.section-head strong {
  color: var(--muted);
  font-size: 0.92rem;
}

.city-list {
  display: grid;
  gap: 9px;
  max-height: calc(100vh - 145px);
  overflow: auto;
  padding-right: 2px;
}

.city-button {
  width: 100%;
  justify-content: space-between;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--glass-inset), 0 8px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(1.22);
  color: var(--ink);
  text-align: left;
}

.city-button.active {
  border-color: var(--line);
  background: var(--active-glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
}

.city-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.city-main strong,
.city-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-main small {
  color: var(--muted);
}

.city-count {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  color: var(--muted);
  font-size: 0.8rem;
}

.city-count::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--line);
}

.main-panel {
  display: grid;
  gap: 16px;
}

.explore-stack {
  display: grid;
  gap: 14px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 22px 34px;
}

.rollup-panel {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(1.24);
}

.rollup-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.rollup-panel summary::-webkit-details-marker {
  display: none;
}

.rollup-panel summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
}

.rollup-panel summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rollup-panel summary::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.rollup-panel[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.rollup-body {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.explore-city-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  max-height: 340px;
}

.explore-university-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.student-rollup .filter-panel {
  box-shadow: none;
}

.student-browser {
  display: block;
}

.student-browser .student-list {
  max-height: 560px;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px) saturate(1.15);
}

.profile-modal {
  position: relative;
  width: min(680px, 100%);
}

.profile-modal .profile-card {
  width: 100%;
}

.profile-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.account-delete-dialog {
  display: grid;
  gap: 16px;
  max-width: 520px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.account-delete-dialog .profile-actions {
  justify-content: flex-end;
}

.account-confirm-row {
  margin-top: 6px;
}

.mobile-explore-controls {
  display: none;
}

.city-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.2);
}

.city-overview span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.city-overview h1 {
  margin: 4px 0 2px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.city-overview p,
.city-overview strong {
  margin: 0;
  color: var(--copy);
}

.city-overview strong {
  flex: 0 0 auto;
  font-size: 0.95rem;
}

.city-hero {
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--hero-bg);
  background-position: center;
  background-size: cover;
  color: white;
  box-shadow: var(--glass-inset), var(--shadow);
}

.hero-overlay {
  display: grid;
  min-height: 240px;
  align-content: space-between;
  padding: 20px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--metric-bg);
  box-shadow: none;
  backdrop-filter: blur(12px) saturate(1.25);
  font-size: 0.86rem;
}

.hero-overlay h1 {
  margin: 0 0 8px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-box,
.filter-panel,
.profile-card,
.composer,
.profile-form,
.post-card,
.moderation-card,
.empty-state {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(20px) saturate(1.28);
}

.stat-box {
  min-height: 80px;
  padding: 14px;
}

.stat-box strong,
.stat-box span {
  display: block;
}

.stat-box strong {
  font-size: 1.55rem;
  line-height: 1;
}

.stat-box span {
  margin-top: 8px;
  color: var(--muted);
}

.university-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.university-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  justify-content: stretch;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--glass-inset), 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px) saturate(1.25);
  color: var(--ink);
  text-align: left;
}

.university-card.active {
  border-color: var(--line);
  background: var(--active-glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
}

.school-logo {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 0;
  background: var(--glass-dark);
  box-shadow: var(--glass-inset), 0 8px 18px rgba(0, 0, 0, 0.14);
  color: white;
  font-weight: 900;
}

.school-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.school-logo.logo-fallback {
  background: var(--glass-dark);
  color: #ffffff;
}

.faculty-logo {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 0;
  background: var(--glass-dark);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 900;
}

.faculty-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.school-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.school-copy strong,
.school-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-copy small,
.school-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.school-meta {
  align-self: end;
  min-width: max-content;
}

.faculty-section {
  display: grid;
  gap: 6px;
}

.faculty-strip,
.chip-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faculty-pill,
.chip {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(14px) saturate(1.22);
  color: var(--ink);
}

.faculty-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faculty-pill.active,
.chip.active {
  border-color: var(--primary-border);
  background: var(--active-strong);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  color: var(--primary-color);
}

.people-panel {
  display: grid;
  gap: 14px;
}

.filter-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.filter-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.filter-head strong {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-head span {
  color: var(--muted);
  font-size: 0.86rem;
}

.filter-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.hidden-field {
  display: none !important;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.field span {
  position: relative;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  text-transform: none;
}

.help-tip {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-dark);
  color: #fff;
  box-shadow: var(--glass-inset);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: none;
  cursor: help;
}

.help-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: min(270px, 72vw);
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--glass-dark);
  color: #fff;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(0.98);
  transition: opacity 0.12s ease, transform 0.12s ease;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.help-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-dark);
}

.help-wrap:hover .help-bubble,
.help-wrap:focus-within .help-bubble {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.field input,
.field select,
.field textarea,
.composer-actions select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  outline: none;
  background: var(--control-bg);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink);
}

.field textarea {
  min-height: 104px;
  padding: 10px;
  resize: vertical;
}

.register-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.register-form .field {
  gap: 4px;
}

.register-form .field input,
.register-form .field select {
  min-height: 36px;
}

.register-form .field textarea {
  min-height: 64px;
  resize: none;
}

.wide {
  grid-column: 1 / -1;
}

.student-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.student-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 86px;
  padding: 11px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset), 0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px) saturate(1.26);
  cursor: pointer;
}

.student-card.active {
  border-color: var(--line);
  background: var(--active-glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
}

.student-copy {
  min-width: 0;
}

.student-copy strong,
.student-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #3a3a3d;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
  color: white;
  font-weight: 900;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.large {
  width: 82px;
  height: 82px;
  font-size: 1.45rem;
}

.avatar.small {
  width: 36px;
  height: 36px;
  font-size: 0.78rem;
}

.avatar-button {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
}

.avatar-button .avatar {
  pointer-events: none;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: linear-gradient(145deg, rgba(23, 26, 31, 0.68), rgba(23, 26, 31, 0.42));
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 140ms ease;
}

.avatar-overlay .icon {
  width: 23px;
  height: 23px;
}

.avatar-button:hover .avatar-overlay,
.avatar-button:focus-visible .avatar-overlay {
  opacity: 1;
}

.avatar-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.quick-avatar-input {
  display: none;
}

.avatar-upload {
  position: relative;
  cursor: pointer;
}

.avatar-upload input[type="file"] {
  position: absolute;
  inset: 22px 0 0;
  width: 100%;
  height: 40px;
  opacity: 0;
  cursor: pointer;
}

.file-control {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--control-bg);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
  text-transform: none;
}

.field .file-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--glass-dark);
  box-shadow: none;
  color: white;
  font-size: 0.84rem;
  font-weight: 850;
  text-transform: none;
}

.field .file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.profile-card {
  display: grid;
  gap: 14px;
  padding: 15px;
  box-shadow: var(--shadow);
}

.profile-card.sticky {
  position: sticky;
  top: 88px;
}

.profile-head,
.author {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.profile-head h3,
.profile-head p {
  margin: 0;
}

.profile-head p {
  margin-top: 4px;
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.metric-row span {
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--metric-bg);
  box-shadow: var(--glass-inset);
}

.metric-row strong,
.metric-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-row small {
  margin-top: 3px;
  color: var(--muted);
}

.bio {
  margin: 0;
  color: var(--copy);
  line-height: 1.5;
}

.profile-logout {
  width: 100%;
}

.friends-card {
  position: relative;
}

.friends-list,
.request-list {
  display: grid;
  gap: 8px;
}

.request-list + .request-list {
  padding-top: 4px;
  border-top: 1px solid var(--glass-border);
}

.request-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.request-card {
  display: grid;
  gap: 8px;
}

.request-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.request-actions .primary-button,
.request-actions .ghost-button {
  width: 100%;
  min-width: 0;
}

.friend-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 9px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--metric-bg);
  box-shadow: var(--glass-inset);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.friend-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.friend-card strong,
.friend-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card small {
  color: var(--muted);
}

.instagram-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--metric-bg);
  color: var(--ink);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(12px) saturate(1.18);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.instagram-link:hover {
  background: var(--active-glass);
}

.instagram-locked {
  opacity: 0.72;
  filter: blur(0.2px);
  pointer-events: none;
  user-select: none;
}

.tag-row em,
.post-card header > em,
.post-tools > em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--panel-soft);
  box-shadow: none;
  color: var(--chip-text);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.tag-row.strong em,
.post-card header > em,
.post-tools > em {
  background: var(--coral-soft);
  color: var(--chip-text);
}

.empty-state {
  display: grid;
  min-height: 126px;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state.slim {
  min-height: 82px;
}

.feed-grid,
.profile-grid,
.moderation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 20px 22px 34px;
}

.profile-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.feed-main {
  display: grid;
  gap: 14px;
}

.feed-side {
  display: grid;
  gap: 14px;
}

.composer,
.profile-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.composer-actions select {
  width: auto;
  min-width: 150px;
}

.register-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.register-choice-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  color: var(--ink);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  cursor: pointer;
}

.register-choice-card .icon {
  width: 28px;
  height: 28px;
}

.register-choice-card strong {
  font-size: 1.1rem;
}

.register-choice-card span {
  color: var(--muted);
  line-height: 1.45;
}

.register-form-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.post-list {
  display: grid;
  gap: 12px;
}

.post-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.post-card header,
.post-card footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.post-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-danger {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger-color);
  cursor: pointer;
}

.icon-danger .icon {
  width: 15px;
  height: 15px;
}

.author span {
  display: grid;
  gap: 2px;
}

.author small {
  color: var(--muted);
}

.post-card h3,
.profile-card h3 {
  margin: 0;
}

.post-card p {
  margin: 0;
  color: var(--copy);
  line-height: 1.5;
}

.post-card footer {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 0.86rem;
}

.post-like {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.post-like .icon {
  width: 16px;
  height: 16px;
}

.post-like.active {
  background: var(--active-strong);
  color: var(--primary-color);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.detail-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-list strong {
  color: var(--ink);
  text-align: right;
}

.moderation-list {
  display: grid;
  gap: 12px;
}

.moderation-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 160px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(1.25);
}

.moderation-toolbar select {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset);
}

.moderation-search input {
  background: var(--control-bg);
}

.moderation-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.moderation-user {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.moderation-user h3,
.moderation-user p {
  margin: 0;
}

.moderation-user p,
.moderation-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.moderation-badges,
.moderation-meta,
.moderation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.moderation-badges {
  margin-top: 7px;
}

.status-badge,
.role-badge,
.score-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--panel-soft);
  box-shadow: none;
  color: var(--chip-text);
  font-size: 0.74rem;
  font-weight: 850;
}

.status-badge.review,
.score-badge {
  background: var(--ok-bg);
  color: var(--ok-color);
}

.status-badge.suspended {
  background: var(--error-bg);
  color: var(--error-color);
}

.status-badge.active {
  background: var(--ok-bg);
  color: var(--ok-color);
}

.role-badge.admin {
  background: var(--glass-dark);
  color: white;
}

.role-badge.moderator {
  background: var(--ok-bg);
  color: var(--ok-color);
}

.role-badge.guest {
  background: rgba(244, 214, 130, 0.16);
  color: var(--ink);
}

.moderation-note textarea {
  min-height: 72px;
}

.moderation-actions {
  justify-content: flex-start;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.report-item strong,
.report-item span,
.report-item p {
  margin: 0;
}

.report-item span,
.report-item p {
  color: var(--muted);
  font-size: 0.86rem;
}

.legal-page {
  min-height: 100vh;
  padding: 22px;
}

.legal-shell {
  display: grid;
  gap: 14px;
  width: min(980px, 100%);
  margin: 0 auto;
}

.legal-top,
.legal-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset), var(--shadow-soft);
  backdrop-filter: blur(20px) saturate(1.24);
}

.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.legal-top .brand-home {
  pointer-events: none;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--primary-bg);
  color: var(--primary-color);
  font-weight: 900;
  text-decoration: none;
}

.legal-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.legal-card h1,
.legal-card h2,
.legal-card p {
  margin: 0;
}

.legal-card h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
}

.legal-card h2 {
  margin-top: 8px;
  font-size: 1.15rem;
}

.legal-card p,
.legal-card li {
  color: var(--copy);
  line-height: 1.6;
}

.legal-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.legal-note {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 750;
}

.legal-card a {
  color: var(--ink);
  font-weight: 900;
}

.fatal {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 100vh;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.auth-shell .copyright {
  grid-column: 1 / -1;
  padding: 0;
}

.auth-shell.register-shell {
  grid-template-columns: minmax(680px, 1040px);
  justify-content: center;
  width: min(1120px, 100%);
  padding: 16px 20px;
}

.register-shell .auth-brand {
  display: none;
}

.auth-brand {
  display: grid;
  gap: 18px;
  align-content: center;
}

.auth-brand .brand-mark {
  width: 48px;
  height: 48px;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.95;
}

.auth-brand p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  backdrop-filter: blur(16px) saturate(1.22);
  color: var(--chip-text);
  font-weight: 750;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--glass-inset), var(--shadow);
  backdrop-filter: blur(24px) saturate(1.32);
}

.register-shell .auth-card {
  gap: 10px;
  padding: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-tabs button,
.link-button {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.auth-tabs button.active {
  border-color: var(--line);
  background: var(--glass-dark);
  color: white;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset), 0 10px 24px rgba(0, 0, 0, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.remember-row input {
  appearance: none;
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  box-shadow: var(--glass-inset);
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.remember-row input::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.remember-row input:checked {
  border-color: var(--primary-border);
  background: var(--active-strong);
}

.remember-row input:checked::after {
  transform: translateX(20px);
  background: var(--primary-color);
}

.terms-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-inset);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.terms-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.terms-row a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.register-form {
  gap: 9px;
}

.auth-warning,
.form-alert {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 11px;
  border-radius: var(--radius);
  line-height: 1.42;
}

.auth-warning {
  border: 1px solid var(--glass-border);
  background: var(--notice-bg);
  color: var(--notice-color);
}

.form-alert.error {
  background: var(--error-bg);
  color: var(--error-color);
}

.form-alert.ok {
  background: var(--ok-bg);
  color: var(--ok-color);
}

.form-alert a {
  color: inherit;
  font-weight: 900;
}

.auth-interest-row {
  padding-top: 2px;
}

.register-form .auth-interest-row {
  max-height: 86px;
  overflow: auto;
  padding-right: 2px;
}

.register-form .chip {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #96351f;
}

.fatal-card {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.fatal-card h1 {
  margin: 14px 0 8px;
}

.fatal-card p {
  color: var(--muted);
  line-height: 1.5;
}

.fatal-card pre {
  overflow: auto;
  padding: 12px;
  border-radius: var(--radius);
  background: #f1f3f0;
  color: #5f2a18;
}

.loading-card {
  text-align: center;
}

.loading-card .brand-mark {
  margin: 0 auto;
}

@media (max-width: 1240px) {
  .app-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .people-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
  }

  .people-panel > .section-head {
    grid-column: 1 / -1;
  }

  .student-list {
    max-height: 360px;
  }
}

@media (max-width: 920px) {
  .app-shell {
    padding-bottom: 92px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 13px 16px;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-tabs {
    position: fixed !important;
    top: auto !important;
    right: 12px !important;
    bottom: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    left: 12px !important;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
    justify-content: stretch;
    padding: 8px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-strong);
    box-shadow: var(--glass-inset), var(--shadow);
    backdrop-filter: blur(24px) saturate(1.35);
  }

  .tab-button {
    flex: 1;
  }

  .nav-tabs .tab-button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 8px;
  }

  .nav-tabs .tab-button span {
    display: none;
  }

  .nav-tabs .nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
  }

  .toast {
    bottom: 92px;
  }

  .app-grid,
  .feed-grid,
  .profile-grid,
  .moderation-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .city-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }

  .people-panel {
    grid-template-columns: 1fr;
  }

  .university-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .profile-card.sticky {
    position: static;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 18px;
  }

  .auth-shell.register-shell {
    grid-template-columns: 1fr;
    width: min(760px, 100%);
    padding: 18px;
  }

  .register-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-brand {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-bottom: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 42px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 0.98rem;
  }

  .topbar .theme-toggle {
    min-width: 42px;
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .topbar .theme-toggle span {
    display: none;
  }

  .app-grid {
    gap: 14px;
  }

  .city-panel,
  .school-section-head,
  .university-grid,
  .stats-row {
    display: none;
  }

  .mobile-explore-controls {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: var(--glass-inset), var(--shadow-soft);
    backdrop-filter: blur(20px) saturate(1.25);
  }

  .city-overview {
    display: grid;
    gap: 8px;
    padding: 14px 15px;
  }

  .city-overview h1 {
    margin-top: 3px;
    font-size: 2rem;
  }

  .city-overview strong {
    font-size: 0.86rem;
  }

  .mobile-place-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

.mobile-place-summary span {
    min-width: 0;
    padding: 8px 7px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    background: var(--panel-soft);
    box-shadow: none;
    color: var(--chip-text);
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
  }

  .main-panel {
    gap: 12px;
  }

  .city-hero,
  .hero-overlay {
    min-height: 150px;
  }

  .hero-overlay {
    padding: 15px;
  }

  .hero-overlay h1 {
    font-size: 2.25rem;
  }

  .hero-overlay p {
    font-size: 0.92rem;
  }

  .hero-pill {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .faculty-section {
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: var(--glass-inset);
    backdrop-filter: blur(18px) saturate(1.22);
  }

  .moderation-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .system-banner {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    width: calc(100% - 32px);
  }

  .system-banner a,
  .system-banner button {
    grid-column: 2;
    margin-left: 0;
    width: max-content;
  }

  .system-banner a {
    padding: 6px 9px;
    border-radius: var(--radius);
    background: rgba(103, 80, 26, 0.1);
  }

  .brand-copy span {
    white-space: normal;
  }

  .filter-grid,
  .form-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .university-card,
  .student-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .school-meta,
  .student-card > button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .composer-actions,
  .moderation-actions,
  .post-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .composer-actions select {
    width: 100%;
  }

  .auth-shell {
    padding: 14px;
  }

  .auth-card {
    padding: 14px;
  }

  .register-form .form-grid {
    grid-template-columns: 1fr;
  }

  .register-choice {
    grid-template-columns: 1fr;
  }

  .auth-points {
    display: grid;
  }
}

@media (max-width: 920px) {
  .explore-stack {
    padding: 16px;
  }

  .student-browser {
    grid-template-columns: 1fr;
  }

  .student-browser .student-list {
    max-height: none;
  }

  .profile-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .explore-university-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .explore-stack {
    gap: 12px;
  }

  .rollup-panel summary {
    min-height: 56px;
    padding: 0 14px;
  }

  .rollup-panel summary span {
    font-size: 0.95rem;
  }

  .rollup-body {
    padding: 0 14px 14px;
  }

  .explore-city-list,
  .explore-university-grid,
  .stats-row {
    display: grid;
  }

  .explore-city-list {
    grid-template-columns: 1fr;
    max-height: 320px;
    overflow: auto;
  }
}

.auth-link-page {
  display: grid;
  min-height: 100vh;
  padding: 22px;
  place-items: center;
  background: var(--page-bg);
}

.auth-link-card {
  display: grid;
  width: min(100%, 480px);
  gap: 18px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-row strong {
  font-size: 1.15rem;
  font-weight: 950;
}

.auth-link-state {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--control-bg);
  box-shadow: var(--shadow-soft);
}

[data-state="success"] .auth-link-state {
  background: linear-gradient(145deg, #f7f7f7, #cfd4d2);
}

[data-theme="light"] [data-state="success"] .auth-link-state {
  background: linear-gradient(145deg, #050505, #2b2b2b);
}

[data-state="error"] .auth-link-state {
  background: linear-gradient(145deg, #3b3b3f, #111113);
}

.auth-link-card h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.auth-link-card p {
  margin: 0;
  color: var(--copy);
  font-size: 1.05rem;
  line-height: 1.55;
}

.auth-link-form {
  margin-top: 4px;
}
