:root {
  --ink: #181713;
  --muted: #67645d;
  --paper: #f8f6ef;
  --surface: #ffffff;
  --line: #ddd7c8;
  --accent: #b63f2c;
  --accent-2: #2d6a6f;
  --shadow: 0 18px 50px rgba(24, 23, 19, 0.08);
}

html {
  font-size: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  background: rgba(248, 246, 239, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-brand {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  letter-spacing: 0;
}

.navbar .nav-link {
  color: var(--ink);
  font-weight: 600;
}

.nav-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.nav-user {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  background:
    linear-gradient(120deg, rgba(248, 246, 239, 0.98), rgba(248, 246, 239, 0.72)),
    url("/images/ass.jpg") right center / cover no-repeat,
    #efe7d3;
  border-bottom: 1px solid var(--line);
  min-height: calc(100svh - 145px);
  padding: clamp(3.5rem, 7vh, 6rem) 0 clamp(2.5rem, 5vh, 3.5rem);
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.hero-copy h1,
.page-section h1 {
  font-size: 4.8rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0 0 1.4rem;
}

.lead {
  color: #3f3b32;
  font-size: 1.25rem;
  line-height: 1.65;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-note {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 1.4rem;
  max-width: 760px;
  padding: 1.2rem;
}

.hero-note h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-note p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.hero-note p:last-child {
  margin-bottom: 0;
}

.hero-note a {
  font-weight: 800;
}

.hero-panel,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.hero-panel > div {
  background: #fff;
  padding: 1.6rem;
}

.metric {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
}

.label {
  color: var(--muted);
  display: block;
  margin-top: 0.45rem;
}

.content-band,
.page-section {
  padding: 4.5rem 0;
}

.narrow {
  max-width: 820px;
}

.narrow h2,
.panel h2,
.media-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.narrow p,
.panel p,
.media-body p {
  color: var(--muted);
  line-height: 1.65;
}

.stack {
  display: grid;
  gap: 1.5rem;
}

.section-head {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.section-head h1 {
  margin-bottom: 0;
}

.info-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 1.35rem;
}

.stats-panel {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.news-section {
  display: grid;
  gap: 1rem;
}

.news-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
}

.news-list {
  display: grid;
  gap: 1rem;
}

.news-item h2,
.news-item h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.news-item p,
.news-item li {
  color: var(--muted);
  line-height: 1.65;
}

.legal-content {
  max-width: 980px;
}

.legal-content h2,
.legal-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 1.4rem 0 0.75rem;
}

.legal-content h2:first-child,
.legal-content h3:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.65;
}

.form-page {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
}

.form-panel {
  display: grid;
  gap: 0.85rem;
}

.form-control {
  border-color: var(--line);
  border-radius: 6px;
}

.combo-field {
  position: relative;
}

.combo-input {
  padding-right: 3rem;
}

.combo-toggle {
  align-items: center;
  background: #fff;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  bottom: 1px;
  color: var(--ink);
  display: flex;
  font-size: 1rem;
  justify-content: center;
  position: absolute;
  right: 1px;
  top: 1px;
  width: 2.65rem;
}

.combo-toggle:hover,
.combo-toggle:focus {
  background: #f8f6ef;
}

.combo-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  left: 0;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.35rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 20;
}

.combo-menu[hidden] {
  display: none;
}

.combo-menu button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.combo-menu button:hover,
.combo-menu button:focus {
  background: #f8f6ef;
}

.form-hint {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: -0.35rem 0 0;
}

.form-help-box {
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: 0.94rem;
  gap: 0.25rem;
  line-height: 1.45;
  padding: 0.85rem 0.95rem;
}

.form-help-box strong {
  color: var(--ink);
}

.upload-progress {
  align-items: center;
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress strong,
.upload-progress span {
  display: block;
}

.upload-progress span {
  color: var(--muted);
  line-height: 1.4;
}

.upload-spinner {
  animation: spin 0.85s linear infinite;
  border: 4px solid #ddd7c8;
  border-top-color: var(--accent-2);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 2.2rem;
  width: 2.2rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.remember-choice {
  align-items: flex-start;
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem;
}

.remember-choice input {
  margin-top: 0.25rem;
}

.remember-choice span {
  display: grid;
  gap: 0.2rem;
}

.remember-choice small {
  color: var(--muted);
  line-height: 1.4;
}

.gallery-container {
  max-width: 1800px;
  padding-left: clamp(1rem, 3vw, 3rem);
  padding-right: clamp(1rem, 3vw, 3rem);
}

.media-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.album-section {
  display: grid;
  gap: 0.85rem;
}

.album-section > h2 {
  align-items: baseline;
  display: flex;
  gap: 0.55rem;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
}

.album-section > h2 span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.gallery-filter-panel {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gallery-filter-panel .form-label {
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.gallery-filter-panel .form-select {
  max-width: 28rem;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-preview {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #f1ede3;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.media-preview img,
.media-preview video {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.lightbox-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: flex;
  height: 100%;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.lightbox-trigger img,
.lightbox-trigger video {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.file-preview {
  color: var(--muted);
  font-weight: 700;
}

.gallery-card .media-preview {
  background: #f6f1e8;
}

.gallery-card-select,
.gallery-card-download {
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 23, 19, 0.1);
  border-radius: 5px;
  box-shadow: none;
  color: var(--ink);
  display: flex;
  height: 1.55rem;
  justify-content: center;
  position: absolute;
  top: 0.45rem;
  width: 1.55rem;
  z-index: 3;
}

.gallery-card-select {
  background: transparent;
  border: 0;
  border-radius: 0;
  height: auto;
  cursor: pointer;
  left: 0.45rem;
  width: auto;
}

.gallery-card-select input {
  accent-color: var(--accent-2);
  background: rgba(255, 255, 255, 0.9);
  height: 0.92rem;
  margin: 0;
  width: 0.92rem;
}

.gallery-card-download {
  right: 0.45rem;
  text-decoration: none;
}

.gallery-card-download svg {
  fill: none;
  height: 0.95rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 0.95rem;
}

.gallery-card-download:hover,
.gallery-card-download:focus {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-2);
}

.gallery-card-meta {
  background: linear-gradient(180deg, rgba(24, 23, 19, 0), rgba(24, 23, 19, 0.76));
  bottom: 0;
  color: #fff;
  display: grid;
  font-size: 0.78rem;
  gap: 0.12rem;
  left: 0;
  line-height: 1.25;
  opacity: 0;
  padding: 2.2rem 0.65rem 0.55rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 2;
}

.gallery-card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.gallery-card:hover .gallery-card-meta,
.gallery-card:focus-within .gallery-card-meta {
  opacity: 1;
  transform: translateY(0);
}

.media-body {
  display: grid;
  gap: 0.32rem;
  padding: 0.62rem;
}

.media-body h2 {
  overflow-wrap: anywhere;
}

.compact-media-body h2 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.media-meta {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.22;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.media-filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card-actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.compact-media-body .check-action,
.media-card-actions .btn {
  font-size: 0.76rem;
  line-height: 1.15;
}

.media-card-actions .btn {
  padding: 0.16rem 0.4rem;
}

.toolbar-panel {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem;
}

.check-action {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  margin: 0;
}

.compact-media-body .check-action input {
  height: 0.92rem;
  width: 0.92rem;
}

.check-action input {
  height: 1rem;
  width: 1rem;
}

.admin-card .media-body {
  gap: 0.45rem;
}

.lightbox {
  align-items: center;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 2rem;
  position: fixed;
  z-index: 1000;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  max-height: 92vh;
  max-width: 92vw;
}

.lightbox-stage img,
.lightbox-stage video {
  display: none;
  max-height: 82vh;
  max-width: 92vw;
  object-fit: contain;
}

.lightbox-stage p {
  color: #fff;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  display: flex;
  justify-content: center;
  position: fixed;
}

.lightbox-close {
  font-size: 2rem;
  height: 3rem;
  right: 1rem;
  top: 1rem;
  width: 3rem;
}

.lightbox-nav {
  font-size: 3rem;
  height: 4rem;
  top: calc(50% - 2rem);
  width: 3rem;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.empty-state {
  max-width: 760px;
}

.notice-panel {
  border-left: 5px solid var(--accent-2);
  box-shadow: none;
}

.notice-panel h2 {
  margin-bottom: 0.35rem;
}

.notice-panel p {
  margin-bottom: 0;
}

.profile-panel {
  display: grid;
  gap: 1.25rem;
}

.profile-title h2 {
  margin-bottom: 0.2rem;
}

.profile-data {
  display: grid;
  gap: 0;
  margin: 0;
}

.profile-data div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
  padding: 0.8rem 0;
}

.profile-data dt {
  color: var(--muted);
  font-weight: 700;
}

.profile-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.people-section {
  display: grid;
  gap: 1rem;
}

.all-profiles-panel {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.all-profiles-panel h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.all-profiles-panel p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.people-filter-panel {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.people-filter-panel fieldset {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

.people-filter-panel legend {
  color: var(--muted);
  flex-basis: 100%;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.15rem;
}

.radio-choice {
  align-items: center;
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
}

.radio-choice input {
  height: 1rem;
  width: 1rem;
}

.people-section > h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
}

.table-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.people-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.people-table th,
.people-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.people-table th {
  background: #f8f6ef;
  font-weight: 800;
}

.people-table tr:last-child td {
  border-bottom: 0;
}

.table-muted {
  color: var(--muted);
  display: inline-block;
  margin-left: 0.5rem;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-list a {
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-block;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  text-decoration: none;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
}

.btn-outline-dark {
  border-color: var(--ink);
}

.btn-outline-danger {
  border-color: var(--accent);
  color: var(--accent);
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.25rem 0;
}

.footer-content {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.footer-links a {
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 991px) {
  .hero {
    min-height: 0;
    padding: 4rem 0 3rem;
  }

  .hero-copy h1,
  .page-section h1 {
    font-size: 3rem;
  }

  .hero-grid,
  .form-page {
    grid-template-columns: 1fr;
  }

  .info-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stats-panel,
  .section-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
  }
}

@media (min-width: 992px) {
  .nav-actions {
    margin-top: 0;
  }
}

@media (min-width: 1500px) {
  .gallery-container .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 640px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
}
