/* Compact manual photo walls. Load after the site's existing stylesheets. */
.photo-gallery.pw-root {
  --pw-line: #a7afb52b;
  --pw-muted: #899298;
  --pw-text: #c8cdd1;
  --pw-frame: #0b0e11;
  --pw-width: clamp(160px, 15.5vw, 210px);
  --pw-gap: 16px;
  display: block;
  min-width: 0;
  width: 100%;
  margin: 42px 0 0;
  padding: 0;
  color: var(--pw-text);
  font-family: var(--font-sans, var(--sans, sans-serif));
}
.photo-gallery.pw-root.pw-credentials {
  --pw-width: clamp(112px, 10.2vw, 142px);
  --pw-gap: 18px;
  margin-top: 0;
}
.pw-root + [data-gallery-toggle] { display: none; }
.pw-root .pw-toolbar,
.pw-root .pw-meta,
.pw-root .pw-controls,
.pw-root .pw-footer { display: flex; align-items: center; }
.pw-root .pw-toolbar {
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--pw-line);
  padding: 0 0 12px;
}
.pw-root .pw-meta { gap: 15px; flex-wrap: wrap; }
.pw-root .pw-title { color: #c5cbd0; font-size: 11px; letter-spacing: 1.3px; }
.pw-root .pw-total {
  color: var(--pw-muted);
  font: 10px/1.5 var(--font-mono, var(--mono, monospace));
  letter-spacing: .7px;
  white-space: nowrap;
}
.pw-root .pw-controls { gap: 4px; flex-shrink: 0; }
.pw-root .pw-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #b7c0c7;
  font: 10px/1.4 var(--font-sans, var(--sans, sans-serif));
  letter-spacing: .5px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.pw-root .pw-control:hover:not(:disabled) { border-color: #a7b1b74d; color: #f2f4f5; }
.pw-root .pw-control:disabled { color: #687179; opacity: .45; cursor: default; }
.pw-root .pw-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #69737a66 transparent;
  cursor: grab;
  padding: 3px 1px 13px;
  outline-offset: 5px;
  scroll-padding-inline: 1px;
  scroll-snap-type: none;
  scroll-behavior: auto;
  touch-action: pan-x pan-y pinch-zoom;
}
.pw-root .pw-viewport::-webkit-scrollbar { height: 3px; }
.pw-root .pw-viewport::-webkit-scrollbar-track { background: transparent; }
.pw-root .pw-viewport::-webkit-scrollbar-thumb { background: #69737a66; }
.pw-root .pw-list {
  display: grid;
  position: relative;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(0, auto));
  grid-auto-columns: var(--pw-width);
  gap: 20px var(--pw-gap);
  width: max-content;
  min-width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pw-credentials .pw-list { grid-template-rows: minmax(0, auto); }
.pw-root .pw-card { display: block; width: var(--pw-width); min-width: 0; margin: 0; padding: 0; scroll-snap-align: none; }
.pw-root .pw-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #a7b0b323;
  border-radius: 0;
  background: var(--pw-frame);
  color: #e5e8ea;
  cursor: zoom-in;
  transition: border-color .22s ease;
}
.pw-root .pw-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(.72) brightness(.92);
  transition: filter .25s ease;
}
.pw-root .pw-thumb:hover,
.pw-root .pw-thumb:focus-visible { border-color: #b8c3cb99; }
.pw-root .pw-thumb:hover .pw-image,
.pw-root .pw-thumb:focus-visible .pw-image { filter: none; }
.pw-credentials .pw-thumb { aspect-ratio: 3 / 4; padding: 5px; background: #111518; }
.pw-credentials .pw-image { filter: none; }
.pw-root .pw-number,
.pw-root .pw-expand {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  bottom: 6px;
  min-width: 22px;
  min-height: 20px;
  background: #05080be6;
  color: #bfc7ce;
  font: 8px/1 var(--font-mono, var(--mono, monospace));
  pointer-events: none;
}
.pw-root .pw-number { left: 6px; letter-spacing: 1px; padding-left: 1px; }
.pw-root .pw-expand { right: 6px; font-size: 13px; opacity: 0; transition: opacity .18s ease; }
.pw-root .pw-thumb:hover .pw-expand,
.pw-root .pw-thumb:focus-visible .pw-expand { opacity: 1; }
.pw-root .pw-caption {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  height: 2.9em;
  margin: 9px 0 0;
  padding: 0;
  color: #88939b;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: .2px;
  overflow-wrap: anywhere;
}
.pw-credentials .pw-caption { font-size: 8px; line-height: 1.55; height: 3.1em; }
.pw-root .pw-footer { justify-content: space-between; gap: 16px; margin-top: 12px; }
.pw-root .pw-hint { color: #727e87; font-size: 9px; letter-spacing: .6px; }
.pw-root .pw-range { color: #a6b0b8; font: 9px/1.4 var(--font-mono, var(--mono, monospace)); letter-spacing: .8px; white-space: nowrap; }
.pw-root .pw-meter { position: relative; height: 1px; margin-top: 3px; background: #8c99a020; overflow: hidden; }
.pw-root .pw-meter-fill { display: block; position: absolute; height: 1px; background: #aab5be88; left: 0; width: 10%; }
.pw-root .pw-dragging,
.pw-root .pw-dragging .pw-thumb { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.pw-root .pw-control:focus-visible,
.pw-root .pw-thumb:focus-visible,
.pw-root .pw-viewport:focus-visible { outline: 1px solid #d7e0e6; outline-offset: 4px; }
.pw-root .pw-empty { margin: 0; color: #899298; font-size: 11px; }
.pw-root .pw-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; }
@media (max-width: 760px) {
  .photo-gallery.pw-root { --pw-width: 166px; --pw-gap: 12px; margin-top: 30px; }
  .photo-gallery.pw-root.pw-credentials { --pw-width: 118px; --pw-gap: 13px; margin-top: 0; }
  .pw-root .pw-toolbar { gap: 10px; margin-bottom: 12px; }
  .pw-root .pw-meta { gap: 8px; }
  .pw-root .pw-title { font-size: 10px; letter-spacing: .5px; }
  .pw-root .pw-total { font-size: 9px; }
  .pw-root .pw-control { min-width: 66px; min-height: 44px; padding: 8px 5px; font-size: 10px; }
  .pw-root .pw-list { row-gap: 16px; }
  .pw-root .pw-caption { font-size: 9px; }
  .pw-root .pw-expand { opacity: 1; }
  .pw-root .pw-hint { max-width: 68%; font-size: 8px; letter-spacing: .2px; }
  .pw-root .pw-range { font-size: 8px; letter-spacing: .3px; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-root *, .pw-root *::before, .pw-root *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .pw-root .pw-thumb, .pw-root .pw-control { border-color: ButtonText; }
  .pw-root .pw-control:disabled { color: GrayText; }
}
