@charset "UTF-8";

:root {
  --paper: #f4f4f2;
  --paper-deep: #e7e7e4;
  --ink: #2a2b29;
  --muted: #75766f;
  --line: #d7d7d3;
  --surface: #f9f8f5;
  --white: #ffffff;
  --danger: #9b2c24;
  --font-sans: "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-serif: Georgia, "Songti SC", "STSong", "SimSun", serif;
  --page: min(1440px, calc(100% - 96px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 分隔线用 100vw 通到屏幕两端，裁掉溢出部分避免横向滚动 */
  overflow-x: clip;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-sans);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
select:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.page-shell {
  width: var(--page);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.detail-header {
  position: relative;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 页头页脚的分隔线：内容有左右留白，但线要通到屏幕两端 */
.site-header::after,
.detail-header::after,
.site-footer::before,
.detail-footer::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  height: 1px;
  transform: translateX(-50%);
  background: var(--line);
  pointer-events: none;
}

.site-header::after,
.detail-header::after {
  bottom: 0;
}

.site-footer::before,
.detail-footer::before {
  top: 0;
}

/* 首页不显示头部分隔线 */
.gallery-page .site-header::after {
  display: none;
}

/* 收成胶囊后不再显示分隔线 */
.site-header.is-stuck::after {
  opacity: 0;
}

/* 首页、相册、分享页：更紧凑的导航，滚动后收成悬浮磨砂胶囊 */
.gallery-page .site-header,
.album-page .site-header,
.share-page .site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 78px;
  --header-flow: 78px;
  --pill-height: 62px;
  --pill-pad: 30px;
  max-width: var(--page);
  transition:
    top 380ms ease,
    min-height 380ms ease,
    margin-bottom 380ms ease,
    padding 380ms ease,
    border-radius 380ms ease,
    background-color 320ms ease,
    box-shadow 320ms ease;
}

.gallery-page .site-header.is-stuck,
.album-page .site-header.is-stuck,
.share-page .site-header.is-stuck {
  top: 10px;
  min-height: var(--pill-height);
  /* 补回收缩掉的高度，避免切换时下方内容跳动 */
  margin-bottom: calc(var(--header-flow) - var(--pill-height));
  /* 宽度保持与整条导航一致，只把外框变成胶囊 */
  padding: 0 var(--pill-pad);
  border-radius: 999px;
  /* 半透明纸色 + 强虚化，压在纯色底上也能透出下方内容 */
  background: color-mix(in srgb, var(--paper) 64%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(30px);
  backdrop-filter: saturate(1.6) blur(30px);
  /* 内高光 + 外描边 + 柔阴影，勾出玻璃的边界 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(28, 28, 24, 0.07),
    0 18px 40px -24px rgba(28, 28, 24, 0.45);
}

.gallery-page #albums,
.gallery-page #journal,
.album-photo {
  scroll-margin-top: 118px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

/* 站点头像：未上传时由 /api/avatar 返回默认头像 */
.brand-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-deep);
}

.footer-brand .brand-avatar {
  width: 26px;
  height: 26px;
}

/* 照片页是深色底，给头像加一圈细边 */
.detail-page .brand-avatar {
  box-shadow: 0 0 0 1px rgba(242, 241, 237, 0.16);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

/* 页头品牌：收敛为导航标签，避免与正文字体混淆 */
.site-header .brand-name,
.detail-header .brand-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.site-nav a {
  color: var(--muted);
  transition: color 200ms ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a,
.text-link,
.back-link {
  position: relative;
}

.site-nav > a:not(.admin-link)::after,
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms ease;
}

.site-nav > a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.admin-link {
  border: 1px solid var(--line);
  padding: 7px 18px;
  transition: background 180ms ease, color 180ms ease;
}

.admin-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
}

.text-link svg,
.back-link svg,
.download-button svg,
.upload-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.works-section {
  position: relative;
  padding-top: 34px;
  padding-bottom: 110px;
}

/* 板块分隔线同样通到屏幕两端 */
.works-section::before,
.journal-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 100vw;
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
}

.works-section::before {
  background: var(--ink);
}

.journal-section::before {
  background: var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}

.section-index {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.3;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 54px 26px;
}

.photo-card {
  display: block;
  min-width: 0;
}

.photo-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-deep);
  transition: transform 420ms cubic-bezier(.2,.7,.2,1);
}

.photo-card:hover .photo-media {
  transform: scale(1.015);
}

.photo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-number {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 34px;
  padding: 3px 8px;
  background: rgba(243, 242, 238, 0.9);
  color: var(--ink);
  font-size: 10px;
  text-align: center;
  letter-spacing: 0.08em;
}

.photo-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding-top: 16px;
}

.photo-caption > span {
  padding-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.photo-caption h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.photo-caption p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.gallery-status {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  text-align: center;
}

.gallery-status p {
  margin: 0;
}

.loading-line {
  display: block;
  width: 92px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.loading-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.empty-gallery {
  min-height: 420px;
  padding: 60px 24px;
  border: 1px solid var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-frame {
  width: 56px;
  height: 70px;
  margin-bottom: 26px;
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 var(--paper-deep);
}

.empty-eyebrow {
  margin: 0 0 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.empty-gallery h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
}

.empty-gallery > p:last-child {
  color: var(--muted);
}

.journal-section {
  position: relative;
  padding-top: 68px;
  padding-bottom: 100px;
}

.journal-heading {
  margin-top: 34px;
}

.journal-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.journal-empty {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.journal-list {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.journal-post {
  max-width: 680px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.journal-post-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.journal-post-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.journal-post-date {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.journal-post-body {
  margin-top: 16px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.journal-post-body p {
  margin: 0 0 18px;
  line-height: 1.9;
}

.journal-post-body p:last-child {
  margin-bottom: 0;
}

.journal-comment-toggle {
  margin-top: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.journal-comment-toggle:hover {
  color: var(--ink);
}

.journal-comments {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.journal-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.journal-comment-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.journal-comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.journal-comment-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.journal-comment-date {
  font-size: 11px;
  color: var(--muted);
}

.journal-comment-content {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.journal-comment-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.journal-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.journal-comment-form input,
.journal-comment-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

.journal-comment-form input:focus,
.journal-comment-form textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.journal-comment-form button {
  align-self: flex-start;
  padding: 7px 16px;
  border: none;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  cursor: pointer;
}

.journal-comment-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.journal-comment-status {
  font-size: 11px;
  color: var(--muted);
}

.about-note {
  margin-top: 28px !important;
  color: var(--muted);
  font-size: 12px;
}

.site-footer,
.detail-footer {
  position: relative;
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.footer-brand {
  color: var(--ink);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button-dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.button-dark:hover:not(:disabled) {
  opacity: 0.86;
}

.button-outline {
  border-color: var(--line);
}

.button-outline:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button-light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.button-light:hover {
  background: var(--surface);
}

.button-full {
  width: 100%;
}

.button-small {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 12px;
}

/* 照片详情 */
.detail-page {
  background: #101010;
  color: #f2f1ed;
}

.detail-header::after,
.detail-footer::before {
  background: #333330;
}

.brand-inverse {
  color: #f2f1ed;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #aaa9a4;
  font-size: 12px;
}

.back-link:hover {
  color: var(--white);
}

.detail-main {
  min-height: calc(100svh - 220px);
  padding-top: 34px;
  padding-bottom: 34px;
}

.detail-status {
  min-height: calc(100svh - 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: #aaa9a4;
  text-align: center;
}

.detail-error h1 {
  margin: 0;
  color: #f2f1ed;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
}

.detail-error > p:not(.empty-eyebrow) {
  margin: 0 0 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 48px;
  min-height: calc(100svh - 290px);
}

.photo-figure {
  position: relative;
  min-width: 0;
  min-height: 400px;
  height: calc(100svh - 280px);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}

.photo-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-step {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(242, 241, 237, 0.22);
  border-radius: 50%;
  background: rgba(16, 16, 16, 0.55);
  color: #f2f1ed;
  font-size: 24px;
  line-height: 1;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 180ms ease, border-color 180ms ease, opacity 320ms ease;
}

/* 桌面：鼠标进入图片区域才显示翻页按钮 */
@media (hover: hover) and (pointer: fine) {
  .photo-step {
    opacity: 0;
    pointer-events: none;
  }

  .photo-figure:hover .photo-step,
  .photo-figure:focus-within .photo-step {
    opacity: 1;
    pointer-events: auto;
  }
}

/* 触屏：常驻半透明，按下时加深 */
@media (hover: none) {
  .photo-step {
    opacity: 0.62;
  }

  .photo-step:active {
    opacity: 1;
  }
}

.photo-step:hover {
  background: rgba(242, 241, 237, 0.16);
  border-color: rgba(242, 241, 237, 0.5);
}

.photo-step-prev {
  left: 18px;
}

.photo-step-next {
  right: 18px;
}

.photo-counter {
  position: absolute;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: rgba(242, 241, 237, 0.65);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.photo-info {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 38px;
  padding: 28px 0;
}

.photo-date {
  margin: 0 0 18px;
  color: #858580;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.photo-info h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.photo-description {
  margin: 24px 0 0;
  color: #aaa9a4;
  font-size: 13px;
  line-height: 2;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.photo-specs {
  margin: 0 0 26px;
  border-top: 1px solid #333330;
}

.photo-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #292927;
  font-size: 11px;
}

.photo-specs dt {
  color: #777772;
}

.photo-specs dd {
  margin: 0;
  color: #c2c1bc;
  text-align: right;
}

.download-button {
  width: 100%;
  justify-content: space-between;
}

.download-status {
  margin: 12px 0 0;
  color: #777772;
  font-size: 10px;
  text-align: center;
  letter-spacing: 0.1em;
}

.detail-footer {
  min-height: 78px;
}

/* 管理后台 */
.login-view {
  min-height: calc(100svh - 108px);
  display: grid;
  place-items: center;
  padding-block: 64px;
}

.login-card {
  width: min(100%, 470px);
}

.login-card h1 {
  margin: 22px 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.login-intro {
  margin: 0 0 40px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label,
.admin-photo-form label,
#network-select-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

input,
select {
  min-height: 46px;
  padding: 10px 13px;
}

textarea {
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ink);
  background: var(--surface);
}

.form-error,
.queue-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.login-footnote {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.dashboard {
  padding-top: 58px;
  padding-bottom: 100px;
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.dashboard-heading h1 {
  margin: 8px 0 4px;
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.3;
}

.dashboard-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-heading-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-bg-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-bg-label {
  color: var(--muted);
  font-size: 12px;
}

#admin-bg-input {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.admin-floating-nav {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 8px;
  margin-bottom: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-floating-nav::-webkit-scrollbar {
  display: none;
}

.admin-floating-nav a {
  flex-shrink: 0;
  padding: 7px 16px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.admin-floating-nav a:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.admin-main-column {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.admin-side-column {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 28px;
  min-width: 0;
}

.admin-panel {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-number {
  color: var(--muted);
  font-size: 10px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.panel-note {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.drop-zone {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #a9a8a1;
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--ink);
  background: var(--paper-deep);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.upload-icon svg {
  width: 22px;
  height: 22px;
}

.drop-zone strong {
  margin-bottom: 4px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 400;
}

.drop-zone > span:not(.upload-icon):not(.button) {
  color: var(--muted);
  font-size: 12px;
}

.drop-zone-button {
  margin-top: 20px;
  pointer-events: none;
}

.upload-queue {
  display: grid;
  gap: 16px;
}

.upload-queue:not(:empty) {
  margin-top: 24px;
}

.queue-item {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.queue-item-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
}

.queue-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-status {
  flex: none;
  color: var(--muted);
}

.queue-progress {
  display: block;
  width: 100%;
  height: 2px;
  margin: 9px 0 4px;
  border: 0;
  appearance: none;
  background: var(--line);
  color: var(--ink);
  overflow: hidden;
}

.queue-progress::-webkit-progress-bar {
  background: var(--line);
}

.queue-progress::-webkit-progress-value {
  background: var(--ink);
  transition: width 180ms ease;
}

.queue-progress::-moz-progress-bar {
  background: var(--ink);
}

.queue-item.is-error .queue-progress {
  color: var(--danger);
}

.queue-item.is-error .queue-progress::-webkit-progress-value {
  background: var(--danger);
}

.queue-item.is-error .queue-progress::-moz-progress-bar {
  background: var(--danger);
}

.qr-frame {
  width: 100%;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
}

.qr-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.admin-album-share {
  font-size: 11px;
}

.admin-album-comments {
  margin-top: 14px;
  font-size: 11px;
}

.admin-avatar-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-avatar-preview {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-deep);
}

.admin-avatar-actions {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-avatar-upload {
  position: relative;
  display: inline-flex;
  width: fit-content;
}

.admin-avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-avatar-hint,
.admin-avatar-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.admin-avatar-status:empty {
  display: none;
}

.admin-home-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.admin-home-share-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.admin-home-share-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.admin-home-share-url {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.admin-home-qr-frame {
  flex: 0 0 auto;
  width: 100%;
  max-width: 230px;
  padding: 12px;
}

.admin-photo-list {
  display: grid;
  gap: 36px;
}

.admin-photo-group {
  min-width: 0;
}

.admin-photo-group-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  padding: 10px 4px 12px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.admin-photo-group-heading:hover {
  opacity: 0.7;
}

.admin-photo-group-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.admin-photo-group-heading[aria-expanded="false"] .admin-photo-group-chevron {
  transform: rotate(-90deg);
}

.admin-photo-group-heading h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.admin-photo-group-count {
  color: var(--muted);
  font-size: 11px;
}

.admin-photo-group-list {
  display: grid;
  padding-top: 20px;
}

.admin-photo-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.admin-photo-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin-thumbnail {
  height: 150px;
  background: var(--paper-deep);
  overflow: hidden;
}

.admin-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-photo-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.admin-photo-date {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.admin-photo-stats {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  margin-left: auto;
}

.admin-photo-form input,
.admin-photo-form textarea {
  background: var(--paper);
  font-size: 12px;
}

.admin-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-save-status {
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
}

.button-danger {
  color: var(--danger);
  border-color: transparent;
}

.button-danger:hover {
  border-color: var(--danger);
}

.button-danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

.admin-empty {
  padding: 54px 20px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.delete-dialog {
  width: min(460px, calc(100% - 40px));
  padding: 34px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.delete-dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
}

.delete-dialog h2 {
  margin: 16px 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
}

.delete-dialog p {
  overflow-wrap: anywhere;
}

.delete-warning {
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

/* 头像裁剪弹窗 */
.avatar-crop-dialog {
  width: min(380px, calc(100% - 40px));
  padding: 28px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.avatar-crop-dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
}

.avatar-crop-dialog h2 {
  margin: 14px 0 6px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
}

.avatar-crop-hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.avatar-crop-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper-deep);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.avatar-crop-stage.is-dragging {
  cursor: grabbing;
}

.avatar-crop-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.avatar-crop-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.avatar-crop-zoom input {
  flex: 1;
  min-width: 0;
}

.clipboard-helper {
  position: fixed;
  top: 0;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 28px;
  bottom: 28px;
  max-width: min(380px, calc(100% - 40px));
  padding: 13px 20px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  font-size: 12px;
}

@media (max-width: 1100px) {
  :root { --page: min(100% - 56px, 1440px); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
  .admin-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
  .admin-panel { padding: 22px; }
  .admin-photo-item { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
  .admin-thumbnail { height: 130px; }
}

@media (max-width: 820px) {
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .journal-list { margin-top: 40px; gap: 40px; }
  .detail-layout { grid-template-columns: 1fr; min-height: 0; }
  .photo-figure { height: auto; min-height: 55svh; max-height: 75svh; }
  .photo-info { padding: 8px 0 20px; }
  .photo-info h1 { font-size: 34px; }
  .photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
  .photo-specs { margin: 0; }
  .download-status { grid-column: 2; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side-column { position: static; }
}

@media (max-width: 600px) {
  :root { --page: calc(100% - 36px); }
  .site-header,
  .detail-header { min-height: 82px; }
  .gallery-page .site-header,
  .album-page .site-header,
  .share-page .site-header {
    min-height: 68px;
    --header-flow: 68px;
    --pill-height: 56px;
    --pill-pad: 22px;
  }
  .site-header .brand-name,
  .detail-header .brand-name { font-size: 14px; letter-spacing: 0.16em; }
  .site-nav { gap: 18px; font-size: 12px; }
  .admin-link { padding: 5px 12px; }
  .works-section { padding-top: 36px; padding-bottom: 76px; }
  .section-heading { align-items: start; margin-bottom: 28px; }
  .section-heading h2 { font-size: 30px; }
  .photo-grid { grid-template-columns: 1fr; gap: 40px; }
  .album-photo-link { border-width: 6px; box-shadow: 0 10px 20px rgba(28, 28, 24, 0.13), 0 2px 5px rgba(28, 28, 24, 0.06); }
  .photo-caption h3 { font-size: 21px; }
  .empty-gallery { min-height: 350px; }
  .journal-section { padding-top: 46px; padding-bottom: 66px; }
  .journal-heading { margin-top: 24px; }
  .journal-heading h2 { font-size: 30px; }
  .site-footer { min-height: 110px; flex-wrap: wrap; gap: 16px; padding-block: 24px; }
  .site-footer > p { order: 3; width: 100%; margin: 0; }
  .detail-main { padding-top: 18px; padding-bottom: 24px; }
  .back-link { font-size: 11px; gap: 6px; }
  .back-link svg { width: 18px; height: 18px; }
  .photo-figure { min-height: 52svh; max-height: 68svh; }
  .photo-step { width: 40px; height: 40px; font-size: 21px; }
  .photo-step-prev { left: 8px; }
  .photo-step-next { right: 8px; }
  .photo-info { gap: 26px; }
  .photo-actions { grid-template-columns: 1fr; }
  .download-status { grid-column: auto; }
  .detail-footer { font-size: 8px; }
  .login-view { min-height: calc(100svh - 82px); padding-block: 44px; }
  .dashboard { padding-top: 38px; padding-bottom: 60px; }
  .dashboard-heading { align-items: start; margin-bottom: 30px; }
  .dashboard-heading h1 { font-size: 38px; }
  .dashboard-heading .button { min-height: 40px; padding: 8px 12px; font-size: 11px; }
  .admin-panel { padding: 18px; }
  .panel-heading { align-items: start; }
  .panel-note { max-width: 130px; }
  .drop-zone { min-height: 270px; padding: 20px; }
  .qr-frame { width: min(100%, 290px); margin-inline: auto; }
  .admin-home-share { flex-direction: column; align-items: stretch; gap: 16px; }
  .admin-home-qr-frame { width: min(100%, 200px); }
  .admin-photo-item { grid-template-columns: 1fr; }
  .admin-thumbnail { height: auto; aspect-ratio: 16 / 10; }
  .admin-title-row { grid-template-columns: 1fr; gap: 0; }
  .admin-photo-date { padding: 0; }
  .admin-item-actions { flex-wrap: wrap; }
  .admin-save-status { width: 100%; margin-bottom: 4px; }
  .delete-dialog { padding: 26px; }
  .toast { right: 20px; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 浏览方式切换 */
.view-toggle {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.view-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 0;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
              width 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-toggle-btn {
  position: relative;
  z-index: 1;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 220ms ease;
}

.view-toggle-btn:hover {
  color: var(--ink);
}

.view-toggle-btn.is-active {
  color: var(--paper);
}

.view-toggle-btn.is-active:hover {
  color: var(--paper);
}

/* 翻页浏览 */
.album-flip {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 24px;
  animation: album-intro 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes album-intro {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.album-flip-track {
  position: relative;
  width: 100%;
  /* 留出封面图 + 说明文字的实际高度，避免内容被 overflow 裁掉 */
  min-height: calc(52vh + 30px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-flip-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 44px);
  padding: 0 70px;
  opacity: 0;
  transform: translateX(56px);
  pointer-events: none;
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.album-flip-page.is-before {
  transform: translateX(-56px);
}

.album-flip-page.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.album-page-media {
  margin: 0;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  max-width: calc(100% - 250px);
}

.album-page-media img {
  display: block;
  max-width: min(60vw, 760px);
  max-height: 52vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(28, 28, 24, 0.07),
    0 5px 12px rgba(28, 28, 24, 0.06),
    0 16px 32px -10px rgba(28, 28, 24, 0.12);
  transition: transform 420ms cubic-bezier(.2,.7,.2,1), box-shadow 420ms ease;
}

.album-page-media img:hover {
  transform: scale(1.012);
  box-shadow:
    0 1px 2px rgba(28, 28, 24, 0.08),
    0 6px 14px rgba(28, 28, 24, 0.07),
    0 18px 36px -10px rgba(28, 28, 24, 0.14);
}

.album-page-caption {
  text-align: left;
  max-width: 200px;
}

.album-page-index {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.album-page-title {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 400;
  line-height: 1.25;
}

.album-page-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.album-page-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 200ms ease;
}

.album-page-more:hover {
  border-bottom-color: var(--ink);
}

.flip-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: opacity 200ms ease, border-color 200ms ease, color 200ms ease;
  z-index: 3;
}

.flip-nav svg,
.photo-step svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flip-nav:hover:not(:disabled) {
  border-color: var(--ink);
}

.flip-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.flip-prev {
  left: 4px;
}

.flip-next {
  right: 4px;
}

.flip-dots {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  min-height: 10px;
}

.flip-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: width 300ms ease, background-color 300ms ease;
}

.flip-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--ink);
}

/* 全部相册网格（统一尺寸） */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 26px;
}

.album-grid-card {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.album-grid-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: var(--line);
}

.album-grid-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.album-grid-card:hover .album-grid-cover img,
.album-grid-card:focus-visible .album-grid-cover img {
  transform: scale(1.04);
}

.album-grid-caption {
  padding-top: 14px;
}

.album-grid-caption h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}

.album-grid-caption p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* 相册详情 */
.album-hero {
  padding-top: 62px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.album-hero h1 {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.album-hero-meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.album-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.album-missing-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  color: var(--ink);
}

.album-photos {
  padding-top: 40px;
  padding-bottom: 100px;
}

.album-comments {
  margin-top: 64px;
  max-width: 760px;
}

.album-comments-heading {
  margin-bottom: 16px;
}

.album-comments-heading h2 {
  font-size: 28px;
}

.album-comments-count {
  color: var(--muted);
  font-size: 12px;
}

.album-comments-box {
  margin-top: 0;
}

.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 24px;
}

.album-photo {
  margin: 0;
  min-width: 0;
  animation: album-photo-in 560ms cubic-bezier(.2,.7,.2,1) both;
}

.album-photo-grid.album-masonry {
  --masonry-columns: 3;
  --masonry-gap-x: 24px;
  --masonry-gap-y: 34px;
  position: relative;
  display: block;
}

.album-masonry .album-photo {
  position: absolute;
  top: 0;
  left: 0;
}

@keyframes album-photo-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.album-photo-link {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 8px solid #ffffff;
  border-radius: 8px;
  background: var(--paper-deep);
  box-shadow: 0 16px 32px rgba(28, 28, 24, 0.15), 0 3px 8px rgba(28, 28, 24, 0.07);
  transition: box-shadow 300ms ease;
}

.album-masonry .album-photo-link {
  aspect-ratio: auto;
}

.album-photo-link:hover {
  box-shadow: 0 22px 40px rgba(28, 28, 24, 0.2), 0 4px 10px rgba(28, 28, 24, 0.08);
}

.album-photo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.album-masonry .album-photo-link img {
  height: auto;
  object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
  .album-masonry .album-photo-link {
    transition: transform 380ms cubic-bezier(.2,.7,.2,1), box-shadow 380ms ease;
  }

  .album-masonry .album-photo:hover {
    z-index: 2;
  }

  .album-masonry .album-photo-link:hover {
    transform: scale(1.03);
    box-shadow: 0 22px 44px rgba(28, 28, 24, 0.22), 0 5px 12px rgba(28, 28, 24, 0.09);
  }
}

.album-photo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.album-photo-title {
  min-width: 0;
  overflow: hidden;
  color: #4a4b47;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-photo-download {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.album-photo-download:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

/* 照片详情补充信息 */
.photo-meta {
  margin: 22px 0 0;
  border-top: 1px solid #333330;
}

.photo-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #292927;
  font-size: 11px;
}

.photo-meta dt {
  color: #777772;
}

.photo-meta dd {
  margin: 0;
  color: #c2c1bc;
  text-align: right;
  overflow-wrap: anywhere;
}

/* 管理后台上传信息 */
.upload-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.upload-meta label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.upload-meta input,
.admin-meta-row input {
  background: var(--paper);
  font-size: 12px;
}

.admin-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 768px) {
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 20px; }
  .album-flip { min-height: 70vh; padding-bottom: 48px; }
  .album-flip-track { min-height: 68vh; }
  .album-flip-page { flex-direction: column; gap: 0; padding: 0 24px; }
  .album-page-media { max-width: 100%; }
  .album-page-media img { max-height: 44vh; max-width: 86vw; }
  .album-page-caption { margin-top: 26px; text-align: center; max-width: none; }
  .album-page-title { font-size: clamp(24px, 6vw, 32px); }
  .album-page-index { font-size: 11px; }
  .album-page-meta { font-size: 12px; }
  .album-page-more { font-size: 12px; }
  .section-heading { flex-wrap: wrap; gap: 16px; }
  .album-hero { padding-top: 44px; }
  .album-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .album-photo-grid.album-masonry { --masonry-columns: 2; --masonry-gap-x: 14px; --masonry-gap-y: 26px; }
  .upload-meta,
  .admin-meta-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .album-grid { grid-template-columns: 1fr; gap: 34px; }
  .album-grid-caption h3 { font-size: 21px; }
  .album-hero { padding-top: 34px; padding-bottom: 26px; }
  .album-photos { padding-top: 28px; padding-bottom: 70px; }
  .album-photo-title { font-size: 11px; }
  .album-photo-download { padding: 4px 10px; }
  .back-link { min-width: 40px; min-height: 40px; justify-content: flex-end; }
}

@media (max-width: 430px) {
  .album-photo-grid { grid-template-columns: 1fr; }
  .album-photo-grid.album-masonry { --masonry-gap-x: 12px; --masonry-gap-y: 22px; }
}

/* 分享相册页 */
.share-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.share-page main {
  flex: 1;
}

.share-header {
  justify-content: flex-start;
}

.share-gate {
  min-height: calc(100svh - 224px);
  display: grid;
  place-items: center;
  padding-block: 64px;
}

.share-gate-card {
  width: min(100%, 440px);
}

.share-gate-card h1 {
  margin: 18px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  line-height: 1.3;
}

.share-gate-intro {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 13px;
}

.share-gate-form {
  display: grid;
  gap: 12px;
}

.share-gate-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

/* 管理后台相册面板 */
.admin-album-list {
  display: grid;
}

.admin-album-item {
  display: grid;
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.admin-album-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin-album-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-album-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-top: 8px;
}

.admin-album-head[aria-expanded="false"] .admin-album-chevron {
  transform: rotate(-90deg);
}

.admin-album-body {
  margin-top: 18px;
}

.admin-album-title {
  flex: 1;
  min-width: 0;
}

.admin-album-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-album-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.admin-album-badges {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-badge {
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.admin-badge-warn {
  border-color: rgba(155, 44, 36, 0.28);
  color: var(--danger);
}

.journal-admin-comment-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.admin-toggle input {
  width: 16px;
  min-height: 0;
  height: 16px;
  padding: 0;
  accent-color: var(--ink);
}

.admin-album-order {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-album-order-label {
  color: var(--muted);
  font-size: 11px;
}

.admin-album-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-album-passcode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-album-passcode label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.admin-album-passcode input {
  background: var(--paper);
  font-size: 12px;
}

.admin-album-passcode-actions {
  display: flex;
  gap: 8px;
}

.admin-album-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.album-qr-area {
  flex-basis: 100%;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.album-network-label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
}

.album-network {
  background: var(--paper);
  font-size: 11px;
}

.album-qr-frame {
  width: 200px;
  padding: 14px;
}

.album-share-url {
  margin: 12px 0 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.album-share-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.admin-album-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

@media (max-width: 768px) {
  .admin-album-passcode { grid-template-columns: 1fr; }
  .admin-album-passcode-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .share-gate { min-height: calc(100svh - 192px); padding-block: 44px; }
  .album-qr-frame { width: min(100%, 240px); }
}

/* 相册封面选择、关于页面与日志编辑 */
.admin-album-cover label,
.admin-about-form label,
.admin-journal-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.admin-album-cover select,
.admin-about-form input,
.admin-about-form textarea,
.admin-journal-form input,
.admin-journal-form textarea {
  background: var(--paper);
  font-size: 12px;
}

.admin-about-form,
.admin-journal-form {
  display: grid;
  gap: 14px;
}

.admin-about-form textarea,
.admin-journal-form textarea {
  min-height: 180px;
}

.journal-admin-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.journal-admin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.journal-admin-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-deep);
}

.journal-admin-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.journal-admin-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.journal-admin-item-date {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.journal-admin-item-body {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.journal-admin-comment-count {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  margin-left: auto;
}

.journal-admin-comments {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--paper-deep);
}

.journal-admin-comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journal-admin-comment-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.journal-admin-comment-row.is-hidden {
  opacity: 0.5;
}

.journal-admin-comment-nameline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journal-admin-comment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.journal-admin-comment-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.journal-admin-comment-date {
  font-size: 11px;
  color: var(--muted);
}

.journal-admin-comment-content {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.journal-admin-comment-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.journal-admin-hidden-badge {
  margin-left: auto;
}

.journal-admin-comment-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.admin-bg-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.admin-bg-control input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.admin-bg-control input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

.admin-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .admin-about-form textarea {
    min-height: 150px;
  }
}


