.moments[hidden],
.moments [hidden] {
  display: none !important;
}
.moments {
  padding: 60px 0;
  background: #f6f1e7;
  color: #111827;
  border-block: 1px solid #e6d9c0;
  overflow: hidden;
}
.moments-shell {
  max-width: 1320px;
  margin: auto;
  padding: 0 28px;
}
.moments-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}
.moments-eyebrow {
  color: #7b1e22;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.moments h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  margin: 6px 0 8px;
  color: #101829;
}
.moments-description {
  margin: 0;
  color: #655b51;
  font-size: 1rem;
}
.moments-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.moments button,
.moments-dialog button {
  font: inherit;
  cursor: pointer;
}
.moments-control {
  border: 1px solid #b9a78b;
  border-radius: 50%;
  height: 46px;
  min-width: 46px;
  background: #fffdf7;
  color: #61181c;
  font-size: 1.1rem;
}
.moments-control:hover {
  background: #7b1e22;
  color: white;
}
.moments-control:disabled {
  opacity: 0.45;
  cursor: default;
}
.moments button:focus-visible,
.moments a:focus-visible,
.moments-dialog :focus-visible {
  outline: 3px solid #2464b3;
  outline-offset: 4px;
}
.moments-viewport {
  overflow: hidden;
  direction: ltr;
  touch-action: pan-y;
  position: relative;
  padding: 6px 0 10px;
}
.moments-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.moments-transition {
  position: absolute;
  top: 6px;
  left: 0;
  pointer-events: none;
  z-index: 1;
}
.moments-group {
  display: flex;
  gap: 20px;
  padding-right: 20px;
}
.moments-card {
  width: var(--photo-width, 360px);
  padding: 0;
  border: 1px solid #e3d7c7;
  border-radius: 20px;
  overflow: hidden;
  background: #fffdf8;
  color: #162032;
  box-shadow: 0 8px 20px #13243b08;
  text-align: start;
  flex-shrink: 0;
}
.moments-card:hover {
  border-color: #ac8650;
}
.moments-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #e5ded2;
}
.moments-caption {
  display: block;
  padding: 17px 19px;
  min-height: 84px;
}
.moments-name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.moments-date {
  display: block;
  color: #75634f;
  font-size: 0.83rem;
  margin-top: 5px;
}
.moments-note {
  margin-top: 18px;
  color: #786953;
  font-size: 0.85rem;
}
.moments-status {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.moments-dialog {
  border: 1px solid #b5a68b;
  border-radius: 18px;
  padding: 0;
  width: min(1100px, 94vw);
  max-width: 94vw;
  max-height: 94dvh;
  background: #101624;
  color: white;
  box-shadow: 0 24px 90px #0008;
}
.moments-dialog::backdrop {
  background: #050915e6;
}
.moments-dialog .viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 12px;
}
.moments-dialog .viewer-image {
  width: 100%;
  height: min(62dvh, 680px);
  object-fit: contain;
  display: block;
  background: #090e19;
}
.moments-dialog button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #657088;
  border-radius: 12px;
  background: #242e41;
  color: white;
}
.moments-dialog a {
  color: #f3d59a;
}
.moments-dialog .viewer-caption {
  padding: 0 20px 18px;
  white-space: pre-wrap;
  max-height: 16dvh;
  overflow: auto;
}
.moments-dialog .viewer-error {
  padding: 20px;
  color: #f3d59a;
}
.gallery-admin-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.gallery-admin-card {
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 12px;
}
.gallery-admin-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
@media (max-width: 700px) {
  .moments {
    padding: 36px 0;
  }
  .moments-shell {
    padding: 0 18px;
  }
  .moments-head {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .moments-group {
    gap: 14px;
    padding-right: 14px;
  }
  .moments-controls {
    align-self: flex-end;
  }
  .moments-caption {
    padding: 13px 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .moments-track {
    will-change: auto;
  }
  .moments * {
    scroll-behavior: auto !important;
  }
}
/* v22 approved visual language: navy / burgundy / restrained gold. */
.moments {
  background: radial-gradient(ellipse at 50% 0, #17283c 0, #0b1423 70%);
  color: #faf5e9;
  border-block: 1px solid #b18b4a40;
  padding: 64px 0;
}
.moments + .moments {
  border-top: 0;
  padding-top: 52px;
}
.moments-shell {
  max-width: 1400px;
}
.moments-head {
  justify-content: center;
  text-align: center;
  margin-bottom: 28px;
}
.moments h2 {
  color: #fff6e6;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.5;
}
.moments h2:after {
  content: '';
  display: block;
  width: 44px;
  height: 2px;
  background: #caa15c;
  margin: 12px auto;
}
.moments-eyebrow {
  display: none;
}
.moments-description {
  color: #e0d6c5;
  line-height: 1.8;
}
.moments-controls {
  justify-content: center;
  margin: 24px auto 0;
  direction: ltr;
}
.moments-control {
  background: transparent;
  border-color: #c5a16a;
  color: #f9edce;
  min-width: 48px;
  height: 48px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.moments-control:nth-child(2) {
  background: #771f34;
}
.moments-control:hover:not(:disabled) {
  background: #8a2941;
  transform: translateY(-2px);
}
.moments-card {
  position: relative;
  border: 1px solid #c3a5789c;
  border-radius: 12px;
  background: #182337;
  box-shadow: none;
  color: white;
}
.moments-card img {
  aspect-ratio: 4/3;
  background: #172235;
  transition: filter 0.2s;
}
.moments-card:hover img {
  filter: brightness(1.08);
}
.moments-caption {
  position: absolute;
  inset: auto 0 0;
  min-height: 100px;
  padding: 38px 20px 18px;
  background: linear-gradient(transparent, #060d19e8);
  white-space: normal;
}
.moments-name {
  font-size: 1.13rem;
  color: #fff;
  line-height: 1.65;
}
.moments-date {
  color: #eee2ce;
}
.moments-note {
  text-align: center;
  color: #d1c4af;
  margin: 16px 0 0;
}
.moments-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
}
.moments-filter {
  background: transparent;
  color: #f7ead0;
  border: 1px solid #b2915e;
  border-radius: 30px;
  padding: 10px 22px;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
}
.moments-filter[aria-pressed='true'] {
  background: #7b243d;
  border-color: #b97983;
}
.moments-filter:hover {
  background: #422735;
}
.moments :focus-visible,
.moments-dialog :focus-visible {
  outline: 3px solid #f4ca7d;
  outline-offset: 4px;
}
.video-moments .moments-card img {
  aspect-ratio: 16/9;
}
.video-moments .moments-caption {
  position: static;
  background: #101d30;
  padding: 16px 18px;
  min-height: 100px;
}
.video-moments .moments-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 3.3em;
}
.video-play {
  position: absolute;
  top: calc((var(--photo-width) * 9 / 16) / 2);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #f8e2b9b3;
  background: #711f37d9;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  pointer-events: none;
}
.video-rank,
.video-duration {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: #091322d9;
  border: 1px solid #ba965e;
  border-radius: 7px;
  padding: 3px 9px;
  color: #ffe5b5;
}
.video-duration {
  top: auto;
  bottom: calc(100% - var(--photo-width) * 9 / 16 + 10px);
  inset-inline-start: auto;
  inset-inline-end: 12px;
  font-size: 0.8rem;
  color: white;
  border: 0;
}
.video-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #070c14;
  display: block;
}
.gallery-admin-tools {
  display: grid;
  gap: 16px;
  background: #f7f4ed;
  border: 1px solid #d3b984;
  padding: 22px;
  border-radius: 16px;
  margin: 20px 0;
  color: #182438;
}
.gallery-admin-tools label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.gallery-admin-tools input,
.gallery-admin-tools select {
  max-width: 100%;
  padding: 12px;
  border: 1px solid #9eabba;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #172235;
}
.gallery-admin-tools .gallery-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gallery-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gallery-upload-preview {
  display: flex;
  gap: 10px;
  overflow: auto;
}
.gallery-upload-preview img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
}
.gallery-admin-status {
  white-space: pre-wrap;
  line-height: 1.7;
}
.gallery-admin-list {
  margin-block: 20px;
}
.gallery-admin-card {
  background: #fff;
  color: #172235;
}
.gallery-admin-card button {
  margin: 4px;
}
.gallery-admin-card img {
  border-radius: 8px;
}
@media (max-width: 700px) {
  .moments {
    padding: 38px 0;
  }
  .moments-head {
    align-items: center;
  }
  .moments-controls {
    align-self: center;
  }
  .moments-filter {
    padding: 8px 13px;
    font-size: 0.85rem;
  }
  .moments-filters {
    gap: 7px;
  }
  .moments-caption {
    padding: 34px 14px 14px;
  }
  .moments-name {
    font-size: 1rem;
  }
  .moments-shell {
    padding-inline: 16px;
  }
  .gallery-admin-tools {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .moments * {
    transition: none !important;
    animation: none !important;
  }
}

.gallery-admin-tools,
.gallery-admin-tools * {
  box-sizing: border-box;
  min-width: 0;
}
.gallery-admin-tools input,
.gallery-admin-tools select {
  width: 100%;
}
.gallery-admin-tools input[type='checkbox'] {
  width: auto;
  flex-shrink: 0;
}
.gallery-admin-status {
  overflow-wrap: anywhere;
}
.gallery-admin-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
