@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  --bg: #ffffff;
  --bg-deep: #ead9b4;
  --surface: #fff8ea;
  --fg: #1c3a18;
  --muted: #4d6a45;
  --primary: #1e6b2a;
  --primary-fg: #fff8ea;
  --accent: #3aa0d8;
  --pinky: #e45a9a;
  --wood: #8b5a2b;
  --border: #d7c49a;
  --danger: #b42318;
  --hover: #c43c22;
  --font: "Nunito", "Segoe UI", sans-serif;
  --display: "Fredoka", "Nunito", sans-serif;
  --radius: 14px;
  --page-width: 1200px;
  --gutter: 12px;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  min-width: 0;
}
body { overflow-x: clip; }
img, video { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--hover); }
h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(1.7rem, 4.6vw, 2.75rem); }
h2 { font-size: clamp(1.15rem, 2.6vw, 1.5rem); }
p { line-height: 1.55; text-wrap: pretty; }

.skip {
  position: absolute; left: -999px; top: 8px;
}
.skip:focus { left: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--bg);
}
.hero img {
  display: block;
  width: 100%;
  max-width: var(--page-width);
  height: auto;
  max-height: clamp(112px, 28vw, 380px);
  object-fit: cover;
  object-position: top;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 92%, transparent);
  mask-image: linear-gradient(to bottom, #000 92%, transparent);
}
.hero-fade {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.75rem;
  background: linear-gradient(to top, var(--bg), transparent);
}

.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.nav-inner {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
}
.nav.is-center .nav-inner { justify-content: center; }
.nav.is-center .nav-links { justify-content: center; width: 100%; }
.nav-links.size-sm { font-size: 13px; }
.nav-links.size-md { font-size: 16px; }
.nav-links.size-lg { font-size: 20px; }
.nav-links.weight-md { font-weight: 600; }
.nav-links.weight-lg { font-weight: 700; }
.nav-links.weight-xl { font-weight: 800; }
.nav-links.is-upper { text-transform: uppercase; letter-spacing: 0.04em; }
.nav-links.color-fg a,
.nav-links.color-fg a:hover,
.nav-links.color-fg a:focus { color: var(--fg); }
.nav-links.color-primary a,
.nav-links.color-primary a:hover,
.nav-links.color-primary a:focus { color: var(--primary); }
.nav-links.color-wood a,
.nav-links.color-wood a:hover,
.nav-links.color-wood a:focus { color: var(--wood); }
.nav-links.color-pinky a,
.nav-links.color-pinky a:hover,
.nav-links.color-pinky a:focus { color: var(--pinky); }
.nav-links.color-accent a,
.nav-links.color-accent a:hover,
.nav-links.color-accent a:focus { color: var(--accent); }
.nav-links a {
  display: inline-block;
  position: relative;
  text-decoration: none;
  padding: 2px 1px;
  border-radius: 6px;
  transform-origin: 50% 80%;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav-links.hover-underline a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
  pointer-events: none;
}
.nav-links.hover-underline a:hover::after,
.nav-links.hover-underline a:focus-visible::after,
.nav-links.hover-underline a.is-current::after {
  transform: scaleX(1);
}
.nav-links.hover-lift a:hover,
.nav-links.hover-lift a:focus-visible {
  transform: translateY(-3px);
}
.nav-links.hover-pill a {
  padding: 4px 12px;
  border-radius: 999px;
}
.nav-links.hover-pill a:hover,
.nav-links.hover-pill a:focus-visible,
.nav-links.hover-pill a.is-current {
  background: color-mix(in srgb, currentColor 16%, transparent);
}
.nav-links.hover-grow a:hover,
.nav-links.hover-grow a:focus-visible {
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a,
  .nav-links.hover-underline a::after { transition: none; }
  .nav-links a:hover,
  .nav-links a:focus-visible { transform: none; }
}

.wrap {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 20px var(--gutter) 32px;
}
.lead { color: var(--muted); max-width: 40rem; }
.gallery-head.is-center { text-align: center; }
.gallery-head.is-center .lead { margin-inline: auto; }
h1.gallery-title { margin: 0 0 0.4em; }
h1.gallery-title.size-sm { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h1.gallery-title.size-md { font-size: clamp(1.55rem, 3.8vw, 2.35rem); }
h1.gallery-title.size-lg { font-size: clamp(1.7rem, 4.6vw, 2.75rem); }
h1.gallery-title.color-fg { color: var(--fg); }
h1.gallery-title.color-primary { color: var(--primary); }
h1.gallery-title.color-wood { color: var(--wood); }
h1.gallery-title.color-pinky { color: var(--pinky); }
h1.gallery-title.color-accent { color: var(--accent); }
.kicker {
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--wood); margin: 0;
}

.toolbar {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
  align-items: stretch;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.search input, .search select { flex: 1 1 140px; min-width: 0; }
.search select { max-width: none; }
.search .btn { flex: 0 0 auto; }

.btn, button.btn, input[type="submit"].btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font: 700 14px var(--font); cursor: pointer; color: var(--primary-fg); background: var(--primary);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn.secondary, a.btn.secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn.danger { background: var(--danger); }
.btn[aria-pressed="true"], .btn.is-on { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover:not(:disabled), a.btn:hover { background: var(--fg); color: var(--primary-fg); }
.btn.secondary:hover:not(:disabled), a.btn.secondary:hover {
  background: #fff; color: var(--fg); border-color: var(--wood);
}
.btn.is-on:hover, a.btn.is-on:hover { background: var(--fg); color: var(--primary-fg); }
.btn.danger:hover:not(:disabled) { background: var(--hover); }
.btn:hover:not(:disabled), a.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgb(28 58 24 / 0.45); }

input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="file"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--fg); font: 16px var(--font);
}
input[type="text"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="url"]:hover, select:hover, textarea:hover {
  border-color: var(--wood);
}

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; list-style: none; margin: 0; padding: 0; }

.card {
  display: flex; flex-direction: column; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; text-align: left; color: inherit;
  box-shadow: 0 10px 24px -16px rgb(28 58 24 / 0.35); cursor: pointer; width: 100%; padding: 0;
  font: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  color: inherit;
  transform: translateY(-4px);
  border-color: var(--wood);
  box-shadow: 0 18px 36px -16px rgb(28 58 24 / 0.5);
}
.card .thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-deep); overflow: hidden; }
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.45s ease, filter 0.3s ease;
}
.card:hover .thumb img {
  transform: scale(1.18);
  filter: brightness(1.1);
}
.card .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(28 58 24 / 0.65), rgb(28 58 24 / 0.08) 55%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
}
.card:hover .thumb::after { opacity: 1; }
.card[data-type="image"]:hover .thumb::after {
  background: linear-gradient(to top, rgb(228 90 154 / 0.5), rgb(28 58 24 / 0.12) 50%, transparent);
}
.card[data-type="video"]:hover .thumb::after {
  background: linear-gradient(to top, rgb(8 32 51 / 0.6), rgb(58 160 216 / 0.12) 50%, transparent);
}
.card[data-type="video"] .thumb::before,
.card[data-type="image"] .thumb::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 18px -8px rgb(8 32 51 / 0.7);
  opacity: 0;
  transform: scale(0.85);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.card[data-type="image"] .thumb::before { background: var(--pinky); }
.card[data-type="video"]:hover .thumb::before,
.card[data-type="image"]:hover .thumb::before {
  opacity: 1;
  transform: scale(1);
}
.card[data-type="video"] .play {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 3;
  width: 0; height: 0;
  margin: -6px 0 0 -4px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff8ea;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.card[data-type="video"]:hover .play { opacity: 1; }
.card[data-type="video"] .play-mini,
.preview-frame .play-mini,
.admin-list .thumb-edit .play-mini {
  position: absolute;
  right: 8px; bottom: 8px;
  z-index: 4;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 4px 10px -4px rgb(8 32 51 / 0.6);
  pointer-events: none;
}
.card[data-type="video"] .play-mini,
.admin-list .thumb-edit .play-mini {
  width: 28px; height: 28px;
}
.card[data-type="video"] .play-mini::after,
.preview-frame .play-mini::after,
.admin-list .thumb-edit .play-mini::after {
  content: "";
  position: absolute;
  left: 8px; top: 6px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff8ea;
}
.card[data-type="video"] .play-mini::after,
.admin-list .thumb-edit .play-mini::after {
  left: 10px; top: 8px;
  border-width: 6px 0 6px 10px;
}
.card[data-type="image"] .zoom {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 3;
  width: 18px; height: 18px;
  margin: -14px 0 0 -14px;
  border: 3px solid #fff8ea;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.card[data-type="image"] .zoom::after {
  content: "";
  position: absolute;
  left: 14px; top: 14px;
  width: 9px; height: 3px;
  background: #fff8ea;
  transform: rotate(45deg);
  border-radius: 2px;
}
.card[data-type="image"]:hover .zoom { opacity: 1; }
.card .body { padding: 14px; }
.when {
  margin: 8px 0 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--wood);
}
.lightbox-card .when { margin-top: 4px; }
.card h2 { font-size: clamp(1.1rem, 2.4vw, 1.35rem); transition: color 0.15s ease; }
.card:hover h2 { color: var(--primary); }
.card p {
  margin: 0; color: var(--muted); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.badge {
  position: absolute; top: 10px; left: 10px; border-radius: 999px; padding: 3px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--accent); color: #082033; z-index: 4;
}
.badge.image { background: var(--pinky); color: #fff8ea; }

.pages { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 28px 0 8px; }
.pages .btn { min-width: 44px; }

.lightbox {
  position: fixed; inset: 0; background: rgb(28 58 24 / 0.72); z-index: 60;
  display: none; align-items: stretch; justify-content: center; padding: 0;
}
.lightbox.is-open { display: flex; }
.lightbox-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border-radius: 0;
  padding: 16px;
  max-height: 100%;
  overflow: auto;
}
.lightbox-card video, .lightbox-card img {
  width: 100%; max-height: 55vh; background: #1c3a18; border-radius: 8px; object-fit: contain;
}
.lightbox-close {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { color: var(--fg); background: var(--bg-deep); border-radius: 8px; }
.lightbox-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  padding-right: 40px; margin-bottom: 8px;
}
.lightbox-head h2 { margin: 0; }
.lightbox-count { margin: 0; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lightbox-stage { position: relative; }
.lightbox-nav {
  position: absolute; top: 50%; z-index: 2;
  width: 44px; height: 44px; margin-top: -22px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgb(255 248 234 / 0.92); color: var(--fg); font-size: 28px; line-height: 1;
  box-shadow: 0 8px 18px -10px rgb(28 58 24 / 0.55);
}
.lightbox-nav.prev { left: 8px; }
.lightbox-nav.next { right: 8px; }
.lightbox-nav:hover { background: #fff; }
.lightbox-nav[hidden] { display: none; }
.lightbox-card img.lb-image { cursor: zoom-in; }
.lightbox-card img.lb-image.is-zoomed {
  max-height: none;
  cursor: zoom-out;
}
.lightbox-zoom-hint {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.lightbox-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
}
.lightbox-thumb {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--bg-deep);
  cursor: pointer;
  overflow: hidden;
}
.lightbox-thumb img { display: block; width: 72px; height: 48px; object-fit: cover; max-height: none; }
.lightbox-thumb.is-on { border-color: var(--primary); }
.lightbox-thumb:hover { border-color: var(--wood); }

.form {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 16px; display: grid; gap: 14px;
}
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .form-row.three { grid-template-columns: 1fr 1fr 1fr; }
}
label { font-weight: 700; display: block; margin-bottom: 6px; }
.alert { padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.alert.bad { background: rgb(180 35 24 / 0.12); color: var(--danger); }
.alert.ok { background: rgb(30 107 42 / 0.12); color: var(--primary); }
.note { background: var(--bg-deep); border: 1px solid var(--border); border-radius: 8px; padding: 12px; color: var(--muted); font-size: 14px; }
.hint {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px 6px;
  margin: 16px 0 20px;
  max-width: 40rem;
}
.hint ol { margin: 0 0 12px; padding-left: 1.3rem; }
.hint li { margin: 6px 0; line-height: 1.45; }
.hint code, .lead code {
  font-size: 0.92em;
  background: var(--bg-deep);
  padding: 1px 6px;
  border-radius: 6px;
}

.upload-pick { display: flex; flex-direction: row; gap: 12px; margin: 16px 0 32px; }
.upload-pick a {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px; background: var(--surface); color: inherit;
  box-shadow: 0 10px 24px -16px rgb(28 58 24 / 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.upload-pick a:hover {
  color: inherit;
  border-color: var(--wood);
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -16px rgb(28 58 24 / 0.45);
}
.upload-pick .pick-thumb {
  display: block;
  width: 160px;
  height: 90px;
  object-fit: cover;
  background: var(--bg-deep);
  margin: 16px 20px 8px;
  border-radius: 10px;
}
.upload-pick svg { display: block; width: 32px; height: 32px; margin: 0 20px 8px; }
.upload-pick .icon-picture { color: var(--pinky); }
.upload-pick .icon-video { color: var(--accent); }
.upload-pick h2 { margin: 0 20px; font-size: 22px; }
.upload-pick p { margin: 4px 20px 0; color: var(--muted); }
.admin-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.admin-head h1 { margin: 0; }
.admin-head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.admin-tools {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin: 0 0 12px;
}
.admin-tools form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.admin-tools select { min-width: 0; flex: 1 1 180px; }
.bulk-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 0 0 12px;
}
.admin-list .pick { display: flex; align-items: center; }
.admin-list .pick input { width: auto; min-height: 0; }
.admin-list .move { display: flex; flex-direction: column; gap: 4px; }
.admin-list .move .btn { min-width: 40px; padding: 4px 8px; }
.nav-edit { margin-bottom: 14px; }
.nav-edit .move { display: flex; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.check input { width: auto; }
.drop {
  border: 2px dashed var(--border); border-radius: 16px; padding: 18px 12px;
  text-align: center; background: var(--bg-deep);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop:hover { border-color: var(--wood); background: #fff; }
.drop p { margin: 0 0 8px; }
.drop input[type="file"] { max-width: 100%; }
details summary { cursor: pointer; font-weight: 700; }

.admin-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
.admin-list li { display: flex; gap: 12px; padding: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; align-items: center; transition: background-color 0.15s ease; }
.admin-list li:hover { background: #fff; }
.admin-list li:first-child { border-top: 0; }
.admin-list .thumb-edit {
  display: flex; flex-direction: column; gap: 10px; color: inherit; flex: 1; min-width: 0;
  background: transparent; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit;
}
.admin-list .thumb-edit:hover { color: inherit; }
.admin-list .thumb-edit .admin-thumb {
  position: relative; display: block; width: 100%; max-width: 100%;
}
.admin-list .thumb-edit img {
  width: 100%; max-width: 100%; height: auto; aspect-ratio: 16/9;
  object-fit: cover; border-radius: 8px; background: var(--bg-deep); flex-shrink: 0;
  transition: transform 0.25s ease, outline-color 0.15s ease;
}
.admin-list .thumb-edit:hover img { outline: 2px solid var(--primary); outline-offset: 2px; transform: scale(1.03); }
.admin-list .thumb-edit strong { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 0.15s ease, color 0.15s ease; }
.admin-list .thumb-edit:hover strong { color: var(--primary); text-decoration-color: var(--primary); }
.admin-actions { display: flex; gap: 8px; margin-left: 0; width: 100%; }
.admin-actions .btn { flex: 1; }
.preview-frame {
  position: relative;
  width: 160px;
  margin: 0 auto 12px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid var(--border);
}
.thumb-preview,
.preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  margin: 0;
  object-fit: cover;
  background: var(--bg-deep);
  border: 0;
  border-radius: 0;
}
.preview-frame video { display: none !important; }
.preview-frame video.is-on { display: none !important; }
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
}
.preview-hint { margin: 8px 0 0; }
.upload-status {
  margin: 8px 0 0;
  font-weight: 800;
  color: var(--primary);
}
.save-status {
  display: block;
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.4;
}
.save-status[hidden] { display: none !important; }

.foot { text-align: center; padding-bottom: 24px; color: var(--muted); width: 100%; }
.foot img { display: block; width: 100%; max-width: var(--page-width); margin: 24px auto 0; }
.muted { color: var(--muted); }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--border); border-radius: 18px; background: var(--surface); }

@media (min-width: 640px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .card { border-radius: 22px; }
  .lightbox {
    align-items: center;
    padding: 16px;
  }
  .lightbox-card {
    width: min(960px, 100%);
    border-radius: 22px;
    padding: 20px 48px 20px 20px;
    max-height: calc(100vh - 32px);
  }
  .lightbox-card video, .lightbox-card img { max-height: 70vh; }
  .admin-list .thumb-edit { flex-direction: row; align-items: center; }
  .admin-list .thumb-edit img { width: 128px; height: 80px; aspect-ratio: auto; }
  .admin-list .thumb-edit .admin-thumb { width: 128px; flex-shrink: 0; }
  .admin-actions { margin-left: auto; width: auto; }
  .admin-actions .btn { flex: 0 0 auto; }
  .admin-tools form { width: auto; }
}

@media (min-width: 720px) {
  .nav-inner { padding: 12px var(--gutter); }
  .nav-links { gap: 0; }
  .nav-links.size-sm { font-size: 15px; }
  .nav-links.size-md { font-size: 18px; }
  .nav-links.size-lg { font-size: 22px; }
  .nav-links span { display: inline; color: var(--border); padding: 0 8px; }
  .wrap { padding: 32px var(--gutter); }
  .toolbar { flex-direction: row; align-items: center; }
  .search { flex: 1; flex-wrap: nowrap; min-width: 240px; }
  .search select { max-width: 200px; flex: 0 1 200px; }
  .form { padding: 20px; border-radius: 22px; }
  .form-row.two { grid-template-columns: 1fr 1fr; }
  .upload-pick { gap: 16px; }
}

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

@media (min-width: 1200px) {
  .hero img { max-height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .btn, .upload-pick a, .card .thumb img, .admin-list .thumb-edit img {
    transition: none;
  }
  .card:hover, .btn:hover, a.btn:hover, .upload-pick a:hover {
    transform: none;
    box-shadow: none;
  }
  .card:hover .thumb img, .admin-list .thumb-edit:hover img { transform: none; filter: none; }
  .card:hover .thumb::after { opacity: 0; }
  .card[data-type="video"]:hover .thumb::before,
  .card[data-type="image"]:hover .thumb::before { transform: none; }
}

@media print {
  .nav, .toolbar, .pages, .lightbox, .admin-head-actions { display: none !important; }
  .hero img, .foot img { max-height: none; }
}
