/* =========================================================
   Soyoo Gallery - 图床系统专用样式
   粉色马卡龙 · 二次元可爱风（呼应主页 / 视频 / 音乐）
   ========================================================= */

@font-face {
    font-family: "ZCOOL KuaiLe";
    font-display: swap;
    src: url('../../font/zcool-kuaile.woff2') format('woff2');
}

:root {
    --g-bg: #fff6f9;
    --g-card: rgba(255, 255, 255, 0.78);
    --g-card-solid: #ffffff;
    --g-card-hover: rgba(255, 255, 255, 0.92);
    --g-text: #5c4a55;
    --g-text-secondary: #9a7f90;
    --g-text-light: #c4a8b8;
    --g-border: rgba(255, 143, 192, 0.28);
    --g-primary: #ff8fc0;
    --g-primary-hover: #ff77b0;
    --g-primary-soft: #fff0f6;
    --g-blue: #7ec8e3;
    --g-gradient: linear-gradient(135deg, #ffb3d9 0%, #ff8fc0 55%, #ffb066 100%);
    --g-gradient-soft: linear-gradient(135deg, #fff0f6 0%, #eaf7ff 100%);
    --g-shadow: 0 10px 32px rgba(255, 143, 192, 0.22);
    --g-shadow-hover: 0 18px 42px rgba(255, 143, 192, 0.32);
    --g-radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    background: var(--g-bg);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    background:
        radial-gradient(1000px 480px at 88% -8%, rgba(255, 179, 217, 0.32), transparent 62%),
        radial-gradient(900px 460px at -6% 12%, rgba(160, 216, 240, 0.35), transparent 58%),
        radial-gradient(700px 380px at 50% 110%, rgba(255, 240, 246, 0.9), transparent 60%),
        linear-gradient(160deg, #fff7fa 0%, #fdf0f6 45%, #eef7fd 100%);

    background-attachment: fixed;

    color: var(--g-text);
    font-family: 'ZCOOL KuaiLe', 'HarmonyOS_Regular', 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;

    cursor: url('/img/logo-cursor.png?v=3') 16 13, auto;
}

/* FUSHI 光标全局生效（超时空辉夜姬·弥千代的相棒） */
*,
a,
button,
input[type="range"] {
    cursor: url('/img/logo-cursor.png?v=3') 16 13, auto !important;
}

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

/* 可爱滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: linear-gradient(180deg, #ffc9de, #ff9ecb);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffb3d9, #ff8fc0);
}

/* =========================================================
   漂浮星星装饰（呼应主页）
   ========================================================= */

.home-star {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.85;
    animation: homeStarFloat 7s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 158, 203, 0.55));
}

.home-star-1 {
    top: 4%;
    right: 6%;
    width: 26px;
}

.home-star-2 {
    top: 13%;
    left: 4%;
    width: 18px;
    animation-delay: 1.5s;
}

@keyframes homeStarFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(12deg);
    }
}

/* =========================================================
   顶部导航
   ========================================================= */

.gallery-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    height: 64px;

    display: flex;
    align-items: center;

    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(255, 143, 192, 0.22);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.gallery-header-inner {
    width: min(1400px, calc(100% - 40px));
    height: 100%;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    font-weight: 600;

    transition: opacity 0.2s ease;
}

.gallery-brand:hover {
    opacity: 0.75;
}

.gallery-brand-logo {
    width: 38px;
    height: 38px;

    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(255, 158, 203, 0.6);

    box-shadow: 0 3px 12px rgba(255, 143, 192, 0.35);
}

.gallery-brand-text {
    white-space: nowrap;

    background: linear-gradient(120deg, #ff8fc0, #ff77b0 55%, #7ec8e3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gallery-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-nav-link {
    padding: 8px 16px;

    color: var(--g-text-secondary);
    font-size: 14px;

    border-radius: 999px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.gallery-nav-link:hover {
    background: #fff0f6;
    color: var(--g-text);
    transform: translateY(-1px);
}

.gallery-nav-link.active {
    color: #fff;
    background: var(--g-gradient);
    box-shadow: 0 4px 14px rgba(255, 143, 192, 0.4);
}

/* =========================================================
   页面容器
   ========================================================= */

.gallery-page {
    width: min(1400px, calc(100% - 40px));

    margin: 0 auto;
    padding: 34px 0 60px;
}

.gallery-page-title {
    margin: 0 0 34px;

    font-size: 34px;
    font-weight: 700;
    line-height: 1.35;

    display: inline-block;

    background: linear-gradient(120deg, #ff8fc0 0%, #ffb066 45%, #7ec8e3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    filter: drop-shadow(0 3px 10px rgba(255, 143, 192, 0.28));
}

.gallery-page-description {
    margin: 10px 0 30px;

    color: var(--g-text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* =========================================================
   通用面板 / 按钮 / 输入
   ========================================================= */

.gallery-panel {
    background: var(--g-card);
    border: 1.5px solid var(--g-border);
    border-radius: var(--g-radius);

    box-shadow: var(--g-shadow);
}

.gallery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 9px 18px;

    font-family: inherit;
    font-size: 14px;

    color: #fff;
    background: var(--g-gradient);

    border: none;
    border-radius: 999px;

    box-shadow: 0 4px 14px rgba(255, 143, 192, 0.35);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 143, 192, 0.45);
    filter: brightness(1.05);
}

.gallery-btn:disabled {
    opacity: 0.55;
    transform: none !important;
    box-shadow: none;
    cursor: not-allowed !important;
}

.gallery-btn-ghost {
    color: var(--g-primary-hover);
    background: var(--g-primary-soft);

    box-shadow: none;
}

.gallery-btn-ghost:hover {
    background: #ffe3ef;
    box-shadow: 0 4px 12px rgba(255, 143, 192, 0.25);
}

.gallery-btn-danger {
    color: #ff7b92;
    background: #fff0f2;

    box-shadow: none;
}

.gallery-btn-danger:hover {
    background: #ffe0e6;
    box-shadow: 0 4px 12px rgba(255, 123, 146, 0.25);
}

.gallery-input {
    padding: 9px 14px;

    font-family: inherit;
    font-size: 14px;

    color: var(--g-text);
    background: rgba(255, 255, 255, 0.85);

    border: 1.5px solid var(--g-border);
    border-radius: 999px;

    outline: none;

    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-input:focus {
    border-color: var(--g-primary);
    box-shadow: 0 0 0 4px rgba(255, 143, 192, 0.15);
}

.gallery-input::placeholder {
    color: var(--g-text-light);
}

/* =========================================================
   鉴权栏
   ========================================================= */

.gallery-auth {
    display: flex;
    align-items: center;
    gap: 12px;

    flex-wrap: wrap;

    padding: 14px 18px;

    margin-bottom: 20px;
}

.gallery-auth label {
    font-size: 14px;
    color: var(--g-text-secondary);
}

.gallery-auth .gallery-input {
    flex: 1;
    min-width: 240px;
}

.gallery-auth-status {
    font-size: 13px;
    color: var(--g-primary-hover);
}

.gallery-auth-status.bad {
    color: #ff7b92;
}

/* =========================================================
   上传区
   ========================================================= */

.gallery-drop {
    padding: 36px 20px;
    text-align: center;

    border: 2px dashed var(--g-border);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.gallery-drop:hover,
.gallery-drop.drag {
    border-color: var(--g-primary);
    background: rgba(255, 143, 192, 0.06);
}

.gallery-drop.drag {
    transform: scale(1.01);
}

.gallery-drop-icon {
    font-size: 40px;
    line-height: 1;

    background: var(--g-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gallery-drop p {
    margin: 12px 0 0;

    color: var(--g-text-secondary);
    font-size: 14px;
}

.gallery-drop p b {
    color: var(--g-text);
}

.gallery-drop-hint {
    margin-top: 6px;

    font-size: 12px;
    color: var(--g-text-light);
}

.gallery-drop input[type="file"] {
    display: none;
}

.gallery-progress {
    height: 8px;

    margin-top: 16px;

    background: rgba(255, 143, 192, 0.15);
    border-radius: 999px;

    overflow: hidden;

    display: none;
}

.gallery-progress.on {
    display: block;
}

.gallery-progress-bar {
    display: block;
    height: 100%;
    width: 0;

    border-radius: 999px;

    background: var(--g-gradient);

    transition: width 0.15s ease;
}

/* =========================================================
   图片列表
   ========================================================= */

.gallery-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    margin: 0 0 16px;
}

.gallery-list-title {
    margin: 0;

    font-size: 18px;
    font-weight: 600;
}

.gallery-list-count {
    font-size: 13px;
    color: var(--g-text-secondary);
}

.gallery-list-count b {
    color: var(--g-primary-hover);
}

.gallery-grid {
    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));

    gap: 20px;
}

.gallery-item {
    overflow: hidden;

    display: flex;
    flex-direction: column;

    background: var(--g-card);
    border: 1.5px solid var(--g-border);
    border-radius: var(--g-radius);

    box-shadow: var(--g-shadow);

    /* 滚动性能：屏外卡片跳过渲染 */
    content-visibility: auto;
    contain-intrinsic-size: 280px;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--g-shadow-hover);
    border-color: rgba(255, 119, 176, 0.45);
}

.gallery-item-thumb {
    position: relative;

    aspect-ratio: 1 / 1;

    background: linear-gradient(135deg, #ffd9e8, #c9e9f7);

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.gallery-item-thumb img {
    max-width: 100%;
    max-height: 100%;

    display: block;

    object-fit: contain;

    /* 异步解码，避免滚动/加载时主线程卡顿 */
    -webkit-user-drag: none;

    transition: transform 0.35s ease;
}

.gallery-item:hover .gallery-item-thumb img {
    transform: scale(1.03);
}

.gallery-item-meta {
    padding: 12px 14px 14px;
}

.gallery-item-name {
    font-size: 14px;
    font-weight: 600;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery-item-sub {
    display: flex;
    justify-content: space-between;
    gap: 8px;

    margin-top: 5px;

    font-size: 12px;
    color: var(--g-text-secondary);
}

.gallery-item-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 12px;
}

.gallery-item-ops .gallery-btn {
    flex: 1 1 auto;
    min-width: 64px;

    padding: 7px 10px;

    font-size: 13px;

    border-radius: 10px;
}

.gallery-item-ops .gallery-btn-danger {
    flex: 0 0 auto;
    padding: 7px 14px;
}

/* 空状态 */
.gallery-empty {
    padding: 70px 20px;

    text-align: center;

    color: var(--g-text-secondary);
    font-size: 14px;
}

.gallery-empty-icon {
    font-size: 42px;
    margin-bottom: 12px;

    color: var(--g-text-light);
}

/* =========================================================
   页脚
   ========================================================= */

.gallery-footer {
    text-align: center;

    padding: 24px 20px 40px;

    color: var(--g-text-light);
    font-size: 13px;
}

/* =========================================================
   胶囊提示框（屏幕下方居中 · 白底粉字 + 星星 + 空心爱心）
   ========================================================= */

.gallery-toast {
    position: fixed;

    left: 50%;
    bottom: 44px;

    transform: translateX(-50%) translateY(16px);

    z-index: 9999;

    max-width: 90vw;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 12px 26px;

    color: var(--g-primary-hover);
    background: rgba(255, 255, 255, 0.96);

    border: 1.5px solid rgba(255, 143, 192, 0.45);
    border-radius: 999px;

    box-shadow: 0 10px 32px rgba(255, 143, 192, 0.32);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    font-size: 14px;

    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.gallery-toast.on {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.gallery-toast-msg {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    font-weight: 600;
}

.gallery-toast-star {
    flex: 0 0 auto;

    width: 15px;
    height: 15px;

    animation: toastStarFloat 2.4s ease-in-out infinite;
}

.gallery-toast-star:nth-child(3) {
    animation-delay: 0.8s;
}

.gallery-toast-heart {
    flex: 0 0 auto;

    width: 16px;
    height: 16px;

    animation: toastHeartBeat 1.6s ease-in-out infinite;
}

@keyframes toastStarFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-3px) rotate(14deg);
    }
}

@keyframes toastHeartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }
}

/* =========================================================
   管理员登录（上传 / 管理页）
   ========================================================= */

.gallery-login {
    max-width: 420px;

    margin: 40px auto;

    padding: 34px 30px 28px;

    text-align: center;
}

.gallery-login-title {
    margin: 0 0 6px;

    font-size: 20px;
    font-weight: 700;

    background: linear-gradient(120deg, #ff8fc0, #ff77b0 55%, #7ec8e3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gallery-login-sub {
    margin: 0 0 24px;

    font-size: 13px;
    color: var(--g-text-secondary);
}

.gallery-login-field {
    margin-bottom: 14px;

    text-align: left;
}

.gallery-login-field label {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    color: var(--g-text-secondary);
}

.gallery-login-field .gallery-input {
    width: 100%;

    padding: 10px 16px;
}

.gallery-login-error {
    min-height: 18px;

    margin: 10px 0 0;

    font-size: 13px;
    color: #ff7b92;
}

.gallery-login .gallery-btn {
    width: 100%;

    margin-top: 4px;

    padding: 11px 18px;
}

.gallery-admin-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    margin-bottom: 16px;
}

.gallery-admin-hello {
    font-size: 13px;
    color: var(--g-text-secondary);
}

/* =========================================================
   复制兜底弹窗（主页深色半透明风格）
   ========================================================= */

.gallery-copy-modal {
    position: fixed;

    inset: 0;

    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.55);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.25s ease;
}

.gallery-copy-modal.on {
    opacity: 1;
    pointer-events: auto;
}

.gallery-copy-box {
    width: min(540px, 100%);

    padding: 26px 24px;

    background: rgba(0, 0, 0, 0.55);

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;

    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);

    text-align: center;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gallery-copy-title {
    margin-bottom: 14px;

    font-size: 15px;
    font-weight: 600;

    color: #efefef;
}

.gallery-copy-text {
    padding: 12px 14px;

    font-family: "Consolas", "Microsoft YaHei", monospace;
    font-size: 13px;

    color: #efefef;
    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;

    text-align: left;
    word-break: break-all;

    user-select: text;
    -webkit-user-select: text;
}

.gallery-copy-ops {
    display: flex;
    justify-content: center;
    gap: 10px;

    margin-top: 18px;
}

/* =========================================================
   图片查看器（点击缩略图放大 · Pixiv 风格）
   ========================================================= */

.gallery-viewer {
    position: fixed;

    inset: 0;

    z-index: 10001;

    display: flex;
    flex-direction: column;

    background: rgba(45, 33, 49, 0.96);

    opacity: 0;
    pointer-events: none;
}

.gallery-viewer.on {
    opacity: 1;
    pointer-events: auto;
}

.gallery-viewer-top {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 16px 22px;

    color: #fff;
}

.gallery-viewer-name {
    flex: 1;
    min-width: 0;

    font-size: 15px;

    color: rgba(255, 255, 255, 0.92);

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery-viewer-count {
    flex: 0 0 auto;

    font-size: 13px;

    color: rgba(255, 255, 255, 0.65);
}

.gallery-viewer-close {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    line-height: 1;

    color: #fff;
    background: var(--g-gradient);

    border: none;
    border-radius: 50%;

    box-shadow: 0 4px 14px rgba(255, 143, 192, 0.4);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.gallery-viewer-close:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 143, 192, 0.55);
}

.gallery-viewer-stage {
    flex: 1;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 0;

    padding: 12px 92px 26px;
}

.gallery-viewer-img {
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.92);

    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);

    user-select: none;
    -webkit-user-drag: none;
}

.gallery-viewer-nav {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
    line-height: 1;

    color: #fff;
    background: rgba(255, 255, 255, 0.14);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        background 0.2s ease,
        transform 0.2s ease;

    user-select: none;
}

.gallery-viewer-nav:hover {
    background: rgba(255, 143, 192, 0.55);
}

.gallery-viewer-prev {
    left: 18px;
}

.gallery-viewer-next {
    right: 18px;
}

@media (max-width: 640px) {

    .gallery-viewer-stage {
        padding: 10px 10px 20px;
    }

    .gallery-viewer-nav {
        width: 42px;
        height: 42px;

        font-size: 24px;
    }

    .gallery-viewer-prev {
        left: 8px;
    }

    .gallery-viewer-next {
        right: 8px;
    }
}


/* =====================================================
   标签筛选 / 图片详情 / 编辑弹窗
   ===================================================== */

/* 标签筛选栏（与全站 tag 芯片统一：半透明白底 + 粉描边 + #d9759f） */
.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.1rem;
}
.gallery-filter-btn {
    border: 1px solid rgba(255, 143, 192, 0.3);
    background: rgba(255, 255, 255, 0.8);
    color: #d9759f;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
}
.gallery-filter-btn:hover {
    border-color: rgba(255, 119, 176, 0.5);
    background: #fff0f6;
    color: #ff77b0;
}
.gallery-filter-btn.active {
    background: linear-gradient(135deg, #ff9ecb, #ff77b0);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 119, 176, .35);
}

/* 标签 chip（与视频/音乐详情页 .video-tag / .music-tag 同款） */
.gallery-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    color: #d9759f;
    border: 1px solid rgba(255, 143, 192, 0.3);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    line-height: 1.35;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
}
.gallery-tag-more {
    color: #b98a9e;
    background: rgba(250, 240, 244, 0.9);
    border-color: rgba(255, 143, 192, 0.18);
}
.gallery-item-tags {
    margin-top: .42rem;
    display: flex;
    flex-wrap: wrap;
}

/* 查看器详情（底部信息条） */
.gallery-viewer-detail {
    position: absolute;
    left: 50%;
    bottom: 1.3rem;
    transform: translateX(-50%);
    width: min(680px, 92%);
    background: rgba(255, 255, 255, .95);
    border-radius: 16px;
    padding: .75rem 1.15rem;
    box-shadow: 0 8px 30px rgba(45, 33, 49, .28);
    display: flex;
    flex-direction: column;
    gap: .38rem;
    max-height: 30vh;
    overflow-y: auto;
    z-index: 3;
}
.gallery-viewer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .28rem;
}
.gallery-viewer-tags .gallery-tag {
    margin: 0;
}
.gallery-viewer-source {
    font-size: .78rem;
    color: #8a6a78;
    word-break: break-all;
}
.gallery-viewer-desc {
    font-size: .82rem;
    color: #5c4450;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.gallery-viewer-empty {
    font-size: .78rem;
    color: #c9a8b6;
}

/* 管理页上传元数据输入 */
.gallery-upload-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .6rem;
    margin: .85rem 0 0;
}
@media (max-width: 720px) {
    .gallery-upload-meta {
        grid-template-columns: 1fr;
    }
}

/* 编辑详情弹窗 */
.gallery-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(45, 33, 49, .45);
    backdrop-filter: blur(3px);
}
.gallery-edit-modal.on {
    display: flex;
}
.gallery-edit-box {
    width: min(460px, 92vw);
    background: #fff;
    border-radius: 18px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 12px 40px rgba(45, 33, 49, .3);
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.gallery-edit-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #5c4450;
}
.gallery-edit-name {
    font-size: .8rem;
    color: #a98a96;
    word-break: break-all;
}
.gallery-edit-box .gallery-input {
    width: 100%;
    box-sizing: border-box;
}
.gallery-edit-desc {
    min-height: 76px;
    resize: vertical;
    font-family: inherit;
}
.gallery-edit-ops {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: .2rem;
}

/* 管理页详情按钮 */
.gallery-btn-edit {
    background: #fff0f6;
    color: #d96a9c;
    border-color: #ffd3e6;
}
.gallery-btn-edit:hover {
    background: #ffe3ef;
}

/* 查看器编辑按钮 */
.gallery-viewer-edit {
    align-self: flex-start;
    margin-top: .2rem;
}


/* =========================================================
   手机端顶部布局（与视频/音乐一致）
   ========================================================= */

@media (max-width: 760px) {
    .gallery-header {
        height: 58px;
    }

    .gallery-header-inner {
        width: calc(100% - 24px);
    }

    .gallery-brand-logo {
        width: 34px;
        height: 34px;
    }

    .gallery-brand-text {
        font-size: 16px;
    }

    .gallery-nav-link {
        padding: 7px 10px;
        font-size: 13px;
    }

    .gallery-page {
        width: calc(100% - 24px);
        padding-top: 25px;
    }

    .gallery-page-title {
        font-size: 27px;
        margin: 0 0 25px;
    }
}

@media (max-width: 420px) {
    .gallery-nav-link {
        padding: 6px 8px;
    }
}

/* ===== 管理台：标签快捷选择 ===== */
.tag-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(255, 143, 192, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
}
.tag-chip {
    border: 1px solid rgba(255, 143, 192, 0.3);
    background: #fff;
    color: #d9759f;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12.5px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.15s;
}
.tag-chip:hover {
    border-color: rgba(255, 119, 176, 0.55);
    background: #fff0f6;
}
.tag-chip.on {
    background: linear-gradient(135deg, #ff9ecb, #ff77b0);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(255, 119, 176, 0.35);
}
