#photosView {
  width: min(1120px, calc(100% - 72px));
  --photo-frame: #fffaf3;
  --photo-frame-edge: #dfcbb9;
  --photo-surface: #fffdf9;
  --photo-surface-hover: #f7ede2;
  --photo-text: #38261c;
  --photo-muted: #6c5648;
  --photo-accent: #984016;
  --photo-error: #a42c38;
  --photo-heart: #a12249;
  --photo-heart-fill: #fce5ec;
  --photo-button-text: #fff9f2;
  --photo-button-fill: #a64117;
  --photo-button-hover: #8f3511;
}
html.dark #photosView {
  --photo-frame: #27211e;
  --photo-frame-edge: #58473c;
  --photo-surface: #332b26;
  --photo-surface-hover: #45362d;
  --photo-text: #f6ebe2;
  --photo-muted: #cbb6a6;
  --photo-accent: #ffc395;
  --photo-error: #ffadb8;
  --photo-heart: #ffc1ce;
  --photo-heart-fill: #512b37;
  --photo-button-text: #2f180c;
  --photo-button-fill: #eeb485;
  --photo-button-hover: #ffca9d;
}
.photo-heading, .photo-account, .photo-heading h1 {
  display: flex;
  align-items: center;
}
.photo-heading {
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.photo-heading h1 {gap: 13px; font-size: clamp(32px, 5vw, 47px); line-height: 1.15; font-weight: 780;}
.photo-heading h1 .photo-symbol {width: 40px; height: 40px; color: var(--photo-accent); transform: rotate(-12deg);}
.photo-account {gap: 10px; flex-wrap: wrap;}
.photo-symbol {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: none;
  background: currentColor;
  mask: var(--photo-icon) center / contain no-repeat;
}
.photo-cat-icon {
  --photo-icon: url("assets/photo-cat.svg?v=3");
  color: var(--photo-accent);
}
.photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 17px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .2s, background-color .2s;
}
.photo-button-primary {
  color: var(--photo-button-text);
  background-color: var(--photo-button-fill);
  border-color: var(--photo-button-fill);
}
.photo-button-soft {color: var(--photo-accent); background: var(--photo-surface); border-color: var(--photo-frame-edge);}
.photo-button:disabled {opacity: .56; cursor: default;}
.photo-button:not(:disabled):active {transform: scale(.96);}
.photo-notice {margin-top: 12px; color: var(--photo-accent); overflow-wrap: anywhere;}
.photo-notice[data-state=error], .photo-empty[data-state=error] {color: var(--photo-error);}
.photo-empty {color: var(--photo-muted); margin: 12px 0;}
.photo-credit-line {margin-top: clamp(40px, 6vw, 74px); text-align: center; color: var(--photo-muted); font-size: 14px;}
#photosView .back-link {display: table; margin: 15px auto 0;}
#photosView .photo-masonry {
  --photo-columns: 3;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .94fr);
  grid-auto-rows: 1px;
  gap: 0 24px;
  align-items: stretch;
  margin-top: 29px;
  overflow: clip;
  overflow-clip-margin: 16px;
}
#photosView .photo-masonry:empty {display: none;}
.photo-track {position: relative; min-width: 0; min-height: 0;}
.photo-track:focus-within {z-index: 1;}
#photosView .photo-card {
  --photo-radius: clamp(22px, 3.4vw, 40px);
  display: block;
  height: 100%;
  position: relative;
  overflow: visible;
  border: 1px solid var(--photo-frame-edge);
  border-radius: var(--photo-radius);
  padding: clamp(5px, .74vw, 10px);
  background: var(--photo-frame);
  transform: translate3d(var(--project-scroll-x, 0px), var(--project-scroll-y, 0px), 0);
  scale: 1;
  transition: scale .32s cubic-bezier(.22,1,.36,1);
  opacity: var(--project-opacity, 1);
}
#photosView .photo-card:has(:focus-visible) {opacity: 1; transform: none;}
#photosView .photo-card::before {content: none;}
#photosView .photo-card::after {padding: 4px;}
.photo-crop {width: 100%; height: 100%; border-radius: calc(var(--photo-radius) - 8px); overflow: hidden; background: var(--photo-surface-hover);}
.photo-crop>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-caption {
  pointer-events: none;
  position: absolute;
  bottom: 18px;
  left: 18px;
  max-width: calc(100% - 105px);
  display: grid;
  padding: 7px 12px;
  background: var(--photo-surface);
  color: var(--photo-text);
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.45;
}
.photo-note-text {white-space: pre-wrap; overflow-wrap: anywhere; max-height: 4.35em; overflow: hidden;}
.photo-author {color: var(--photo-accent); font-size: 12px; overflow-wrap: anywhere;}
.photo-like {
  position: absolute;
  right: 17px;
  bottom: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 51px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--photo-frame-edge);
  border-radius: 20px;
  background: var(--photo-surface);
  color: var(--photo-text);
}
.photo-like[aria-pressed=true] {background: var(--photo-heart-fill); color: var(--photo-heart);}
.photo-like[aria-disabled=true] {cursor: wait;}
.photo-like-count {font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;}
.photo-burst {position: absolute; inset: 0; pointer-events: none;}
.photo-particle {position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; color: #ffd099;}
.photo-particle-dot {background: #ffa8b8; border-radius: 50%;}
.photo-particle-dot:nth-child(even) {width: 6px; height: 6px; background: #ffdfac;}
@media(hover:hover) and (pointer:fine) {
  .photo-track:hover {z-index: 1;}
  #photosView .photo-card:hover {scale: 1.055;}
  .photo-button-primary:not(:disabled):hover {background-color: var(--photo-button-hover);}
  .photo-button-soft:not(:disabled):hover {background-color: var(--photo-surface-hover);}
}
.photo-dialog.info-dialog {
  width: min(580px, calc(100% - 28px));
  max-height: min(82dvh, 770px);
  padding: clamp(24px, 5vw, 36px);
  border: 2px solid var(--photo-frame-edge);
  border-radius: 32px;
  background: var(--photo-frame);
  color: var(--photo-text);
  box-shadow: none;
  overscroll-behavior: contain;
}
.photo-dialog.info-dialog::backdrop {background: #34251952;}
html.dark #photosView .photo-dialog::backdrop {background: #100d0b9c;}
.photo-dialog:has([data-photo-login]:not([hidden])) {width: min(378px, calc(100% - 28px)); text-align: center;}
.photo-dialog [data-photo-login] {padding-block: 8px 10px;}
.photo-dialog .photo-dialog-close {top: 10px; right: 10px; color: var(--photo-muted);}
.photo-dialog .photo-dialog-close:hover {color: var(--photo-text); background: var(--photo-surface-hover);}
.photo-dialog.info-dialog h2 {margin: 0 35px 20px 0; font-size: 26px;}
.photo-dialog [data-photo-login] h2 {margin: 7px 0 20px;}
.photo-dialog-emblem {display: block; width: 58px; height: 58px; margin-inline: auto;}
.photo-github {width: 100%;}
.photo-form {display: grid; gap: 16px;}
.photo-picker {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 17px 10px;
  text-align: center;
  border: 2px dashed var(--photo-frame-edge);
  border-radius: 19px;
  background: var(--photo-surface);
  color: var(--photo-accent);
  cursor: pointer;
}
.photo-picker small, .photo-field small {color: var(--photo-muted);}
.photo-picker .photo-symbol {width: 31px; height: 31px;}
.photo-picker input {position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer;}
.photo-picker:focus-within {outline: 3px solid var(--photo-accent); outline-offset: 2px;}
.photo-previews {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0;}
.photo-previews>li {position: relative;}
.photo-previews img, .photo-history-images img {display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 13px; background: var(--photo-surface);}
.photo-preview-remove {position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--photo-surface); color: var(--photo-text);}
.photo-preview-remove .photo-symbol {width: 17px; height: 17px;}
.photo-field {display: grid; gap: 5px;}
.photo-field>span {display: flex; align-items: center; justify-content: space-between; font-weight: 650;}
.photo-field textarea {font: inherit; resize: vertical; color: var(--photo-text); border: 1px solid var(--photo-frame-edge); background: var(--photo-surface); padding: 10px 12px; border-radius: 13px;}
.photo-field textarea::placeholder {color: var(--photo-muted);}
.photo-anonymous {display: flex; align-items: center; gap: 8px; min-height: 33px;}
.photo-anonymous input {width: 17px; height: 17px; accent-color: var(--photo-accent);}
.photo-form .photo-notice {margin: 0;}
.photo-history-list {display: grid; gap: 10px;}
.photo-history-card {display: grid; gap: 8px; border: 1px solid var(--photo-frame-edge); padding: 13px; border-radius: 17px; background: var(--photo-surface); overflow-wrap: anywhere;}
.photo-history-head, .photo-history-actions {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;}
.photo-history-actions {margin-top: 17px;}
.photo-history-head time {font-size: 13px; color: var(--photo-muted);}
.photo-status {display: inline-block; padding: 2px 9px; border-radius: 999px; background: #ffe0b3; color: #6c451b; font-size: 12px;}
.photo-status[data-status=approved] {background: #dbe6cb; color: #305123;}
.photo-status[data-status=rejected] {background: #ffd9df; color: #832f42;}
html.dark #photosView .photo-status {background: #4c3726; color: #ffdaa5;}
html.dark #photosView .photo-status[data-status=approved] {background: #303d29; color: #d1ebbb;}
html.dark #photosView .photo-status[data-status=rejected] {background: #4d2b34; color: #ffc5cf;}
.photo-reject-reason {color: var(--photo-muted);}
#photosView :is(button, a, textarea, input):focus-visible {outline-color: var(--photo-accent);}
.photo-history-images {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;}
@media(max-width:800px) {
  #photosView {width: calc(100% - 38px);}
  #photosView .photo-masonry {--photo-columns: 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 17px;}
}
@media(max-width:490px) {
  #photosView .photo-masonry {--photo-columns: 1; grid-template-columns: minmax(0, 1fr);}
  .photo-heading h1 .photo-symbol {width: 33px; height: 33px;}
  .photo-account .photo-button {padding-inline: 10px; gap: 4px;}
}
@media(prefers-reduced-motion:reduce) {
  #photosView .photo-card, #photosView .photo-button {transform: none !important; scale: none !important; transition: none;}
  #photosView .photo-dialog::backdrop {animation: none;}
}
