:root {
  --bg: #050505;
  --surface: #111;
  --fg: #f2f2f2;
  --muted: #8a8a8a;
  --faint: #5c5c5c;
  --border: #222;
  --line: #1a1a1a;
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --brand: "Grand Hotel", "Segoe Script", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
html {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a #0a0a0a;
}
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: #0a0a0a; }
html::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 999px; }
html::-webkit-scrollbar-thumb:hover { background: #555; }
a { color: inherit; }
img, video { display: block; max-width: 100%; user-select: none; }
button, [role="button"] { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
.hidden { display: none !important; }

.site-header { z-index: 40; }
.site-header.is-solid { position: sticky; top: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 16px; }
.brand, .brand-plain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--brand);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1;
}
.brand-icon { display: block; flex: 0 0 auto; }
.brand { min-width: 0; max-width: 100%; }
.brand-name { padding-top: 2px; }
.site-header .brand-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.age-splash-card .brand-name { min-width: 0; overflow-wrap: anywhere; }
.download-btn { display: inline-flex; align-items: center; gap: 6px; }
.download-icon { display: block; }
.site-nav { display: flex; align-items: center; gap: 10px; }
.nav-link, .user-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0;
  color: var(--muted); text-decoration: none; font-size: 13px;
}
.nav-link:hover, .user-menu-btn:hover, .user-menu-btn[aria-expanded="true"] { color: var(--fg); }
.nav-admin-link {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #0c0c0c;
  color: var(--fg);
}
.nav-admin-link:hover { border-color: #3a3a3a; background: #151515; }
.nav-admin-link:focus-visible { outline: 1px solid #d8d8d8; outline-offset: 2px; }
.nav-icon { display: block; flex: 0 0 auto; }
.nav-icon-chevron { width: 14px; height: 14px; opacity: 0.7; }
.user-menu { position: relative; }
.user-menu-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 11.5rem;
  padding: 6px; border: 1px solid var(--border); background: #0c0c0c;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.45);
}
.user-menu-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; color: var(--fg); text-decoration: none; font-size: 13px;
}
.user-menu-list a:hover { background: #171717; }
.user-menu-out { color: var(--muted) !important; margin-top: 4px; border-top: 1px solid var(--line); }
.user-menu-out:hover { color: var(--fg) !important; }

@media (max-width: 420px) {
  .site-header-inner { padding-inline: 10px; }
  .user-menu-name { display: none; }
  .nav-admin-link span { display: none; }
  .nav-admin-link { width: 32px; padding: 0; justify-content: center; }
}

.wall-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px 0;
}
.wall-feed-options {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-right: auto;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0c0c0c;
}
.wall-feed-option {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.wall-feed-option:hover { color: var(--fg); }
.wall-feed-option.is-on, .wall-feed-option[aria-current="page"] { background: #222; color: var(--fg); }
.wall-feed-option:focus-visible { outline: 1px solid #d8d8d8; outline-offset: 2px; }
.wall-feed-icon-option {
  display: inline-flex;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.wall-feed-icon-option .nav-icon { width: 18px; height: 18px; }
.wall-feed-user-picker {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  margin: 0;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}
.wall-feed-user-picker label {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wall-feed-user-picker select {
  width: clamp(7rem, 18vw, 11rem);
  min-width: 0;
  min-height: 32px;
  padding: 4px 24px 4px 7px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #151515;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
}
.wall-feed-user-picker select:focus-visible { outline: 1px solid #d8d8d8; outline-offset: 2px; }
@media (max-width: 599px) {
  .wall-feed-options { width: 100%; }
  .wall-feed-user-picker {
    order: 2;
    flex: 1 1 100%;
    padding: 5px 3px 1px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .wall-feed-user-picker select { flex: 1 1 auto; width: auto; }
}
.wall-view-control-group { display: inline-flex; align-items: center; gap: 10px; }
.wall-view-control-group[hidden] { display: none; }
.wall-view-label { color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.wall-view-options {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0c0c0c;
}
.wall-view-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.wall-view-option:hover { color: var(--fg); }
.wall-view-option[aria-pressed="true"] { background: #222; color: var(--fg); }
.wall-view-option:focus-visible { outline: 1px solid #d8d8d8; outline-offset: 2px; }
.wall-view-option svg { width: 14px; height: 14px; flex: 0 0 auto; fill: currentColor; }
.wall-view-option rect { fill: currentColor; }
.gallery-video-autoplay-control { margin: 0; }
.gallery-video-autoplay-option[aria-busy="true"] { opacity: 0.65; }

.wall {
  --wall-columns: 1;
  display: grid;
  grid-template-columns: repeat(var(--wall-columns), minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}
.wall[data-wall-view="compact"] { --wall-columns: 2; gap: 6px; padding: 6px; }
@media (min-width: 720px) { .wall { --wall-columns: 2; } }
@media (min-width: 720px) { .wall[data-wall-view="compact"] { --wall-columns: 4; } }
@media (min-width: 1100px) { .wall { --wall-columns: 3; } }
@media (min-width: 1100px) { .wall[data-wall-view="compact"] { --wall-columns: 6; } }

.gallery-card { position: relative; min-width: 0; }
.gallery-card-preferences {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}
.gallery-card-preferences .favorite-button:not(.has-label) { width: 52px; }
.gallery-preference-form { display: inline-flex; margin: 0; }
.gallery-preference-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.32);
  border-radius: 999px;
  background: rgb(7 7 7 / 0.76);
  color: #f1f1f1;
  box-shadow: 0 4px 18px rgb(0 0 0 / 0.28);
  backdrop-filter: blur(8px);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.gallery-preference-button:hover { border-color: rgb(255 255 255 / 0.7); transform: translateY(-1px); }
.gallery-preference-button.is-on { border-color: #ededed; background: #ededed; color: #080808; }
.gallery-preference-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.gallery-preference-button:disabled { opacity: 0.58; transform: none; cursor: wait; }
.gallery-preference-button.has-label {
  width: auto;
  min-height: 38px;
  height: auto;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.gallery-preference-icon { width: 18px; height: 18px; overflow: visible; }
.gallery-preference-icon path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.16s ease;
}
.gallery-preference-button.is-on .gallery-preference-icon path { fill: currentColor; }
.gallery-preference-button:not(.has-label) {
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
.gallery-preference-button:not(.has-label):hover {
  border: 0;
  background: transparent;
  transform: none;
}
.gallery-preference-button:not(.has-label).is-on {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.gallery-preference-button:not(.has-label) .gallery-preference-icon {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.92)) drop-shadow(0 0 1px rgb(0 0 0 / 0.9));
  transform-origin: center;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.gallery-preference-button:not(.has-label):hover .gallery-preference-icon { transform: scale(1.08); }
.gallery-card-preferences .gallery-preference-icon {
  width: 25.6px;
  height: 25.6px;
  filter: none;
}
.favorite-button,
.media-favorite-button {
  --favorite-spark-left: 50%;
  position: relative;
  overflow: visible;
  isolation: isolate;
}
.gallery-preference-button.favorite-button:not(.has-label) .gallery-preference-icon {
  width: 28.8px;
  height: 28.8px;
  filter: none;
}
.gallery-preference-button.media-favorite-button:not(.has-label) .gallery-preference-icon {
  width: 28.8px;
  height: 28.8px;
  filter: none;
}
.gallery-preference-button.media-snout-button:not(.has-label) .gallery-preference-icon {
  width: 25.6px;
  height: 25.6px;
  filter: none;
}
.favorite-button.has-label {
  --favorite-spark-left: 22px;
}
.favorite-button.has-label .gallery-preference-icon { width: 20px; height: 20px; }
.favorite-button.is-on .gallery-preference-icon path,
.media-favorite-button.is-on .gallery-preference-icon path {
  fill: #ff405d;
  stroke: #ff405d;
}
.favorite-button.is-on:not(.has-label),
.media-favorite-button.is-on:not(.has-label) {
  color: #ff405d;
}
.owner-pin-button.is-on:not(.has-label) { color: #ffd36a; }
.favorite-button::before,
.favorite-button::after,
.media-favorite-button::before,
.media-favorite-button::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--favorite-spark-left);
  top: 50%;
  pointer-events: none;
  opacity: 0;
}
.favorite-button::before,
.media-favorite-button::before {
  width: 36px;
  height: 36px;
  border: 2px solid rgb(255 64 93 / 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.45);
}
.favorite-button::after,
.media-favorite-button::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff405d;
  box-shadow:
    0 -22px 0 #ffd166,
    16px -16px 0 #ff7188,
    22px 0 0 #ff405d,
    16px 16px 0 #ff9b61,
    0 22px 0 #ffd166,
    -16px 16px 0 #ff7188,
    -22px 0 0 #ff405d,
    -16px -16px 0 #ff9b61;
  transform: translate(-50%, -50%) scale(0.18) rotate(-8deg);
}
.favorite-button.is-celebrating::before,
.media-favorite-button.is-celebrating::before { animation: favorite-ring 560ms ease-out both; }
.favorite-button.is-celebrating::after,
.media-favorite-button.is-celebrating::after { animation: favorite-sparks 620ms cubic-bezier(0.18, 0.72, 0.24, 1) both; }
.favorite-button.is-celebrating .gallery-preference-icon,
.media-favorite-button.is-celebrating .gallery-preference-icon { animation: favorite-heart-pop 560ms cubic-bezier(0.2, 0.82, 0.25, 1) both; }
@keyframes favorite-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  28% { opacity: 0.78; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.28); }
}
@keyframes favorite-sparks {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.18) rotate(-8deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.08) rotate(10deg); }
}
@keyframes favorite-heart-pop {
  0%, 100% { transform: scale(1) rotate(0); }
  34% { transform: scale(1.28) rotate(-7deg); }
  64% { transform: scale(0.94) rotate(3deg); }
}
.media-snout-button .media-snout-icon path,
.media-snout-button.is-on .media-snout-icon path { fill: none; }
.media-snout-button.is-on {
  color: #f2a7bd;
}
.media-snout-button.is-on.has-label {
  border-color: #f2a7bd;
  background: #f2a7bd;
  color: #1b070d;
}

.gallery-card-main {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-fade {
  pointer-events: none;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 48px 12px 12px;
  background: linear-gradient(to top, rgb(5 5 5 / 0.82), rgb(5 5 5 / 0.18), transparent);
}
.card-meta p { margin: 2px 0 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title h2 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.pin { flex: 0 0 auto; }

.gallery-card-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin-top: 3px; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; background: var(--surface); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { outline: 1px solid rgb(242 242 242 / 0.8); outline-offset: -1px; }
.thumb:not(.is-active)::after { content: ""; position: absolute; inset: 0; background: rgb(5 5 5 / 0.25); }
.thumb:not(.is-active):hover::after { background: transparent; }

.wall[data-wall-view="compact"] .gallery-fade { padding: 36px 8px 8px; }
.wall[data-wall-view="compact"] .card-title { min-width: 0; gap: 5px; }
.wall[data-wall-view="compact"] .card-title h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.wall[data-wall-view="compact"] .card-meta p { font-size: 10px; }
.wall[data-wall-view="compact"] .pin { width: 12px; height: 12px; }
.wall[data-wall-view="compact"] .gallery-card-thumbs { gap: 2px; margin-top: 2px; }
.wall[data-wall-view="compact"] .gallery-card-preferences { top: 5px; right: 5px; gap: 4px; }
.wall[data-wall-view="compact"] .gallery-card-preferences .gallery-preference-button {
  width: 34px;
  height: 34px;
}
.wall[data-wall-view="compact"] .gallery-card-preferences .favorite-button:not(.has-label) {
  width: 44.2px;
}
.wall[data-wall-view="compact"] .gallery-card-preferences .gallery-preference-icon {
  width: 24px;
  height: 24px;
  filter: none;
}

.play-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.62);
  border: 2px solid rgb(255 255 255 / 0.92);
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.5);
}
.play-badge::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 16px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}
.mosaic-item .play-badge {
  width: 72px;
  height: 72px;
  left: 12px;
  bottom: 12px;
}
.mosaic-item .play-badge::after {
  left: 27px;
  top: 21px;
  border-width: 15px 0 15px 26px;
}
.thumb .play-badge {
  width: 34px;
  height: 34px;
  left: 4px;
  bottom: 4px;
}
.thumb .play-badge::after {
  left: 12px;
  top: 9px;
  border-width: 8px 0 8px 13px;
}
.wall[data-wall-view="compact"] .gallery-card-main > .play-badge {
  width: 40px;
  height: 40px;
  left: 8px;
  bottom: 8px;
}
.wall[data-wall-view="compact"] .gallery-card-main > .play-badge::after {
  left: 15px;
  top: 11px;
  border-width: 9px 0 9px 15px;
}
.wall[data-wall-view="compact"] .thumb .play-badge {
  width: 20px;
  height: 20px;
  left: 2px;
  bottom: 2px;
  border-width: 1px;
}
.wall[data-wall-view="compact"] .thumb .play-badge::after {
  left: 7px;
  top: 5px;
  border-width: 5px 0 5px 8px;
}

.empty-wall { display: grid; min-height: 70dvh; place-items: center; text-align: center; padding: 24px; }
.empty-wall h1, .auth h1, .narrow h1, .admin h1 { font-weight: 500; letter-spacing: -0.03em; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.muted { color: var(--muted); }
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 16px 10px;
}
.gallery-head > :first-child { flex: 1 1 320px; min-width: 0; }
.gallery-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 14px;
  margin-left: auto;
}
.gallery-head-preferences { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.gallery-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gallery-title-row h1 { margin: 4px 0 0; font-size: 28px; font-weight: 500; }
.gallery-state {
  padding: 3px 6px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gallery-edit-link { min-height: 30px; margin-left: 2px; padding: 0 9px; font-size: 12px; }
.gallery-access-note {
  margin: 0 0 16px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: #101010;
  color: var(--muted);
  font-size: 13px;
}
.gallery-desc { max-width: 36rem; margin: 6px 0 0; font-size: 14px; }
.back { font-size: 12px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--fg); }
.count { margin: 0; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pad { padding: 16px; }

.mosaic-wrap {
  display: block;
  width: 100%;
  padding: 0 8px 32px;
}
.mosaic {
  display: flex;
  gap: 2px;
  align-items: flex-start;
  width: 100%;
}
.mosaic-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mosaic-item {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  font-size: 0;
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: var(--ar, 3 / 4);
}
.mosaic-item.is-single-video {
  max-width: var(--poster-w, 800px);
  margin-inline: auto;
}
@media (min-width: 520px) {
  .mosaic-item.is-single-video { width: calc((100% - 2px) / 2); }
}
@media (min-width: 720px) {
  .mosaic-item.is-single-video { width: calc((100% - 4px) / 3); }
}
.mosaic[data-gallery-view="compact"] .mosaic-item.is-single-video {
  width: calc((100% - 2px) / 2);
}
@media (min-width: 520px) {
  .mosaic[data-gallery-view="compact"] .mosaic-item.is-single-video {
    width: calc((100% - 6px) / 4);
  }
}
@media (min-width: 720px) {
  .mosaic[data-gallery-view="compact"] .mosaic-item.is-single-video {
    width: calc((100% - 10px) / 6);
  }
}
.mosaic-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
}
.mosaic-item img,
.mosaic-hover-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: top;
}
.mosaic-hover-video {
  z-index: 1;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.mosaic-poster { transition: opacity 180ms ease; }
.mosaic-item .play-badge { transition: opacity 160ms ease, transform 160ms ease; }
.mosaic-item.is-video-playing .mosaic-hover-video { opacity: 1; }
.mosaic-item.is-video-playing .mosaic-poster { opacity: 0; }
.mosaic-item.is-video-playing .play-badge,
.mosaic-item.is-video-loading .play-badge { opacity: 0; transform: scale(0.86); }
.mosaic-item.is-video-loading .mosaic-open::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -19px 0 0 -19px;
  border: 2px solid rgb(255 255 255 / 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgb(0 0 0 / 0.22);
  animation: feed-spin 0.7s linear infinite;
  pointer-events: none;
}
.mosaic-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .gallery-card > .gallery-card-preferences {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    transition:
      opacity 0.16s ease,
      transform 0.16s ease;
  }
  .gallery-card:hover > .gallery-card-preferences,
  .gallery-card:has(:focus-visible) > .gallery-card-preferences {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .mosaic-item > .mosaic-actions {
    pointer-events: none;
  }
  .mosaic-item > .mosaic-actions > * {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    transition:
      opacity 0.16s ease,
      transform 0.16s ease;
  }
  .mosaic-item > .mosaic-actions > [data-media-favorite-form]:has(.media-favorite-button.is-on) {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .mosaic-item:hover > .mosaic-actions > *,
  .mosaic-item:has(:focus-visible) > .mosaic-actions > * {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}
.mosaic-delete-form {
  display: inline-flex;
  margin: 0;
}
.mosaic-actions .media-favorite-button { width: 52px; height: 40px; }
.mosaic-actions .media-snout-button { width: 40px; height: 40px; }
.mosaic[data-gallery-view="compact"] .mosaic-actions { top: 5px; right: 0; gap: 0; }
.mosaic[data-gallery-view="compact"] .mosaic-actions .media-favorite-button {
  width: 44.2px;
  height: 34px;
}
.mosaic[data-gallery-view="compact"] .mosaic-actions .media-snout-button {
  width: 34px;
  height: 34px;
}
.mosaic[data-gallery-view="compact"] .mosaic-actions .gallery-preference-icon {
  width: 24px;
  height: 24px;
  filter: none;
}
.mosaic-delete {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  transition: color 0.16s ease, transform 0.16s ease;
}
.mosaic-delete-icon {
  width: 25.6px;
  height: 25.6px;
  overflow: visible;
  filter: none;
  transform-origin: center;
  transition: transform 0.18s ease;
}
.mosaic-delete-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.mosaic-delete:hover { background: transparent; color: #ff9b91; }
.mosaic-delete:hover .mosaic-delete-icon { transform: scale(1.08); }
.mosaic-delete:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.mosaic[data-gallery-view="compact"] .mosaic-delete {
  width: 34px;
  height: 34px;
}
.mosaic[data-gallery-view="compact"] .mosaic-delete-icon { width: 24px; height: 24px; }

.age-splash {
  min-height: 100dvh;
  margin: 0;
  background: #000;
  color: var(--fg);
  display: grid;
  place-items: center;
  padding: 24px;
}
.age-splash-card {
  width: min(36rem, 100%);
  border: 1px solid #2a2a2a;
  background: #0a0a0a;
  padding: 48px 40px;
}
.age-splash-card .brand { margin: 0 0 20px; color: var(--fg); pointer-events: none; }
.age-splash-card .age-mark {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}
.age-splash-card p { margin: 18px 0 0; font-size: 1.05rem; line-height: 1.5; color: var(--muted); max-width: 28rem; }
.age-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 36px; }
.age-actions .btn { min-height: 48px; font-size: 16px; }
@media (min-width: 600px) { .age-actions { flex-direction: row; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 14px;
  border: 1px solid #333;
  background: #111;
  color: var(--fg);
  font-size: 14px; text-decoration: none;
}
.btn:hover { background: #181818; border-color: #4a4a4a; }
.btn-outline, .btn-ghost { background: transparent; color: var(--fg); border: 1px solid #2a2a2a; }
.btn-outline:hover, .btn-ghost:hover { background: #141414; border-color: #444; }
.btn-ghost { border-color: transparent; }
.btn-ghost.is-on { border-color: #3a3a3a; background: #161616; }
.btn-danger { background: transparent; color: #c98a84; border: 1px solid #3a2220; }
.btn-danger:hover { background: #1a1010; border-color: #5a3030; }
.btn:disabled { opacity: 0.45; cursor: default; }
.text-btn, .icon-btn { background: none; border: 0; color: var(--fg); text-decoration: none; font-size: 14px; }
.icon-btn { width: 40px; height: 40px; }

.auth { width: min(24rem, calc(100% - 32px)); margin: 80px auto 40px; }
.auth .brand { margin-bottom: 8px; }
.stack { display: grid; gap: 12px; margin-top: 24px; }
.stack.tight { margin-top: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, input[type="file"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); background: #0b0b0b; color: var(--fg); font: inherit;
}
.check { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.admin-check {
  width: fit-content;
  padding: 3px 0;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.admin-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid #4b4b4b;
  border-radius: 4px;
  background: #090909;
  color: #050505;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.admin-check input[type="checkbox"]::before {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.12s ease-out;
}
.admin-check:hover input[type="checkbox"] { border-color: #8a8a8a; }
.admin-check input[type="checkbox"]:checked {
  border-color: #ededed;
  background: #ededed;
}
.admin-check input[type="checkbox"]:checked::before { transform: rotate(45deg) scale(1); }
.admin-check input[type="checkbox"]:focus-visible {
  outline: 2px solid #f2f2f2;
  outline-offset: 3px;
}
.admin-check input[type="checkbox"]:disabled { opacity: 0.45; cursor: not-allowed; }
.upload-placement-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
}
.upload-placement-choice > .muted { font-size: 12px; }
@media (forced-colors: active) {
  .admin-check input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: auto;
  }
  .admin-check input[type="checkbox"]::before { display: none; }
}
.form-notice, .system-notice {
  position: relative;
  margin: 16px 0;
  padding: 11px 13px 11px 42px;
  border: 1px solid #63332f;
  border-radius: 8px;
  background: #190d0c;
  color: #f2d1ce;
  font-size: 13px;
  line-height: 1.5;
}
.form-notice::before, .system-notice::before {
  content: "!";
  position: absolute;
  top: 10px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #71342f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.narrow { width: min(28rem, calc(100% - 32px)); margin: 80px auto; }
.center { text-align: center; }

.admin { width: min(1080px, calc(100% - 32px)); margin: 24px auto 64px; }
.admin.profile-page:not(.is-blu) { width: min(48rem, calc(100% - 32px)); }
.profile-hero .eyebrow { margin: 0; }
.profile-hero h1 { margin: 4px 0 0; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 500; letter-spacing: -0.045em; }
.profile-card {
  margin-top: 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  background: #0b0b0b;
}
.profile-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 20px;
  align-items: end;
}
.profile-section-head .eyebrow { margin: 0 0 5px; }
.profile-section-head h2,
.profile-gallery-section-head h2 {
  margin: 0;
  color: var(--fg);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-transform: none;
}
.profile-section-head > .muted { margin: 0; line-height: 1.5; }
.profile-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-top: 20px; }
.profile-shortcut {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 112px;
  padding: 16px 38px 16px 16px;
  border: 1px solid #292929;
  background: #101010;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.profile-shortcut:hover { border-color: #555; background: #151515; transform: translateY(-1px); }
.profile-shortcut:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.profile-shortcut strong { font-size: 14px; font-weight: 600; }
.profile-shortcut span { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.profile-shortcut b { position: absolute; top: 13px; right: 14px; color: var(--faint); font-size: 18px; font-weight: 400; }
.profile-access-note { margin: 12px 0 0; font-size: 12px; }
.profile-gallery-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.profile-gallery-section-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.profile-gallery-section-head .muted { margin: 0; font-size: 12px; }
.profile-gallery-list { margin-top: 12px; }
.profile-gallery-list .admin-row { grid-template-columns: 40px minmax(0, 1fr); }
.profile-gallery-preview { display: block; color: inherit; text-decoration: none; }
.profile-gallery-preview:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.profile-gallery-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(145deg, #151515, #090909); }
.profile-gallery-title { margin: 0; overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.profile-gallery-list .admin-actions { margin-left: auto; }
.profile-gallery-empty { margin-top: 12px; padding: 22px; border: 1px dashed #303030; text-align: center; }
.profile-gallery-empty p { margin: 0; }
.profile-gallery-empty .btn, .profile-gallery-empty .muted { margin-top: 12px; }
.profile-settings { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.profile-settings > h2 { margin: 0; color: #c9c9c9; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.profile-settings .stack { margin-top: 20px; }
.admin.profile-page.is-blu {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: calc(100dvh - 48px);
  margin: 0;
  padding: clamp(28px, 5vw, 64px) 16px 72px;
  overflow: hidden;
}
.profile-page.is-blu .blu-profile-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #030303;
  pointer-events: none;
}
.profile-page.is-blu .blu-profile-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
  filter: grayscale(1) contrast(1.08) brightness(0.66);
  opacity: 0.78;
}
.profile-page.is-blu::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 19%, rgb(0 0 0 / 0.08) 0, rgb(0 0 0 / 0.62) 64%, rgb(0 0 0 / 0.88) 100%),
    linear-gradient(to bottom, rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.44) 72%, rgb(0 0 0 / 0.82));
  pointer-events: none;
}
.profile-page.is-blu .blu-profile-shell {
  position: relative;
  z-index: 2;
  width: min(48rem, 100%);
  margin: 0 auto;
}
.profile-page.is-blu .blu-profile-hero { text-align: center; }
.profile-page.is-blu .blu-profile-portrait {
  width: clamp(220px, 32vw, 320px);
  aspect-ratio: 1;
  margin: 0 auto 14px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgb(0 0 0 / 0.72));
}
.profile-page.is-blu .blu-profile-hero .eyebrow { color: #b8b8b8; }
.profile-page.is-blu .blu-profile-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(2.25rem, 5vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}
.profile-page.is-blu .blu-profile-card {
  margin-top: 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgb(255 255 255 / 0.17);
  background: rgb(7 7 7 / 0.91);
  box-shadow: 0 24px 72px rgb(0 0 0 / 0.7), inset 0 1px rgb(255 255 255 / 0.035);
  backdrop-filter: blur(10px);
}
.profile-page.is-blu .blu-profile-card h2 {
  margin: 0;
  color: #c9c9c9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.profile-page.is-blu .blu-profile-card .profile-section-head h2,
.profile-page.is-blu .blu-profile-card .profile-gallery-section-head h2 {
  color: var(--fg);
  font-size: 22px;
  letter-spacing: -0.035em;
  text-transform: none;
}
.profile-page.is-blu .blu-profile-card .stack { margin-top: 20px; }
.profile-page.is-blu .blu-profile-card input {
  border-color: #343434;
  background: rgb(5 5 5 / 0.94);
}
.profile-page.is-blu .blu-profile-card input:focus-visible {
  outline: 1px solid #d8d8d8;
  outline-offset: 2px;
}
.profile-page.is-blu .blu-profile-card .form-notice { margin: 18px 0 -4px; }
.profile-page.is-blu .blu-profile-card .btn { justify-self: start; }
@media (max-width: 599px) {
  .admin.profile-page:not(.is-blu) { width: min(100% - 24px, 48rem); }
  .profile-card { margin-top: 16px; padding: 20px 16px; }
  .profile-section-head { grid-template-columns: 1fr; gap: 8px; }
  .profile-shortcuts { grid-template-columns: 1fr; }
  .profile-shortcut { min-height: 92px; }
  .admin.profile-page.is-blu { padding: 24px 16px 48px; }
  .profile-page.is-blu .blu-profile-backdrop img {
    top: auto;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    opacity: 0.7;
  }
  .profile-page.is-blu .blu-profile-portrait { width: clamp(208px, 66vw, 260px); }
  .profile-page.is-blu .blu-profile-card {
    margin-top: 18px;
    padding: 20px 18px;
    background: rgb(7 7 7 / 0.96);
    backdrop-filter: none;
  }
  .profile-page.is-blu .profile-settings .btn[type="submit"] { width: 100%; justify-content: center; }
}
.admin.personal-gallery-dashboard.is-blu {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: calc(100dvh - 48px);
  margin: 0;
  padding: clamp(24px, 4vw, 48px) 16px 72px;
}
.personal-gallery-dashboard.is-blu .blu-gallery-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #030303;
  pointer-events: none;
}
.personal-gallery-dashboard.is-blu .blu-gallery-backdrop img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: min(100dvh, 900px);
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
  filter: grayscale(1) contrast(1.08) brightness(0.61);
  opacity: 0.72;
}
.personal-gallery-dashboard.is-blu::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 10%, rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.65) 70%),
    linear-gradient(to bottom, rgb(0 0 0 / 0.18), rgb(0 0 0 / 0.72) 820px, #030303 1020px);
  pointer-events: none;
}
.personal-gallery-dashboard.is-blu .blu-gallery-content {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  margin: 0 auto;
}
.personal-gallery-dashboard.is-blu .admin-toolbar {
  background: rgb(5 5 5 / 0.92);
  backdrop-filter: blur(8px);
}
@media (max-width: 599px) {
  .admin.personal-gallery-dashboard.is-blu { padding: 20px 12px 48px; }
  .personal-gallery-dashboard.is-blu .blu-gallery-backdrop img {
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    opacity: 0.62;
  }
  .personal-gallery-dashboard.is-blu .admin-toolbar { backdrop-filter: none; }
}
.admin-nav { display: flex; gap: 12px; margin: 0 0 20px; font-size: 13px; }
.admin-nav a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.admin-nav a:hover, .admin-nav a.is-on { color: var(--fg); border-bottom-color: #444; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: end; }
.admin-create { display: grid; gap: 12px; margin: 16px 0 8px; }
.admin-registration-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #0b0b0b;
}
.admin-registration-form .btn { min-height: 32px; margin-left: auto; padding-inline: 10px; font-size: 12px; }
.member-row { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-meta { margin: 3px 0 0; font-size: 12px; }
.user-table-panel h2 { margin: 0 0 12px; }
.user-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #0b0b0b;
}
.user-table-wrap:focus-visible { outline: 1px solid #d8d8d8; outline-offset: 2px; }
.user-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
.user-table th, .user-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.user-table th { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.user-table tbody tr:last-child td { border-bottom: 0; }
.user-table tbody tr:hover { background: #101010; }
.user-table strong { font-weight: 600; }
.user-table-flags { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.user-table-registered { color: var(--muted); font-variant-numeric: tabular-nums; }
.user-table-ip { color: var(--fg); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.user-table .user-table-number { text-align: right; font-variant-numeric: tabular-nums; }
.user-table-action { width: 1%; text-align: right !important; }
.user-table-action .btn { min-height: 30px; padding: 0 9px; font-size: 12px; }
.admin .user-table-panel { margin-top: 28px; padding-top: 20px; }
@media (max-width: 599px) {
  .admin-registration-form .admin-check { flex: 1 1 100%; }
  .admin-registration-form .btn { width: 100%; margin-left: 0; }
}
.admin-intro { margin: -8px 0 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { min-width: 220px; }
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  position: sticky;
  top: 48px;
  z-index: 5;
  margin-top: 20px;
  padding: 8px 0;
  background: var(--bg);
}
.admin-toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
  width: auto;
  padding: 8px 10px;
}
.admin-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-filters .btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
.admin-count { margin: 0; margin-left: auto; font-size: 13px; }
.admin-reorder-hint { margin: 8px 0 0; font-size: 13px; }
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #0b0b0b;
}
.admin-row {
  display: grid;
  grid-template-columns: 36px 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #0b0b0b;
}
.admin-row.is-personal { grid-template-columns: 40px minmax(0, 1fr); }
.admin-row:last-child { border-bottom: 0; }
.admin-row[hidden] { display: none !important; }
.admin-drag {
  display: grid;
  place-items: center;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.admin-drag:active { cursor: grabbing; }
.admin-list.is-locked .admin-drag { cursor: default; opacity: 0.35; pointer-events: none; }
.admin-preview {
  position: relative;
  width: 40px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}
.admin-preview .cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.admin-preview .play-badge {
  width: 16px;
  height: 16px;
  left: auto;
  right: 2px;
  bottom: auto;
  top: 2px;
  border-width: 1px;
}
.admin-preview .play-badge::after {
  left: 5px;
  top: 4px;
  border-width: 4px 0 4px 7px;
}
.admin-meta { min-width: 0; }
.admin-meta h2 { margin: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-meta .muted { margin: 2px 0 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.admin-actions .btn { min-height: 30px; padding: 0 8px; font-size: 12px; }
.admin-empty { margin: 12px 0 0; }
@media (min-width: 880px) {
  .admin-row { grid-template-columns: 36px 40px minmax(0, 1fr) auto; }
  .admin-row.is-personal { grid-template-columns: 40px minmax(0, 1fr) auto; }
}
@media (max-width: 879px) {
  .admin-actions { grid-column: 1 / -1; padding-left: 46px; }
}
.admin-panel { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.member-list { padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.drop-zone {
  margin: 8px 0 28px;
  padding: 16px 16px 14px;
  border: 2px dashed #8a8a8a;
  background: #161616;
  text-align: center;
}
.drop-zone.is-over { border-color: #f2f2f2; background: #242424; }
.drop-zone.is-busy { pointer-events: none; }
.drop-zone.is-busy > :not(.drop-progress):not(.drop-status) { opacity: 0.7; }
.drop-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.drop-zone .muted { margin: 0 auto 16px; max-width: 34rem; }
.drop-zone label { text-align: left; max-width: 28rem; margin: 0 auto; }
.drop-zone .upload-placement-choice {
  max-width: 40rem;
  margin: 0 auto 14px;
  justify-content: center;
  text-align: left;
}
.drop-zone .upload-placement-choice > label,
.drop-zone .upload-placement-choice > .muted {
  max-width: none;
  margin: 0;
}
.drop-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.drop-progress {
  max-width: 40rem;
  margin: 16px auto 0;
  padding: 12px;
  border: 1px solid #303030;
  border-radius: 6px;
  background: #0c0c0c;
  text-align: left;
}
.drop-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drop-progress-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.drop-progress-head span { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.drop-progress-track { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #272727; }
.drop-progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: #ededed; transition: width 120ms linear; }
.drop-progress-meta { margin: 7px 0 0; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.drop-progress.is-processing .drop-progress-track > span { opacity: 0.72; animation: upload-processing-pulse 1.1s ease-in-out infinite alternate; }
.drop-progress.is-error { border-color: #5a2c2c; }
.drop-progress.is-error .drop-progress-track > span { background: #d98f88; animation: none; }
@keyframes upload-processing-pulse { to { opacity: 0.38; } }
.drop-status {
  margin: 12px auto 0;
  max-width: 40rem;
  text-align: left;
  white-space: pre-wrap;
  color: var(--muted);
}
.drop-status.is-error { color: #f0b4ae; }

.admin-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 10px; margin-top: 12px; }
.admin-media-item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.admin-media-item.is-cover { border-color: #666; }
.admin-media.is-reordering,
.admin-list.is-reordering { user-select: none; }
body.is-reordering { cursor: grabbing; user-select: none; }
body.is-reordering * { cursor: grabbing !important; }
.admin-row.is-origin,
.admin-media-item.is-origin {
  visibility: hidden;
  pointer-events: none;
}
.admin-row.is-shifting,
.admin-media-item.is-shifting {
  position: relative;
  z-index: 1;
  transition: transform 0.22s cubic-bezier(.22, .8, .24, 1);
  will-change: transform;
}
.admin-row.is-dragging,
.admin-media-item.is-dragging {
  position: fixed;
  z-index: 90;
  margin: 0;
  opacity: 1;
  pointer-events: none;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.62);
  cursor: grabbing;
}
.admin-row.is-dragging {
  border: 1px solid #444;
  background: #111;
}
.admin-reorder-hole {
  position: fixed;
  z-index: 8;
  box-sizing: border-box;
  pointer-events: none;
  border: 1px dashed #5a5a5a;
  background: #121212;
  transition: left 0.22s cubic-bezier(.22, .8, .24, 1), top 0.22s cubic-bezier(.22, .8, .24, 1);
}
@media (prefers-reduced-motion: reduce) {
  .admin-row.is-shifting,
  .admin-media-item.is-shifting,
  .admin-reorder-hole { transition: none; }
}
.admin-tool { touch-action: manipulation; }
.admin-media-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
}
.admin-media-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.admin-media-preview:focus-visible { outline: 2px solid #ddd; outline-offset: -2px; }
.admin-media-item img,
.admin-media-item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.admin-cover-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgb(8 8 8 / 0.86);
  border: 1px solid #555;
  pointer-events: none;
}
.admin-video-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgb(8 8 8 / 0.86);
  border: 1px solid #555;
  pointer-events: none;
}
.admin-media-tools {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 8px 6px 6px;
  background: linear-gradient(to top, rgb(5 5 5 / 0.92), rgb(5 5 5 / 0.2), transparent);
}
.admin-tool-form { flex: 1 1 0; min-width: 0; margin: 0; touch-action: manipulation; }
.admin-tool {
  width: 100%;
  padding: 6px 4px;
  border: 1px solid #3a3a3a;
  background: #111;
  color: var(--fg);
  font-size: 11px;
  line-height: 1.1;
}
.admin-tool:hover { border-color: #666; background: #181818; }
.admin-tool-danger { color: #c98a84; border-color: #3a2220; }
.admin-tool-danger:hover { background: #1a1010; }

.site-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(24rem, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid #326246;
  border-radius: 10px;
  background: #0c1710;
  color: #e6f6eb;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.62);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-toast[hidden] { display: none; }
.site-toast.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.site-toast.is-error { border-color: #6c3430; background: #1b0e0d; color: #f5d9d6; }
.site-toast.is-warning { border-color: #725b2e; background: #1b160a; color: #f4e7c7; }
.site-toast.is-info { border-color: #365a70; background: #0c171d; color: #d7ebf5; }
.site-toast-icon {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #245c39;
  color: #fff;
  font-weight: 700;
}
.site-toast.is-error .site-toast-icon { background: #7a3530; }
.site-toast.is-warning .site-toast-icon { background: #7a6028; }
.site-toast.is-info .site-toast-icon { background: #315f78; }
.site-toast-message { flex: 1 1 auto; min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.site-toast-close {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: -4px -5px -4px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font-size: 20px;
  line-height: 1;
  opacity: 0.68;
}
.site-toast-close:hover { background: rgb(255 255 255 / 0.08); opacity: 1; }
.site-toast-close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; opacity: 1; }
@media (max-width: 599px) {
  .site-toast { right: 16px; bottom: 16px; }
}

.confirm-dialog {
  width: min(28rem, calc(100% - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid #333;
  background: #0b0b0b;
  color: var(--fg);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.72);
}
.confirm-dialog::backdrop { background: rgb(0 0 0 / 0.76); backdrop-filter: blur(2px); }
.confirm-dialog-card { padding: 24px; }
.confirm-dialog h2 { margin: 8px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.confirm-dialog [data-confirm-message] { margin: 12px 0 0; line-height: 1.5; }
.delete-progress-dialog .drop-progress-track { margin-top: 16px; }
.delete-progress-dialog .form-notice { margin-top: 14px; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.confirm-dialog-actions .btn { min-width: 92px; }

.create-user-dialog {
  position: fixed;
  inset: 0;
  width: min(31rem, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #383838;
  background: #0b0b0b;
  color: var(--fg);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.76);
}
.create-user-dialog::backdrop { background: rgb(0 0 0 / 0.78); backdrop-filter: blur(3px); }
.create-user-dialog-card { padding: 24px; }
.create-user-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.create-user-dialog h2 { margin: 7px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.035em; }
.create-user-dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #2f2f2f;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
}
.create-user-dialog-close:hover { border-color: #555; background: #151515; color: var(--fg); }
.create-user-dialog-close:focus-visible { outline: 2px solid #f2f2f2; outline-offset: 2px; }
.create-user-dialog-description { margin: 15px 0 0; line-height: 1.5; }
.create-user-dialog-error { margin: 14px 0 0; }
.create-user-dialog .create-user-form { margin-top: 22px; }
.create-user-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.create-user-dialog-actions .btn { min-width: 112px; }
@media (max-width: 599px) {
  .create-user-dialog-card { padding: 20px 18px; }
  .create-user-dialog-actions { display: grid; grid-template-columns: 1fr; }
  .create-user-dialog-actions .btn { width: 100%; }
}

.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 12px; }
.lightbox-bar div { display: flex; align-items: center; gap: 8px; }
.lightbox-media-favorite[hidden],
.lightbox-media-snout[hidden] { display: none !important; }
.lightbox-media-favorite .media-favorite-button { width: 46.8px; height: 36px; }
.lightbox-media-snout .media-snout-button { width: 36px; height: 36px; }
.lightbox-bar .gallery-preference-button:not(.has-label) .gallery-preference-icon {
  width: 25.6px;
  height: 25.6px;
  filter: none;
}
@media (max-width: 359px) {
  .lightbox-bar { padding-inline: 8px; }
  .lightbox-bar div { gap: 6px; }
  .lightbox-bar .download-btn { justify-content: center; width: 36px; height: 36px; padding: 0; }
  .lightbox-bar .download-btn span { display: none; }
}
.lightbox-stage { --lightbox-nav-width: 64px; position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; }
.lightbox-media-frame { position: absolute; inset: 0; overflow: hidden; }
/* Keep the entire video element, including native controls, outside arrow hit areas. */
.lightbox-stage.is-video { --lightbox-nav-width: clamp(44px, 5vw, 64px); }
.lightbox-stage.is-video .lightbox-media-frame { inset-inline: var(--lightbox-nav-width); }
.lightbox-stage img, .lightbox-stage video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
}
.lightbox-stage [hidden] { display: none !important; }
.lightbox-video-poster {
  z-index: 0;
  opacity: 0.72;
  filter: brightness(0.62) saturate(0.84);
  transform: scale(1.01);
  transition: opacity 180ms ease;
}
.lightbox-video-poster.is-hidden { opacity: 0; }
#lightbox-img { z-index: 1; }
.lightbox-stage-video {
  z-index: 1;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  background: #000;
  transition: opacity 180ms ease;
}
.lightbox-stage-video.is-ready { opacity: 1; pointer-events: auto; }
.lightbox-loading {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgb(255 255 255 / 0.88);
  font-size: 13px;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.lightbox-loading[hidden] { display: none !important; }
.lightbox-loading::before {
  content: "";
  position: absolute;
  width: 148px;
  height: 54px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 999px;
  background: rgb(5 5 5 / 0.68);
  box-shadow: 0 10px 34px rgb(0 0 0 / 0.38);
  backdrop-filter: blur(8px);
}
.lightbox-loading > * { position: relative; z-index: 1; }
.lightbox-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgb(255 255 255 / 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: feed-spin 0.7s linear infinite;
}
.lightbox-loading.is-error { color: #ffd5d1; }
.lightbox-loading.is-error::before { width: 220px; border-color: rgb(165 109 104 / 0.42); background: rgb(31 10 9 / 0.82); }
.lightbox-loading.is-error .lightbox-spinner { display: none; }
.lightbox-stage .nav { position: absolute; z-index: 4; top: 0; height: 100%; width: var(--lightbox-nav-width); border: 0; background: none; font-size: 40px; color: rgb(242 242 242 / 0.8); }
.lightbox-stage .prev { left: 0; }
.lightbox-stage .next { right: 0; }
.lightbox-thumbs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 8px 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
  overscroll-behavior: contain;
}
.lightbox-thumbs::-webkit-scrollbar {
  height: 6px;
}
.lightbox-thumbs::-webkit-scrollbar-track {
  background: transparent;
}
.lightbox-thumbs::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 999px;
}
.lightbox-thumbs::-webkit-scrollbar-thumb:hover {
  background: #555;
}
.lightbox-thumbs::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.lightbox-thumbs button {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 76px;
  padding: 0;
  border: 0;
  background: #111;
  opacity: 0.55;
  overflow: hidden;
}
.lightbox-thumbs button.is-active { opacity: 1; outline: 1px solid var(--fg); }
.lightbox-thumbs button.is-video { opacity: 0.85; }
.lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumbs .play-badge {
  width: 28px;
  height: 28px;
  left: 4px;
  bottom: 4px;
  border-width: 1px;
}
.lightbox-thumbs .play-badge::after {
  left: 10px;
  top: 7px;
  border-width: 7px 0 7px 11px;
}

.feed-sentinel { height: 1px; }
.feed-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 22px 16px 28px;
  font-size: 13px;
  color: var(--muted);
}
.feed-status[hidden] { display: none !important; }
.feed-status.is-error .feed-spinner { display: none; }
.feed-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #333;
  border-top-color: #e6e6e6;
  border-radius: 50%;
  animation: feed-spin 0.7s linear infinite;
}
@keyframes feed-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
