:root {
  color-scheme: light;
  --bg: #012A40;
  --surface: #ffffff;
  --surface-soft: #f4f8fa;
  --ink: #1A202C;
  --muted: #8C9084;
  --brand: #21B3D7;
  --brand-dark: #012A40;
  --green: #3ECE7E;
  --green-dark: #28a965;
  --pink: #DF1C74;
  --line: #e4e9ec;
  --danger: #c82333;
  --danger-dark: #971b27;
  --shadow: 0 18px 45px rgba(0, 0, 0, .18);
  --radius: 8px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(33, 179, 215, .12), transparent 360px),
    var(--bg);
  font-size: 17px;
  line-height: 1.5;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
}

.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--brand-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 27px;
  font-weight: 950;
}

.brand::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: url('/static/favicon.png') center / cover no-repeat;
}

.brand:hover {
  color: #ffffff;
  opacity: .86;
}

.top .row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.top .row > a,
.year-menu summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 9px 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.top .row > a:hover,
.year-menu[open] summary,
.year-menu summary:hover {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.year-menu {
  position: relative;
  color: #ffffff;
  font-weight: 800;
}

.year-menu summary {
  list-style: none;
  cursor: pointer;
}

.year-menu summary::-webkit-details-marker {
  display: none;
}

.year-menu summary::after {
  content: "⌄";
  margin-left: 8px;
  color: currentColor;
  opacity: .72;
  font-size: .82em;
}

.year-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 280px;
  max-height: min(480px, calc(100vh - 120px));
  overflow: auto;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.year-dropdown a,
.year-dropdown span {
  display: block;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink) !important;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.year-dropdown a:hover {
  background: var(--surface-soft);
  color: var(--brand-dark) !important;
}

:where(.wrap, [data-page-content]) > h1,
:where(.wrap, [data-page-content]) > p,
:where(.wrap, [data-page-content]) > .camp-grid,
:where(.wrap, [data-page-content]) > .photos,
:where(.wrap, [data-page-content]) > .gallery,
:where(.wrap, [data-page-content]) > .pagination,
[data-gallery-content] > .pagination,
:where(.wrap, [data-page-content]) > .notice,
:where(.wrap, [data-page-content]) > .table,
:where(.wrap, [data-page-content]) > hr,
.cover-help,
.password-box,
.intro-card,
.year-section,
.card,
.hero,
.years-overview,
.gallery-viewer {
  width: min(calc(100% - 40px), var(--content));
  margin-left: auto;
  margin-right: auto;
}

:where(.wrap, [data-page-content]) > h1 {
  margin-top: 38px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 8px solid var(--pink);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.04;
  color: #ffffff;
}

:where(.wrap, [data-page-content]) > p {
  margin-top: 14px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .78);
}

:where(.wrap, [data-page-content]) > p:not(.row) a:first-child,
.gallery-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--green);
  border: 1px solid var(--green);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.nav-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-block;
  fill: currentColor;
}

.btn .nav-icon:first-child,
:where(.wrap, [data-page-content]) > p:not(.row) a:first-child .nav-icon:first-child,
.gallery-topbar a .nav-icon:first-child {
  margin-right: 6px;
}

.btn .nav-icon:last-child {
  margin-left: 6px;
}

:where(.wrap, [data-page-content]) > p:not(.row) a:first-child:hover,
.gallery-topbar a:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #ffffff;
}

:where(.wrap, [data-page-content]) > form {
  width: min(calc(100% - 40px), 720px);
  margin: 34px auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

:where(.wrap, [data-page-content]) > hr + form {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto 34px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.site-hero {
  width: min(calc(100% - 40px), var(--content));
  margin: 34px auto 0;
  padding: clamp(42px, 9vw, 86px) clamp(22px, 6vw, 64px);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(135deg, rgba(1, 42, 64, .88), rgba(1, 42, 64, .48)),
    var(--hero-bg, linear-gradient(135deg, var(--brand-dark), var(--brand)));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.site-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: var(--pink);
}

.site-hero h1 {
  max-width: 760px;
  margin: 0;
  color: white;
  font-size: clamp(40px, 5.8vw, 66px);
  line-height: .98;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.intro-card,
.year-section,
.card,
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(13, 44, 70, .08);
}

.intro-card {
  margin-top: 18px;
  padding: clamp(24px, 5vw, 42px);
  color: #364253;
  font-size: clamp(18px, 2.1vw, 22px);
}

.intro-card p:first-child {
  margin-top: 0;
}

.intro-card p:last-child {
  margin-bottom: 0;
}

.week-info {
  margin-bottom: 20px;
}

.week-info + .camp-grid {
  margin-top: 20px;
}

.years-overview {
  margin-top: 22px;
}

.years-overview > .year-section {
  width: 100%;
}

.year-section {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.year-summary,
.admin-year-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}

.year-summary::-webkit-details-marker,
.admin-year-summary::-webkit-details-marker {
  display: none;
}

.year-summary::after,
.admin-year-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background-color: #334155;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  transform: rotate(0deg);
  transition: background-color .16s ease, transform .16s ease;
}

.year-summary:hover::after,
.admin-year-summary:hover::after {
  background-color: #1f2937;
}

.year-section[open] > .year-summary::after,
.admin-year[open] > .admin-year-summary::after {
  transform: rotate(180deg);
}

.year-section h2,
.admin-year-summary h2,
.admin-year-head h2 {
  margin: 0 0 22px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
}

.year-summary h2,
.admin-year-summary h2 {
  margin-bottom: 0;
}

.year-section[open] > .week-grid,
.admin-year[open] .admin-year-content {
  margin-top: 22px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.week-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 245px;
  overflow: hidden;
  color: white;
  background: var(--brand-dark);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(13, 44, 70, .12);
  isolation: isolate;
}

.week-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(135deg, rgba(33, 179, 215, .38), rgba(223, 28, 116, .25)),
    repeating-linear-gradient(45deg, #dbf2fb 0 18px, #f8fcff 18px 36px);
  background-size: cover;
  background-position: center;
  transition: transform .2s ease;
}

.week-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 33, 49, .1), rgba(5, 33, 49, .82));
}

.week-card[data-stock-bg]::before {
  background-image: linear-gradient(135deg, rgba(1, 42, 64, .12), rgba(223, 28, 116, .12)), var(--week-bg);
}

.week-card:hover::before {
  transform: scale(1.035);
}

.week-card > div {
  margin-top: auto;
  padding: 18px;
}

.week-card h3 {
  margin: 0 0 4px;
  color: white;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
}

.week-card strong {
  display: block;
  color: rgba(255, 255, 255, .86);
  font-size: 15px;
  line-height: 1.35;
}

.admin-week-card p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.86);
  font-weight: 800;
}

.admin-year {
  margin-top: 22px;
  margin-bottom: 22px;
}

.admin-year-actions {
  margin-bottom: 20px;
}

.year-password-panel {
  margin: 0 0 20px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.year-password-panel textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.5;
}

.admin-year-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-week-grid > div,
.camp-grid > div:has(> .camp-card + form) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}

.admin-week-grid > div .week-card,
.camp-grid > div:has(> .camp-card + form) .camp-card {
  height: auto;
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-week-grid > div .week-card {
  min-height: 205px;
}

.admin-week-grid > div > form,
.camp-grid > div:has(> .camp-card + form) > form {
  margin: 0;
  padding: 12px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.admin-week-grid > div > form button,
.camp-grid > div:has(> .camp-card + form) > form button {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 15px;
}

.card {
  padding: 26px;
}

.stock-section {
  margin-top: 34px;
  margin-bottom: 34px;
}

.hero {
  width: min(calc(100% - 40px), 560px);
  margin-top: 8vh;
  margin-bottom: 8vh;
  padding: 30px;
}

.hero h1,
.card h1,
.card h2 {
  margin-top: 0;
}

.password-box {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #fff7fb;
  border: 1px solid #f6bdd8;
  border-left: 6px solid var(--pink);
  border-radius: var(--radius);
  font-weight: 850;
}

.info-box {
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: var(--radius);
  color: var(--ink) !important;
  font-weight: 800;
}

.info-box .muted,
.info-box.muted {
  color: var(--ink) !important;
}

.info-box p:first-child {
  margin-top: 0;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.week-grid > .info-box {
  grid-column: 1 / -1;
}

.camp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.camp-card {
  display: block;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(13, 44, 70, .08);
  transition: transform .16s ease, box-shadow .16s ease;
}

.camp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.camp-card img,
.camp-empty {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(33, 179, 215, .15), rgba(223, 28, 116, .1)),
    #e9f1f7;
  color: var(--brand-dark);
  font-weight: 950;
}

.camp-card div:not(.camp-empty) {
  padding: 18px;
}

.camp-card h2 {
  margin: 0 0 5px;
  font-size: 24px;
  line-height: 1.15;
}

.camp-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.photo {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #dde7ee;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.photo img,
.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .18s ease;
}

.photo:hover img,
.gallery-photo:hover img {
  transform: scale(1.035);
}

.header-upload-form,
.header-delete-form {
  margin: 0;
}

.header-upload-tile {
  width: 100%;
  min-height: 0;
  display: grid;
  gap: 9px;
  margin: 14px 0 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(13, 44, 70, .08);
  cursor: pointer;
  text-align: left;
}

.header-upload-tile:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--brand);
}

.header-upload-tile strong {
  padding: 0 14px 14px;
  font-size: 15px;
  line-height: 1.2;
}

.header-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 18 / 7;
  background: #dde7ee;
  color: #64748b;
  font-weight: 850;
}

.header-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-drop-field {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 24px;
  border: 2px dashed #b9c8d3;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: #475569;
  text-align: center;
  cursor: pointer;
}

.file-drop-field:hover,
.file-drop-field.is-dragover {
  border-color: var(--brand);
  background: #eef9fc;
}

.file-drop-field strong {
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-view-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(0, 0, 0, .12);
}

.gallery-view-switch a {
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.gallery-view-switch a:hover {
  color: #ffffff;
}

.gallery-view-switch a.active {
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.gallery-day {
  width: min(calc(100% - 40px), var(--content));
  margin: 26px auto 34px;
}

.gallery-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.gallery-day-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.gallery-day-head > h2 {
  display: flex;
  align-items: center;
  flex: 1;
  margin: 0;
  padding: 10px 13px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  color: var(--brand-dark);
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.2;
}

.gallery-day-head .gallery-view-switch {
  flex: 0 0 auto;
}

.gallery-photo {
  display: block;
  aspect-ratio: 10 / 7;
  margin: 0;
  overflow: hidden;
  background: #dde7ee;
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(13, 44, 70, .08);
}

.gallery-photo img {
  height: 100%;
  object-fit: cover;
}

.gallery-item {
  display: block;
  width: 100%;
  margin: 0;
}

.gallery-item .gallery-photo {
  margin-bottom: 0;
}

.admin-gallery .gallery-photo {
  border-radius: var(--radius) var(--radius) 0 0;
}

.processing-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #475569;
  font-weight: 850;
  text-align: center;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 22px rgba(13, 44, 70, .08);
}

.photo-actions form {
  flex: 1 1 120px;
  margin: 0;
}

.current-cover {
  flex: 1 1 120px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--green);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.cover-help form {
  margin: 0 0 20px;
}

:where(.wrap, [data-page-content]) > form.stock-upload-form {
  width: min(calc(100% - 40px), var(--content));
}

.camp-default-grid,
.stock-default-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.camp-default-tile {
  min-height: 0;
  display: grid;
  gap: 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(13, 44, 70, .08);
  text-align: left;
}

.camp-default-tile:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--brand);
}

.camp-default-tile strong {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px 12px;
  font-size: 15px;
  line-height: 1.2;
}

.camp-default-image {
  width: 100%;
  aspect-ratio: 10 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: #64748b;
  font-weight: 850;
}

.camp-default-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camp-default-empty {
  padding: 10px;
}

.stock-default-list span {
  display: grid;
  gap: 7px;
}

.stock-default-list img {
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  border-radius: var(--radius);
}

.stock-picker-dialog {
  width: min(960px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.stock-picker-dialog::backdrop {
  background: rgba(1, 42, 64, .72);
}

.stock-picker-panel {
  padding: 18px;
  background: var(--surface);
}

.stock-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.stock-picker-head h2 {
  margin-bottom: 4px;
}

.stock-picker-head form,
.stock-clear-form,
.stock-picker-grid form {
  margin: 0;
}

.stock-clear-form {
  margin-bottom: 14px;
}

.stock-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: min(540px, 58vh);
  overflow: auto;
  padding-right: 4px;
}

.stock-choice {
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: none;
}

.stock-choice:hover {
  background: var(--surface-soft);
  border-color: var(--brand);
}

.stock-choice img {
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  display: block;
}

.photo-actions button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.gallery > .card {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, .82);
  font-weight: 850;
}

.page-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.page-link,
.pagination-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
}

.page-link {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand-dark);
}

.pagination-gap {
  min-width: 24px;
  min-height: 40px;
  padding: 0 2px;
  color: rgba(255, 255, 255, .72);
}

.page-link:hover,
.page-link.active {
  background: var(--pink);
  border-color: var(--pink);
  color: #ffffff;
}

.pagination .disabled {
  opacity: .48;
  cursor: default;
  pointer-events: none;
}

[data-gallery-content] {
  transition: opacity 160ms ease;
}

[data-page-content] {
  display: contents;
}

[data-page-content] > * {
  transition: opacity 160ms ease;
}

[data-page-content].is-loading > * {
  cursor: progress;
  opacity: .45;
}

[data-page-content].is-entering > * {
  opacity: 0;
}

[data-gallery-content].is-loading {
  cursor: progress;
  opacity: .45;
  pointer-events: none;
}

[data-gallery-content].is-entering {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  [data-gallery-content] {
    transition: none;
  }

  [data-page-content] > * {
    transition: none;
  }
}

.page-link.active {
  cursor: default;
  pointer-events: none;
}

.gallery-viewer {
  margin-top: 24px;
  margin-bottom: 40px;
}

.gallery-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 850;
}

.gallery-topbar span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--green);
  border: 1px solid var(--green);
  color: #ffffff;
}

.stage {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #071d2c;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stage-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  transition: opacity .12s ease;
}

.stage.is-loading .stage-img {
  opacity: 0;
}

.stage-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  align-items: center;
  gap: 10px;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-weight: 800;
}

.stage-loading::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: upload-spin .7s linear infinite;
}

.stage.is-loading .stage-loading {
  display: flex;
}

.stage-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 179, 215, .92);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  z-index: 2;
}

.stage-nav::before {
  content: "";
  width: 15px;
  height: 15px;
  border-top: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.stage-nav.prev::before {
  transform: translateX(2px) rotate(-135deg);
}

.stage-nav.next::before {
  transform: translateX(-2px) rotate(45deg);
}

.stage-nav:hover {
  background: var(--pink);
  color: #ffffff;
}

.stage-nav.prev { left: 14px; }
.stage-nav.next { right: 14px; }
.stage-nav.disabled { display: none; }

.filmstrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 2px 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.film-thumb {
  flex: 0 0 100px;
  height: 70px;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 7px;
  background: #fff;
  scroll-snap-align: center;
  opacity: .72;
}

.film-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-thumb.active,
.film-thumb:hover {
  border-color: var(--pink);
  opacity: 1;
}

.viewer-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 14px;
}

.fullscreen-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, .88);
  color: var(--brand-dark);
  padding: 0;
}

.fullscreen-btn::before {
  content: "";
  width: 19px;
  height: 19px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 5h6v2H7v4H5V5Zm8 0h6v6h-2V7h-4V5ZM7 13v4h4v2H5v-6h2Zm12 0v6h-6v-2h4v-4h2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 5h6v2H7v4H5V5Zm8 0h6v6h-2V7h-4V5ZM7 13v4h4v2H5v-6h2Zm12 0v6h-6v-2h4v-4h2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.viewer-date {
  text-align: center;
}

.muted {
  color: var(--muted) !important;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #cfdbe5;
  border-radius: 7px;
  font: inherit;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(33, 179, 215, .22);
  border-color: var(--brand);
}

label {
  display: block;
  margin: 15px 0 6px;
  color: #334155;
  font-weight: 850;
}

label.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

label.check input {
  width: auto;
  min-height: auto;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(62, 206, 126, .18);
}

.btn:hover,
button:hover {
  background: var(--green-dark);
  color: white;
}

.btn.secondary,
button.secondary {
  background: #334155;
  box-shadow: none;
}

.btn.secondary:hover,
button.secondary:hover {
  background: #1f2937;
}

.btn.danger,
button.danger {
  background: var(--danger);
  box-shadow: none;
}

.btn.danger:hover,
button.danger:hover {
  background: var(--danger-dark);
}

button:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.notice {
  padding: 14px 16px;
  background: #eefbff;
  border: 1px solid #bceefa;
  border-radius: 7px;
  margin-top: 4px;
  margin-bottom: 18px;
}

.err {
  background: #fff2f3;
  border-color: #ffc7ce;
}

.progress-wrap {
  margin: 14px 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}

.progress-meta span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.progress-wrap.is-uploading .progress-meta span:first-child::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  border: 3px solid rgba(33, 179, 215, .25);
  border-top-color: var(--brand);
  animation: upload-spin .75s linear infinite;
}

.progress-wrap.is-processing {
  border-color: rgba(62, 206, 126, .55);
  background: #f1fff7;
}

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

progress {
  width: 100%;
  height: 18px;
  accent-color: var(--brand);
}

.site-footer {
  width: min(calc(100% - 40px), var(--content));
  margin: auto auto 0;
  padding: 36px 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  font-weight: 750;
}

.site-footer .admin-login-link {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  font-weight: 650;
}

.site-footer .admin-login-link:hover {
  color: #ffffff;
}

.site-footer .footer-site-link {
  color: rgba(255, 255, 255, .88);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer .footer-site-link:hover {
  color: #ffffff;
}

.go-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 7px;
  background: var(--pink);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.go-top:hover {
  background: var(--pink);
}

.go-top::before {
  content: "";
  width: 44px;
  height: 44px;
  display: block;
  background: currentColor;
  transform: rotate(180deg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 7 9.5 9.5L21.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 7 9.5 9.5L21.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.go-top.show {
  display: flex;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  margin-bottom: 28px;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(13, 44, 70, .06);
}

.table td,
.table th {
  border-bottom: 1px solid var(--line);
  padding: 15px 13px;
  text-align: left;
}

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

.table th {
  background: #f8fafc;
  font-weight: 950;
}

.table form {
  margin: 0;
}

.error-page {
  text-align: center;
  margin-top: 48px;
}

.error-code {
  color: var(--pink);
  font-size: clamp(72px, 14vw, 150px);
  font-weight: 950;
  line-height: .9;
}

@media (max-width: 900px) {
  .top {
    align-items: flex-start;
  }

  .top .row {
    gap: 4px;
  }

  .camp-grid,
  .photos {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }

  .gallery { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 650px) {
  body {
    font-size: 16px;
  }

  .top {
    position: static;
    padding: 15px 16px;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    font-size: 24px;
  }

  .top .row {
    width: 100%;
    justify-content: flex-start;
  }

  .top .row > a,
  .year-menu summary {
    padding: 8px 11px;
    font-size: 14px;
  }

  .year-dropdown {
    left: 0;
    right: auto;
    width: min(300px, calc(100vw - 32px));
    min-width: 0;
  }

  :where(.wrap, [data-page-content]) > h1,
  :where(.wrap, [data-page-content]) > p,
  :where(.wrap, [data-page-content]) > .camp-grid,
  :where(.wrap, [data-page-content]) > .photos,
  :where(.wrap, [data-page-content]) > .gallery,
  .gallery-day,
  :where(.wrap, [data-page-content]) > .pagination,
  [data-gallery-content] > .pagination,
  :where(.wrap, [data-page-content]) > .table,
  :where(.wrap, [data-page-content]) > hr,
  .password-box,
  .intro-card,
  .year-section,
  .card,
  .hero,
  .years-overview,
  .gallery-viewer,
  .site-hero,
  :where(.wrap, [data-page-content]) > form {
    width: calc(100% - 28px);
  }

  .site-hero {
    margin-top: 18px;
  }

  .site-hero h1 {
    font-size: clamp(25px, 6.8vw, 30px);
  }

  .intro-card,
  .year-section,
  .card,
  .hero,
  :where(.wrap, [data-page-content]) > form {
    padding: 20px;
  }

  .week-grid,
  .camp-grid,
  .photos {
    grid-template-columns: 1fr;
  }

  .week-card {
    min-height: 210px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .gallery-day-head {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-day-head .gallery-view-switch {
    align-self: flex-start;
  }

  .gallery-toolbar {
    justify-content: flex-start;
  }

  .gallery-viewer {
    width: 100%;
    margin-top: 12px;
  }

  .gallery-topbar {
    padding: 0 14px;
    font-size: 14px;
  }

  .stage {
    min-height: 54vh;
    border-radius: 0;
  }

  .stage-img {
    max-height: 64vh;
  }

  .stage-nav {
    width: 48px;
    height: 48px;
  }

  .stage-nav::before {
    width: 13px;
    height: 13px;
    border-width: 3px;
  }

  .stage-nav.prev { left: 8px; }
  .stage-nav.next { right: 8px; }

  .filmstrip {
    padding: 12px 14px 6px;
    gap: 8px;
  }

  .film-thumb {
    flex-basis: 78px;
    height: 58px;
  }

  .viewer-actions {
    padding: 12px 14px 0;
    justify-content: stretch;
  }

  .viewer-actions .btn {
    flex: 1;
  }

  .viewer-date {
    padding: 0 14px;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .admin-year-head {
    display: block;
  }

  .admin-year-head form {
    margin-top: 12px;
  }

  .row {
    align-items: stretch;
  }

  .row .btn,
  .row button {
    flex: 1 1 auto;
  }
}
