@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  --ink: #10243f;
  --muted: #657891;
  --paper: #e6edf5;
  --surface: #fbfdff;
  --surface-soft: #edf4fb;
  --line: #c7d5e5;
  --accent: #137b9b;
  --accent-dark: #0a5275;
  --navy: #102c50;
  --cyan: #35b8c8;
  --coral: #d96758;
  --danger: #b4474d;
}

* { box-sizing: border-box; }

body {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 184, 200, 0.18), transparent 38%),
    linear-gradient(135deg, #dce7f3, #f4f8fc 55%, #d4e1ef);
  font-family: 'DM Sans', sans-serif;
}

body:has(.community-view.active) {
  display: block;
  padding: 0;
  background: #eef1f5;
}

body:has(.admin-view.active) {
  display: block;
  padding: 0;
}

.shell { width: min(100%, 480px); }

.shell:has(.community-view.active) {
  width: 100%;
  max-width: none;
}

.shell:has(.admin-view.active) {
  width: 100%;
  max-width: none;
}

.panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 7vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(16, 44, 80, 0.15), 0 2px 4px rgba(16, 44, 80, 0.04);
}

.shell:has(.community-view.active) .panel {
  min-height: 100vh;
  border-radius: 0;
  border-top: 0;
  justify-content: flex-start;
  padding: 0 clamp(24px, 7vw, 96px) clamp(24px, 4vw, 56px);
  background: #eef1f5;
  box-shadow: none;
}

.shell:has(.admin-view.active) .panel {
  min-height: 100vh;
  border-radius: 0;
  border-top: 0;
  justify-content: flex-start;
  padding: 0 clamp(24px, 7vw, 96px) clamp(24px, 4vw, 56px);
}

.shell:has(.community-view.active) .message {
  display: none;
}

.shell:has(.admin-view.active) .message#message {
  display: none;
}

.view { display: none; width: 100%; animation: appear 180ms ease-out; }
.view.active { display: block; }

.login-badge {
  display: block;
  width: min(176px, 62%);
  max-height: 138px;
  margin: 0 auto 34px;
  object-fit: contain;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.view h2 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  font-size: 36px;
  letter-spacing: -0.8px;
  text-align: center;
}

.muted { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #f7faff; color: var(--ink); font: inherit; font-size: 16px; transition: border-color 160ms, box-shadow 160ms, background 160ms; }
input:focus { border-color: var(--cyan); background: #fff; box-shadow: 0 0 0 3px rgba(53, 184, 200, 0.14); }

.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 15px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary:hover { background: var(--accent-dark); }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.text-button { padding: 0; border: 0; color: var(--accent); background: transparent; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.back { margin-bottom: 42px; text-decoration: none; }
.message { min-height: 24px; margin-bottom: 8px; color: var(--danger); font-size: 13px; }
.message.success { color: var(--accent); }

.community-view { width: 100%; max-width: 1180px; margin: 0 auto; padding-top: 0; }
.community-banner { display: block; width: 100%; max-width: 1180px; aspect-ratio: 4 / 1; margin-top: 0; margin-bottom: 0; border-radius: 0; object-fit: cover; object-position: center; box-shadow: 0 12px 26px rgba(16, 44, 80, 0.12); }
.community-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px; border: 1px solid #d9e0e9; background: #fff; box-shadow: 0 2px 8px rgba(16, 44, 80, 0.06); }
.community-menu, .account-actions { display: flex; align-items: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.community-menu::-webkit-scrollbar { display: none; }
.community-menu::-webkit-scrollbar, .account-actions::-webkit-scrollbar { display: none; }
.menu-item { flex: 0 0 126px; min-height: 38px; padding: 9px 10px; border: 1px solid var(--line); border-right: 0; border-radius: 0; color: var(--accent); background: var(--surface-soft); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; transition: background 160ms, border-color 160ms, color 160ms; }
.menu-item:hover, .menu-item.active { border-color: var(--accent); color: #fff; background: var(--navy); }
.account-actions .menu-item:last-child { border-right: 1px solid var(--line); }
.logout-button, .logout-button:hover { border-color: #bd454d; color: #fff; background: #bd454d; }
.account-actions { margin-left: auto; }
.feed { display: grid; gap: 16px; margin-top: 18px; }
.community-body { display: grid; grid-template-columns: 460px minmax(0, 1fr); gap: 24px; align-items: start; }
.gallery-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; margin-top: 18px; }
.gallery-item { min-width: 0; overflow: hidden; border: 1px solid #d9e0e9; border-radius: 8px; background: #fff; }
.gallery-media { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #dfe7f0; }
.gallery-caption { display: grid; gap: 5px; padding: 12px; }
.gallery-caption strong { overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gallery-caption small { color: var(--muted); font-size: 11px; }
.jobs-view { width: 100%; max-width: 1180px; margin: 28px auto 0; }
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.job-card { display: flex; min-width: 0; flex-direction: column; padding: 16px; border: 1px solid #d9e0e9; border-top: 3px solid var(--accent); border-radius: 6px; background: #fff; }
.job-card h3 { margin: 0 0 10px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.job-description { margin: 0 0 14px; color: #263f5d; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.job-details { display: grid; gap: 6px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); }
.job-details p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.job-details strong { color: var(--ink); }
.job-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.job-recommend-action { display: inline-flex; height: 34px; align-items: center; gap: 2px; padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; }
.job-recommend, .job-comments-button { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: 5px; padding: 4px 6px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.job-recommend { width: 32px; aspect-ratio: 1; padding: 0; }
.job-recommend:hover, .job-recommend.selected { color: var(--accent-dark); background: rgba(19, 123, 155, 0.1); }
.job-recommend span[aria-hidden="true"], .job-comments-button span[aria-hidden="true"] { font-size: 16px; }
.job-comments-button:hover { color: var(--accent-dark); background: rgba(19, 123, 155, 0.08); }
.job-count-link { display: grid; min-width: 24px; height: 28px; place-items: center; padding: 0 4px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.job-count-link:hover { color: var(--accent-dark); background: var(--surface-soft); }
.job-comment-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 4px; border-radius: 10px; color: var(--navy); background: var(--surface-soft); font-size: 10px; }
.band-view { max-width: 1180px; margin: 28px auto 0; }
.band-view > h2 { margin: 0 0 22px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 22px; }
.band-layout { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 28px; align-items: start; }
.band-members-panel, .band-map-panel { min-width: 0; }
.band-map-panel { padding-left: 28px; border-left: 1px solid var(--line); }
.band-section-title { margin: 0 0 12px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 16px; }
.band-map-caption { margin: -4px 0 14px; color: var(--muted); font-size: 12px; }
.band-table { width: 100%; border-collapse: collapse; background: #fff; }
.band-table th, .band-table td { padding: 4px 8px; border: 1px solid var(--line); text-align: left; }
.band-table th { color: var(--navy); background: var(--surface-soft); font-size: 11px; }
.band-table td { color: #263f5d; font-size: 11px; }
#band-members .band-table th, #band-members .band-table td { font-size: 9px; }
.band-table tbody tr:nth-child(even) { background: #f7fafc; }
.band-seats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.band-seat { display: grid; min-width: 0; min-height: 48px; grid-auto-rows: min-content; place-items: center; align-content: center; row-gap: 0; border-radius: 4px; color: #fff; background: #27834a; font-size: 12px; font-weight: 700; line-height: 1; }
.band-seat-reserved { background: #c9343e; }
.band-seat-type { font-size: 9px; line-height: 1; }
.band-seat-number { font-size: 12px; line-height: 1; }
.fixed-images-panel { position: sticky; top: 0; margin-top: 18px; padding: 0; border: 1px solid #d9e0e9; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(16, 44, 80, 0.08); }
.fixed-images-panel h2 { margin: 0 0 14px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 17px; }
.fixed-images { display: grid; gap: 12px; padding: 0; }
.fixed-images img { display: block; width: 100%; height: auto; border-radius: 6px; background: #dfe7f0; object-fit: contain; object-position: center; }
.post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr); gap: 24px; min-height: 310px; height: 310px; padding: 20px; border: 1px solid #d9e0e9; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(16, 44, 80, 0.08); }
.post:has(.post-main.has-image) { min-height: 650px; height: 650px; }
.post-content { display: flex; min-width: 0; min-height: 0; flex-direction: column; grid-column: 1 / -1; }
.post-topline { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-weight: 700; }
.post-topline strong { display: block; font-size: 13px; }
.post-topline time { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.post-main { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.post-main.has-image { flex-direction: column; align-items: stretch; gap: 0; }
.post-body { display: -webkit-box; overflow: hidden; margin: 18px 0; color: #263f5d; font-size: 15px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.post-description { min-width: 0; flex: 1; }
.post-title { margin: 2px 0 0; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 17px; line-height: 1.2; }
.post-main.has-image .post-body { flex: 1; margin: 0; -webkit-line-clamp: 3; }
.post-image { display: block; flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 5 / 3; margin: 0; border-radius: 6px; object-fit: cover; object-position: center; }
.post-video { background: #0b1f3a; }
.post-image { cursor: zoom-in; }
.post-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 0 0; border-top: 1px solid var(--line); }
.post-actions span { margin-left: auto; color: var(--muted); font-size: 11px; }
.reaction { padding: 6px 8px; border: 0; color: var(--muted); background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.reaction b { margin-left: 3px; font-weight: 700; }
.reaction:hover, .reaction.selected { color: var(--accent); background: rgba(76, 201, 214, 0.12); }
.reaction.selected.dislike { color: var(--coral); background: rgba(241, 132, 112, 0.12); }
.comments-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; padding-left: 20px; border-left: 1px solid var(--line); }
.comments-panel h3 { margin: 0 0 12px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 15px; }
.comments { display: grid; gap: 9px; padding-top: 0; }
.comments.scrollable { max-height: 250px; overflow-y: auto; padding-right: 8px; }
.comments.scrollable::-webkit-scrollbar { width: 6px; }
.comments.scrollable::-webkit-scrollbar-thumb { border-radius: 6px; background: #9fb6ca; }
.comment { display: grid; gap: 3px; padding-left: 12px; border-left: 2px solid #2c6e7a; font-size: 12px; line-height: 1.45; }
.comment strong { color: var(--accent); }
.comment span { color: #263f5d; }
.comment-form { display: flex; gap: 10px; margin-top: auto; padding-top: 16px; }
.comment-form input { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.comment-form button { padding: 9px 12px; border: 0; color: #fff; background: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.empty-feed { color: var(--muted); font-size: 14px; }
.comment-count { padding: 7px 0; border: 0; color: var(--accent); background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.post-modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(7, 20, 38, 0.58); }
.post-modal-card { position: relative; width: min(100%, 760px); max-height: 90vh; overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 80px rgba(7, 20, 38, 0.3); }
.job-modal-card { width: min(100%, 600px); }
.job-modal-card h2 { margin: 0 38px 4px 0; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 20px; }
.job-modal-subtitle { margin: 0 38px 18px 0; color: var(--muted); font-size: 12px; }
.job-people-list { display: grid; max-height: 55vh; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.job-people-list li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.job-modal-comments { display: grid; max-height: 45vh; overflow-y: auto; gap: 12px; }
.job-comment-form { align-items: center; }
.job-comment-form input { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 13px; }
.job-comment-form button { flex: 0 0 auto; padding: 10px 14px; border: 0; border-radius: 4px; color: #fff; background: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.job-comment-form button:hover { background: var(--accent-dark); }
.modal-close { position: absolute; top: 10px; right: 14px; border: 0; color: var(--muted); background: transparent; font-size: 28px; cursor: pointer; }
.modal-post-author { display: grid; gap: 4px; margin-bottom: 18px; color: var(--ink); }
.modal-post-author time { color: var(--muted); font-size: 11px; }
.modal-post-image { display: block; width: 100%; max-height: 420px; margin-bottom: 18px; border-radius: 8px; object-fit: contain; background: var(--surface-soft); }
.modal-post-title { margin: 0 0 10px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 24px; }
.modal-post-body { color: #263f5d; line-height: 1.65; }
.modal-actions { display: flex; gap: 10px; margin: 20px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal-comments h3 { margin: 0 0 14px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; font-size: 16px; }
.modal-comment-form { display: flex; gap: 10px; margin-top: 18px; }
.modal-comment-form input { width: 100%; }
.hidden { display: none !important; }
.profile-view { width: 100%; max-width: 820px; margin: 28px auto 0; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.profile-heading h2 { margin: 0; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 30px; }
.profile-card { padding: 22px; border: 1px solid var(--line); background: var(--surface-soft); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.profile-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.profile-grid strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.profile-form { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; padding: 18px; border: 1px solid var(--line); background: var(--surface-soft); }
.admin-view { width: 100%; max-width: 1180px; margin: 0 auto; }
.admin-publication-panel { width: min(100%, 760px); margin: 42px auto; padding: 28px; border: 1px solid var(--line); background: var(--surface-soft); }
.admin-publication-panel h2 { margin: 0; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 30px; }
.admin-copy { margin-top: 10px; text-align: left; }
.admin-form textarea, .admin-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #f7faff; color: var(--ink); font: inherit; }
.admin-form textarea { resize: vertical; }
.admin-form textarea:focus, .admin-form select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53, 184, 200, 0.14); }
.admin-posts { display: grid; gap: 8px; margin-top: 24px; }
.admin-post-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.admin-post-content { min-width: 0; flex: 1; }
.admin-post-row strong, .admin-post-row small { display: block; }
.admin-post-row small { max-width: 560px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.admin-post-comments { display: grid; gap: 6px; margin-top: 12px; }
.admin-post-comments > strong { color: var(--navy); font-size: 12px; }
.admin-comment-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 10px; background: var(--surface-soft); }
.admin-comment-row > div { min-width: 0; }
.admin-comment-row > div strong { color: var(--ink); font-size: 12px; }
.admin-comment-row > div span { display: block; margin-top: 3px; color: #263f5d; font-size: 12px; overflow-wrap: anywhere; }
.admin-comment-row .text-button { flex: 0 0 auto; color: var(--danger); }
.admin-fixed-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; margin-top: 18px; }
.admin-fixed-item { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--line); background: #fff; }
.admin-fixed-item img { display: block; width: 100%; max-height: 260px; aspect-ratio: 3 / 4; background: var(--surface-soft); object-fit: contain; }
.admin-fixed-item .text-button { justify-self: start; color: var(--danger); }
.admin-job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; }
.admin-job-row strong, .admin-job-row small { display: block; overflow-wrap: anywhere; }
.admin-job-row small { max-width: 560px; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.delete-post { flex: 0 0 auto; color: var(--danger); }
.admin-menu { margin-right: auto; }
.maintenance { width: 100%; }
.maintenance-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 18px; }
.maintenance-heading h2 { margin: 0; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 30px; }
.compact-button { width: auto; }
.search-input { margin-bottom: 18px; }
.alumni-form { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; border: 1px solid var(--line); background: var(--surface-soft); }
.form-actions { display: flex; align-items: center; gap: 16px; grid-column: 1 / -1; }
.alumni-table { display: grid; gap: 8px; }
.alumni-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface-soft); }
.alumni-record { min-width: 0; flex: 1; }
.alumni-row strong { display: block; color: var(--ink); font-size: 14px; }
.alumni-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.alumni-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.alumni-details div { min-width: 0; }
.alumni-details small { margin: 0 0 3px; }
.alumni-details span { display: block; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 14px; flex: 0 0 auto; }
.delete-alumni { color: var(--danger); }

@media (max-width: 520px) {
  body {
    display: block;
    padding: 12px;
  }

  .shell {
    width: 100%;
    margin: 0 auto;
  }

  .shell:has(.community-view.active) .panel {
    padding: 0 clamp(16px, 5vw, 32px) 24px;
  }

  .panel {
    min-height: calc(100vh - 24px);
    padding: 32px clamp(20px, 7vw, 32px);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.12);
  }

  .view h2 { font-size: clamp(30px, 9vw, 34px); }
  .links { gap: 14px; }
  .text-button { min-height: 28px; }
  .community-header { align-items: center; }
  .menu-item { flex-basis: 112px; }
  .community-banner { width: 100%; aspect-ratio: 3 / 1; margin-bottom: 0; }
  .post { display: block; height: auto; min-height: 0; padding: 16px; }
  .post:has(.post-main.has-image) { height: auto; min-height: 0; }
  .post-content { height: auto; min-height: 0; }
  .post-main, .post-description, .post-main.has-image .post-body { flex: none; }
  .post-body, .post-main.has-image .post-body { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .post-main.has-image { align-items: stretch; gap: 8px; }
  .post-image { width: 100%; height: auto; aspect-ratio: 5 / 3; }
  .comments-panel { margin-top: 20px; padding-top: 18px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .post-actions { flex-wrap: wrap; }
  .post-actions span { margin-left: 0; width: 100%; }
  .comment-form { display: grid; grid-template-columns: 1fr auto; }
  .community-body { grid-template-columns: 1fr; }
  .band-layout { grid-template-columns: 1fr; gap: 24px; }
  .band-map-panel { padding: 22px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .band-seats { gap: 8px; }
  .fixed-images-panel { margin-top: 18px; }
  .fixed-images-panel { position: static; }
  .comment-form input { width: 100%; }
  .alumni-form { grid-template-columns: 1fr; }
  .form-actions { grid-column: auto; }
  .alumni-row { align-items: flex-start; flex-direction: column; }
  .alumni-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-post-row { flex-direction: column; }
  .admin-job-row { grid-template-columns: 1fr; }
  .profile-view { margin-top: 20px; }
  .profile-heading { align-items: flex-start; flex-direction: column; }
  .profile-grid, .profile-form { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  body { padding: 0; }
  .panel { min-height: 100vh; border: 0; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

.chat-toggle { position: fixed; right: 24px; bottom: 24px; z-index: 31; display: grid; width: 58px; aspect-ratio: 1; place-items: center; border: 0; border-radius: 50%; background: var(--navy); box-shadow: 0 8px 24px rgba(16, 44, 80, 0.3); cursor: pointer; }
.chat-toggle-icon { position: relative; width: 24px; height: 18px; border: 2px solid #fff; border-radius: 7px; }
.chat-toggle-icon::after { position: absolute; right: 3px; bottom: -6px; width: 7px; height: 7px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; background: var(--navy); content: ''; transform: skewY(-35deg); }
.chat-unread { position: absolute; top: -3px; right: -3px; display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border: 2px solid #fff; border-radius: 11px; color: #fff; background: var(--coral); font-size: 11px; font-weight: 700; }
.chat-panel { position: fixed; right: 24px; bottom: 94px; z-index: 30; display: flex; width: min(760px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 116px)); min-height: 340px; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 20px 60px rgba(16, 44, 80, 0.24); }
.chat-header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; padding: 10px 16px; color: #fff; background: var(--navy); }
.chat-header strong, .chat-header small { display: block; }
.chat-header strong { font-size: 15px; }
.chat-header small { margin-top: 2px; color: #c9d9e9; font-size: 11px; }
.chat-close { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.12); font-size: 24px; line-height: 1; cursor: pointer; }
.chat-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: 220px minmax(0, 1fr); }
.chat-contacts { min-width: 0; overflow-y: auto; padding: 14px 10px; border-right: 1px solid var(--line); background: #f5f8fb; }
.chat-contacts h2 { margin: 0 8px 12px; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 14px; }
#chat-users { display: grid; gap: 4px; }
.chat-contact { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 9px 8px; border: 0; border-radius: 7px; text-align: left; background: transparent; cursor: pointer; }
.chat-contact:hover, .chat-contact.selected { background: #e4edf4; }
.chat-avatar { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-weight: 700; }
.chat-contact-copy { display: block; min-width: 0; }
.chat-contact-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-contact-copy small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.chat-status-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #a4afba; }
.chat-status-dot.is-online { background: #2ea66b; }
.chat-conversation { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
.chat-conversation-header { display: flex; min-height: 57px; align-items: center; gap: 9px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chat-conversation-header strong, .chat-conversation-header small { display: block; }
.chat-conversation-header strong { overflow: hidden; max-width: 100%; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.chat-conversation-header small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-messages { display: flex; min-height: 0; flex-direction: column; gap: 9px; overflow-y: auto; padding: 18px 16px; background: #fff; }
.chat-empty { margin: auto; color: var(--muted); font-size: 12px; text-align: center; }
.chat-message-row { display: flex; width: 100%; }
.chat-message-row.sent { justify-content: flex-end; }
.chat-message-bubble { max-width: min(78%, 420px); padding: 9px 12px 7px; border-radius: 14px; color: var(--ink); background: #edf2f6; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message-row.sent .chat-message-bubble { color: #103b50; background: #d9f0f1; }
.chat-message-bubble time { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; text-align: right; }
.chat-message-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-message-form textarea { width: 100%; max-height: 96px; resize: none; padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px; outline: 0; color: var(--ink); background: #f5f8fb; font: inherit; font-size: 12px; }
.chat-message-form textarea:focus { border-color: var(--accent); }
.chat-message-form button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 20px; color: #fff; background: var(--accent-dark); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-message-form button:disabled { opacity: 0.5; cursor: default; }
.chat-error:not(:empty) { padding: 7px 12px; color: var(--danger); background: #fff4f2; font-size: 11px; }

@media (max-width: 560px) {
  .chat-toggle { right: 16px; bottom: 16px; }
  .chat-panel { right: 10px; bottom: 84px; width: calc(100vw - 20px); height: calc(100dvh - 100px); min-height: 280px; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: 116px minmax(0, 1fr); }
  .chat-contacts { overflow-x: auto; overflow-y: hidden; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-contacts h2 { margin: 0 0 5px 4px; font-size: 12px; }
  #chat-users { display: flex; gap: 5px; overflow-x: auto; }
  .chat-contact { min-width: 64px; flex: 0 0 72px; flex-direction: column; gap: 4px; padding: 3px; text-align: center; }
  .chat-contact-copy { max-width: 100%; }
  .chat-contact-copy strong { max-width: 68px; font-size: 10px; }
  .chat-contact-copy small { justify-content: center; margin-top: 2px; font-size: 9px; }
  .chat-conversation-header { min-height: 49px; padding: 8px 12px; }
  .chat-messages { padding: 12px; }
}
