body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(180deg, #00146d 0%, #0a1d9a 100%);
    font-family: 'Cascadia Code', 'Consolas', monospace;
    color: #fff;
    position: relative;
    overflow-x: hidden;
    padding-top: 65px;
    box-sizing: border-box;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.12) 1.3px, transparent 1.5px);
    background-size: 18px 18px;
    opacity: 0.35;
    pointer-events: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 6, 92, 0.66);
    z-index: 30;
    /* 开与关都走过渡：visibility 延迟隐藏，避免瞬间消失 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.32s ease, visibility 0s;
}

.login-modal {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: rgba(0, 14, 131, 0.96);
    border: 1px solid rgba(143, 217, 255, 0.5);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    padding: 28px 24px 20px;
}

.upload-modal {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: min(88vh, 820px);
    overflow: auto;
    background: rgba(0, 14, 131, 0.98);
    border: 1px solid rgba(143, 217, 255, 0.5);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    padding: 28px 24px 20px;
}

.photo-lightbox {
    padding: 20px;
}

.photo-lightbox__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    width: min(1160px, calc(100vw - 40px));
    max-height: min(92vh, 900px);
    overflow: auto;
    border: 1px solid rgba(143, 217, 255, 0.48);
    background: #00065C;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.modal-close.photo-lightbox__close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    padding: 0 8px;
    border: 1px solid rgba(143, 217, 255, 0.8);
    background: rgba(0, 6, 92, 0.92);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.modal-close.photo-lightbox__close .icon {
    width: 20px;
    height: 20px;
}

.modal-close.photo-lightbox__close:hover,
.modal-close.photo-lightbox__close:focus-visible {
    background: #0038D7;
}

.photo-lightbox__image-wrap {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 240px;
    background: #000;
}

.photo-lightbox__nav {
    position: absolute;
    z-index: 1;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 1px solid rgba(143, 217, 255, 0.65);
    background: rgba(0, 6, 92, 0.78);
    color: #EEF2FF;
    cursor: pointer;
}

.photo-lightbox__nav .icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-lightbox__prev:hover:not(:disabled) .icon {
    transform: translateX(-4px);
}

.photo-lightbox__next:hover:not(:disabled) .icon {
    transform: translateX(4px);
}

.photo-lightbox__nav:hover:not(:disabled),
.photo-lightbox__nav:focus-visible {
    background: rgba(0, 56, 215, 0.92);
}

.photo-lightbox__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.photo-lightbox__prev {
    left: 12px;
}

.photo-lightbox__next {
    right: 12px;
}

/* 详情/缩略图未就绪时的骨架占位：固定底色+微光，避免图片到位后布局跳变 */
.photo-lightbox__image-wrap.is-loading {
    background: linear-gradient(110deg, rgba(143, 217, 255, 0.07) 28%, rgba(143, 217, 255, 0.16) 42%, rgba(143, 217, 255, 0.07) 58%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.15s linear infinite;
    min-height: 220px;
}

@keyframes skeletonShimmer {
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .photo-lightbox__image-wrap.is-loading { animation: none; }
}

.photo-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
}

.photo-lightbox__info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 20px 20px;
    overflow-wrap: anywhere;
}

.photo-lightbox__info h2 {
    margin: 0;
    color: #fff;
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    font-size: 1.2rem;
}

.photo-lightbox__details {
    display: grid;
    gap: 10px;
    margin: 0;
}

/* 详情未就绪：横条纹占位预留高度，字段到位时不跳版 */
.photo-lightbox__details.is-pending {
    min-height: 136px;
    background-image: repeating-linear-gradient(
        180deg,
        rgba(143, 217, 255, 0.16) 0 10px,
        transparent 10px 34px
    );
}

.photo-lightbox__detail {
    display: grid;
    gap: 3px;
}

.photo-lightbox__detail dt {
    color: #8FD9FF;
    font-size: 0.72rem;
}

.photo-lightbox__detail dd {
    margin: 0;
    color: #EEF2FF;
    font-size: 0.88rem;
    line-height: 1.45;
}

.photo-lightbox__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: auto;
    border: 1px solid #8FD9FF;
    background: #8FD9FF;
    color: #000E83;
    font-size: 0.88rem;
    text-decoration: none;
}

.photo-lightbox__download[hidden] {
    display: none;
}

.photo-lightbox__error {
    color: #ffd1d1;
    font-size: 0.88rem;
}

.upload-modal__heading h2 {
    margin: 8px 0 18px;
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    font-size: 1.35rem;
}

.upload-dropzone {
    width: 100%;
    min-height: 142px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(143, 217, 255, 0.8);
    background: rgba(143, 217, 255, 0.06);
    color: #EEF2FF;
    font: inherit;
    cursor: pointer;
}

.upload-dropzone.is-dragover,
.upload-dropzone:hover {
    background: rgba(143, 217, 255, 0.14);
}

.upload-dropzone__plus {
    display: grid;
    place-items: center;
    color: #8FD9FF;
}

.upload-dropzone__plus .icon {
    width: 42px;
    height: 42px;
    stroke-width: 1.6;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upload-dropzone:hover .upload-dropzone__plus .icon,
.upload-dropzone.is-dragover .upload-dropzone__plus .icon {
    transform: rotate(90deg);
}

.upload-dropzone small {
    color: rgba(238, 242, 255, 0.7);
    font-size: 0.75rem;
}

.upload-message {
    min-height: 1.4em;
    margin: 10px 0 0;
    color: #8FD9FF;
    font-size: 0.82rem;
}

.upload-message.is-error {
    color: #ffd1d1;
}

/* 本批次备注：一套字段应用到整批 */
.upload-batch {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(143, 217, 255, 0.32);
    background: rgba(0, 6, 92, 0.5);
}

.upload-batch__hint {
    margin: 0 0 10px;
    color: #8FD9FF;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.upload-batch__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.upload-batch__field {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: rgba(238, 242, 255, 0.8);
    font-size: 0.75rem;
    white-space: nowrap;
}

.upload-batch__field input {
    width: 100%;
    box-sizing: border-box;
    min-height: 38px;
    padding: 6px 9px;
    border: 1px solid rgba(143, 217, 255, 0.48);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 15px;
}

.upload-batch__note {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(238, 242, 255, 0.55);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 批次总进度 */
.upload-progress {
    margin-top: 12px;
    display: grid;
    gap: 6px;
}

.upload-progress[hidden] { display: none; }

.upload-progress__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #EEF2FF;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.78rem;
    white-space: nowrap;
}

.upload-progress__meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-progress progress {
    width: 100%;
    height: 8px;
    accent-color: #8FD9FF;
}

.upload-queue {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    max-height: min(38vh, 340px);
    overflow-y: auto;
}

.upload-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 9px 12px;
    border: 1px solid rgba(143, 217, 255, 0.26);
    background: rgba(0, 6, 92, 0.38);
}

.upload-item.is-done { border-color: rgba(143, 217, 255, 0.5); }
.upload-item.is-failed { border-color: rgba(255, 140, 140, 0.65); }

.upload-item__info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    white-space: nowrap;
}

.upload-item__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 0.85rem;
}

.upload-item__size,
.upload-item__status {
    color: rgba(238, 242, 255, 0.7);
    font-size: 0.75rem;
    white-space: nowrap;
}

.upload-item__status {
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item__fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.upload-item__fields label {
    display: grid;
    gap: 4px;
    color: rgba(238, 242, 255, 0.78);
    font-size: 0.72rem;
}

.upload-item__fields label:first-child {
    grid-column: 1 / -1;
}

.upload-item__fields input,
.upload-item__fields textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 38px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 16px;
}

.upload-item__fields textarea {
    min-height: 58px;
    resize: vertical;
}

.upload-item__progress {
    grid-column: 1 / -1;
    width: 100%;
    height: 4px;
    accent-color: #8FD9FF;
}

.upload-retry,
.upload-remove,
.upload-cancel {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: transparent;
    color: #EEF2FF;
    font: inherit;
    cursor: pointer;
}

.upload-retry[hidden] {
    display: none;
}

.upload-retry-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #ffb3b3;
    background: rgba(164, 39, 70, 0.35);
    color: #ffd1d1;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.upload-retry-all[hidden] { display: none; }

.upload-retry-all:hover,
.upload-retry-all:focus-visible { background: rgba(164, 39, 70, 0.7); color: #fff; }

.upload-item__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.upload-retry,
.upload-remove,
.upload-cancel,
.upload-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

.upload-actions > button {
    min-height: 44px;
    box-sizing: border-box;
}

.upload-actions > .upload-submit {
    min-height: 44px;
    padding: 8px 20px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.upload-submit {
    margin: 0;
}

.upload-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.login-modal h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 1.8rem;
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #dfe9ff;
    font-size: 0.9rem;
}

.login-form input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 1rem;
    outline: none;
}

.login-form input:focus {
    border-color: #8FD9FF;
    box-shadow: 0 0 0 2px rgba(143, 217, 255, 0.2);
}

.submit-button {
    margin-top: 8px;
    background: #8FD9FF;
    border: 1px solid #8FD9FF;
    color: #000E83;
    min-height: 44px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.modal-close .icon {
    width: 15px;
    height: 15px;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close:hover .icon,
.modal-close:focus-visible .icon {
    transform: rotate(90deg);
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #8FD9FF;
    border: 2px solid #8FD9FF;
    color: #000E83;
    padding: 10px 5px;
    margin-left: auto;
    min-width: 120px;
    cursor: pointer;
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.25s ease;
    opacity: 0;
    visibility: hidden;
}

.login-button[hidden] {
    display: none;
}

.profile-menu {
    position: relative;
    margin-left: auto;
}

.profile-menu[hidden],
.profile-menu__panel[hidden] {
    display: none;
}

.profile-menu .profile-menu__trigger {
    margin-left: 0;
    max-width: min(240px, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu__trigger .icon-dots {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
}

.profile-menu__panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    min-width: 168px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: #00065C;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.profile-menu__panel button {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(143, 217, 255, 0.18);
    background: transparent;
    color: #EEF2FF;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-menu__panel button img {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    object-fit: contain;
    vertical-align: -4px;
}

.profile-menu__panel button:hover,
.profile-menu__panel button:focus-visible {
    background: rgba(143, 217, 255, 0.14);
}

.login-button.is-visible {
    opacity: 1;
    visibility: visible;
}

.login-button:hover {
    transform: translateY(-1px);
    background: #c8f0ff;
    border-color: #c8f0ff;
}

.login-button__icon {
    width: 18px;
    height: 25px;
    display: block;
    filter: brightness(0) saturate(100%) invert(12%) sepia(86%) saturate(1412%) hue-rotate(200deg) brightness(92%) contrast(109%);
}

.topbur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(0, 8, 105, .86);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 20;
    border-bottom: 1px solid rgba(143, 217, 255, 0.24);
}

.topbur-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.5, 1),
        filter 0.3s ease;
}

.topbur-home:hover,
.topbur-home:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.12);
}

.topbur-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: brightness(1.08);
}

.topbur-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 0 12px rgba(143, 217, 255, 0.18);
}

.topbur-brand b {
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: #f6fbff;
}

.topbur-brand small {
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    font-size: 0.66rem;
    opacity: 0.85;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.8);
}
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: rgb(255, 255, 255);
    padding: 3vh 24px 0;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    margin-top: 50px;
}

.typing-line {
    display: block;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 2rem;
    font-size: 3rem;
    line-height: 1.15;
    letter-spacing: 0.04em;
    color: #ffffff;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    border-right: none;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-weight: 400;
    text-shadow: none;
}

.typing-line.is-typing {
    border-right: none;
}

.typing-line.is-typing::after {
    /* 打字机光标已按需求移除 */
    display: none;
}

.typing-line.is-member-welcome {
    font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
}

.typing-line-small {
    display: block;
    max-width: 100%;
    font-size: 1.3rem;
    min-height: 1.9rem;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    font-weight: 400;
}

.login_icon{
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    justify-content: center;
}

.form-message {
    min-height: 20px;
    margin: -8px 0 12px;
    text-align: center;
    color: #ffd1d1;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.form-message.is-error {
    color: #ffd1d1;
}

.photo-preview {
    width: min(1200px, calc(100% - 40px));
    margin: 32px auto 0;
    padding: 0 0 40px;
    display: block;
}

.photo-preview[hidden] {
    display: none;
}

.photo-preview__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    color: #8FD9FF;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.photo-upload-entry {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid rgba(143, 217, 255, 0.58);
    background: rgba(0, 6, 92, 0.72);
    color: #8FD9FF;
    font: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: none;
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-upload-entry .icon {
    width: 15px;
    height: 15px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-upload-entry:hover,
.photo-upload-entry:focus-visible {
    background: rgba(143, 217, 255, 0.16);
    transform: translateY(-2px);
}

.photo-upload-entry:hover .icon {
    transform: translateY(-3px);
}

.photo-upload-entry[hidden] {
    display: none;
}

/* 整理归类：工具栏入口 / 勾选框 / 底部操作条 */
.photo-organize-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(143, 217, 255, 0.58);
    background: rgba(0, 6, 92, 0.72);
    color: #8FD9FF;
    font: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-organize-entry:hover,
.photo-organize-entry:focus-visible {
    background: rgba(143, 217, 255, 0.16);
    transform: translateY(-2px);
}

.photo-organize-entry[hidden] { display: none; }

.photo-card__pick {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(143, 217, 255, 0.7);
    background: rgba(0, 6, 92, 0.82);
    cursor: pointer;
}

.photo-card__pick input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #8FD9FF;
    cursor: pointer;
}

.photo-card__pick.is-locked {
    border-color: rgba(143, 217, 255, 0.35);
    background: rgba(0, 6, 92, 0.5);
    opacity: 0.7;
}

.photo-card__pick input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.photo-card.is-picked {
    outline: 2px solid #8FD9FF;
    outline-offset: 2px;
}

.organize-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(143, 217, 255, 0.45);
    background: rgba(0, 6, 92, 0.94);
    color: #EEF2FF;
    font-size: 0.85rem;
}

.organize-bar[hidden] { display: none; }

.organize-bar select,
.organize-bar input {
    min-height: 38px;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 15px;
}

.organize-bar input[hidden] { display: none; }

.organize-bar__apply,
.organize-bar__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: transparent;
    color: #EEF2FF;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1;
    cursor: pointer;
}

.organize-bar__apply:disabled { opacity: 0.5; cursor: not-allowed; }

.organize-bar__status { color: rgba(238, 242, 255, 0.78); font-size: 0.8rem; white-space: nowrap; }
.organize-bar__status.is-error { color: #ffd1d1; }

.organize-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: transparent;
    color: #EEF2FF;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.organize-bar__btn:hover,
.organize-bar__btn:focus-visible { background: rgba(143, 217, 255, 0.16); }

.photo-preview__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.photo-filters {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    text-transform: none;
    letter-spacing: 0;
}

.photo-filters[hidden] {
    display: none;
}

.photo-filter-back[hidden] {
    display: none;
}

.photo-filter-back {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(143, 217, 255, 0.58);
    background: rgba(0, 6, 92, 0.72);
    color: #8FD9FF;
    font: inherit;
    font-size: 0.78rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-filter-back .icon {
    width: 14px;
    height: 14px;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-filter-back:hover,
.photo-filter-back:focus-visible {
    background: rgba(143, 217, 255, 0.14);
    transform: translateY(-2px);
}

.photo-filter-back:hover .icon {
    transform: translateX(-3px);
}

.photo-filters select,
.photo-filters input {
    width: auto;
    min-width: 0;
    min-height: 38px;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid rgba(143, 217, 255, 0.48);
    background: rgba(0, 6, 92, 0.72);
    color: #EEF2FF;
    font: inherit;
    font-size: 0.78rem;
}

.photo-filters input {
    width: min(190px, 20vw);
}

.photo-filters select:focus,
.photo-filters input:focus {
    outline: 2px solid rgba(143, 217, 255, 0.75);
    outline-offset: 1px;
}

.photo-preview__tag {
    font-size: 0.78rem;
    opacity: 0.9;
}

.photo-preview__title {
    font-size: 0.9rem;
    color: #dfe9ff;
    letter-spacing: 0.14em;
}

.photo-preview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.photo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(9, 18, 118, 0.68);
    border: 1px solid rgba(143, 217, 255, 0.3);
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, border-color 0.22s ease;
    transform-origin: center;
}

.photo-card.is-hovered {
    transform: scale(1.03);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
    border-color: rgba(143, 217, 255, 0.6);
    z-index: 1;
}

.photo-card.is-neighbor {
    transform: scale(0.985);
    filter: saturate(0.88);
}

.photo-card__actions {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap:30px;
    inset: 0;
    padding: 0 12px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.photo-card.is-hovered .photo-card__actions {
    opacity: 1;
    pointer-events: auto;
}
.photo-card__delete,
.photo-lightbox__delete {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #ff6577;
    background: rgba(95, 0, 18, 0.9);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}
.photo-card__delete:hover,
.photo-lightbox__delete:hover {
    background: #b51232;
}

.photo-card__delete {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 8px;
}

.photo-card__delete img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.photo-delete-confirm {
    display: grid;
    gap: 8px;
    color: #ff7180;
    font-size: 0.8rem;
    line-height: 1.4;
}

.photo-delete-confirm__message {
    color: #ff6577;
    font-weight: 700;
}
.photo-delete-confirm[hidden] {
    display: none;
}
.photo-delete-confirm > div {
    display: flex;
    gap: 8px;
}
.photo-delete-confirm button {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(255, 113, 128, 0.7);
    background: transparent;
    color: #ffd9de;
    font: inherit;
    cursor: pointer;
}
.photo-delete-confirm .photo-delete-confirm__accept {
    background: #a80f2b;
    color: #fff;
}
.photo-delete-confirm button:disabled {
    opacity: 0.6;
    cursor: wait;
}
.photo-card__delete-confirm {
    position: absolute;
    z-index: 3;
    inset: auto 8px 8px;
    padding: 10px;
    border: 1px solid rgba(255, 113, 128, 0.8);
    background: rgba(34, 0, 8, 0.94);
    text-align: left;
}
.photo-lightbox__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.photo-lightbox__actions > a,
.photo-lightbox__actions > button {
    flex: 1;
    margin-top: 0;
}
.photo-lightbox__fullscreen {
    flex-basis: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: transparent;
    color: #8FD9FF;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo-lightbox__fullscreen:hover,
.photo-lightbox__fullscreen:focus-visible {
    background: rgba(143, 217, 255, 0.14);
}
.photo-lightbox__delete[hidden] {
    display: none;
}

.photo-lightbox__delete-confirm {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 113, 128, 0.5);
    background: rgba(34, 0, 8, 0.52);
}

.photo-card__visual {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.photo-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(255,255,255,0.04);
    display: block;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.photo-card.is-hovered .photo-card__image {
    transform: scale(1.04);
    filter: brightness(0.48);
}

.photo-card__zoom {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.94);
    filter: invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
    transition: opacity 160ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-card.is-hovered .photo-card__zoom {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.photo-card__zoom img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.photo-card__meta {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photo-upload-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 2;
    min-height: 0;
    border: 1px solid #8FD9FF;
    background: #8FD9FF;
    color: #000E83;
    cursor: pointer;
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
    font-weight: 300;
    box-shadow: 0 8px 22px rgba(0, 6, 92, 0.2);
}

.photo-upload-trigger:hover {
    background: #c8f0ff;
    border-color: #c8f0ff;
}

.photo-upload-status {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    width: 100%;
    aspect-ratio: 3 / 2;
    min-width: 0;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid rgba(143, 217, 255, 0.8);
    background: rgba(0, 6, 92, 0.72);
    color: #EEF2FF;
}

.photo-upload-status__name {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 0.84rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.photo-upload-status progress {
    display: block;
    width: 100%;
    height: 8px;
    accent-color: #8FD9FF;
}

.photo-end {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82rem;
    text-align: center;
}

.photo-page-sentinel {
    grid-column: 1 / -1;
    height: 1px;
}

.photo-card__credit {
    font-size: 0.96rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.photo-card__time {
    color: rgba(255,255,255,0.72);
    font-size: 0.78rem;
    font-family: 'Cascadia Code', 'Consolas', monospace;
}

.photo-preview__empty {
    border: 1px dashed rgba(143, 217, 255, 0.5);
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.8);
    padding: 26px 18px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    text-align: center;
}

@keyframes blink-caret {
    50% {
        border-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .typing-line.is-typing::after {
        animation: none;
    }

    .photo-card,
    .photo-card__image,
    .photo-card__zoom {
        transition: none;
    }

    .photo-card.is-hovered,
    .photo-card.is-neighbor,
    .photo-card.is-hovered .photo-card__image {
        transform: none;
    }

    .photo-card.is-hovered .photo-card__zoom {
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 760px) {
    .photo-lightbox {
        padding: 10px;
    }

    .photo-lightbox__panel {
        grid-template-columns: minmax(0, 1fr);
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .photo-lightbox__image-wrap {
        min-height: 180px;
    }

    .photo-lightbox__image {
        max-height: 48vh;
    }

    /* 移动端详情压紧：标签+值同一行，整体少占一屏 */
    .photo-lightbox__info {
        padding: 12px 14px 14px;
    }

    .photo-lightbox__info h2 {
        margin: 0 0 10px;
        font-size: 1.15rem;
    }

    .photo-lightbox__details {
        gap: 4px;
    }

    .photo-lightbox__detail {
        grid-template-columns: 5.2em minmax(0, 1fr);
        align-items: baseline;
        gap: 8px;
    }

    .photo-lightbox__detail dt {
        font-size: 0.7rem;
    }

    .photo-lightbox__detail dd {
        font-size: 0.8rem;
        line-height: 1.4;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .photo-lightbox__actions {
        margin-top: 10px;
        gap: 6px;
    }
}

@media (hover: none), (pointer: coarse) {
    /* 触屏没有 hover：操作簇缩到右下角常显，所有人（含访客）都能放大预览 */
    .photo-card__actions {
        inset: auto 8px 8px auto;
        justify-content: flex-end;
        gap: 8px;
        padding: 0;
        opacity: 1;
        pointer-events: auto;
    }

    .photo-card__zoom {
        display: grid;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(143, 217, 255, 0.65);
        background: rgba(0, 6, 92, 0.85);
    }

    /* 触屏勾选框加大热区（点卡片本身也能选中） */
    .photo-card__pick {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 600px) {
    .photo-preview__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .photo-filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .photo-filters input {
        flex: 1 1 140px;
        width: auto;
    }

    /* 上传弹窗移动端：批次备注单列、队列更紧凑、操作条换行不挤 */
    .upload-modal {
        padding: 18px 14px 14px;
        max-height: calc(100vh - 24px);
    }

    .upload-batch__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .upload-batch__note {
        white-space: normal;
        line-height: 1.5;
    }

    .upload-queue {
        max-height: 32vh;
    }

    .upload-actions {
        flex-wrap: wrap;
    }

    .upload-actions > button {
        flex: 1 1 auto;
        min-height: 44px;
    }

    .organize-bar {
        bottom: 0;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    }

    .organize-bar__count,
    .organize-bar__status {
        white-space: normal;
    }

    .organize-bar select,
    .organize-bar input {
        flex: 1 1 140px;
    }

    .photo-filters select {
        flex: 1 1 110px;
    }

    .typing-line {
        font-size: 2rem;
    }

    .typing-line.is-member-welcome {
        font-size: 1.8rem;
    }

    .typing-line-small {
        font-size: 1rem;
    }

    .upload-modal {
        padding: 24px 16px 16px;
    }

    .upload-item__fields {
        grid-template-columns: 1fr;
    }

    .upload-item__fields label:first-child {
        grid-column: auto;
    }
}

@media (min-width: 601px) and (max-width: 820px) {
    .photo-preview__header {
        flex-wrap: wrap;
    }

    .photo-filters {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   自托管 SVG 图标 + 分类分节 + 非线性布局过渡
   ========================================================================== */
.icon {
    display: block;
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- 分类分节（group 视图） ---------- */
.photo-preview__grid.is-grouped {
    display: block;
}

.cat-section {
    margin: 0 0 40px;
    animation: catSectionIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 0.07s);
}

@keyframes catSectionIn {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
}

.cat-section__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(143, 217, 255, 0.35);
    font-family: 'Cascadia Code', 'Consolas', monospace;
}

.cat-section__tag {
    color: #8FD9FF;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.cat-section__name {
    margin: 0;
    color: #EEF2FF;
    font-size: 1.12rem;
    letter-spacing: 0.05em;
}

.cat-section__count {
    color: rgba(223, 233, 255, 0.65);
    font-size: 0.75rem;
}

.cat-section__tools {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.cat-enter,
.cat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: rgba(0, 6, 92, 0.66);
    color: #8FD9FF;
    font: inherit;
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        color 0.3s ease;
}

.cat-enter:hover,
.cat-enter:focus-visible {
    background: rgba(0, 56, 215, 0.55);
    color: #EEF2FF;
    transform: translateY(-2px);
}

.cat-enter .icon {
    width: 14px;
    height: 14px;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-enter:hover .icon {
    transform: translateX(4px);
}

.cat-toggle:hover,
.cat-toggle:focus-visible {
    background: rgba(143, 217, 255, 0.14);
}

.cat-toggle .icon {
    width: 15px;
    height: 15px;
}

.icon-dots {
    stroke-width: 3;
}

.cat-section__grid,
.cat-section__more {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

/* 展开分节拉取剩余照片：加载指示与失败重试（等宽体系统语汇） */
.cat-section__loading {
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px 0;
    color: #8FD9FF;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-align: center;
}

.cat-section__retry {
    grid-column: 1 / -1;
    justify-self: center;
    padding: 9px 16px;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: rgba(0, 6, 92, 0.66);
    color: #8FD9FF;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.cat-section__retry:hover,
.cat-section__retry:focus-visible {
    background: rgba(0, 56, 215, 0.55);
    color: #EEF2FF;
}

/* 折叠区：max-height + 非线性缓动的形变 */
.cat-section__more {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.65s cubic-bezier(0.65, 0, 0.35, 1),
        opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        margin-top 0.65s cubic-bezier(0.65, 0, 0.35, 1);
}

.cat-section.is-expanded .cat-section__more {
    max-height: 2600px;
    opacity: 1;
    margin-top: 14px;
}

/* 展开时卡片错峰入场 */
.cat-section.is-expanded .cat-section__more .photo-card {
    animation: catCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cat-section.is-expanded .cat-section__more .photo-card:nth-child(2) { animation-delay: 0.05s; }
.cat-section.is-expanded .cat-section__more .photo-card:nth-child(3) { animation-delay: 0.1s; }
.cat-section.is-expanded .cat-section__more .photo-card:nth-child(4) { animation-delay: 0.15s; }
.cat-section.is-expanded .cat-section__more .photo-card:nth-child(5) { animation-delay: 0.2s; }
.cat-section.is-expanded .cat-section__more .photo-card:nth-child(6) { animation-delay: 0.25s; }
.cat-section.is-expanded .cat-section__more .photo-card:nth-child(n + 7) { animation-delay: 0.3s; }

@keyframes catCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* ---------- 空态 ---------- */
.photo-empty {
    margin: 26px 0 8px;
    text-align: center;
    color: rgba(223, 233, 255, 0.75);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    animation: catSectionIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---------- 上传弹窗：分类选择 ---------- */
.upload-category {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.upload-category__label {
    color: rgba(238, 242, 255, 0.78);
    font-size: 0.72rem;
}

.upload-category select,
.upload-category input {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid rgba(143, 217, 255, 0.48);
    background: rgba(0, 6, 92, 0.72);
    color: #EEF2FF;
    font: inherit;
    font-size: 0.8rem;
}

.upload-category input {
    flex: 1;
    min-width: 180px;
    animation: catSectionIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.upload-category input[hidden] {
    display: none;
}

/* ---------- 模态开合与菜单弹出：非线性过渡 ---------- */
/* backdrop 淡入由文件头 .modal-backdrop.is-open 的 opacity transition 承担；
   不再叠 backdropIn 动画 —— 与 View Transition 同跑时是纯冗余的帧负担 */

.modal-backdrop.is-open .login-modal,
.modal-backdrop.is-open .upload-modal,
.modal-backdrop.is-open .photo-lightbox__panel {
    animation: modalIn 0.5s cubic-bezier(0.34, 1.3, 0.45, 1) both;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: none; }
}

.profile-menu__panel:not([hidden]):not(.is-closing) {
    transform-origin: top right;
    animation: menuPop 0.4s cubic-bezier(0.34, 1.45, 0.5, 1) both;
}

.profile-menu__panel.is-closing {
    transform-origin: top right;
    animation: menuOut 0.22s cubic-bezier(0.5, 0, 0.75, 0) both;
}

@keyframes menuOut {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(-8px) scale(0.94); }
}

@keyframes menuPop {
    from { opacity: 0; transform: translateY(-12px) scale(0.9); }
    to { opacity: 1; transform: none; }
}

/* ---------- 卡片 ↔ 灯箱的形状演变（View Transitions） ---------- */
::view-transition-group(photo-morph),
::view-transition-old(photo-morph),
::view-transition-new(photo-morph) {
    animation-duration: 0.55s;
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
}

@media (max-width: 600px) {
    .photo-upload-entry { margin-left: 0; }
    .cat-section__tools { margin-left: 0; width: 100%; }
    .cat-section__grid,
    .cat-section__more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cat-section.is-expanded .cat-section__more { max-height: 4000px; }
}

@media (prefers-reduced-motion: reduce) {
    .cat-section,
    .photo-empty,
    .upload-category input,
    .modal-backdrop.is-open,
    .modal-backdrop.is-open .login-modal,
    .modal-backdrop.is-open .upload-modal,
    .modal-backdrop.is-open .photo-lightbox__panel,
    .profile-menu__panel:not([hidden]),
    .cat-section.is-expanded .cat-section__more .photo-card {
        animation: none;
    }
    .cat-section__more { transition: none; }
}

/* ---------- 文字按钮图标化：正方形图标钮（悬浮 title 显示功能） ---------- */
.photo-filter-back,
.photo-upload-entry,
.cat-enter,
.cat-toggle {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 0;
}

.photo-filter-back .icon,
.photo-upload-entry .icon,
.cat-enter .icon,
.cat-toggle .icon {
    width: 17px;
    height: 17px;
}

.photo-filter-back:hover .icon,
.photo-filter-back:focus-visible .icon {
    transform: translateX(-3px);
}

/* 点图放大：与首页图片同一语汇 */
.photo-card__image { cursor: zoom-in; }

/* ==========================================================================
   堆叠瓷贴（代替展开/进入分类）· 分节隐藏过渡 · 全量入场动画
   ========================================================================== */

/* 分节：隐藏/出现走 max-height + opacity 过渡（布局变化逐帧重排，观感连贯） */
.cat-section {
    max-height: 4200px;
    overflow: hidden;
    padding: 0 8px;
    margin-left: -8px;
    margin-right: -8px;
    transition: max-height 0.55s cubic-bezier(0.65, 0, 0.35, 1),
        opacity 0.4s ease,
        margin-bottom 0.55s cubic-bezier(0.65, 0, 0.35, 1),
        visibility 0s;
}

.cat-section.is-hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    visibility: hidden;
    transition: max-height 0.55s cubic-bezier(0.65, 0, 0.35, 1),
        opacity 0.4s ease,
        margin-bottom 0.55s cubic-bezier(0.65, 0, 0.35, 1),
        visibility 0s linear 0.55s;
}

/* 展开态取消高度上限：手机两列长分类会超过 4200px，overflow:hidden 会把下半截裁掉 */
.cat-section.is-expanded {
    max-height: none;
}

/* 分节内卡片（含折叠态/展开态重绘）入场 */
.cat-section__grid .photo-card {
    animation: catCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cat-section__grid .photo-card:nth-child(2) { animation-delay: 0.05s; }
.cat-section__grid .photo-card:nth-child(3) { animation-delay: 0.1s; }
.cat-section__grid .photo-card:nth-child(4) { animation-delay: 0.15s; }
.cat-section__grid .photo-card:nth-child(5) { animation-delay: 0.2s; }
.cat-section__grid .photo-card:nth-child(6) { animation-delay: 0.25s; }
.cat-section__grid .photo-card:nth-child(n + 7) { animation-delay: 0.3s; }

/* 平铺视图（我的作品/搜索）的卡片入场 */
.photo-preview__grid > .photo-card {
    animation: catCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---------- 堆叠瓷贴：折叠的前三张错位堆叠 + 半透明遮罩 ⋯ ---------- */
.cat-stack {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    padding: 0;
    border: 1px solid rgba(143, 217, 255, 0.4);
    background: rgba(0, 6, 92, 0.5);
    overflow: hidden;
    cursor: pointer;
    animation: catCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.25s;
}

.cat-stack__pile {
    position: absolute;
    inset: 0;
}

.cat-stack__card {
    position: absolute;
    width: 72%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: #0a1470;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.5s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.cat-stack__card:nth-child(1) { left: 2%; top: 16%; transform: rotate(-8deg); z-index: 1; }
.cat-stack__card:nth-child(2) { left: 13%; top: 10%; transform: rotate(0deg); z-index: 2; }
.cat-stack__card:nth-child(3) { left: 24%; top: 4%; transform: rotate(8deg); z-index: 3; }

.cat-stack:hover .cat-stack__card:nth-child(1) { transform: rotate(-12deg) translate(-6px, 4px); }
.cat-stack:hover .cat-stack__card:nth-child(2) { transform: translateY(-5px); }
.cat-stack:hover .cat-stack__card:nth-child(3) { transform: rotate(12deg) translate(6px, 4px); }

.cat-stack__mask {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: rgba(0, 6, 92, 0.55);
    color: #eef2ff;
    transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-stack__mask .icon {
    width: 30px;
    height: 30px;
    stroke-width: 3;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-stack:hover .cat-stack__mask,
.cat-stack:focus-visible .cat-stack__mask {
    background: rgba(0, 56, 215, 0.55);
}

.cat-stack:hover .cat-stack__mask .icon,
.cat-stack:focus-visible .cat-stack__mask .icon {
    transform: scale(1.25);
}

/* 展开后的文字「收起」按钮（右上角） */
.cat-collapse-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border: 1px solid rgba(143, 217, 255, 0.58);
    background: rgba(0, 6, 92, 0.72);
    color: #8fd9ff;
    font: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    animation: menuPop 0.4s cubic-bezier(0.34, 1.45, 0.5, 1) both;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-collapse-text:hover,
.cat-collapse-text:focus-visible {
    background: rgba(143, 217, 255, 0.16);
    transform: translateY(-2px);
}

.cat-collapse-text[hidden] {
    display: none;
}

/* ---------- 其余出现/消失的小部件也补入场动画 ---------- */
.photo-preview__empty,
.photo-end {
    animation: catSectionIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.photo-upload-status,
.upload-item {
    animation: catCardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---------- 全局减动效兜底：动画/过渡一律瞬时 ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

/* 账号设置弹窗的静态提示行 */
.form-hint {
    margin-top: 12px;
    color: rgba(223, 233, 255, 0.62);
    font-size: 0.78rem;
    line-height: 1.6;
}

/* ---------- 页脚（门户同款语汇；链接分「网站内部 / 网站外部」） ---------- */
.footer {
    background: #00065c;
    border-top: 1px solid rgba(143, 217, 255, 0.25);
    padding: 72px 20px 56px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: start;
    max-width: 1160px;
    margin: 0 auto;
}

.footer-emblem {
    width: 54px;
    margin: 0 0 18px;
    opacity: 0.85;
}

.footer-brand p {
    font-size: 14px;
    color: #a7b3f0;
}

.footer-brand .footer-small {
    margin-top: 6px;
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 12px;
    color: #5f6bc4;
    letter-spacing: 0.06em;
}

.footer-small a {
    color: inherit;
}

.footer-links {
    border-left: 1px solid rgba(143, 217, 255, 0.25);
    padding-left: 40px;
}

.footer-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 36px;
    align-items: start;
}

.footer-k {
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 12px;
    color: #8fd9ff;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li { break-inside: avoid; }

.footer-list a {
    display: inline-block;
    padding: 5px 0;
    font-size: 13.5px;
    color: #a7b3f0;
    transition: color 0.15s ease;
}

.footer-list a::after {
    content: " ↗";
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 11px;
    color: #5f6bc4;
    transition: color 0.15s ease;
}

.footer-list a:hover,
.footer-list a:focus-visible {
    color: #8fd9ff;
}

.footer-list a:hover::after {
    color: #8fd9ff;
}

.footer-nm {
    grid-column: 1 / -1;
    margin-top: 0;
    font-size: 12.5px;
    color: #5f6bc4;
    font-family: 'Cascadia Code', Consolas, monospace;
    letter-spacing: 0.04em;
}

/* 备案行高亮 */
.footer-icp a {
    color: #8fd9ff !important;
    font-weight: 600;
}

.footer-icp a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    .footer { padding: 40px 18px 34px; margin-top: 32px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-links { border-left: 0; border-top: 1px solid rgba(143, 217, 255, 0.25); padding: 32px 0 0; }
    .footer-split { grid-template-columns: 1fr; gap: 28px; }
}

/* 照片墙数据未到达前不渲染页脚：否则入场期间页脚悬在屏幕中部 */
.photo-preview[hidden] ~ .footer {
    display: none;
}

/* ---------- 手机上传双通道：相册 / 文件管理器（触屏显示） ---------- */
.upload-channels {
    display: none;
    gap: 10px;
    margin-top: 12px;
}

.upload-channel {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid rgba(143, 217, 255, 0.58);
    background: rgba(0, 6, 92, 0.72);
    color: #8fd9ff;
    font: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upload-channel .icon {
    width: 17px;
    height: 17px;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upload-channel:hover,
.upload-channel:focus-visible {
    background: rgba(143, 217, 255, 0.16);
    transform: translateY(-2px);
}

.upload-channel:hover .icon {
    transform: translateY(-2px) scale(1.08);
}

@media (hover: none), (pointer: coarse) {
    .upload-channels { display: flex; }
}

/* ---------- 触屏灯箱全屏预览（点图进入，再点/Esc 退出） ---------- */
.photo-lightbox.is-fullscreen {
    padding: 0;
}

.photo-lightbox.is-fullscreen .photo-lightbox__panel {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border: 0;
    background: #000;
    box-shadow: none;
    grid-template-columns: minmax(0, 1fr);
}

.photo-lightbox.is-fullscreen .photo-lightbox__image-wrap {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: #000;
    min-height: 0;
    animation: fsIn 0.35s cubic-bezier(0.34, 1.3, 0.45, 1) both;
}

.photo-lightbox.is-fullscreen .photo-lightbox__image {
    max-width: 100vw;
    max-height: 100vh;
}

.photo-lightbox.is-fullscreen .photo-lightbox__info {
    display: none;
}

.photo-lightbox.is-fullscreen .photo-lightbox__nav,
.photo-lightbox.is-fullscreen .photo-lightbox__close {
    opacity: 0;
    pointer-events: none;
}

/* 沉浸全屏底部控制条：点击画面切换显隐 */
.photo-lightbox__cinema {
    position: fixed;
    left: 50%;
    /* iPad/全面屏 home 指示条会压住贴底按钮：抬高到 max(30px, 安全区+16px) */
    bottom: max(30px, calc(env(safe-area-inset-bottom, 0px) + 16px));
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.photo-lightbox__cinema[hidden] { display: none; }

.photo-lightbox.is-cinema-ui .photo-lightbox__cinema {
    opacity: 1;
    pointer-events: auto;
}

.photo-lightbox__cinema-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid rgba(143, 217, 255, 0.65);
    background: rgba(0, 6, 92, 0.82);
    color: #EEF2FF;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.photo-lightbox__cinema-btn .icon {
    width: 20px;
    height: 20px;
}

.photo-lightbox__cinema-btn:hover,
.photo-lightbox__cinema-btn:focus-visible {
    background: rgba(0, 56, 215, 0.85);
}

/* 真全屏（Fullscreen API）时同样铺满黑底 */
.photo-lightbox:fullscreen {
    padding: 0;
    background: #000;
}

@keyframes fsIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: none; }
}

/* ---------- 弹窗/灯箱打开时锁定页面滚动 ---------- */
body.is-scroll-locked {
    overflow: hidden;
}

/* ---------- 灯箱内创建者改分类 ---------- */
.photo-lightbox__cat .lightbox-cat-select {
    min-width: 140px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(143, 217, 255, 0.48);
    background: rgba(0, 6, 92, 0.72);
    color: #eef2ff;
    font: inherit;
    font-size: 0.82rem;
}

.photo-lightbox__cat .lightbox-cat-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.72rem;
    color: rgba(223, 233, 255, 0.65);
}

/* ---------- 分节标题旁的「重命名」入口与内联改名框 ---------- */
.cat-rename {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid rgba(143, 217, 255, 0.55);
    background: rgba(0, 6, 92, 0.66);
    color: #8fd9ff;
    cursor: pointer;
    transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-rename .icon {
    width: 15px;
    height: 15px;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-rename:hover,
.cat-rename:focus-visible {
    background: rgba(143, 217, 255, 0.16);
    transform: translateY(-2px);
}

.cat-rename:hover .icon {
    transform: rotate(-12deg) scale(1.08);
}

.cat-rename-input {
    width: min(260px, 60vw);
    min-height: 34px;
    padding: 4px 10px;
    border: 0;
    border-bottom: 2px solid #8fd9ff;
    background: rgba(0, 6, 92, 0.55);
    color: #eef2ff;
    font: 800 1.02rem/1.3 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
    letter-spacing: 0.05em;
}

.cat-rename-input:focus {
    outline: 2px solid rgba(143, 217, 255, 0.75);
    outline-offset: 1px;
}

.cat-rename-input.is-bad {
    border-bottom-color: #ff7597;
}
