:root {
  --bg: #ffffff;
  --fg: #3a3a3a;
  --muted: #8d8d8d;
  --line: #e8e8e8;
  --link-line: #bbbbbb;
  --link-line-hover: #646464;
  --selection: #ededed;
  --name-a: #1d4ed8;
  --name-b: #0f766e;
  --name-c: #b45309;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --fg: #e5e5e5;
    --muted: #707070;
    --line: #2e2e2e;
    --link-line: #505050;
    --link-line-hover: #a0a0a0;
    --selection: #ffffff14;
    --name-a: #7aa2ff;
    --name-b: #5eead4;
    --name-c: #fbbf24;
    color-scheme: dark;
  }
}

*, ::before, ::after {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27g%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%20color-interpolation-filters%3D%27sRGB%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.8%27%20numOctaves%3D%274%27%20seed%3D%277%27%20stitchTiles%3D%27stitch%27%20result%3D%27t%27%2F%3E%3CfeColorMatrix%20in%3D%27t%27%20type%3D%27matrix%27%20values%3D%270%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.55%200.55%200.55%200%20-0.65%27%20result%3D%27a%27%2F%3E%3CfeComposite%20in%3D%27SourceGraphic%27%20in2%3D%27a%27%20operator%3D%27in%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27220%27%20height%3D%27220%27%20fill%3D%27%23000%27%20filter%3D%27url%28%23g%29%27%20opacity%3D%270.085%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 28px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27220%27%20height%3D%27220%27%3E%3Cfilter%20id%3D%27g%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%20color-interpolation-filters%3D%27sRGB%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.8%27%20numOctaves%3D%274%27%20seed%3D%277%27%20stitchTiles%3D%27stitch%27%20result%3D%27t%27%2F%3E%3CfeColorMatrix%20in%3D%27t%27%20type%3D%27matrix%27%20values%3D%270%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.55%200.55%200.55%200%20-0.65%27%20result%3D%27a%27%2F%3E%3CfeComposite%20in%3D%27SourceGraphic%27%20in2%3D%27a%27%20operator%3D%27in%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27220%27%20height%3D%27220%27%20fill%3D%27%23fff%27%20filter%3D%27url%28%23g%29%27%20opacity%3D%270.13%27%2F%3E%3C%2Fsvg%3E");
  }
}

@media (prefers-contrast: more) {
  body {
    background-image: none;
  }
}

::selection {
  background: var(--selection);
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.album-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) 24px clamp(24px, 5vh, 56px);
}

.album-head {
  max-width: 640px;
  margin: 0 auto clamp(36px, 7vh, 64px);
  text-align: center;
}

.wordmark {
  display: inline-block;
  margin: 0;
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s ease;
}

@media (hover: hover) {
  .wordmark:hover {
    transform: translateY(-2px) rotate(-.6deg);
  }
}

.wordmark-grad {
  color: var(--name-a);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark-grad {
    background: linear-gradient(120deg, var(--name-a), var(--name-b) 46%, var(--name-c));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.wordmark-sub {
  font-weight: 400;
}

.album-intro {
  margin: clamp(8px, 1.5vh, 14px) 0 0;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
}

.album-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 18px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.text-link {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .16s ease;
}

@media (hover: hover) {
  .text-link:hover {
    text-decoration-color: var(--link-line-hover);
  }
}

.text-link:focus-visible {
  outline: 2px solid var(--link-line-hover);
  outline-offset: 4px;
  border-radius: 2px;
}

.group-title {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--fg);
}

.upload-panel {
  margin: 0 0 clamp(32px, 6vh, 56px);
}

.dropzone {
  margin-top: 12px;
  padding: clamp(24px, 4vh, 40px) 24px;
  border: 1px dashed var(--link-line);
  border-radius: 2px;
  text-align: center;
  transition: border-color .16s ease, background-color .16s ease;
}

.dropzone.is-over {
  border-color: var(--link-line-hover);
  background: var(--selection);
}

.dropzone-title {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}

.dropzone-hint {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
}

.upload-status {
  min-height: 24px;
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 24px;
}

.pill {
  appearance: none;
  display: inline-block;
  margin: 0;
  padding: 6px 26px;
  border: 1px solid var(--link-line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 28px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, opacity .16s ease;
}

@media (hover: hover) {
  .pill:hover {
    border-color: var(--link-line-hover);
    transform: translateY(-1px);
  }
}

.pill:focus-visible {
  outline: 2px solid var(--link-line-hover);
  outline-offset: 3px;
}

.pill:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}

.gallery-section {
  margin-top: 0;
}

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.gallery-count {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .02em;
}

.gallery {
  column-width: 240px;
  column-gap: 16px;
}

.photo {
  break-inside: avoid;
  margin: 0 0 16px;
  animation: rise .55s cubic-bezier(.19, 1, .22, 1) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}

.photo-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--line);
  transition: opacity .18s ease, transform .18s ease;
}

@media (hover: hover) {
  .photo-button:hover img {
    opacity: .9;
    transform: translateY(-1px);
  }
}

.photo-button:focus-visible {
  outline: 2px solid var(--link-line-hover);
  outline-offset: 3px;
  border-radius: 2px;
}

.photo-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  letter-spacing: .02em;
}

.empty {
  margin: 0;
  padding: clamp(40px, 9vh, 88px) 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 26px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 8vh, 80px) 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-wordmark {
  font-size: 26px;
}

.login-title {
  margin: clamp(28px, 5vh, 44px) 0 8px;
  font-size: 21px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: .01em;
}

.login-sub {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
}

.login-form {
  text-align: left;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .02em;
}

.field input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 28px;
  outline: none;
  transition: border-color .16s ease;
}

.field input:focus {
  border-bottom-color: var(--fg);
}

.login-submit {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.login-error {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--name-c);
  font-size: 13px;
  line-height: 24px;
  text-align: center;
}

.login-back {
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.site-footer {
  flex: 0 0 48px;
  height: 48px;
}

.site-footer > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 2px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  white-space: nowrap;
}

.footer-sign {
  font-weight: 700;
  letter-spacing: .04em;
}

.icp {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color .16s ease;
}

@media (hover: hover) {
  .icp:hover {
    color: var(--fg);
    text-decoration: underline;
    text-decoration-color: var(--link-line);
    text-underline-offset: 3px;
  }
}

.icp:focus-visible {
  outline: 2px solid var(--link-line-hover);
  outline-offset: 3px;
  border-radius: 2px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 20, .94);
  color: #e5e5e5;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.lightbox-image {
  display: block;
  max-width: min(92vw, 1600px);
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  background: rgba(255, 255, 255, .04);
}

.lightbox-caption {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-top: 14px;
  color: #c9c9c9;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
}

.lightbox-delete {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: #c9c9c9;
  font: inherit;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 24px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .35);
  text-underline-offset: 3px;
  cursor: pointer;
}

.lightbox-delete:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-delete:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.stagger-0 { --stagger: 0; }
.stagger-1 { --stagger: 1; }
.stagger-2 { --stagger: 2; }

[data-animate] {
  opacity: 0;
  transform: translateY(6px);
  animation: rise .7s cubic-bezier(.19, 1, .22, 1) forwards;
  animation-delay: calc(var(--stagger, 0) * 80ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .album-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .album-head {
    margin-bottom: 36px;
  }

  .album-intro {
    font-size: 16px;
  }

  .gallery {
    column-gap: 12px;
  }

  .photo {
    margin-bottom: 12px;
  }

  .site-footer > div {
    padding-left: 20px;
    padding-right: 20px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-image {
    max-height: 72vh;
  }
}

@media (max-width: 420px) {
  .site-footer {
    flex-basis: auto;
    height: auto;
    min-height: 48px;
    padding-bottom: 8px;
  }

  .site-footer > div {
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 2px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .photo {
    animation: none;
  }

  .wordmark:hover,
  .pill:hover,
  .photo-button:hover img {
    transform: none;
  }
}
