/**
 * 初恋 · 前台
 * LV 巧克力棕 × 黄铜。主页和详情用夜景底图加毛玻璃，入口页单独用自己的背景。
 */

 :root {
    color-scheme: dark;
    --bg: #1A130D;
    --bg-2: #241A12;
    --card: rgba(22, 18, 12, 0.38);
    --ink: #F1EBE0;
    --ink-2: #D9CFC0;
    --ink-3: #A89880;
    --gold: #C6A45D;
    --gold-2: #DCBE82;
    --brown: #8A6B35;
    --brown-2: #C19A5B;
    --gold-dim: rgba(193, 154, 91, 0.24);
    --line: rgba(193, 154, 91, 0.38);
    --line-2: rgba(193, 154, 91, 0.16);
    --glass: rgba(22, 18, 12, 0.42);
    --glass-2: rgba(22, 18, 12, 0.84);
    --on-gold: #F1EBE0;
    --fill: rgba(193, 154, 91, 0.16);
    --fill-soft: rgba(193, 154, 91, 0.1);
    --field: rgba(193, 154, 91, 0.08);
    --edge: rgba(193, 154, 91, 0.46);
    --edge-strong: rgba(220, 190, 130, 0.86);
    --edge-soft: rgba(193, 154, 91, 0.22);
    --scrim: rgba(22, 18, 14, 0.58);
    --overlay: rgba(16, 12, 8, 0.78);
    --glow: rgba(193, 154, 91, 0.42);
    --hot-bg: rgba(0, 0, 0, 0.5);
    --hot-ink: rgba(240, 212, 138, 0.5);
    --hot-border: rgba(240, 212, 138, 0.5);
    --c-hot: #E05A4E;
    --c-limited: #D9B36C;
    --c-ace: #3FA97C;
    --c-premium: #5B8DD9;
    --c-student: #D98E4A;
    --c-fancy: #A983D8;
    --c-hot-dim: rgba(224, 90, 78, 0.72);
    --c-limited-dim: rgba(217, 179, 108, 0.78);
    --c-ace-dim: rgba(63, 169, 124, 0.72);
    --c-premium-dim: rgba(91, 141, 217, 0.72);
    --c-student-dim: rgba(217, 142, 74, 0.72);
    --c-fancy-dim: rgba(169, 131, 216, 0.72);
    --c-hot-bg: rgba(224, 90, 78, 0.14);
    --c-limited-bg: rgba(217, 179, 108, 0.14);
    --c-ace-bg: rgba(63, 169, 124, 0.14);
    --c-premium-bg: rgba(91, 141, 217, 0.14);
    --c-student-bg: rgba(217, 142, 74, 0.14);
    --c-fancy-bg: rgba(169, 131, 216, 0.14);
    --title-shine: linear-gradient(90deg, #8A6B35 0%, #DCBE82 38%, #FFF6E4 50%, #C6A45D 62%, #7A5C2C 100%);
    --damier: repeating-conic-gradient(rgba(198, 164, 93, 0.1) 0% 25%, rgba(0, 0, 0, 0.16) 0% 50%);
    --damier-size: 64px 64px;
    --grain-opacity: 0.05;
    --ring-silver: #F7F8FA;
    --ring-silver-in: #B7C0C8;
    --ring-gold: #F0D48A;
    --ring-black: #050403;
    --metal-gold: #E4C98A;
    --metal-gold-line: rgba(198, 164, 93, 0.78);
    --metal-gold-bg: rgba(198, 164, 93, 0.14);
    --metal-silver: #E8EAEE;
    --metal-silver-line: rgba(214, 220, 228, 0.78);
    --metal-silver-bg: rgba(214, 220, 228, 0.14);
    --metal-champagne: #F3E0B0;
    --metal-champagne-line: rgba(243, 224, 176, 0.72);
    --metal-champagne-bg: rgba(243, 224, 176, 0.12);
    --metal-platinum: #D5DCE4;
    --metal-platinum-line: rgba(190, 200, 210, 0.72);
    --metal-platinum-bg: rgba(190, 200, 210, 0.12);
    --metal-brass: #E2C2A4;
    --metal-brass-line: rgba(196, 150, 112, 0.72);
    --metal-brass-bg: rgba(196, 150, 112, 0.14);
    --page-bg:
        radial-gradient(72% 42% at 100% -8%, rgba(198, 164, 93, 0.22), transparent 58%),
        radial-gradient(60% 36% at 0% 8%, rgba(220, 190, 130, 0.08), transparent 52%),
        linear-gradient(180deg, #241A12 0%, #1A130D 48%, #140F0A 100%);
    --pad: 16px;
    --r: 0px;
    --gap: 14px;
    --max-width: 1100px;
    --serif: "Songti SC", "STSong", "SimSun", "NSimSun", "PMingLiU", serif;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    min-height: 100%;
    background-color: var(--bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: #070605;
    -webkit-font-smoothing: antialiased;
}

body:not(.gate-body)::before {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    inset: 0;
    background: url("/assets/bj2.webp") center center / cover no-repeat;
    filter: none;
    transform: none;
}

body.is-cat-switching {
    overflow-x: hidden;
}

body:not(.gate-body)::after {
    content: none;
}

body:has(.detail-container) {
    background: #050403;
    color: #F6EDD8;
}

body:has(.detail-container)::before {
    background:
        radial-gradient(78% 36% at 50% -6%, rgba(223, 186, 106, 0.34), transparent 58%),
        radial-gradient(42% 26% at 0% 100%, rgba(166, 124, 62, 0.16), transparent 62%),
        radial-gradient(36% 22% at 100% 92%, rgba(198, 164, 93, 0.14), transparent 64%),
        linear-gradient(180deg, #16120d 0%, #070605 46%, #0c0a08 100%);
}

body:has(.detail-container) .header {
    background: linear-gradient(180deg, rgba(22, 17, 12, 0.96), rgba(8, 6, 4, 0.94));
    border-bottom-color: rgba(223, 186, 106, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.2), 0 12px 28px rgba(0, 0, 0, 0.45);
}

body:has(.detail-container) .footer {
    background: #050403;
}

body:has(.detail-container) .footer-content {
    border-top-color: rgba(198, 164, 93, 0.38);
}

body:has(.detail-container) .footer-content p,
body:has(.detail-container) .detail-content,
body:has(.detail-container) .detail-content :where(p, li, h1, h2, h3, h4, strong, em, span, div, font) {
    color: #F6EBD8;
}

body:has(.detail-container) .detail-title,
body:has(.detail-container) .detail-title .title-text,
body:has(.detail-container) .review-head h2 {
    color: #F8E7C0;
}

body:has(.detail-container) .top-nav-btn,
body:has(.detail-container) .nav-btn {
    color: #F3D48A;
    background: rgba(16, 12, 8, 0.78);
    border-color: rgba(223, 186, 106, 0.5);
}

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.header,
.main-content,
.footer,
.gate {
    position: relative;
    z-index: 1;
}

/* 页头 */

.header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    border-bottom: 1px solid var(--edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.header-container,
.main-content,
.footer-content,
.announcement-content-full,
.search-and-filter,
.search-bar {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.header-container {
    padding: 0 var(--pad);
    font-weight: 700;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-height: 64px;
    min-width: 0;
    padding: 12px 0 10px;
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.brand-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.brand-name::before,
.brand-name::after {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
    flex: 1 1 18px;
    max-width: 48px;
}

.brand-name::after {
    background: linear-gradient(90deg, var(--gold), transparent);
}

.site-title,
.brand-motto {
    flex: 0 0 auto;
    white-space: nowrap;
    color: transparent;
    background-size: 220% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brandSweep 4.2s ease-in-out infinite;
}

.site-title {
    flex: 0 1 auto;
    min-width: 0;
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    background-image: var(--title-shine);
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 12px var(--glow));
    -webkit-font-smoothing: auto;
}

.brand-motto {
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.4;
    background-image: var(--title-shine);
    animation-delay: 0.6s;
    -webkit-font-smoothing: auto;
}

.brand-motto::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 1px;
    margin-right: 10px;
    background: var(--gold);
    vertical-align: 0.28em;
}

.site-slogan {
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    letter-spacing: 0.12em;
    -webkit-font-smoothing: auto;
}

.announcement-bar {
    margin: 0 var(--pad) 12px;
}

.announcement-content-full {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: var(--field);
    border: 1px solid var(--edge-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.notice-tag {
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 0;
    background: transparent;
    color: var(--gold);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    line-height: 1.6;
}

.announcement-body {
    flex: 1;
    min-width: 0;
}

.announcement-text {
    display: block;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-2);
    letter-spacing: 0.04em;
}

.announcement-text + .announcement-text {
    margin-top: 4px;
}

/* 搜索 */

.main-content {
    padding: 18px var(--pad) 36px;
    min-height: calc(100vh - 180px);
}

.search-bar,
.search-and-filter {
    position: relative;
    z-index: 35;
    padding: 0 0 16px;
    background: transparent;
    border: 0;
}

.search-and-filter .search-bar,
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 6px 0 14px;
    background: var(--field);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 0;
    box-shadow: none;
}

.search-and-filter .search-bar {
    max-width: none;
    overflow: visible;
}

.search-and-filter .search-form {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 44px;
}

.search-input,
.search-and-filter .search-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    letter-spacing: 0.04em;
}

.search-input::placeholder {
    color: var(--ink-3);
    letter-spacing: 0.12em;
}

.search-btn,
.search-and-filter .search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--on-gold);
    background: var(--fill);
    border: 1px solid var(--edge);
    border-radius: 0;
    flex: 0 0 auto;
}

.search-and-filter .search-bar:focus-within,
.search-form:focus-within {
    border-color: var(--gold);
}

.search-and-filter .search-bar,
.search-form {
    position: relative;
}

.search-suggest {
    position: absolute;
    left: -1px;
    right: -1px;
    top: calc(100% + 6px);
    z-index: 60;
    max-height: min(360px, 60vh);
    overflow: auto;
    background: var(--glass-2);
    border: 1px solid var(--edge);
    border-radius: 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.search-suggest[hidden] {
    display: none;
}

.search-suggest-item {
    display: block;
    padding: 12px 16px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--line-2);
}

.search-suggest-item.is-active,
.search-suggest-item:hover {
    background: var(--fill-soft);
    color: var(--gold-2);
}

.search-suggest mark {
    background: transparent;
    color: var(--gold-2);
    font-weight: 600;
}

.search-suggest-more,
.search-suggest-empty {
    display: block;
    padding: 11px 16px;
    color: var(--ink-3);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-align: center;
}

.search-suggest-more:hover {
    color: var(--gold);
}

.keyword-filter-wrapper {
    position: relative;
    flex: 0 0 auto;
}

.keyword-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 0;
    color: var(--gold);
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.keyword-toggle.active,
.keyword-toggle:hover {
    color: var(--on-gold);
    background: var(--fill);
    border-color: var(--gold);
}

.keyword-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    padding: 14px;
    background: var(--glass-2);
    border: 1px solid var(--edge);
    border-radius: 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: 0.2s ease;
    z-index: 40;
}

.keyword-filter-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.keyword-filter-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.clear-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
}

.keyword-item,
.keyword-tag,
.detail-keywords-box .keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    color: var(--metal-gold);
    background: var(--metal-gold-bg);
    border: 1px solid var(--metal-gold-line);
    border-radius: 0;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.keyword-item.active,
.keyword-item:hover,
.keyword-tag:hover,
.detail-keywords-box .keyword-tag:hover {
    color: var(--on-gold);
    background: var(--fill);
    border-color: var(--gold);
    transform: none;
    box-shadow: none;
}

/* 主页分类：一条金线玻璃签，选中项底下亮一条短金线 */

.home-categories {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 2px 0 18px;
    padding: 4px;
    overflow: hidden;
    scrollbar-width: none;
    background:
        linear-gradient(180deg, rgba(255, 236, 196, 0.16), transparent 42%),
        rgba(8, 6, 4, 0.9);
    border: 1px solid rgba(240, 212, 138, 0.78);
    box-shadow:
        inset 0 0 0 1px #050403,
        inset 0 1px 0 rgba(255, 236, 196, 0.28),
        0 12px 28px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.home-categories::-webkit-scrollbar {
    display: none;
}

.home-categories::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 28%;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 244, 214, 0.02) 32%,
        rgba(255, 250, 236, 0.55) 50%,
        rgba(255, 244, 214, 0.02) 68%,
        transparent 100%
    );
    transform: translateX(-180%) skewX(-18deg);
    animation: categorySweep 4.8s ease-in-out infinite;
}

.home-category {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 1px 13px;
    text-align: center;
    color: #F8EDD8;
    background: transparent;
    border: 0;
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.72);
    -webkit-font-smoothing: auto;
    transition: color 0.2s ease, background 0.2s ease;
}

.home-category.cat-hot {
    flex: 1.5 1 0;
}

.home-category + .home-category::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24%;
    bottom: 30%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(198, 164, 93, 0.55), transparent);
}

.home-category::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 1px;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.home-category:hover {
    color: var(--gold-2);
}

.home-category.is-active {
    color: #FFF8E8;
    background: linear-gradient(180deg, rgba(243, 212, 138, 0.22), rgba(243, 212, 138, 0.08));
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 12px rgba(243, 212, 138, 0.28);
}

.home-category.is-active::after {
    width: 18px;
    height: 2px;
}

.home-category.cat-hot.is-active {
    color: #F3D48A;
}

.home-category.cat-limited.is-active {
    color: var(--metal-gold);
}

.home-category.cat-ace.is-active {
    color: var(--metal-silver);
}

.home-category.cat-premium.is-active {
    color: var(--metal-champagne);
}

.home-category.cat-student.is-active {
    color: var(--metal-platinum);
}

.home-category.cat-fancy.is-active {
    color: var(--metal-brass);
}

@media (min-width: 720px) {
    .home-categories {
        margin-bottom: 22px;
    }

    .home-category {
        padding: 14px 8px 15px;
        font-size: 18px;
        letter-spacing: 0.08em;
    }

    .home-category.is-active::after {
        width: 22px;
    }
}

/* 卡片 */

.gallery-container {
    margin-bottom: 8px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
}

.gallery-item {
    position: relative;
    background: var(--card);
    border: 1px solid var(--ring-gold);
    border-radius: 0;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px var(--ring-black),
        0 16px 36px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: cardIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gallery-item:nth-child(1) { animation-delay: 0.04s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.16s; }
.gallery-item:nth-child(4) { animation-delay: 0.22s; }
.gallery-item:nth-child(5) { animation-delay: 0.28s; }
.gallery-item:nth-child(6) { animation-delay: 0.34s; }
.gallery-item:nth-child(7) { animation-delay: 0.4s; }
.gallery-item:nth-child(8) { animation-delay: 0.46s; }
.gallery-item:nth-child(9) { animation-delay: 0.52s; }
.gallery-item:nth-child(10) { animation-delay: 0.58s; }
.gallery-item:nth-child(11) { animation-delay: 0.64s; }
.gallery-item:nth-child(12) { animation-delay: 0.7s; }
.gallery-item:nth-child(n + 13) { animation-delay: 0.76s; }

.gallery-container.is-swapped .gallery-item {
    animation-name: cardSettle;
    animation-duration: 0.32s;
    animation-delay: 0s;
}

.gallery-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 248, 230, 0.34) 50%, transparent 62%);
    transform: translateX(-130%);
    animation: cardSheen 0.85s ease both;
}

.gallery-item:nth-child(1) .gallery-image::after { animation-delay: 0.12s; }
.gallery-item:nth-child(2) .gallery-image::after { animation-delay: 0.18s; }
.gallery-item:nth-child(3) .gallery-image::after { animation-delay: 0.24s; }
.gallery-item:nth-child(4) .gallery-image::after { animation-delay: 0.3s; }
.gallery-item:nth-child(5) .gallery-image::after { animation-delay: 0.36s; }
.gallery-item:nth-child(6) .gallery-image::after { animation-delay: 0.42s; }
.gallery-item:nth-child(7) .gallery-image::after { animation-delay: 0.48s; }
.gallery-item:nth-child(8) .gallery-image::after { animation-delay: 0.54s; }
.gallery-item:nth-child(9) .gallery-image::after { animation-delay: 0.6s; }
.gallery-item:nth-child(10) .gallery-image::after { animation-delay: 0.66s; }
.gallery-item:nth-child(11) .gallery-image::after { animation-delay: 0.72s; }
.gallery-item:nth-child(12) .gallery-image::after { animation-delay: 0.78s; }
.gallery-item:nth-child(n + 13) .gallery-image::after { animation-delay: 0.84s; }

.gallery-container.is-swapped .gallery-image::after {
    animation: none;
}

.gallery-item:hover {
    border-color: var(--ring-gold);
    transform: none;
}

.gallery-link {
    display: block;
    color: inherit;
}

.gallery-link:hover {
    color: inherit;
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-top: 132%;
    background: #1A1510;
    overflow: hidden;
}

.gallery-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
    transition: transform 0.5s ease;
}

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

.badge-hot {
position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 8px 4px;
    color: rgb(255 236 186 / 69%);
    background: rgb(0 0 0 / 57%);
    border: 1px solid rgb(255 238 193 / 50%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    writing-mode: vertical-rl;
    box-shadow: none;
}

.gallery-info {
    margin: 8px;
    padding: 10px 10px 12px;
    background: var(--scrim);
    border: 0;
    box-shadow: none;
}

.gallery-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    margin: 0;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.title-badges {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
}

.gallery-title .title-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-limited,
.badge-ace,
.badge-premium,
.badge-student,
.badge-fancy {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 0;
    border: 1px solid var(--gold-dim);
    background: var(--fill-soft);
    color: var(--gold);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.5;
    box-shadow: none;
}

.badge-limited {
    color: var(--metal-gold);
    border-color: var(--metal-gold-line);
    background: var(--metal-gold-bg);
}

.badge-ace {
    color: var(--metal-silver);
    border-color: var(--metal-silver-line);
    background: var(--metal-silver-bg);
}

.badge-premium {
    color: var(--metal-champagne);
    border-color: var(--metal-champagne-line);
    background: var(--metal-champagne-bg);
}

.badge-student {
    color: var(--metal-platinum);
    border-color: var(--metal-platinum-line);
    background: var(--metal-platinum-bg);
}

.badge-fancy {
    color: var(--metal-brass);
    border-color: var(--metal-brass-line);
    background: var(--metal-brass-bg);
}

.empty-state {
    padding: 80px 0;
    text-align: center;
    color: var(--ink-3);
}

.empty-state svg {
    margin: 0 auto 14px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 13px;
    letter-spacing: 0.2em;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn,
.page-num {
    min-width: 36px;
    padding: 8px 12px;
    text-align: center;
    color: var(--ink-2);
    background: var(--field);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0;
    box-shadow: none;
    letter-spacing: 0.06em;
}

.page-btn:hover,
.page-num:hover,
.page-num.active {
    color: var(--on-gold);
    background: var(--fill);
    border-color: var(--gold);
    transform: none;
    box-shadow: none;
}

.page-dots {
    color: var(--ink-3);
}

/* 详情 */

body:has(.detail-container) .main-content {
    max-width: none;
    padding: 12px 0 28px;
}

.detail-container {
    background: transparent;
}

.detail-info {
    padding: 4px 0 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.detail-nav {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.detail-top-nav,
.nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex-wrap: nowrap;
    gap: 6px;
}

.detail-top-nav {
    margin-bottom: 18px;
    padding: 0 var(--pad);
}

.top-nav-btn,
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    color: var(--gold-2);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.top-nav-btn:hover,
.nav-btn:hover {
    color: var(--on-gold);
    background: var(--fill);
    border-color: var(--gold);
}

.nav-btn.nav-home,
.nav-btn.nav-home:hover {
    color: var(--on-gold);
    background: var(--fill);
    border-color: var(--gold);
}

.nav-btn.nav-disabled,
.nav-btn.nav-disabled:hover {
    opacity: 0.35;
    color: var(--ink-3);
    background: transparent;
    border-color: var(--line-2);
}

.detail-nav {
    margin-top: 28px;
    padding: 18px var(--pad) 0;
    border-top: 1px solid var(--line);
}

.nav-row {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.nav-row .nav-btn {
    width: 100%;
    min-width: 0;
    gap: 2px;
    padding: 0 2px;
    font-size: 12px;
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-row .nav-btn span {
    white-space: nowrap;
    letter-spacing: 0;
}

.nav-row .nav-btn svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.detail-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 16px;
    padding: 0 var(--pad) 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-align: left;
}

.detail-title .title-text {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0.08em;
    text-indent: 0;
    white-space: normal;
}

.detail-title .title-badges {
    gap: 8px;
    overflow: visible;
}

.detail-title .badge-limited,
.detail-title .badge-ace,
.detail-title .badge-premium,
.detail-title .badge-student,
.detail-title .badge-fancy {
    font-size: 16px;
    padding: 3px 10px;
    letter-spacing: 0.06em;
    line-height: 1.5;
    border-radius: 0;
}

.detail-keywords-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 var(--pad) 16px;
}

.detail-content {
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 0.03em;
}

.detail-content p {
    margin: 0;
}

.detail-content > :not(p):not(.detail-text-frame) {
    margin-left: var(--pad);
    margin-right: var(--pad);
}

.detail-content p:not(:has(img)):not(:has(video)):not(:has(iframe)) {
    padding: 0 var(--pad);
}

.detail-content p:has(img),
.detail-content p:has(video),
.detail-content p:has(iframe) {
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
}

.detail-content :where(p, li, h1, h2, h3, h4, strong, em, span, div, font) {
    color: var(--ink-2);
}

.detail-content a {
    color: var(--gold-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.detail-content img,
.detail-content video,
.detail-content iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    margin: 0 !important;
    border-radius: 0;
    display: block;
    vertical-align: top;
}

.detail-content video {
    background: #000;
}

.detail-content h1,
.detail-content h2,
.detail-content h3 {
    margin: 24px 0 10px;
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: 0.12em;
}

.detail-content > .detail-text-frame {
    position: relative;
    margin: 4px var(--pad) 22px;
    padding: 26px 20px 22px;
    color: #F6EBD8;
    background:
        linear-gradient(#F6E7C2, #C6A45D) left 10px top 10px / 12px 1px no-repeat,
        linear-gradient(#F6E7C2, #C6A45D) left 10px top 10px / 1px 12px no-repeat,
        linear-gradient(#C6A45D, #F6E7C2) right 10px top 10px / 12px 1px no-repeat,
        linear-gradient(#C6A45D, #F6E7C2) right 10px top 10px / 1px 12px no-repeat,
        linear-gradient(#F6E7C2, #C6A45D) left 10px bottom 10px / 12px 1px no-repeat,
        linear-gradient(#F6E7C2, #C6A45D) left 10px bottom 10px / 1px 12px no-repeat,
        linear-gradient(#C6A45D, #F6E7C2) right 10px bottom 10px / 12px 1px no-repeat,
        linear-gradient(#C6A45D, #F6E7C2) right 10px bottom 10px / 1px 12px no-repeat,
        radial-gradient(120% 70% at 50% 0%, rgba(223, 186, 106, 0.2), transparent 54%),
        linear-gradient(180deg, #16110c 0%, #0a0806 100%);
    border: 1px solid #E4C98A;
    box-shadow:
        inset 0 0 0 5px #070605,
        inset 0 0 0 6px rgba(212, 175, 110, 0.78),
        0 0 0 1px rgba(0, 0, 0, 0.72),
        0 16px 36px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(198, 164, 93, 0.14);
}

.detail-content .detail-text-frame p,
.detail-content .detail-text-frame > :not(p) {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.detail-content .detail-text-frame > :first-child {
    margin-top: 0;
}

.detail-content .detail-text-frame > p + p {
    margin-top: 0.7em;
}

.review-sec {
    margin-top: 28px;
    padding: 4px var(--pad) 0;
    background: transparent;
}

.review-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    background: transparent;
}

.review-orn {
    display: none;
}

.review-head h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    color: var(--ink);
    background: transparent;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
}

.review-head h2::before,
.review-head h2::after {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--gold);
    flex: 0 0 auto;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 0;
    background: transparent;
}

.review-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    animation: cardIn 0.45s ease both;
}

.review-item:nth-child(3n+2) {
    animation-delay: 0.06s;
}

.review-item:nth-child(3n) {
    animation-delay: 0.12s;
}

.review-item:hover,
.review-item:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: -1px;
    z-index: 1;
}

.review-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
    transition: transform 0.5s ease;
}

.review-item:hover img,
.review-item:focus-visible img {
    transform: scale(1.03);
}

.review-empty {
    padding: 28px 0 8px;
    color: var(--ink-3);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-align: center;
}

.review-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 64px 18px 72px;
    background: var(--overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    touch-action: none;
    user-select: none;
}

.review-lightbox.open {
    display: flex !important;
}

.review-lightbox-viewport {
    position: relative;
    z-index: 1;
    width: min(860px, calc(100vw - 128px));
    height: calc(100vh - 148px);
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.review-lightbox-viewport.is-dragging {
    cursor: grabbing;
}

.review-lightbox-track {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    height: 100%;
    will-change: transform;
}

.review-slide {
    flex: 0 0 auto;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.review-lightbox-close,
.review-lightbox-nav {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-2);
    background: var(--glass);
    border: 1px solid var(--edge);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0;
}

.review-lightbox-close:hover,
.review-lightbox-nav:hover {
    color: var(--on-gold);
    background: var(--fill);
    border-color: var(--gold);
}

.review-lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 1;
}

.review-lightbox-nav {
    top: 50%;
    width: 42px;
    height: 64px;
    transform: translateY(-50%);
    font-size: 26px;
    line-height: 1;
}

.review-lightbox-prev {
    left: 12px;
}

.review-lightbox-next {
    right: 12px;
}

.review-lightbox-count {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
    color: var(--gold-2);
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: 0.22em;
}

/* 页脚与返回 */

.footer {
    padding: 8px var(--pad) calc(28px + var(--safe-b));
    background: transparent;
    border: 0;
}

.footer-content {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.footer-content p {
    color: var(--ink-3);
    font-size: 11px;
    letter-spacing: 0.18em;
}

.back-to-top {
    position: fixed;
    right: 16px;
    bottom: calc(22px + var(--safe-b));
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--gold-2);
    background: var(--glass);
    border: 1px solid var(--edge-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0;
    box-shadow: none;
}

.back-to-top:hover {
    color: var(--on-gold);
    background: var(--fill);
}

/* 入口 */

.gate-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #16120E url("/assets/bj.webp") center center / cover no-repeat fixed;
}

.gate-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.gate {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 36px 28px 40px;
}

.gate-panel {
    width: min(460px, 100%);
    max-width: none;
    display: flex;
}

.gate-frame {
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 0 4px;
    text-align: left;
    color: #F4F6F8;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.gate-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-indent: 0;
    line-height: 1.35;
    text-align: left;
    color: #F4F6F8;
    background: none;
    -webkit-text-fill-color: #F4F6F8;
    animation: none;
}

.gate-kicker {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 14px 0 0;
    color: rgba(244, 246, 248, 0.78);
    font-size: 12px;
    letter-spacing: 0.28em;
}

.gate-kicker::before,
.gate-kicker::after {
    content: "";
    width: 28px;
    height: 1px;
    background: rgba(244, 246, 248, 0.7);
    flex: 0 0 auto;
}

.gate-kicker::after {
    display: none;
}

.gate-err {
    min-height: 0;
    margin: 18px 0 0;
    color: #F4F6F8;
    font-size: 13px;
    letter-spacing: 0.06em;
}

.gate-err.on {
    margin: 0 0 12px;
}

.gate-form {
    width: min(260px, 100%);
    margin-top: auto;
}

.gate-input {
    width: 100%;
    margin-bottom: 16px;
    padding: 12px 0 8px;
    text-align: left;
    color: #F7F8FA;
    background: transparent;
    border: 0;
    border-bottom: 3px solid rgba(244, 246, 248, 0.72);
    border-radius: 0;
    outline: none;
    font-family: var(--serif);
    font-size: 30px;
    letter-spacing: 0.22em;
    caret-color: #F7F8FA;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.gate-input::placeholder {
    color: rgba(244, 246, 248, 0.48);
    letter-spacing: 0.22em;
}

.gate-input:focus {
    border-bottom-color: #FFFFFF;
}

.gate-input:-webkit-autofill {
    -webkit-text-fill-color: #F7F8FA;
    caret-color: #F7F8FA;
    transition: background-color 9999s ease-out;
}

.gate-btn {
    display: block;
    width: auto;
    padding: 2px 0 0;
    color: #F4F6F8;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.36em;
    text-indent: 0;
    text-align: left;
}

@keyframes gateTitleShine {
    0%, 18% { background-position: 100% 0; }
    62%, 100% { background-position: 0% 0; }
}

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

@keyframes cardSettle {
    from { transform: translateY(10px); }
    to { transform: none; }
}

@keyframes cardSheen {
    0% { transform: translateX(-130%); }
    55%, 100% { transform: translateX(130%); }
}

@keyframes brandSweep {
    0%, 20% { background-position: 100% 0; }
    68%, 100% { background-position: 0% 0; }
}

@keyframes categorySweep {
    0%, 22% { transform: translateX(-180%) skewX(-18deg); }
    68%, 100% { transform: translateX(460%) skewX(-18deg); }
}

@keyframes badgeShine {
    0%, 58% { transform: translateX(-160%) skewX(-18deg); }
    100% { transform: translateX(280%) skewX(-18deg); }
}

@media (min-width: 720px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nav-row .nav-btn {
        gap: 6px;
        padding: 0 10px;
        font-size: 13px;
        letter-spacing: 0.06em;
    }

    .nav-row .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .review-grid {
        gap: 6px;
    }

    .review-head h2 {
        font-size: 20px;
    }

    .review-head h2::before,
    .review-head h2::after {
        width: 48px;
    }
}

@media (min-width: 1040px) {
    .gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-title {
        font-size: 18px;
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    .brand-name::before,
    .brand-name::after {
        max-width: 22px;
    }

    .brand-motto {
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .brand-motto::before {
        width: 14px;
        margin-right: 8px;
    }

    .gallery-title,
    .gallery-title .title-text {
        font-size: 15px;
    }

    .detail-title,
    .detail-title .title-text {
        font-size: 32px;
        letter-spacing: 0.04em;
    }

    .detail-title .badge-limited,
    .detail-title .badge-ace,
    .detail-title .badge-premium,
    .detail-title .badge-student,
    .detail-title .badge-fancy {
        font-size: 15px;
        padding: 3px 9px;
    }

    .detail-content > .detail-text-frame {
        padding: 22px 16px 18px;
    }

    .gate {
        padding: 28px 22px 32px;
    }

    .gate-frame {
        padding: 4px 0;
    }

    .gate-title {
        font-size: 45px;
        letter-spacing: 0.12em;
        text-indent: 0;
    }

    .gate-kicker {
        font-size: 22px;
        letter-spacing: 0.16em;
    }

    .review-lightbox {
        padding: 56px 0 64px;
    }

    .review-lightbox-viewport {
        width: 100vw;
        height: calc(100vh - 132px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-image::after,
    .gallery-image img,
    .review-item,
    .review-item img,
    .gallery-title .badge-limited::after,
    .gallery-title .badge-ace::after,
    .gallery-title .badge-premium::after,
    .gallery-title .badge-student::after,
    .gallery-title .badge-fancy::after,
    .site-title,
    .brand-motto,
    .gate-title,
    .home-categories::after {
        animation: none;
        transition: none;
    }

    .gate-title {
        color: var(--ink);
        background: none;
        -webkit-text-fill-color: var(--ink);
    }

    .site-title {
        color: var(--ink);
        background: none;
        -webkit-text-fill-color: var(--ink);
    }

    .brand-motto {
        color: var(--gold);
        background: none;
        -webkit-text-fill-color: var(--gold);
    }
}
