/* 暗黑2风格主题 */
/* 暗黑2官方字体 */
@font-face {
    font-family: 'Diablo2';
    src: url('/static/fonts/Diablo2-site.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DYmingA';
    src: url('/static/fonts/DYmingA-site.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --bg-light: #2a2a2a;
    --surface-stone: #201c17;
    --surface-inset: #15120f;
    --gold: #b79a5b;
    --gold-light: #d6c28e;
    --gold-dark: #75613a;
    --metal-highlight: rgba(190, 160, 101, 0.24);
    --red: #681414;
    --red-light: #9b2520;
    --text-primary: #d0c3aa;
    --text-secondary: #918777;
    --border-color: #40372b;
    --border-deep: #080706;
    --shadow-color: rgba(12, 7, 4, 0.82);
    --font-display: 'Diablo2', 'Cinzel', serif;
    --font-body: 'DYmingA', 'Noto Serif SC', 'Songti SC', serif;
    --font-ui: system-ui, 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    --font-numeric: Georgia, 'Times New Roman', serif;
}

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10000; padding: .65rem .9rem; color: #fff; background: #681414; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
button, input, select, textarea, nav, .entity-stats, .post-date, .comment-action-time { font-family: var(--font-ui); }
.comment-list { display: flex; flex-direction: column; gap: 1rem; }
.unified-comment-entry { background: var(--bg-medium); padding: 1rem 1.5rem; border: 1px solid var(--border-color); border-left: 3px solid var(--gold-dark); }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    cursor: url('/static/cursors/diablo-normal.cur'), auto !important;
}

a,
button,
[role='button'],
[role='tab'],
[onclick],
input[type='button'],
input[type='submit'],
input[type='checkbox'],
input[type='radio'],
input[type='file'],
select,
label[for],
.post-card,
.ambiance-card,
.avatar-clickable {
    cursor: url('/static/cursors/diablo-link.cur'), pointer !important;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='datetime-local'],
textarea,
[contenteditable='true'] {
    cursor: text !important;
}

/* 个人资料面板使用原版石质框素材的九宫格切片。 */
.profile-container {
    border: 10px solid transparent !important;
    border-image: url('/static/img/box_frame.png') 10 / 10px stretch !important;
    border-radius: 0 !important;
}

/* 展示字体采用原始笔画，不叠加浏览器默认标题粗体。 */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at top, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(139, 105, 20, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 火星飘零效果 */
.ember-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    mix-blend-mode: screen;
}

.ember {
    position: absolute;
    bottom: -16px;
    width: var(--ember-size, 2px);
    height: var(--ember-height, 3px);
    background: linear-gradient(180deg, #ffd28a 0%, #e36932 42%, #7a1e13 100%);
    border-radius: 60% 60% 48% 48%;
    box-shadow: 0 0 7px rgba(230, 91, 38, 0.78), 0 0 2px rgba(255, 203, 111, 0.75);
    filter: blur(var(--ember-blur, 0px));
    animation: ember-rise var(--ember-duration, 10s) cubic-bezier(0.22, 0.5, 0.38, 1) infinite;
    animation-delay: var(--ember-delay, 0s);
    opacity: 0;
    will-change: transform, opacity;
}

@keyframes ember-rise {
    0% {
        transform: translate3d(0, 10vh, 0) rotate(-8deg) scale(0.65);
        opacity: 0;
    }
    8% {
        opacity: var(--ember-opacity, 0.65);
    }
    22% {
        transform: translate3d(-12px, -20vh, 0) rotate(7deg) scale(1);
        opacity: var(--ember-opacity, 0.65);
    }
    52% {
        transform: translate3d(var(--ember-sway, 24px), -55vh, 0) rotate(-12deg) scale(0.82);
        opacity: 0.42;
    }
    100% {
        transform: translate3d(-18px, -112vh, 0) rotate(18deg) scale(0.35);
        opacity: 0;
    }
}

.ember:nth-child(1)  { left: 7%;  --ember-size: 2px; --ember-height: 3px; --ember-duration: 11.5s; --ember-delay: -8.2s; --ember-sway: 31px; --ember-opacity: .66; }
.ember:nth-child(2)  { left: 12%; --ember-size: 1px; --ember-height: 5px; --ember-duration: 8.4s;  --ember-delay: -3.1s; --ember-sway: -19px; --ember-opacity: .82; }
.ember:nth-child(3)  { left: 18%; --ember-size: 2px; --ember-duration: 13.2s; --ember-delay: -11s;  --ember-sway: 44px; --ember-opacity: .42; --ember-blur: .25px; }
.ember:nth-child(4)  { left: 25%; --ember-size: 1px; --ember-duration: 9.7s;  --ember-delay: -6.4s; --ember-sway: -28px; --ember-opacity: .58; }
.ember:nth-child(5)  { left: 31%; --ember-size: 3px; --ember-duration: 14.5s; --ember-delay: -2.8s; --ember-sway: 37px; --ember-opacity: .34; --ember-blur: .4px; }
.ember:nth-child(6)  { left: 46%; --ember-size: 1px; --ember-height: 4px; --ember-duration: 12.1s; --ember-delay: -9.5s; --ember-sway: -35px; --ember-opacity: .52; }
.ember:nth-child(7)  { left: 58%; --ember-size: 2px; --ember-duration: 15.3s; --ember-delay: -5.6s; --ember-sway: 26px; --ember-opacity: .3; --ember-blur: .35px; }
.ember:nth-child(8)  { left: 69%; --ember-size: 1px; --ember-height: 5px; --ember-duration: 10.2s; --ember-delay: -7.7s; --ember-sway: -23px; --ember-opacity: .72; }
.ember:nth-child(9)  { left: 76%; --ember-size: 2px; --ember-duration: 13.8s; --ember-delay: -1.9s; --ember-sway: 41px; --ember-opacity: .4; }
.ember:nth-child(10) { left: 83%; --ember-size: 1px; --ember-duration: 8.9s;  --ember-delay: -4.2s; --ember-sway: -29px; --ember-opacity: .66; }
.ember:nth-child(11) { left: 89%; --ember-size: 3px; --ember-duration: 16s;   --ember-delay: -12s;  --ember-sway: 34px; --ember-opacity: .28; --ember-blur: .5px; }
.ember:nth-child(12) { left: 94%; --ember-size: 1px; --ember-height: 4px; --ember-duration: 11.2s; --ember-delay: -6.8s; --ember-sway: -22px; --ember-opacity: .62; }
.ember:nth-child(13) { left: 21%; --ember-size: 1px; --ember-duration: 17.4s; --ember-delay: -14s;  --ember-sway: 55px; --ember-opacity: .24; }
.ember:nth-child(14) { left: 73%; --ember-size: 2px; --ember-duration: 18.2s; --ember-delay: -9.1s; --ember-sway: -48px; --ember-opacity: .22; --ember-blur: .45px; }
.ember:nth-child(15) { left: 4%;  --ember-size: 2px; --ember-height: 4px; --ember-duration: 9.4s;  --ember-delay: -2.2s; --ember-sway: 22px; --ember-opacity: .74; }
.ember:nth-child(16) { left: 16%; --ember-size: 1px; --ember-height: 3px; --ember-duration: 12.8s; --ember-delay: -10.4s; --ember-sway: -36px; --ember-opacity: .58; }
.ember:nth-child(17) { left: 36%; --ember-size: 2px; --ember-height: 3px; --ember-duration: 10.7s; --ember-delay: -5.3s; --ember-sway: 29px; --ember-opacity: .64; --ember-blur: .2px; }
.ember:nth-child(18) { left: 63%; --ember-size: 1px; --ember-height: 5px; --ember-duration: 8.6s;  --ember-delay: -7.1s; --ember-sway: -18px; --ember-opacity: .8; }
.ember:nth-child(19) { left: 81%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 11.9s; --ember-delay: -3.8s; --ember-sway: 33px; --ember-opacity: .68; }
.ember:nth-child(20) { left: 97%; --ember-size: 1px; --ember-height: 3px; --ember-duration: 14.2s; --ember-delay: -11.7s; --ember-sway: -27px; --ember-opacity: .52; }
.ember:nth-child(21) { left: 10%; --ember-size: 1px; --ember-height: 3px; --ember-duration: 15.1s; --ember-delay: -12.9s; --ember-sway: 46px; --ember-opacity: .4; }
.ember:nth-child(22) { left: 14%; --ember-size: 2px; --ember-height: 3px; --ember-duration: 10.4s; --ember-delay: -8.6s; --ember-sway: -21px; --ember-opacity: .62; --ember-blur: .2px; }
.ember:nth-child(23) { left: 28%; --ember-size: 1px; --ember-height: 5px; --ember-duration: 9.1s; --ember-delay: -1.4s; --ember-sway: 24px; --ember-opacity: .72; }
.ember:nth-child(24) { left: 39%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 13.6s; --ember-delay: -7.3s; --ember-sway: -39px; --ember-opacity: .48; }
.ember:nth-child(25) { left: 43%; --ember-size: 1px; --ember-height: 3px; --ember-duration: 16.8s; --ember-delay: -14.8s; --ember-sway: 52px; --ember-opacity: .34; --ember-blur: .3px; }
.ember:nth-child(26) { left: 51%; --ember-size: 2px; --ember-height: 3px; --ember-duration: 11.3s; --ember-delay: -4.7s; --ember-sway: -26px; --ember-opacity: .58; }
.ember:nth-child(27) { left: 56%; --ember-size: 1px; --ember-height: 5px; --ember-duration: 8.8s; --ember-delay: -6.2s; --ember-sway: 19px; --ember-opacity: .76; }
.ember:nth-child(28) { left: 66%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 14.7s; --ember-delay: -10.1s; --ember-sway: -43px; --ember-opacity: .42; --ember-blur: .25px; }
.ember:nth-child(29) { left: 71%; --ember-size: 1px; --ember-height: 3px; --ember-duration: 12.4s; --ember-delay: -2.9s; --ember-sway: 35px; --ember-opacity: .54; }
.ember:nth-child(30) { left: 86%; --ember-size: 2px; --ember-height: 3px; --ember-duration: 10.1s; --ember-delay: -8.1s; --ember-sway: -24px; --ember-opacity: .66; }
.ember:nth-child(31) { left: 91%; --ember-size: 1px; --ember-height: 5px; --ember-duration: 9.6s; --ember-delay: -3.6s; --ember-sway: 20px; --ember-opacity: .7; }
.ember:nth-child(32) { left: 98%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 17.2s; --ember-delay: -15.4s; --ember-sway: -51px; --ember-opacity: .32; --ember-blur: .4px; }
.ember:nth-child(33) { left: 2%;  --ember-size: 3px; --ember-height: 5px; --ember-duration: 9.2s;  --ember-delay: -7.4s; --ember-sway: 28px; --ember-opacity: .86; }
.ember:nth-child(34) { left: 9%;  --ember-size: 2px; --ember-height: 6px; --ember-duration: 12.6s; --ember-delay: -4.3s; --ember-sway: -32px; --ember-opacity: .72; }
.ember:nth-child(35) { left: 15%; --ember-size: 3px; --ember-height: 4px; --ember-duration: 10.8s; --ember-delay: -9.7s; --ember-sway: 24px; --ember-opacity: .78; --ember-blur: .15px; }
.ember:nth-child(36) { left: 20%; --ember-size: 2px; --ember-height: 5px; --ember-duration: 8.5s;  --ember-delay: -2.1s; --ember-sway: -18px; --ember-opacity: .9; }
.ember:nth-child(37) { left: 24%; --ember-size: 4px; --ember-height: 5px; --ember-duration: 14.4s; --ember-delay: -11.6s; --ember-sway: 43px; --ember-opacity: .6; --ember-blur: .3px; }
.ember:nth-child(38) { left: 29%; --ember-size: 2px; --ember-height: 6px; --ember-duration: 9.6s;  --ember-delay: -5.8s; --ember-sway: -25px; --ember-opacity: .82; }
.ember:nth-child(39) { left: 34%; --ember-size: 3px; --ember-height: 5px; --ember-duration: 11.7s; --ember-delay: -8.8s; --ember-sway: 36px; --ember-opacity: .74; }
.ember:nth-child(40) { left: 40%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 8.9s;  --ember-delay: -3.5s; --ember-sway: -20px; --ember-opacity: .92; }
.ember:nth-child(41) { left: 45%; --ember-size: 3px; --ember-height: 6px; --ember-duration: 13.1s; --ember-delay: -10.2s; --ember-sway: 47px; --ember-opacity: .64; --ember-blur: .25px; }
.ember:nth-child(42) { left: 49%; --ember-size: 2px; --ember-height: 5px; --ember-duration: 10.3s; --ember-delay: -6.6s; --ember-sway: -29px; --ember-opacity: .84; }
.ember:nth-child(43) { left: 54%; --ember-size: 4px; --ember-height: 5px; --ember-duration: 15.2s; --ember-delay: -13.5s; --ember-sway: 39px; --ember-opacity: .56; --ember-blur: .35px; }
.ember:nth-child(44) { left: 59%; --ember-size: 2px; --ember-height: 6px; --ember-duration: 9.4s;  --ember-delay: -1.7s; --ember-sway: -21px; --ember-opacity: .88; }
.ember:nth-child(45) { left: 62%; --ember-size: 3px; --ember-height: 4px; --ember-duration: 11.1s; --ember-delay: -7.9s; --ember-sway: 31px; --ember-opacity: .78; }
.ember:nth-child(46) { left: 67%; --ember-size: 2px; --ember-height: 5px; --ember-duration: 8.7s;  --ember-delay: -4.9s; --ember-sway: -17px; --ember-opacity: .94; }
.ember:nth-child(47) { left: 72%; --ember-size: 3px; --ember-height: 6px; --ember-duration: 12.9s; --ember-delay: -10.9s; --ember-sway: 45px; --ember-opacity: .68; --ember-blur: .2px; }
.ember:nth-child(48) { left: 75%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 9.8s;  --ember-delay: -2.7s; --ember-sway: -26px; --ember-opacity: .86; }
.ember:nth-child(49) { left: 79%; --ember-size: 4px; --ember-height: 5px; --ember-duration: 14.8s; --ember-delay: -12.4s; --ember-sway: 34px; --ember-opacity: .58; --ember-blur: .4px; }
.ember:nth-child(50) { left: 82%; --ember-size: 2px; --ember-height: 6px; --ember-duration: 8.3s;  --ember-delay: -6.1s; --ember-sway: -19px; --ember-opacity: .96; }
.ember:nth-child(51) { left: 85%; --ember-size: 3px; --ember-height: 5px; --ember-duration: 10.9s; --ember-delay: -8.4s; --ember-sway: 27px; --ember-opacity: .8; }
.ember:nth-child(52) { left: 88%; --ember-size: 2px; --ember-height: 4px; --ember-duration: 9.1s;  --ember-delay: -3.2s; --ember-sway: -23px; --ember-opacity: .9; }
.ember:nth-child(53) { left: 92%; --ember-size: 3px; --ember-height: 6px; --ember-duration: 12.3s; --ember-delay: -9.3s; --ember-sway: 41px; --ember-opacity: .7; --ember-blur: .2px; }
.ember:nth-child(54) { left: 95%; --ember-size: 2px; --ember-height: 5px; --ember-duration: 8.8s;  --ember-delay: -5.2s; --ember-sway: -16px; --ember-opacity: .94; }
.ember:nth-child(55) { left: 6%;  --ember-size: 4px; --ember-height: 4px; --ember-duration: 13.7s; --ember-delay: -11.1s; --ember-sway: 38px; --ember-opacity: .62; --ember-blur: .35px; }
.ember:nth-child(56) { left: 52%; --ember-size: 3px; --ember-height: 5px; --ember-duration: 10.5s; --ember-delay: -7.2s; --ember-sway: -33px; --ember-opacity: .82; }

@media (prefers-reduced-motion: reduce) {
    .ember-container { display: none; }
}

/* 头部导航 */
.site-header {
    background-color: #15120f;
    background-image:
        linear-gradient(180deg, rgba(207,187,143,.045), transparent 24%, rgba(0,0,0,.2) 100%),
        url('/static/img/dark-parchment.svg');
    background-size: auto, 480px 347px;
    background-blend-mode: normal, soft-light;
    border-bottom: 2px solid #070605;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow:
        inset 0 1px 0 rgba(208,190,151,.06),
        inset 0 -1px 0 rgba(126,105,62,.38),
        inset 0 -10px 24px rgba(0,0,0,.16),
        0 8px 24px rgba(7,4,2,.62);
}

.site-header::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 1px;
    content: '';
    pointer-events: none;
    background: linear-gradient(90deg, transparent 2%, rgba(126,105,62,.16) 16%, rgba(161,133,73,.34) 50%, rgba(126,105,62,.16) 84%, transparent 98%);
}

.header-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.header-subtitle {
    color: var(--gold);
    font-size: 1.1rem;
    font-family: 'DYmingA', 'KaiTi', 'STKaiti', '楷体', cursive;
    opacity: 0.8;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.online-status {
    color: var(--gold-light);
    white-space: nowrap;
}

.campfire-mark {
    display: block;
    width: 22px;
    height: 22px;
    margin-left: 0.18rem;
    flex: 0 0 22px;
    image-rendering: pixelated;
    filter: saturate(0.82) brightness(0.92);
}

.logo {
    font-family: 'Diablo2', cursive;
    font-size: 2rem;
    color: var(--gold);
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9), 0 0 4px rgba(201, 169, 97, 0.16);
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--gold-light);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9), 0 0 6px rgba(201, 169, 97, 0.24);
}

.header-right {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

nav {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

nav::-webkit-scrollbar { display: none; }

nav a.nav-link {
    flex: 0 0 auto;
    color: var(--gold);
    text-decoration: none;
    font-size: 1.15rem;
    font-family: 'DYmingA', 'Diablo2', cursive;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--gold-light);
    text-shadow: 0 1px 1px rgba(0,0,0,.9), 0 0 5px rgba(201,169,97,.18);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 用户菜单 */
.user-menu {
    position: relative;
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 240px;
    margin-left: clamp(0rem, 1vw, 1rem);
}

.user-menu-trigger {
    display: flex;
    width: auto;
    min-width: 0;
    max-width: 240px;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    appearance: none;
    -webkit-appearance: none;
    color: inherit;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 4px;
    box-shadow: none !important;
    transition: background 0.3s ease;
}

.user-menu-trigger:hover {
    background-color: var(--bg-light) !important;
    background-image: none !important;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gold-dark);
    object-fit: cover;
    margin-right: 0.5rem;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-dark);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    margin-right: 0.5rem;
    border: 2px solid var(--gold);
}

.user-name {
    display: block;
    min-width: 0;
    max-width: 185px;
    overflow: hidden;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-link {
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.25em;
    letter-spacing: 0.05em;
    transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.login-link:hover {
    color: var(--gold-light);
    text-decoration-color: var(--red-light);
}

.login-link:focus-visible {
    color: var(--gold-light);
    outline: 1px solid var(--red-light);
    outline-offset: 4px;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    padding: 0.55rem 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,.035) 0 1px, transparent 2px),
        radial-gradient(circle at 76% 68%, rgba(255,255,255,.025) 0 1px, transparent 2px),
        linear-gradient(145deg, #191b1a 0%, #101211 55%, #0b0c0c 100%);
    background-size: 29px 31px, 37px 41px, auto;
    border: 1px solid #4d4b43;
    border-radius: 0;
    box-shadow:
        inset 0 0 0 1px rgba(184, 174, 145, 0.08),
        inset 0 0 22px rgba(0, 0, 0, 0.72),
        0 12px 24px rgba(0, 0, 0, 0.76);
    z-index: 1000;
}

.user-menu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.user-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 34px;
    width: 13px;
    height: 13px;
    background: #171918;
    border-top: 1px solid #4d4b43;
    border-left: 1px solid #4d4b43;
    transform: rotate(45deg);
    box-shadow: inset 2px 2px 4px rgba(255,255,255,.025);
}

.user-menu-dropdown::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(171, 155, 112, 0.08);
    background:
        radial-gradient(circle at 2px 2px, #777164 0 1px, #252723 2px, transparent 3px),
        radial-gradient(circle at calc(100% - 2px) 2px, #777164 0 1px, #252723 2px, transparent 3px),
        radial-gradient(circle at 2px calc(100% - 2px), #777164 0 1px, #252723 2px, transparent 3px),
        radial-gradient(circle at calc(100% - 2px) calc(100% - 2px), #777164 0 1px, #252723 2px, transparent 3px);
    pointer-events: none;
}

.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
    display: block;
}

.user-menu-dropdown a {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    padding: 0.55rem 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    margin-left: 0;
    border-left: 2px solid transparent;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.user-menu-dropdown a:hover {
    background: linear-gradient(90deg, rgba(104, 20, 20, 0.36), rgba(104, 20, 20, 0.08));
    border-left-color: var(--red-light);
    color: var(--gold-light);
}

.user-menu-dropdown a:focus-visible {
    background: rgba(104, 20, 20, 0.22);
    border-left-color: var(--red-light);
    color: var(--gold-light);
    outline: 1px solid var(--gold-dark);
    outline-offset: -3px;
}

.user-menu-dropdown a::after {
    display: none;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}

.home-intro {
    max-width: 760px;
    margin: 1rem 0 4rem;
    padding-left: 1.4rem;
    border-left: 2px solid var(--gold-dark);
}

.home-intro-kicker {
    margin-bottom: 0.35rem;
    color: var(--gold-dark);
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    letter-spacing: 0.22em;
}

.home-intro h1 {
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: normal;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-shadow: 0 0 18px rgba(201, 169, 97, 0.25);
}

.home-intro > p:last-child {
    max-width: 38rem;
    margin-top: 0.8rem;
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 0.06em;
}

/* 文章卡片 */
.category-section {
    margin-bottom: 4.5rem;
}

.category-heading {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.category-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
}

.category-title {
    flex: 0 0 auto;
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.6rem;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85);
}

.category-count {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.post-card {
    background-color: var(--bg-dark);
    background-image: none;
    border: 4px solid transparent;
    border-image: url('/static/img/box_frame.png') 6 / 6px / 2px stretch;
    border-radius: 0;
    overflow: visible;
    transition: all 0.4s ease;
    position: relative;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(260px, 36%) 1fr;
    min-height: 250px;
    filter: brightness(0.76);
    box-shadow:
        inset 0 0 28px rgba(6, 4, 3, 0.48),
        0 10px 24px rgba(12, 7, 4, 0.56);
}

.post-card::before {
    display: none;
}

.user-menu-icon {
    position: relative;
    width: 20px;
    height: 20px;
    color: var(--gold-dark);
}

.user-menu-icon::before,
.user-menu-icon::after {
    content: '';
    position: absolute;
    box-sizing: border-box;
}

[data-menu-icon="profile"] .user-menu-icon::before {
    left: 5px;
    top: 1px;
    width: 10px;
    height: 10px;
    border: 1px solid currentColor;
    border-radius: 50%;
}
[data-menu-icon="profile"] .user-menu-icon::after {
    left: 2px;
    bottom: 1px;
    width: 16px;
    height: 8px;
    border: 1px solid currentColor;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
}

[data-menu-icon="admin"] .user-menu-icon::before {
    inset: 3px;
    border: 1px solid currentColor;
    transform: rotate(45deg);
}
[data-menu-icon="admin"] .user-menu-icon::after {
    left: 9px;
    top: 0;
    width: 1px;
    height: 20px;
    background: currentColor;
    transform: rotate(45deg);
}

[data-menu-icon="logout"] .user-menu-icon::before {
    left: 2px;
    top: 3px;
    width: 10px;
    height: 14px;
    border: 1px solid currentColor;
    border-right: 0;
}
[data-menu-icon="logout"] .user-menu-icon::after {
    right: 1px;
    top: 9px;
    width: 11px;
    height: 1px;
    background: currentColor;
    box-shadow: 4px -3px 0 -0.2px currentColor, 4px 3px 0 -0.2px currentColor;
}

.user-menu-dropdown .user-menu-logout {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(117, 97, 58, 0.32);
}

/* 各档案页沿用首页的营地题头语言。 */
.archive-hero {
    max-width: 760px;
    margin: 1rem 0 4rem;
    padding-left: 1.4rem;
    border-left: 2px solid var(--gold-dark);
}

.archive-hero-kicker {
    margin-bottom: 0.35rem;
    color: var(--gold-dark);
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.archive-hero h1 {
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-shadow: 0 0 18px rgba(201, 169, 97, 0.25);
}

.archive-hero > p:last-child {
    max-width: 38rem;
    margin-top: 0.8rem;
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 0.06em;
}

.post-card:hover {
    filter: brightness(0.8);
    box-shadow:
        inset 0 0 30px rgba(33, 7, 5, 0.42),
        0 12px 28px rgba(12, 7, 4, 0.68);
}

.post-card-frame-top,
.post-card-frame-bottom,
.post-card-frame-left,
.post-card-frame-right,
.post-card-frame-bl,
.post-card-frame-br {
    display: none;
}

.post-card > .post-image-link,
.post-card > .post-content-preview {
    filter: brightness(1.315);
}

.post-card:hover > .post-image-link,
.post-card:hover > .post-content-preview {
    filter: brightness(1.25);
}

.post-image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    display: block;
}

.post-content-preview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.4rem, 3vw, 2.5rem);
    background-color: #0b0a08;
    background-image:
        linear-gradient(90deg, rgba(0,0,0,.28), transparent 8%, transparent 92%, rgba(0,0,0,.34)),
        linear-gradient(180deg, rgba(125,86,43,.095), transparent 32%, rgba(0,0,0,.16)),
        url('/static/img/dark-parchment.svg');
    background-size: auto, auto, 360px 260px;
    background-blend-mode: normal, normal, soft-light;
    box-shadow: inset 14px 0 24px rgba(0,0,0,.22), inset 0 0 28px rgba(20,10,4,.2);
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    color: var(--gold);
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.post-title:hover {
    color: var(--gold-light);
}

.post-meta {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-card-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    color: var(--text-secondary);
    max-width: 58rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--gold-light);
    text-shadow: 0 0 10px rgba(201, 169, 97, 0.5);
}

/* 文章详情页容器 */
.post-detail-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1000px) auto;
    gap: 0.5rem;
    max-width: 1102px;
    margin: 0 auto;
    align-items: flex-start;
}

/* 文章详情页 */
.post-detail {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    background-color: var(--surface-stone);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.018), transparent 30%);
    border: 3px solid var(--border-deep);
    border-radius: 2px;
    padding: 3rem;
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 14px 30px var(--shadow-color);
}

.post-detail-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img,
.author-avatar .avatar-placeholder {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid var(--gold-dark);
}

.avatar-placeholder {
    background: var(--gold-dark);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 2.5rem;
}

.author-details {
    text-align: left;
}

.author-name {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.post-date {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-family: var(--font-body);
    font-weight: 400;
}

.post-stats .entity-stat,
.post-stats .stat-value {
    font: inherit;
}

.stat-item {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-light) 100%);
    color: var(--gold-light);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    margin-left: 0.4rem;
    letter-spacing: 0.5px;
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Diablo2', cursive;
}

.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--red-light) 0%, var(--red) 100%);
    color: var(--gold-light);
    font-family: 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.22rem 0.58rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.4);
    vertical-align: 0.08em;
}

.post-detail-title {
    font-family: 'Diablo2', cursive;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(201, 169, 97, 0.3);
}

.post-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.post-detail-content {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 2;
}

.post-detail-content p {
    margin-bottom: 1.5rem;
}

/* 正文引用沿用旧金属配色，避免浏览器默认的蓝色/紫色链接。 */
.post-detail-content a:not(.btn):not(.creator-card) {
    color: var(--gold);
    text-decoration-line: underline;
    text-decoration-color: rgba(183, 154, 91, 0.58);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    transition: color 0.18s ease, text-decoration-color 0.18s ease, background-color 0.18s ease;
}

.post-detail-content a:not(.btn):not(.creator-card):visited {
    color: #a98e59;
    text-decoration-color: rgba(117, 97, 58, 0.72);
}

.post-detail-content a:not(.btn):not(.creator-card):hover {
    color: var(--gold-light);
    text-decoration-color: var(--red-light);
    background-color: rgba(104, 20, 20, 0.18);
}

.post-detail-content a:not(.btn):not(.creator-card):focus-visible {
    color: var(--gold-light);
    outline: 1px solid var(--red-light);
    outline-offset: 3px;
    background-color: rgba(104, 20, 20, 0.22);
}

.post-detail-content .creator-card,
.post-detail-content .creator-card:visited {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    width: min(100%, 480px);
    margin: 1.25rem 0 1.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    background: linear-gradient(145deg, #1b1814 0%, #12100e 100%);
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 5px 12px rgba(12, 7, 4, 0.56);
    text-decoration: none;
}

.post-detail-content .creator-card:hover {
    color: var(--text-primary);
    background: linear-gradient(145deg, #261b17 0%, #15110f 100%);
    border-color: #4b1b17;
    box-shadow: inset 0 0 0 1px rgba(214, 194, 142, 0.2), 0 6px 14px rgba(12, 7, 4, 0.68);
}

.post-detail-content .creator-card:focus-visible {
    color: var(--text-primary);
    outline: 1px solid var(--red-light);
    outline-offset: 3px;
}

.post-detail-content .creator-card-avatar {
    width: 44px;
    height: 44px;
    margin: 0;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid var(--gold-dark);
    box-shadow: inset 0 0 0 1px rgba(190, 160, 101, 0.12);
}

.creator-card-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.45;
}

.creator-card-kicker,
.creator-card-meta {
    color: var(--text-secondary);
    font-family: 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.creator-card-title {
    color: var(--gold-light);
    font-family: 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.creator-card-arrow {
    color: var(--gold-dark);
    font-family: Georgia, serif;
    font-size: 1.2rem;
    transition: color 0.18s ease, transform 0.18s ease;
}

.creator-card:hover .creator-card-arrow {
    color: var(--red-light);
    transform: translate(2px, -2px);
}

.post-detail-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 1.5rem 0;
    cursor: zoom-in;
}

.post-article {
    position: relative;
    background-color: #151514;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 18% 4%, rgba(116, 110, 95, 0.075), transparent 25%),
        radial-gradient(ellipse at 86% 52%, rgba(0, 0, 0, 0.2), transparent 38%);
    background-size: 400px 300px, auto, auto;
    background-blend-mode: soft-light, normal, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126, 111, 78, 0.3);
    outline-offset: -4px;
    box-shadow:
        inset 0 1px 0 rgba(198, 188, 160, 0.08),
        inset 0 0 38px rgba(0, 0, 0, 0.24),
        0 12px 28px rgba(5, 3, 2, 0.54);
}

.post-article .post-detail-content {
    position: relative;
    padding: clamp(1rem, 2.5vw, 1.8rem);
    background: rgba(10, 10, 9, 0.22);
    border-top: 1px solid rgba(126, 111, 78, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.58);
    box-shadow: inset 0 10px 24px rgba(0, 0, 0, 0.08);
}

.post-article .site-comment-form {
    background-color: #0f0f0e;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 20% 8%, rgba(121, 115, 100, 0.055), transparent 42%);
    background-size: 320px 240px, auto;
    background-blend-mode: soft-light, normal;
    border-color: #070706;
    outline: 1px solid rgba(126, 111, 78, 0.22);
    outline-offset: -4px;
}

.post-image-link {
    display: block;
    min-width: 0;
    min-height: 250px;
    overflow: hidden;
    color: inherit;
    cursor: pointer;
}

.post-image-link .post-image {
    width: 100%;
    height: 100%;
    transition: filter 0.28s ease, transform 0.38s ease;
}

.post-image-link:hover .post-image,
.post-image-link:focus-visible .post-image {
    filter: brightness(1.08) contrast(1.03);
    transform: scale(1.012);
}

.post-excerpt-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-excerpt-link:hover .post-excerpt,
.post-excerpt-link:focus-visible .post-excerpt {
    color: var(--text-primary);
}

.post-image-link:focus-visible,
.post-excerpt-link:focus-visible {
    outline: 1px solid var(--gold-dark);
    outline-offset: 3px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface-inset);
    border: 2px solid var(--border-deep);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: inset 0 0 0 1px var(--metal-highlight), inset 0 2px 8px rgba(0, 0, 0, 0.58);
}

textarea.form-control {
    min-height: 300px;
    resize: vertical;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(180deg, #4a4439 0%, #2d2923 48%, #201c18 100%);
    color: var(--gold-light);
    border: 2px solid var(--border-deep);
    border-radius: 2px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    text-decoration: none;
    text-align: center;
    box-shadow: inset 0 1px 0 var(--metal-highlight), inset 0 -2px 4px rgba(0,0,0,0.46), 0 3px 7px rgba(12,7,4,0.55);
}

.btn:hover {
    background: linear-gradient(180deg, #81231e 0%, #571511 55%, #36100d 100%);
    color: #e1c994;
    box-shadow: inset 0 1px 0 rgba(224, 168, 112, 0.22), inset 0 -2px 5px rgba(0,0,0,0.55), 0 4px 9px rgba(12,7,4,0.62);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.68), 0 1px 2px rgba(12,7,4,0.5);
}

/* 个人资料保存按钮：无字的暗黑石质按钮素材试用。 */
.profile-container .profile-save-texture,
.profile-container .profile-save-texture:hover {
    min-width: 142px;
    min-height: 46px;
    padding: 0.7rem 1.6rem;
    color: #17130e;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    -webkit-text-stroke: 0.45px #17130e;
    paint-order: stroke fill;
    background-color: transparent;
    background-image: url('/static/img/button-blank.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    border: 0;
    border-radius: 0;
    image-rendering: pixelated;
    text-shadow: 0 1px 0 rgba(210, 201, 170, 0.24);
    box-shadow: 0 3px 7px rgba(8, 5, 3, 0.72);
}

.profile-container .profile-save-texture:hover {
    color: #2b160f;
    filter: brightness(1.08) sepia(0.16);
}

.profile-container .profile-save-texture:active {
    filter: brightness(0.9);
}

.profile-container .form-actions {
    justify-content: center;
    flex-wrap: wrap;
}

.btn-danger {
    background: linear-gradient(145deg, var(--red) 0%, var(--red-light) 100%);
    color: var(--text-primary);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #9b2520 0%, #681414 100%);
    box-shadow: inset 0 1px 0 rgba(224, 168, 112, 0.2), 0 4px 9px rgba(12,7,4,0.62);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    box-shadow: none;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-stone);
    border: 3px solid var(--border-deep);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 10px 22px var(--shadow-color);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-light);
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 1px;
}

.table tr:hover {
    background: rgba(201, 169, 97, 0.05);
}

/* 提示消息 */
.flash-messages {
    margin-bottom: 2rem;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    background: var(--bg-medium);
    border-left: 3px solid var(--gold);
}

.flash.error {
    border-left-color: var(--red-light);
}

.flash.success {
    border-left-color: #4caf50;
}

/* 登录框 */
.login-box {
    position: relative;
    max-width: 460px;
    margin: clamp(3rem, 8vh, 5rem) auto;
    padding: clamp(2rem, 6vw, 3rem);
    background-color: #151514;
    background-image: url('/static/img/stone-texture.svg'), radial-gradient(ellipse at 18% 4%, rgba(116,110,95,.08), transparent 30%);
    background-size: 360px 270px, auto;
    background-blend-mode: soft-light, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126,111,78,.3);
    outline-offset: -4px;
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(198,188,160,.08), inset 0 0 32px rgba(0,0,0,.24), 0 16px 34px rgba(5,3,2,.58);
}

.login-box::before,
.login-box::after {
    position: absolute;
    width: 28px;
    height: 28px;
    content: '';
    pointer-events: none;
}

.login-box::before { top: 10px; left: 10px; border-top: 1px solid #665735; border-left: 1px solid #665735; }
.login-box::after { right: 10px; bottom: 10px; border-right: 1px solid #665735; border-bottom: 1px solid #665735; }

.login-kicker {
    margin: 0 0 .4rem;
    color: #74684f;
    font-family: 'Cinzel', serif;
    font-size: .68rem;
    letter-spacing: .2em;
    text-align: center;
    text-transform: uppercase;
}

.login-title {
    text-align: center;
    font-family: 'Diablo2', cursive;
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 2.4rem;
    font-weight: 400;
    text-shadow: 0 1px 1px rgba(0,0,0,.9), 0 0 5px rgba(201,169,97,.12);
}

.login-box .form-group { margin-bottom: 1.55rem; }

.login-box .form-group label {
    margin-bottom: .65rem;
    color: #b29555;
    font-size: .88rem;
}

.login-box .form-control {
    min-height: 52px;
    padding: .82rem 1rem;
    color: #d1c5ad;
    caret-color: var(--gold-light);
    background: #0b0b0a;
    border: 2px solid #070706;
    border-bottom-color: #3e3524;
    border-radius: 0;
    box-shadow: inset 0 3px 10px rgba(0,0,0,.78), 0 0 0 1px rgba(126,111,78,.18);
}

.login-box .form-control::placeholder { color: #665f53; opacity: 1; }

.login-box .form-control:focus {
    border-color: #6c5b36;
    box-shadow: inset 0 3px 10px rgba(0,0,0,.78), 0 0 0 1px rgba(179,147,77,.28), 0 0 8px rgba(111,76,33,.12);
}

.login-box .form-control:-webkit-autofill,
.login-box .form-control:-webkit-autofill:hover,
.login-box .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #d1c5ad;
    caret-color: #d1c5ad;
    box-shadow: inset 0 0 0 1000px #0b0b0a, inset 0 3px 10px rgba(0,0,0,.78), 0 0 0 1px rgba(126,111,78,.18);
    transition: background-color 9999s ease-out 0s;
}

.login-submit {
    width: 100%;
    min-height: 52px;
    margin-top: .25rem;
    font-size: 1rem;
    letter-spacing: .12em;
}

.login-footer {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(126,111,78,.24);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: center;
}

.login-footer a,
.login-footer a:visited {
    color: var(--gold);
    font-weight: 600;
    text-decoration-line: underline;
    text-decoration-color: rgba(183, 154, 91, 0.58);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

.login-footer a:hover {
    color: var(--gold-light);
    text-decoration-color: var(--red-light);
}

.login-footer a:focus-visible {
    color: var(--gold-light);
    outline: 1px solid var(--red-light);
    outline-offset: 3px;
}

/* 页脚 */
footer {
    background: transparent;
    border-top: 0;
    padding: 2.25rem 1rem 2.75rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.76rem;
    position: relative;
    z-index: 2;
    margin-top: 3rem;
    letter-spacing: 0.04em;
    opacity: 0.78;
}

.verification-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.registration-notice {
    margin: -0.65rem 0 1.6rem;
    padding: 0.9rem 1rem;
    color: var(--text-secondary);
    background: rgba(10, 9, 8, 0.62);
    border: 1px solid rgba(117, 97, 58, 0.34);
    border-left: 2px solid var(--gold-dark);
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.75;
}

.registration-notice p + p {
    margin-top: 0.45rem;
}

.verification-code-button {
    min-width: 116px;
    white-space: nowrap;
}

.verification-code-status.is-success { color: #9caf76; }
.verification-code-status.is-error { color: #cf746a; }

@media (max-width: 520px) {
    .verification-code-row { grid-template-columns: 1fr; }
    .verification-code-button { width: 100%; }
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(calc(100% - 2rem), 1200px);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(117, 97, 58, 0.55) 18%, rgba(117, 97, 58, 0.55) 82%, transparent);
}

footer p {
    color: #817664;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}

/* 响应式 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .home-intro {
        margin: 0.5rem 0 3rem;
    }

    .category-heading {
        gap: 0.7rem;
    }

    .category-heading::after {
        display: none;
    }

    .category-count {
        margin-left: auto;
    }

    .post-card {
        display: block;
        min-height: 0;
    }

    .post-image {
        height: 210px;
        min-height: 0;
    }
    
    .post-detail {
        padding: 1.5rem;
    }
    
    .post-detail-title {
        font-size: 1.8rem;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 营地留言簿 */
.guestbook-page {
    position: relative;
    background-color: #151514;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 14% 6%, rgba(116, 110, 95, 0.075), transparent 27%),
        radial-gradient(ellipse at 84% 54%, rgba(0, 0, 0, 0.2), transparent 38%);
    background-size: 320px 240px, auto, auto;
    background-blend-mode: soft-light, normal, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126, 111, 78, 0.3);
    outline-offset: -4px;
    box-shadow:
        inset 0 1px 0 rgba(198, 188, 160, 0.08),
        inset 0 0 34px rgba(0, 0, 0, 0.24),
        0 10px 26px rgba(5, 3, 2, 0.52);
}

.guestbook-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guestbook-entry {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    column-gap: 1rem;
    padding: 1.25rem;
    background-color: #111110;
    background-image:
        url('/static/img/stone-texture.svg'),
        linear-gradient(112deg, rgba(255, 255, 255, 0.025), transparent 32%, rgba(0, 0, 0, 0.12));
    background-size: 360px 270px, auto;
    background-blend-mode: soft-light, normal;
    border: 2px solid #080807;
    border-left: 3px solid #615333;
    outline: 1px solid rgba(126, 111, 78, 0.2);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(198, 188, 160, 0.055), inset 0 -10px 24px rgba(0, 0, 0, 0.12);
}

.guestbook-entry-header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1rem;
    margin-bottom: 0.65rem;
}

.guestbook-author {
    display: contents;
}

.guestbook-avatar {
    grid-column: 1;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid var(--gold-dark);
    background: var(--bg-dark);
}

.guestbook-avatar-placeholder {
    display: grid;
    place-items: center;
    color: var(--bg-dark);
    background: var(--gold-dark);
    border-color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.guestbook-author-name {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.guestbook-author-name .admin-badge {
    flex: 0 0 auto;
    margin-left: 0;
}

.guestbook-time {
    grid-column: 3;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.guestbook-image,
.guestbook-content,
.guestbook-actions,
.guestbook-entry > .comment-interactions,
.guestbook-entry > .comment-replies,
.guestbook-entry > .comment-reply-form {
    grid-column: 2 / -1;
}

.guestbook-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: clamp(3rem, 7vw, 5rem) 0 1.25rem;
    padding: 1rem 1.15rem;
    background: rgba(7, 7, 6, 0.3);
    border-top: 1px solid rgba(126, 111, 78, 0.34);
    border-bottom: 1px solid rgba(126, 111, 78, 0.34);
    box-shadow: inset 0 1px 0 rgba(198, 188, 160, 0.035);
}

.guestbook-list-heading h3 {
    margin: 0;
    color: var(--gold);
    font-family: 'Diablo2', cursive;
    font-size: clamp(1.35rem, 2.5vw, 1.7rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-compose-slot {
    flex: 0 0 auto;
}

.comment-compose-slot .comment-compose-toggle {
    min-width: auto;
    min-height: 38px;
    margin: 0;
    padding: 0.4rem 1rem;
    font-size: 0.88rem;
    box-shadow: inset 0 0 0 1px rgba(190, 160, 101, 0.08), 0 3px 8px rgba(0,0,0,.45);
}

.guestbook-section-title {
    margin: 0;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.06em;
}

.guestbook-page > .post-detail-header:not(:first-child) {
    margin-top: 3.5rem;
}

.guestbook-page > .post-detail-header:first-child {
    margin-bottom: 1.5rem;
    text-align: left;
}

.guestbook-page > .about-content {
    padding-bottom: clamp(1rem, 3vw, 2rem);
}

.guestbook-image {
    max-width: 100%;
    max-height: 400px;
    margin-bottom: 0.8rem;
    object-fit: contain;
    border: 1px solid var(--border-color);
}

.guestbook-content {
    color: var(--text-primary);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.guestbook-actions {
    margin-top: 0.75rem;
    text-align: right;
}

.guestbook-page .site-comment-form {
    background-color: #0f0f0e;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 20% 8%, rgba(121, 115, 100, 0.06), transparent 42%);
    background-size: 300px 225px, auto;
    background-blend-mode: soft-light, normal;
    border-color: #070706;
    outline: 1px solid rgba(126, 111, 78, 0.24);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(196, 186, 158, 0.06), inset 0 0 22px rgba(0, 0, 0, 0.22);
}

.comment-board {
    margin-top: clamp(3rem, 7vw, 5rem) !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

.comment-board .guestbook-list-heading {
    margin-top: 0;
}

.comment-board .guestbook-list-heading h3 small {
    margin-left: .65rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: .7rem;
    font-weight: 400;
    letter-spacing: .04em;
}

.unified-comment-entry,
.ambiance-comment-item.unified-comment-entry {
    padding: 1.25rem !important;
    background-color: #111110 !important;
    background-image: url('/static/img/stone-texture.svg'), linear-gradient(112deg, rgba(255,255,255,.025), transparent 32%, rgba(0,0,0,.12)) !important;
    background-size: 360px 270px, auto !important;
    background-blend-mode: soft-light, normal !important;
    border: 2px solid #080807 !important;
    border-left: 3px solid #615333 !important;
    border-radius: 0 !important;
    outline: 1px solid rgba(126,111,78,.2);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(198,188,160,.055), inset 0 -10px 24px rgba(0,0,0,.12);
}

.unified-comment-entry .guestbook-entry-header {
    display: grid !important;
    grid-template-columns: 100px minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 1rem !important;
    margin-bottom: .65rem !important;
}

.unified-comment-entry .guestbook-author {
    display: contents !important;
}

.unified-comment-entry > .guestbook-content,
.unified-comment-entry > .guestbook-image,
.unified-comment-entry > .comment-interactions,
.unified-comment-entry > .comment-replies,
.unified-comment-entry > .comment-reply-form {
    grid-column: 2 / -1;
}

.unified-comment-entry > .guestbook-content {
    margin: .1rem 0 0;
    line-height: 1.8 !important;
}

.unified-comment-entry > .comment-interactions {
    margin-top: .55rem;
}

.comment-board > .site-comment-form {
    background-color: #0f0f0e;
    background-image: url('/static/img/stone-texture.svg');
    background-size: 300px 225px;
    background-blend-mode: soft-light;
    border-color: #070706;
    outline: 1px solid rgba(126,111,78,.24);
    outline-offset: -4px;
}

@media (max-width: 600px) {
    .guestbook-entry {
        grid-template-columns: 100px minmax(0, 1fr);
        column-gap: 0.75rem;
        padding: 1rem;
    }

    .guestbook-entry-header {
        grid-template-columns: 100px minmax(0, 1fr);
        column-gap: 0.75rem;
    }

    .guestbook-avatar {
        width: 100px;
        height: 100px;
    }

    .guestbook-time {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0.2rem;
    }
}

/* 项目进度 */
.project-progress-panel {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 0 3rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    background-color: #151514;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 16% 9%, rgba(112, 109, 101, 0.09) 0, transparent 23%),
        radial-gradient(ellipse at 83% 68%, rgba(0, 0, 0, 0.24) 0, transparent 34%),
        radial-gradient(circle at 27% 58%, rgba(103, 96, 83, 0.045) 0 1px, transparent 1.8px),
        radial-gradient(circle at 73% 28%, rgba(0, 0, 0, 0.16) 0 1px, transparent 2px),
        linear-gradient(112deg, rgba(255, 255, 255, 0.018), transparent 28%, rgba(0, 0, 0, 0.08) 61%, transparent 82%);
    background-size: 320px 240px, auto, auto, 19px 23px, 31px 29px, auto;
    background-blend-mode: soft-light, normal, normal, normal, normal, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126, 111, 78, 0.34);
    outline-offset: -4px;
    box-shadow:
        inset 0 1px 0 rgba(198, 188, 160, 0.09),
        inset 0 -1px 0 rgba(0, 0, 0, 0.9),
        inset 0 0 30px rgba(0, 0, 0, 0.28),
        0 10px 24px rgba(5, 3, 2, 0.56);
}

.project-progress-panel::before,
.project-progress-panel::after {
    position: absolute;
    width: 34px;
    height: 34px;
    content: '';
    pointer-events: none;
}

.project-progress-panel::before {
    top: 10px;
    left: 10px;
    border-top: 1px solid var(--gold-dark);
    border-left: 1px solid var(--gold-dark);
}

.project-progress-panel::after {
    right: 10px;
    bottom: 10px;
    border-right: 1px solid var(--gold-dark);
    border-bottom: 1px solid var(--gold-dark);
}

.project-progress-header {
    max-width: 680px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.project-progress-kicker {
    display: block;
    color: var(--text-secondary);
    font-size: 0.74rem;
    letter-spacing: 0.2em;
}

.project-progress-header h1,
.progress-admin-header h1 {
    margin: 0.35rem 0 0.65rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
}

.project-progress-header p,
.progress-admin-header p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-progress-overview {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.25rem, 4vw, 2.5rem);
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
    border-bottom: 1px solid var(--border-color);
}

.project-progress-pending {
    max-width: 760px;
    margin: 0 auto clamp(2.5rem, 6vw, 4rem);
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem);
    text-align: center;
    background: rgba(7, 7, 6, 0.28);
    border-top: 1px solid rgba(126, 111, 78, 0.34);
    border-bottom: 1px solid rgba(0, 0, 0, 0.72);
    box-shadow: inset 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-progress-pending h2 {
    margin: 0.65rem 0 1rem;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: clamp(1.45rem, 4vw, 2.15rem);
    font-weight: 400;
    letter-spacing: 0.08em;
}

.project-progress-pending p {
    max-width: 38rem;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.85;
}

.project-progress-value {
    color: var(--gold-light);
    line-height: 1;
}

.project-progress-value strong {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(3.5rem, 9vw, 5.5rem);
    font-weight: 400;
    text-shadow: 0 3px 10px rgba(8, 7, 6, 0.8);
}

.project-progress-value > span {
    margin-left: 0.15rem;
    color: var(--gold-dark);
    font-size: 1.5rem;
}

.project-progress-value small {
    display: block;
    margin-top: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
}

.project-progress-track-wrap {
    min-width: 0;
}

.project-progress-track {
    position: relative;
    height: 24px;
    padding: 4px;
    overflow: visible;
    background: #090807;
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.86), 0 0 0 1px var(--border-color);
}

.project-progress-track::after {
    position: absolute;
    inset: 4px;
    content: '';
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(8, 7, 6, 0.55) calc(10% - 1px), rgba(8, 7, 6, 0.55) 10%);
    pointer-events: none;
}

.project-progress-fill {
    position: relative;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    background:
        linear-gradient(105deg, transparent 0 34%, rgba(220, 137, 52, 0.18) 42%, transparent 51%) 0 0 / 180% 100%,
        linear-gradient(90deg, #4b1110 0%, #7c201a 66%, #a7632d 100%);
    box-shadow: inset 0 1px 0 rgba(230, 190, 112, 0.2), 0 0 8px rgba(104, 20, 20, 0.5);
    animation: progress-ember-flow 4.8s linear infinite;
}

.project-progress-fill::before {
    position: absolute;
    inset: 0;
    content: '';
    background: repeating-linear-gradient(
        115deg,
        rgba(255, 177, 73, 0.06) 0 2px,
        transparent 2px 9px,
        rgba(46, 5, 4, 0.16) 9px 13px
    );
    animation: progress-coals-shift 7s linear infinite;
}

.project-progress-marker {
    position: absolute;
    top: -5px;
    width: 2px;
    height: 30px;
    background: var(--gold-light);
    box-shadow: 0 0 5px rgba(214, 194, 142, 0.45);
    transform: translateX(-1px);
    animation: progress-marker-breathe 2.4s ease-in-out infinite;
}

.project-progress-marker::after {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 5px;
    height: 5px;
    content: '';
    background: #e1a24d;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(214, 118, 43, 0.8);
    transform: translateX(-50%);
    animation: progress-ember-pulse 1.7s ease-in-out infinite;
}

@keyframes progress-ember-flow {
    from { background-position: 160% 0, 0 0; }
    to { background-position: -80% 0, 0 0; }
}

@keyframes progress-coals-shift {
    from { transform: translateX(-18px); }
    to { transform: translateX(18px); }
}

@keyframes progress-marker-breathe {
    0%, 100% { box-shadow: 0 0 4px rgba(214, 194, 142, 0.35); }
    50% { box-shadow: 0 0 10px rgba(214, 157, 74, 0.72); }
}

@keyframes progress-ember-pulse {
    0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.75); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .project-progress-fill,
    .project-progress-fill::before,
    .project-progress-marker,
    .project-progress-marker::after {
        animation: none;
    }
}

.project-progress-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 0.45rem;
    color: #6f6659;
    font-family: Georgia, serif;
    font-size: 0.7rem;
}

.project-progress-waypoint {
    position: relative;
    display: flex;
    width: 0;
    flex: 0 0 0;
    flex-direction: column;
    align-items: center;
    gap: 0.22rem;
}

.project-progress-waypoint img {
    width: 20px;
    height: 20px;
    max-width: none;
    image-rendering: pixelated;
    opacity: 0.34;
    filter: grayscale(0.55) brightness(0.65);
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.project-progress-waypoint small {
    color: #6f6659;
    font: inherit;
}

.project-progress-waypoint.reached img {
    opacity: 0.9;
    filter: sepia(0.35) brightness(1.05) drop-shadow(0 0 4px rgba(201, 169, 97, 0.35));
}

.project-progress-waypoint.reached small {
    color: var(--gold-dark);
}

.project-countdown-section {
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

.project-countdown-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-countdown-heading h2 {
    margin-top: 0.25rem;
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

#project-target-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.project-countdown {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr) auto minmax(90px, 1fr) auto minmax(90px, 1fr);
    align-items: center;
    gap: clamp(0.4rem, 2vw, 1rem);
}

.countdown-unit {
    min-width: 0;
    padding: clamp(0.8rem, 3vw, 1.3rem) 0.5rem;
    text-align: center;
    background-color: #0d0d0c;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 28% 18%, rgba(121, 115, 100, 0.07), transparent 45%),
        radial-gradient(circle at 72% 72%, rgba(0, 0, 0, 0.2) 0 1px, transparent 2px);
    background-size: 260px 195px, auto, 23px 19px;
    background-blend-mode: soft-light, normal, normal;
    border: 2px solid #070706;
    outline: 1px solid rgba(126, 111, 78, 0.25);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(196, 186, 158, 0.07), inset 0 4px 10px rgba(0, 0, 0, 0.72);
}

.countdown-unit strong {
    display: block;
    color: var(--gold-light);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.countdown-unit span {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.countdown-separator {
    color: var(--gold-dark);
    font-family: Georgia, serif;
    font-size: 1.5rem;
}

.project-subscription {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-top: clamp(2rem, 5vw, 3rem);
    padding: 1.15rem 1.25rem;
    background-color: #11100f;
    background-image:
        url('/static/img/stone-texture.svg'),
        linear-gradient(135deg, rgba(104, 20, 20, 0.13), transparent 52%),
        radial-gradient(ellipse at 75% 20%, rgba(111, 104, 91, 0.055), transparent 42%),
        radial-gradient(circle at 35% 70%, rgba(0, 0, 0, 0.18) 0 1px, transparent 2px);
    background-size: 320px 240px, auto, auto, 27px 23px;
    background-blend-mode: soft-light, normal, normal, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126, 111, 78, 0.25);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(196, 186, 158, 0.07), inset 0 -8px 18px rgba(0, 0, 0, 0.2);
}

.project-subscription-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--gold);
    font-size: 1.15rem;
    background: var(--surface-inset);
    border: 1px solid var(--gold-dark);
    transform: rotate(45deg);
}

.project-subscription-mark span {
    display: block;
    transform: rotate(-45deg);
}

.project-subscription-mark:has(img) {
    width: 58px;
    height: 64px;
    background: transparent;
    border: 0;
    transform: none;
}

.project-subscription-mark img {
    display: block;
    width: 52px;
    height: auto;
    max-height: 62px;
    object-fit: contain;
    image-rendering: pixelated;
}

.project-subscription-copy {
    min-width: 0;
}

.project-subscription-copy h2 {
    margin: 0.2rem 0 0.3rem;
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.project-subscription-copy p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.6;
}

.project-subscription-copy p span {
    color: var(--text-primary);
}

.project-subscription-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
}

.project-subscription-action .btn {
    padding: 0.65rem 1.1rem;
    white-space: nowrap;
}

.project-subscription-state {
    padding: 0.28rem 0.6rem;
    color: var(--gold-light);
    font-size: 0.78rem;
    white-space: nowrap;
    background: rgba(104, 20, 20, 0.28);
    border: 1px solid #5b211b;
}

.project-subscription-link {
    padding: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--gold-dark);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.project-subscription-link:hover {
    color: var(--gold-light);
    border-bottom-color: var(--red-light);
}

.project-subscription-action form {
    margin: 0;
}

.project-subscription-action button.project-subscription-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    min-height: 52px;
    padding: 0.65rem 1.25rem;
    line-height: 1.15;
    white-space: nowrap;
}

.project-subscription-action .project-subscription-state {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.project-progress-footer {
    margin-top: 2rem;
    color: #6f6659;
    font-size: 0.72rem;
    text-align: right;
    letter-spacing: 0.05em;
}

.progress-admin-panel {
    max-width: 760px;
    margin: 1rem auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--bg-medium);
    border: 3px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 12px 28px var(--shadow-color);
}

.progress-admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.progress-admin-header h1 {
    font-size: 2rem;
}

.progress-admin-form {
    max-width: 560px;
}

.progress-admin-percentage {
    display: grid;
    grid-template-columns: minmax(0, 180px) auto;
    align-items: center;
    gap: 0.75rem;
}

.progress-admin-percentage span {
    color: var(--gold);
    font-size: 1.2rem;
}

@media (max-width: 680px) {
    .project-progress-overview {
        grid-template-columns: 1fr;
    }

    .project-progress-value {
        display: grid;
        grid-template-columns: auto auto 1fr;
        align-items: end;
        justify-content: start;
        gap: 0.2rem;
    }

    .project-progress-value small {
        margin: 0 0 0.35rem 0.6rem;
    }

    .project-countdown-heading,
    .progress-admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-countdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .countdown-separator {
        display: none;
    }

    .project-progress-footer {
        text-align: left;
    }

    .project-subscription {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: start;
        padding: 1rem;
    }

    .project-subscription-mark {
        width: 40px;
        height: 40px;
    }

    .project-subscription-action {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .project-subscription-action form,
    .project-subscription-action button.project-subscription-link {
        width: 100%;
    }
}

/* 氛围音详情：首屏负责播放，长说明独立为阅读区。 */
body .ambiance-detail-container {
    max-width: 1080px;
    margin: 1.5rem auto;
}

.ambiance-detail-container .ambiance-detail-player {
    padding: clamp(1.25rem, 3vw, 2.5rem);
    background: #171717;
    border: 2px solid var(--border-deep);
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 12px 28px var(--shadow-color);
}

.ambiance-detail-container .ambiance-detail-content {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: stretch;
}

.ambiance-detail-container .ambiance-detail-image {
    min-width: 0;
}

.ambiance-detail-container .ambiance-detail-image img {
    display: block;
    width: 100%;
    height: 340px;
    margin: 0;
    object-fit: cover;
    border: 1px solid var(--gold-dark);
    border-radius: 2px;
    filter: brightness(1.08) contrast(1.05);
    box-shadow: inset 0 0 0 1px rgba(214, 194, 142, 0.12), 0 8px 18px rgba(8, 7, 6, 0.56);
}

.ambiance-detail-container .ambiance-detail-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-start;
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.ambiance-detail-container .ambiance-detail-header {
    margin: 0 0 1.75rem;
    text-align: left;
}

.ambiance-detail-kicker {
    display: block;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
}

.ambiance-detail-container .ambiance-detail-title {
    margin: 0.35rem 0 0.8rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(8, 7, 6, 0.7);
}

.ambiance-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.ambiance-detail-container .ambiance-detail-location,
.ambiance-detail-listeners {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.65rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.3;
    letter-spacing: 0.08em;
    border: 1px solid var(--border-color);
    background: var(--surface-inset);
}

.ambiance-detail-container .ambiance-detail-location {
    color: var(--text-secondary);
    text-transform: none;
}

.ambiance-detail-listeners {
    color: var(--gold);
}

.ambiance-detail-container .ambiance-detail-play-hint {
    display: flex;
    width: max-content;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1rem;
    padding: 0;
    text-align: left;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.ambiance-detail-play-hint p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.ambiance-play-btn {
    display: inline-flex;
    min-width: 116px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    flex: 0 0 auto;
    padding: 0.65rem 1.25rem;
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: linear-gradient(180deg, #4a4439 0%, #26221d 100%);
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 1px 0 var(--metal-highlight), 0 3px 7px rgba(12, 7, 4, 0.55);
    cursor: pointer;
}

.ambiance-play-btn:hover {
    color: #e1c994;
    background: linear-gradient(180deg, #81231e 0%, #571511 55%, #36100d 100%);
}

.ambiance-play-btn:active {
    transform: translateY(2px);
}

.ambiance-detail-notes {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
    padding-top: clamp(1.25rem, 3vw, 2rem);
    border-top: 1px solid var(--border-color);
}

.ambiance-inline-play {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid currentColor;
}

.ambiance-detail-notes > h2,
.ambiance-detail-notes > .ambiance-notes-author,
.ambiance-detail-notes > .ambiance-detail-language,
.ambiance-detail-notes > .ambiance-detail-description,
.ambiance-detail-notes > .ambiance-detail-translation {
    width: min(100%, 760px);
    max-width: none;
    margin-right: auto;
    margin-left: auto;
}

.ambiance-detail-notes h2 {
    margin: 0 0 1.15rem;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.12em;
}

.ambiance-notes-author {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 2rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(117, 97, 58, 0.55);
    border-left: 2px solid var(--gold-dark);
    background: linear-gradient(90deg, rgba(31, 25, 19, 0.82), rgba(17, 14, 11, 0.28));
}

.ambiance-notes-author-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: cover;
    background: #030303;
}

.ambiance-notes-author-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.24rem;
}

.ambiance-notes-author-role {
    color: var(--text-secondary);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}

.ambiance-notes-author-name {
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.045em;
}

.ambiance-detail-language {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    color: var(--gold-dark);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.16em;
}

.ambiance-detail-language::after {
    height: 1px;
    content: '';
    flex: 1;
    background: linear-gradient(90deg, rgba(117, 97, 58, 0.5), transparent);
}

.ambiance-detail-translation {
    margin-top: 3rem;
    padding: 1.5rem 1.75rem 1.65rem;
    border-left: 2px solid rgba(174, 133, 53, 0.65);
    background: linear-gradient(90deg, rgba(29, 22, 15, 0.5), rgba(10, 8, 6, 0.22));
}

.ambiance-detail-translation .ambiance-detail-description {
    color: #d4c7ad;
}

.ambiance-detail-container .ambiance-detail-description {
    max-width: none;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.06rem;
    line-height: 1.9;
    text-wrap: pretty;
}

.ambiance-detail-description p {
    margin: 0;
    white-space: pre-line;
}

.ambiance-detail-description p + p {
    margin-top: 1.45rem;
}

.ambiance-detail-description[lang="en"] {
    line-height: 1.82;
    overflow-wrap: break-word;
    hyphens: auto;
}

.ambiance-detail-description[lang="zh-CN"] {
    color: #d7cab0;
    line-height: 2;
    letter-spacing: 0.025em;
}

@media (max-width: 768px) {
    .ambiance-detail-notes > h2,
    .ambiance-detail-notes > .ambiance-notes-author,
    .ambiance-detail-notes > .ambiance-detail-language,
    .ambiance-detail-notes > .ambiance-detail-description,
    .ambiance-detail-notes > .ambiance-detail-translation {
        width: 100%;
    }

    .ambiance-detail-container .ambiance-detail-description {
        font-size: 1rem;
    }

    .ambiance-detail-translation {
        margin-top: 2.35rem;
        padding: 1.15rem 1rem 1.3rem;
    }
}

/* 全站按钮系统：沿用个人资料保存按钮的暗黑石质素材。 */
:where(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button,
    .project-subscription-link
) {
    position: relative;
    min-height: 44px;
    padding: 0.66rem 1.35rem;
    color: #1b160f;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.07em;
    -webkit-text-stroke: 0.32px rgba(18, 14, 9, 0.9);
    paint-order: stroke fill;
    background-color: transparent;
    background-image: url('/static/img/button-blank.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    border: 0;
    border-radius: 0;
    image-rendering: pixelated;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(219, 205, 166, 0.2);
    box-shadow: 0 4px 8px rgba(5, 3, 2, 0.72);
    cursor: pointer;
    transition: color 120ms ease, filter 140ms ease, transform 80ms ease, box-shadow 120ms ease;
}

:where(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button,
    .project-subscription-link
):hover {
    color: #2a160f;
    background-image: url('/static/img/button-blank.png');
    filter: brightness(1.09) sepia(0.12) saturate(1.08);
    box-shadow: 0 5px 10px rgba(5, 3, 2, 0.78);
}

:where(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button
):active {
    transform: translateY(2px);
    filter: brightness(0.82) contrast(1.06);
    box-shadow: 0 1px 3px rgba(5, 3, 2, 0.72);
}

:where(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button
):focus-visible {
    outline: 1px solid var(--gold-light);
    outline-offset: 3px;
}

:where(.btn-danger, .gallery-danger-button, .gallery-category-delete) {
    color: #3c0d0a;
    background-color: rgba(114, 24, 19, 0.46);
    background-blend-mode: multiply;
    -webkit-text-stroke-color: rgba(45, 7, 5, 0.9);
}

:where(.btn-danger, .gallery-danger-button, .gallery-category-delete):hover {
    color: #55120e;
    background-color: rgba(137, 31, 24, 0.34);
    background-blend-mode: multiply;
}

:where(.btn-secondary) {
    color: #c4b58f;
    -webkit-text-stroke: 0;
    filter: brightness(0.72);
    text-shadow: 0 1px 1px #050403;
}

:where(.btn-secondary):hover {
    color: var(--gold-light);
    filter: brightness(0.9) sepia(0.08);
}

:where(button, .btn)[disabled],
:where(button, .btn)[aria-disabled='true'] {
    opacity: 0.46;
    filter: grayscale(0.7) brightness(0.72);
    pointer-events: none;
}

/* 图标与行内操作保持轻量，但使用同一套旧金属反馈。 */
:where(
    .comment-action,
    .entity-like-button,
    .like-btn,
    .ambiance-transport-btn,
    .ambiance-detail-link,
    .gallery-lightbox-close,
    .notification-link
) {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 80ms ease, filter 140ms ease;
}

:where(
    .comment-action,
    .entity-like-button,
    .like-btn,
    .ambiance-transport-btn,
    .ambiance-detail-link,
    .gallery-lightbox-close,
    .notification-link
):active {
    transform: translateY(1px);
    filter: brightness(0.78);
}

/* 曲目详情留言：保持正文优先，弱化传统后台表单感。 */
.site-comment-form {
    width: 100%;
    max-width: none;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    background: #0d0c0b;
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 8px 20px rgba(8, 5, 3, 0.45);
}

.site-comment-form[hidden] {
    display: none;
}

.comment-compose-toggle {
    min-width: 112px;
    margin: 0 0 1.25rem;
}

.site-comment-form form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
}

.site-comment-form .form-group {
    grid-column: 1 / -1;
    margin-bottom: 1.15rem;
}

.site-comment-form .ambiance-field-label,
.site-comment-form label {
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.06em;
}

.site-comment-form .ambiance-anonymous-option {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 0.6rem;
    margin: 0;
    padding: 0.35rem 0;
    color: var(--text-primary);
    cursor: pointer;
}

.ambiance-anonymous-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ambiance-checkbox-mark {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: #0a0908;
    border: 1px solid var(--gold-dark);
    box-shadow: inset 0 0 0 2px #17130f;
}

.ambiance-anonymous-option input:checked + .ambiance-checkbox-mark::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #8a211b;
    box-shadow: 0 0 5px rgba(138, 33, 27, 0.55);
}

.ambiance-anonymous-option input:focus-visible + .ambiance-checkbox-mark {
    outline: 1px solid var(--gold-light);
    outline-offset: 2px;
}

.site-comment-form textarea.form-control {
    min-height: 138px;
    padding: 1rem;
    line-height: 1.75;
    resize: vertical;
    background: #151412;
    border-color: #3d352a;
}

.site-comment-form textarea.form-control:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: inset 0 0 0 1px rgba(183, 154, 91, 0.14);
}

.site-comment-form .ambiance-attachment-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    grid-column: 1 !important;
    margin: 0 !important;
}

.site-comment-form .ambiance-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.site-comment-form .ambiance-file-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.52rem 0.75rem;
    color: var(--text-primary);
    background: linear-gradient(180deg, #373129, #211d18);
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px var(--metal-highlight);
    cursor: pointer;
}

.site-comment-form .ambiance-file-trigger:hover {
    color: var(--gold-light);
    background: linear-gradient(180deg, #4b4031, #29221a);
}

.ambiance-file-icon {
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 1.1rem;
    line-height: 1;
}

.ambiance-file-name {
    min-width: 0;
    overflow: hidden;
    color: #746c60;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-comment-form > form > .btn {
    grid-column: 2;
    align-self: end;
    min-height: 42px;
    padding: 0.55rem 1.15rem;
    color: var(--gold-light);
    font-weight: 400;
    background: linear-gradient(180deg, #4a402f, #2a241c);
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px var(--metal-highlight);
}

.site-comment-form > form > .btn:hover {
    background: linear-gradient(180deg, #79221d, #451310);
}

@media (max-width: 768px) {
    .site-comment-form form {
        grid-template-columns: 1fr;
    }

    .site-comment-form .ambiance-attachment-group,
    .site-comment-form > form > .btn {
        grid-column: 1 !important;
    }

    .site-comment-form > form > .btn {
        width: 100%;
        margin-top: 0.85rem;
    }

    .ambiance-notes-author-avatar {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .ambiance-detail-container .ambiance-detail-content {
        grid-template-columns: 1fr;
    }

    .ambiance-detail-container .ambiance-detail-image {
        width: 100%;
    }

    .ambiance-detail-container .ambiance-detail-image img {
        height: min(78vw, 360px);
    }

    .ambiance-detail-container .ambiance-detail-play-hint {
        align-items: stretch;
        flex-direction: column;
    }

    .ambiance-play-btn {
        width: 100%;
    }
}

/* 全局氛围音播放器 */
.ost-archive {
    position: relative;
    max-width: 1120px;
    margin: 0 auto clamp(2.5rem, 7vw, 5rem);
    padding: clamp(1.25rem, 3vw, 2rem);
    background-color: #151514;
    background-image:
        url('/static/img/stone-texture.svg'),
        radial-gradient(ellipse at 12% 5%, rgba(118, 110, 92, 0.08), transparent 28%),
        radial-gradient(ellipse at 82% 72%, rgba(0, 0, 0, 0.22), transparent 36%);
    background-size: 420px 315px, auto, auto;
    background-blend-mode: soft-light, normal, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126, 111, 78, 0.3);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(198,188,160,.08), inset 0 0 36px rgba(0,0,0,.24), 0 16px 34px rgba(5,3,2,.58);
}

.ost-archive::before,
.ost-archive::after {
    position: absolute;
    width: 30px;
    height: 30px;
    content: '';
    pointer-events: none;
}

.ost-archive::before { top: 10px; left: 10px; border-top: 1px solid #665735; border-left: 1px solid #665735; }
.ost-archive::after { right: 10px; bottom: 10px; border-right: 1px solid #665735; border-bottom: 1px solid #665735; }

.ost-archive-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.35rem 0 1.2rem 1rem;
    border-bottom: 1px solid rgba(126,111,78,.38);
    border-left: 2px solid #665735;
}

.ost-archive-kicker {
    color: var(--gold-dark);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
}

.ost-archive-header h2 {
    margin: 0.3rem 0 0.25rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 400;
}

.ost-archive-header p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.ost-archive-stage {
    position: relative;
    height: clamp(330px, 54vw, 590px);
    overflow: hidden;
    perspective: 1200px;
    margin-top: 1rem;
    background:
        linear-gradient(180deg, rgba(0,0,0,.12), transparent 18%, transparent 78%, rgba(0,0,0,.2)),
        radial-gradient(ellipse at center 82%, rgba(108,77,42,.1), transparent 46%);
    border-top: 1px solid rgba(255,255,255,.025);
    border-bottom: 1px solid rgba(0,0,0,.62);
}

.ost-piece {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    transition: transform 1.15s cubic-bezier(0.2, 0.72, 0.18, 1), filter 0.8s ease, opacity 0.6s ease;
    will-change: transform;
}

.ost-piece img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(126, 111, 78, 0.46);
    box-shadow: 0 18px 34px rgba(4, 2, 1, 0.76), 0 0 0 3px rgba(5,5,4,.58);
    transition: filter .3s ease, box-shadow .3s ease;
}

.ost-piece:hover img {
    filter: brightness(1.06) contrast(1.02);
    box-shadow: 0 22px 40px rgba(4,2,1,.82), 0 0 0 3px rgba(102,87,53,.34);
}

.ost-piece figcaption {
    width: max-content;
    max-width: 100%;
    margin: 0.75rem auto 0;
    padding: .28rem .7rem;
    color: #8c806d;
    background: rgba(7,7,6,.58);
    border-top: 1px solid rgba(126,111,78,.22);
    border-bottom: 1px solid rgba(0,0,0,.65);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease 0.65s;
}

.ost-piece-front {
    z-index: 3;
    width: min(48%, 510px);
    transform: translate(-50%, -50%);
}

.ost-piece-disc {
    z-index: 2;
    width: min(31%, 330px);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.78) rotate(-100deg);
}

.ost-piece-disc img {
    border-radius: 50%;
}

.ost-piece-back {
    z-index: 1;
    width: min(43%, 455px);
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(0.88);
    filter: brightness(0.55);
}

.ost-archive.is-open .ost-piece-front {
    transform: translate(-116%, -50%) rotateY(8deg) rotateZ(-0.8deg);
}

.ost-archive.is-open .ost-piece-disc {
    transform: translate(-50%, -50%) scale(0.82) rotate(360deg);
}

.ost-archive.is-open .ost-piece-back {
    opacity: 1;
    filter: brightness(0.82);
    transform: translate(5%, -50%) scale(1);
}

.ost-archive.is-open .ost-piece figcaption {
    opacity: 1;
}

@media (max-width: 700px) {
    .ost-archive-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ost-archive-stage {
        height: min(116vw, 650px);
    }

    .ost-piece-front { width: 60%; }
    .ost-piece-disc { width: 43%; }
    .ost-piece-back { width: 65%; }

    .ost-archive.is-open .ost-piece-front {
        transform: translate(-83%, -72%) rotateZ(-1deg);
    }

    .ost-archive.is-open .ost-piece-disc {
        transform: translate(-18%, -48%) scale(0.76) rotate(360deg);
    }

    .ost-archive.is-open .ost-piece-back {
        transform: translate(-50%, 4%) scale(0.86);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ost-piece,
    .ost-piece figcaption {
        transition: none;
    }
}

.global-ambiance-player {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100vw - 36px));
    background: var(--bg-dark);
    border: 3px solid var(--border-deep);
    border-radius: 2px;
    z-index: 1000;
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 10px 26px rgba(8, 5, 3, 0.76);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-ambiance-player.is-open {
    border-color: #090706;
    box-shadow: inset 0 0 0 1px rgba(190, 160, 101, 0.32), 0 14px 32px rgba(8, 5, 3, 0.84);
}

#global-ambiance-player .ambiance-player-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 46px;
    padding: 0 14px;
    background: linear-gradient(180deg, #29251f 0%, #171410 100%);
    border: 0;
    cursor: pointer;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    gap: 0.65rem;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

#global-ambiance-player .ambiance-player-toggle:hover {
    background: linear-gradient(180deg, #4c1b17 0%, #25110e 100%);
    color: var(--gold-light);
}

#global-ambiance-player .ambiance-player-toggle:active {
    transform: translateY(1px);
}

#ambiance-icon {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--gold-dark);
    box-shadow: 0 0 0 2px rgba(117, 97, 58, 0.18);
}

.global-ambiance-player.is-playing #ambiance-icon {
    background: #8e211b;
    box-shadow: 0 0 0 2px rgba(142, 33, 27, 0.24);
}

#ambiance-status {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#ambiance-listeners {
    margin-left: auto !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-body);
    white-space: nowrap;
}

#global-ambiance-player .ambiance-player-content {
    display: none;
    padding: 14px;
    border-top: 1px solid var(--border-color);
    background: #0d0c0b;
}

#global-ambiance-player .ambiance-player-content.show {
    display: block;
}

#global-ambiance-player .ambiance-player-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 12px;
}

#global-ambiance-player .ambiance-cover {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    background: var(--bg-medium);
    border: 2px solid var(--border-deep);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px var(--metal-highlight);
}

#global-ambiance-player .ambiance-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.2) contrast(1.1);
}

#global-ambiance-player .ambiance-info {
    flex: 1;
    min-width: 0;
    text-align: left;
    margin-bottom: 0;
}

#global-ambiance-player .ambiance-detail-link {
    display: inline-flex;
    width: 24px;
    height: 38px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    border: 0;
    background: transparent;
    box-shadow: none;
    transition: color 120ms ease, background 120ms ease, transform 80ms ease;
}

#global-ambiance-player .ambiance-detail-link:hover {
    color: var(--gold-light);
    background: transparent;
}

#global-ambiance-player .detail-arrow {
    width: 17px;
    height: 17px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transition: transform .18s ease, stroke-width .18s ease;
}

#global-ambiance-player .ambiance-detail-link:hover .detail-arrow { transform: translate(2px, -2px); stroke-width: 1.6; }

#global-ambiance-player .ambiance-detail-link:focus-visible {
    outline: 1px solid var(--gold-light);
    outline-offset: 2px;
}

#global-ambiance-player .ambiance-detail-link:active {
    transform: translateY(2px);
}

#global-ambiance-player .ambiance-title {
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: .04em;
    margin-bottom: 0.2rem;
}

#global-ambiance-player .ambiance-location {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#global-ambiance-player .ambiance-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin: 10px 0 0;
}

#global-ambiance-player .ambiance-btn {
    background: linear-gradient(180deg, #3f3930, #24201b);
    border: 2px solid var(--border-deep);
    color: var(--gold);
    padding: 0.42rem 0.8rem;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-body);
    letter-spacing: 0.08em;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    box-shadow: inset 0 1px 0 var(--metal-highlight);
}

#global-ambiance-player .ambiance-btn:hover {
    background: linear-gradient(180deg, #81231e, #46130f);
    color: var(--gold-light);
    border-color: var(--border-deep);
}

#global-ambiance-player .ambiance-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.65);
}

#global-audio {
    display: none;
}

#global-ambiance-player .ambiance-transport {
    display: grid;
    grid-template-columns: 32px auto minmax(76px, 1fr) auto 32px 32px;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #090807;
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px rgba(190, 160, 101, 0.12), inset 0 3px 9px rgba(0,0,0,0.72);
}

#global-ambiance-player .ambiance-transport-btn {
    width: 32px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: none;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
}

#global-ambiance-player #ambiance-listener-count {
    font-family: var(--font-body);
    font-size: .74rem !important;
}

#global-ambiance-player .ambiance-transport-btn:hover {
    background: rgba(117,97,58,.12);
    color: var(--gold-light);
    border-color: rgba(117,97,58,.34);
}

#global-ambiance-player .ambiance-transport-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.transport-play-icon {
    width: 0;
    height: 0;
    margin-left: 2px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid currentColor;
}

#ambiance-play-btn.is-paused .transport-play-icon {
    width: 9px;
    height: 12px;
    margin-left: 0;
    border: 0;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.transport-volume-icon {
    position: relative;
    width: 7px;
    height: 8px;
    border-left: 5px solid currentColor;
}

.transport-volume-icon::before {
    position: absolute;
    top: -3px;
    left: -1px;
    width: 8px;
    height: 14px;
    content: '';
    border-right: 1px solid currentColor;
    border-radius: 50%;
}

.transport-volume-icon::after {
    position: absolute;
    top: 3px;
    left: -9px;
    width: 7px;
    height: 2px;
    content: '';
    background: currentColor;
}

#ambiance-mute-btn.is-muted .transport-volume-icon::before {
    top: 3px;
    left: -4px;
    width: 14px;
    height: 1px;
    background: #9b2b24;
    border: 0;
    border-radius: 0;
    transform: rotate(-45deg);
}

.transport-next-icon {
    position: relative;
    width: 13px;
    height: 12px;
}

.transport-next-icon::before,
.transport-next-icon::after {
    position: absolute;
    top: 1px;
    content: '';
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid currentColor;
}

.transport-next-icon::before { left: 0; }
.transport-next-icon::after { left: 6px; }

#global-ambiance-player .ambiance-time {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#global-ambiance-player .ambiance-progress {
    width: 100%;
    height: 14px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#global-ambiance-player .ambiance-progress::-webkit-slider-runnable-track {
    height: 5px;
    background: #17130f;
    border: 1px solid #050403;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.82);
}

#global-ambiance-player .ambiance-progress::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -4px;
    background: #9a814c;
    border: 2px solid #211a11;
    border-radius: 1px;
    box-shadow: inset 0 1px 0 rgba(231,210,158,0.35);
    -webkit-appearance: none;
}

#global-ambiance-player .ambiance-progress::-moz-range-track {
    height: 5px;
    background: #17130f;
    border: 1px solid #050403;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.82);
}

#global-ambiance-player .ambiance-progress::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #9a814c;
    border: 2px solid #211a11;
    border-radius: 1px;
}

.ambiance-volume {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ambiance-volume label {
    color: var(--gold);
    font-size: 1.2rem;
}

.ambiance-volume input[type="range"] {
    width: 200px;
    height: 8px;
    -webkit-appearance: none;
    background: var(--bg-medium);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.ambiance-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-dark);
}

#global-ambiance-player .ambiance-next-btn {
    width: 32px;
    height: 30px;
    padding: 0;
}

.ambiance-volume input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-dark);
}

@media (max-width: 768px) {
    .global-ambiance-player {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
    }

    #global-ambiance-player .ambiance-player-content {
        padding: 12px;
    }
    
    .ambiance-volume input[type="range"] {
        width: 150px;
    }
}

/* 艺术图册 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    background: #090908;
    border: 3px solid var(--border-deep);
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 9px 20px var(--shadow-color);
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dark);
}

.gallery-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

.gallery-item-info {
    padding: 1rem;
    background: linear-gradient(180deg, rgba(21, 18, 14, 0.5), rgba(9, 9, 8, 0.94));
    border-top: 1px solid rgba(117, 97, 58, 0.2);
}

.gallery-item-title {
    display: block;
    color: var(--gold);
    font-family: 'Diablo2', cursive;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.gallery-item-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.gallery-item-author {
    display: block;
    margin: 0.15rem 0 0.35rem;
    color: var(--gold-dark);
    font-size: 0.8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* 图册上传、分类管理与图片详情 */
.gallery-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(1rem, 3vw, 2.5rem);
}

.gallery-heading-row .archive-hero {
    width: 100%;
}

.gallery-admin-rail {
    position: sticky;
    top: 110px;
    z-index: 5;
    padding-top: 1rem;
}

.gallery-admin-toggle {
    min-width: 104px;
}

.gallery-page-header {
    margin-bottom: 2.5rem;
}

.gallery-page-header p,
.gallery-admin-heading p,
.gallery-muted {
    color: var(--text-secondary);
}

.gallery-kicker,
.gallery-panel-kicker {
    display: block;
    color: var(--gold-dark);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.gallery-admin-panel {
    margin-bottom: 3.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: #090909;
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px rgba(181, 147, 76, 0.13), 0 12px 26px rgba(8, 5, 3, 0.62);
}

.gallery-admin-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.gallery-admin-heading h2,
.gallery-category-title h3,
.gallery-section-heading h2,
.gallery-comments-heading h2 {
    margin: 0.25rem 0 0;
    color: var(--gold);
    font-weight: 400;
}

.gallery-upload-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.gallery-upload-source {
    min-width: 0;
}

.gallery-remote-source {
    position: relative;
    margin-top: 1.25rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-color);
}

.gallery-remote-source > span {
    position: absolute;
    top: 0;
    left: 50%;
    padding: 0 0.65rem;
    color: var(--text-secondary);
    background: #090909;
    transform: translate(-50%, -50%);
}

.gallery-remote-source label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--gold);
}

.gallery-remote-source small {
    display: block;
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.gallery-dropzone {
    min-height: 360px;
    border: 1px dashed rgba(181, 147, 76, 0.55);
    background: linear-gradient(145deg, #11100e, #080808);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.gallery-dropzone.is-dragging {
    border-color: var(--gold);
    background: #17120d;
    transform: translateY(-2px);
}

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

.gallery-dropzone label {
    position: relative;
    display: flex;
    min-height: 360px;
    padding: 1.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: var(--text-primary);
    cursor: pointer;
    overflow: hidden;
}

.gallery-dropzone label::after {
    content: "点击更换";
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.35rem 0.65rem;
    color: var(--gold);
    background: rgba(7, 6, 5, 0.82);
    border: 1px solid var(--border-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-dropzone.has-preview label:hover::after { opacity: 1; }
.gallery-upload-mark { color: var(--gold); font-size: 2.5rem; font-weight: 300; }
.gallery-dropzone small { color: var(--text-secondary); }
.gallery-dropzone img { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #050505; }
.gallery-dropzone.has-preview img { display: block; }
.gallery-dropzone.has-preview .gallery-upload-mark,
.gallery-dropzone.has-preview strong { display: none; }
.gallery-dropzone.has-preview small { position: absolute; left: 1rem; bottom: 1rem; z-index: 1; max-width: 70%; padding: 0.35rem 0.6rem; overflow: hidden; color: var(--text-primary); background: rgba(7, 6, 5, 0.82); text-overflow: ellipsis; white-space: nowrap; }

.gallery-upload-fields textarea,
.gallery-edit-panel textarea { min-height: 112px; }
.gallery-upload-submit { min-width: 170px; }

.gallery-category-manager {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
}

.gallery-category-title,
.gallery-section-heading,
.gallery-comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-category-title span,
.gallery-section-heading span,
.gallery-comments-heading > span { color: var(--text-secondary); font-size: 0.85rem; }
.gallery-category-add { display: flex; gap: 0.75rem; margin-top: 1rem; }
.gallery-category-add .form-control { flex: 1; }
.gallery-category-list { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }
.gallery-category-row { display: flex; border: 1px solid var(--border-color); background: #11100e; }
.gallery-category-row form { display: flex; }
.gallery-category-row input { width: 150px; padding: 0.55rem 0.7rem; color: var(--text-primary); background: transparent; border: 0; }
.gallery-category-row button,
.gallery-danger-button { padding: 0.55rem 0.75rem; color: var(--gold); background: #17140f; border: 0; border-left: 1px solid var(--border-color); cursor: pointer; }
.gallery-category-row .gallery-category-delete,
.gallery-danger-button { color: #bd6158; }

.gallery-section-heading { margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color); }
.gallery-section-heading h2 {
    font-family: 'Diablo2', 'Cinzel', serif;
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    letter-spacing: 0.08em;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.gallery-card-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.gallery-page .gallery-item-title {
    min-height: 2.7em;
    color: var(--gold);
    font-family: 'DYmingA', 'Noto Serif SC', 'Songti SC', serif;
    font-size: 1.18rem;
    font-weight: 400;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: normal;
}
.gallery-card-meta { display: flex; justify-content: space-between; margin-top: 0.8rem; color: var(--gold-dark); font-size: 0.78rem; }
.gallery-item:hover .gallery-card-meta { color: var(--gold); }

.gallery-back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--gold-dark); text-decoration: none; }
.gallery-back-link:hover { color: var(--gold); }
.gallery-detail-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr); background: #090909; border: 2px solid var(--border-deep); box-shadow: inset 0 0 0 1px rgba(181,147,76,.12); }
.gallery-detail-page {
    background-color: #151514;
    background-image: url('/static/img/stone-texture.svg'), radial-gradient(ellipse at 80% 8%, rgba(112,106,92,.06), transparent 30%);
    background-size: 420px 315px, auto;
    background-blend-mode: soft-light, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126,111,78,.28);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(198,188,160,.07), inset 0 0 32px rgba(0,0,0,.2), 0 10px 26px rgba(5,3,2,.5);
}
.gallery-detail-page .gallery-detail-copy,
.gallery-detail-page .gallery-edit-panel,
.gallery-detail-page .gallery-comment-form {
    background-color: rgba(11,11,10,.72);
    background-image: url('/static/img/stone-texture.svg');
    background-size: 380px 285px;
    background-blend-mode: soft-light;
}

.admin-page-stone {
    padding: clamp(1.25rem, 3vw, 2rem);
    background-color: #151514;
    background-image: url('/static/img/stone-texture.svg'), radial-gradient(ellipse at 15% 5%, rgba(116,110,95,.07), transparent 28%);
    background-size: 400px 300px, auto;
    background-blend-mode: soft-light, normal;
    border: 2px solid #080807;
    outline: 1px solid rgba(126,111,78,.3);
    outline-offset: -4px;
    box-shadow: inset 0 1px 0 rgba(198,188,160,.07), inset 0 0 34px rgba(0,0,0,.22), 0 10px 26px rgba(5,3,2,.52);
}

.admin-category-panel {
    background-color: #111110;
    background-image: url('/static/img/stone-texture.svg');
    background-size: 360px 270px;
    background-blend-mode: soft-light;
    border: 2px solid #080807;
    outline: 1px solid rgba(126,111,78,.22);
    outline-offset: -4px;
}

.admin-page-stone > .table {
    background: rgba(8,8,7,.42);
    border: 2px solid #080807;
    box-shadow: inset 0 0 0 1px rgba(126,111,78,.18);
}
.gallery-detail-image-wrap { position: relative; display: flex; width: 100%; min-height: 480px; padding: 0; align-items: center; justify-content: center; background: #030303; border: 0; cursor: zoom-in; overflow: hidden; }
.gallery-detail-image { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.gallery-zoom-hint { position: absolute; right: 1rem; bottom: 1rem; padding: 0.4rem 0.7rem; color: var(--gold-light); background: rgba(7,6,5,.82); border: 1px solid var(--border-color); font-size: .78rem; opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; }
.gallery-detail-image-wrap:hover .gallery-zoom-hint { opacity: 1; transform: translateY(0); }
.gallery-detail-copy { display: flex; min-width: 0; padding: clamp(1.5rem, 3vw, 2rem); flex-direction: column; justify-content: center; border-left: 1px solid var(--border-color); }
.gallery-detail-copy > .gallery-panel-kicker {
    font-family: 'Diablo2', 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 0.11em;
    line-height: 1.35;
    text-transform: none;
    overflow-wrap: anywhere;
}

.gallery-detail-copy h1 {
    max-width: 100%;
    margin: 0.65rem 0 1.25rem;
    color: var(--gold);
    font-family: 'DYmingA', 'Noto Serif SC', 'Songti SC', serif;
    font-size: clamp(1.85rem, 2.4vw, 2.2rem);
    font-weight: 400;
    line-height: 1.22;
    overflow-wrap: break-word;
    word-break: normal;
}
.gallery-detail-copy p { white-space: pre-line; line-height: 1.8; }
.gallery-detail-copy .gallery-detail-author {
    display: flex;
    margin: -0.5rem 0 1rem;
    align-items: baseline;
    gap: 0.65rem;
    color: var(--gold-light);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}
.gallery-detail-author span { color: var(--text-secondary); font-size: 0.78rem; letter-spacing: 0.12em; }
.gallery-detail-date { margin-top: 1.5rem; color: var(--text-secondary); font-size: 0.8rem; }
.entity-like-button { display: inline-flex; width: max-content; margin-top: 1.25rem; padding: .55rem .85rem; align-items: center; gap: .5rem; color: var(--gold-dark); background: #12100d; border: 1px solid var(--border-color); font: inherit; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .15s ease; }
.entity-like-button:hover { color: var(--gold-light); border-color: var(--gold-dark); }
.entity-like-button:active { transform: translateY(1px); }
.entity-like-button.liked { color: #bd6158; background: rgba(104,20,20,.18); border-color: #652a27; }
.entity-like-button:disabled { opacity: .65; cursor: wait; }
.entity-like-icon { font-size: 1.2rem; line-height: 1; }
.entity-like-count { min-width: 1ch; color: var(--text-secondary); font-size: .78rem; }
.ambiance-like-button { margin-top: 1rem; }
.gallery-image-lightbox[hidden],
.post-image-lightbox[hidden] { display: none; }
.gallery-image-lightbox,
.post-image-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; padding: clamp(1rem, 3vw, 2.5rem); flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: rgba(2,2,2,.96); cursor: zoom-out; }
.gallery-image-lightbox img,
.post-image-lightbox img { display: block; max-width: 94vw; max-height: 84vh; object-fit: contain; border: 1px solid var(--gold-dark); box-shadow: 0 18px 55px rgba(0,0,0,.85); cursor: default; }
.gallery-image-lightbox > span,
.post-image-lightbox > span { color: var(--gold-dark); font-family: 'DYmingA', serif; text-align: center; }
.gallery-lightbox-close { position: absolute; top: 1rem; right: 1.25rem; width: 42px; height: 42px; color: var(--gold); background: #11100e; border: 1px solid var(--border-color); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.gallery-edit-panel { margin-top: 1.5rem; padding: 1.25rem; background: #0b0b0b; border: 1px solid var(--border-color); }
.gallery-edit-panel summary { color: var(--gold); cursor: pointer; }
.gallery-edit-panel form { margin-top: 1.25rem; }
.gallery-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gallery-edit-actions { display: flex; align-items: center; gap: 1rem; }
.gallery-edit-actions .gallery-danger-button { border: 1px solid #652a27; }
.gallery-comments-section { margin-top: 3.5rem; }
.gallery-comments-heading { margin-bottom: 1.5rem; }
.gallery-comment-form { margin-bottom: 2rem; }
.gallery-comment-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gallery-comment-actions .form-group { margin-bottom: 0; }
.gallery-comment-list .guestbook-entry { margin-bottom: 1rem; }

@media (max-width: 800px) {
    .gallery-heading-row {
        grid-template-columns: 1fr;
    }
    .gallery-admin-rail {
        position: static;
        margin-top: -2rem;
        padding-top: 0;
    }
    .gallery-admin-toggle {
        width: 100%;
    }
    .gallery-admin-heading,
    .gallery-category-title,
    .gallery-comments-heading,
    .gallery-comment-actions { align-items: stretch; flex-direction: column; }
    .gallery-upload-grid,
    .gallery-detail-hero,
    .gallery-edit-grid { grid-template-columns: 1fr; }
    .gallery-detail-copy { border-top: 1px solid var(--border-color); border-left: 0; }
    .gallery-category-add { flex-direction: column; }
    .gallery-dropzone,
    .gallery-dropzone label { min-height: 280px; }
}

/* 悬浮点赞按钮 */
.like-fab {
    position: sticky;
    top: 38vh;
    flex-shrink: 0;
    z-index: 100;
    margin-left: -1px;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-width: 94px;
    height: 44px;
    padding: 0 .75rem;
    color: var(--text-secondary);
    background-color: #11100e;
    background-image: url('/static/img/stone-texture.svg');
    background-size: 250px 188px;
    background-blend-mode: soft-light;
    border: 2px solid #080706;
    border-left-color: #665735;
    border-radius: 0;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .12s ease;
    box-shadow: inset 0 0 0 1px rgba(126,111,78,.22), 0 5px 14px rgba(0,0,0,.55);
}

.like-btn:hover {
    color: var(--gold-light);
    border-color: #77643b;
    background-color: #18130f;
    box-shadow: inset 0 0 0 1px rgba(160,132,73,.28), 0 6px 16px rgba(0,0,0,.62);
}

.like-btn:active { transform: translateY(1px); }

.like-btn.liked {
    border-color: #6e211c;
    border-left-color: #a4382e;
    background-color: #1b0c0a;
}

.like-btn.liked .like-icon {
    color: var(--red-light);
    text-shadow: none;
}

.like-icon {
    font-size: 1.05rem;
    color: var(--gold);
    transition: color .2s ease;
    line-height: 1;
}

.like-label {
    color: currentColor;
    font-family: var(--font-body);
    font-size: .82rem;
    letter-spacing: .08em;
}

.like-count {
    min-width: 1ch;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1;
}

/* 卡片点赞数 */
.post-card-likes {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.post-card-likes .like-icon-small {
    color: var(--gold);
    font-size: 0.9rem;
}

/* 留言互动与站内通知 */
.notification-link {
    position: relative;
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    border: 0;
    background: transparent;
    text-decoration: none;
}

.notification-ear {
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px rgba(201, 169, 97, 0.18));
}

.notification-ear-outline {
    stroke-width: 1.8;
}

.notification-link:hover .notification-ear {
    color: var(--gold-light);
    filter: drop-shadow(0 0 5px rgba(201, 169, 97, 0.32));
}
.notification-link b {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    color: #f2d49a;
    background: #8e201c;
    border: 1px solid #bb4437;
    border-radius: 10px;
    font: 700 0.66rem/17px Arial, sans-serif;
    text-align: center;
}

.comment-interactions {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-top: 0.55rem;
    min-height: 28px;
}

.comment-action-time {
    color: var(--text-secondary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.74rem;
    opacity: 0.82;
}

.comment-action {
    min-height: 28px;
    padding: 0.15rem 0.1rem;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    font: 400 0.86rem 'DYmingA', serif;
    cursor: pointer;
}

.comment-action:hover,
.comment-action.liked { color: var(--gold); }
.comment-action.liked .comment-like-icon { color: #b9332d; fill: rgba(185, 51, 45, 0.18); }
.comment-like-icon { width: 17px; height: 17px; margin-right: 0.18rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; }

.comment-header-time,
.guestbook-time,
.ambiance-comment-time { display: none; }

.comment-replies {
    margin: 0.65rem 0 0 2.5rem;
    padding-left: 1.15rem;
    border-left: 1px solid var(--border-color);
}

.comment-reply {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(121, 99, 58, 0.24);
}
.comment-reply:last-child { border-bottom: 0; }
.comment-reply-head { display: flex; justify-content: space-between; gap: 1rem; color: var(--gold-dark); font-size: 0.88rem; }
.comment-reply p { margin: 0.4rem 0 0; color: var(--text-primary); line-height: 1.65; }
.comment-reply .comment-interactions { margin-top: 0.2rem; }

.comment-reply-form {
    margin-top: 0.8rem;
    padding: 0.85rem;
    background: #0d0c0a;
    border: 1px solid var(--border-color);
}
.comment-reply-form[hidden] { display: none; }
.comment-reply-form textarea { width: 100%; padding: 0.7rem; resize: vertical; color: var(--text-primary); background: #171512; border: 1px solid var(--border-color); font: inherit; }
.comment-reply-actions { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin-top: 0.65rem; }
.comment-reply-anonymous { margin-right: auto; color: var(--text-secondary); font-size: 0.82rem; }
.comment-reply-actions .btn { min-width: 88px; padding: 0.45rem 1rem; }

.notifications-page { width: 100%; max-width: var(--content-max); margin: 0 auto; }
.notifications-page .notifications-header { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.notifications-board { padding: clamp(1.25rem, 3vw, 2rem); }
.notifications-board-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding-bottom: 0.85rem; border-bottom: 1px solid rgba(117, 97, 58, 0.38); }
.notifications-board-heading h2 { margin: 0; color: var(--gold); font-family: var(--font-body); font-size: 1rem; font-weight: 400; letter-spacing: 0.1em; }
.notifications-board-heading span { color: var(--text-secondary); font-size: 0.76rem; }
.notification-list { overflow: hidden; background: rgba(7, 7, 6, 0.38); border: 2px solid var(--border-deep); box-shadow: inset 0 0 0 1px rgba(190, 160, 101, 0.12); }
.notification-item { display: flex; min-height: 72px; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; color: var(--text-primary); border-bottom: 1px solid rgba(117, 97, 58, 0.34); text-decoration: none; transition: color .18s ease, background-color .18s ease; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { color: var(--gold-light); background: rgba(117, 97, 58, 0.1); }
.notification-item.unread { background: linear-gradient(90deg, rgba(116, 27, 21, 0.18), rgba(116, 27, 21, 0.035) 46%, transparent); box-shadow: inset 3px 0 #8e201c; }
.notification-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; color: var(--gold-dark); font-family: var(--font-numeric); font-size: 1.15rem; border: 1px solid rgba(117, 97, 58, 0.45); background: #0a0908; transform: rotate(45deg); }
.notification-mark > span { transform: rotate(-45deg); }
.notification-copy { display: flex; min-width: 0; flex: 1; justify-content: space-between; gap: 1rem; }
.notification-copy strong { font-weight: 400; line-height: 1.65; }
.notification-copy time { flex: 0 0 auto; color: var(--text-secondary); font-size: 0.76rem; }
.notification-empty { display: grid; min-height: 220px; place-content: center; gap: 0.85rem; color: var(--text-secondary); text-align: center; background: rgba(7, 7, 6, 0.32); border: 2px solid var(--border-deep); box-shadow: inset 0 0 0 1px rgba(190, 160, 101, 0.1); }
.notification-empty p { margin: 0; }
.notification-empty-mark { color: rgba(154, 129, 76, 0.55); font-family: var(--font-numeric); font-size: 1.45rem; }

.about-heading-row {
    display: flex;
    width: min(100%, 800px);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-inline: auto;
    text-align: left;
}
.about-heading-row .post-detail-title { margin-bottom: 0; }
.guestbook-page > .about-content {
    width: min(100%, 760px);
    margin-inline: auto;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.06rem;
    line-height: 1.95;
    overflow-wrap: break-word;
    text-wrap: pretty;
}
.guestbook-page > .about-content > p { margin: 0 0 1.25rem; }
.guestbook-page > .about-content > p:first-child {
    color: #d7cab0;
    font-size: 1.12rem;
    line-height: 1.85;
}
.guestbook-page > .about-content strong { color: var(--gold); font-weight: 400; }
.guestbook-page > .about-content .creator-card {
    width: min(100%, 540px);
    margin: 1.75rem 0 0;
}
.guestbook-page > .about-content .creator-card-kicker,
.guestbook-page > .about-content .creator-card-title,
.guestbook-page > .about-content .creator-card-meta {
    font-family: var(--font-body);
    font-weight: 400;
}
.about-content h2,
.about-content h3 { margin: 2rem 0 1rem; color: var(--gold); font-family: 'Diablo2', cursive; font-weight: 400; }
.about-content ul { margin: 0 0 1.5rem 1.5rem; }
.about-content li { margin: 0.45rem 0; }

.about-editor { max-width: 960px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2rem); background: #090908; border: 2px solid var(--border-deep); box-shadow: inset 0 0 0 1px var(--metal-highlight); }
.about-editor-header { margin-bottom: 1.75rem; border-bottom: 1px solid var(--border-color); }
.about-editor-header p { color: var(--gold-dark); font: 0.72rem 'Cinzel', serif; letter-spacing: 0.2em; }
.about-editor-header h1 { margin: 0.35rem 0; color: var(--gold); font-family: var(--font-display); font-weight: 400; }
.about-editor-header span { display: block; margin-bottom: 1.2rem; color: var(--text-secondary); }
.about-editor form > label { display: block; margin-bottom: 0.65rem; color: var(--gold); }
.about-editor textarea {
    display: block;
    width: 100%;
    height: clamp(300px, 42vh, 520px);
    min-height: 300px;
    padding: 1rem 1.15rem;
    overflow: auto;
    color: var(--text-primary);
    background: #151310;
    border: 1px solid var(--border-color);
    font: 0.92rem/1.65 Consolas, 'Courier New', monospace;
    tab-size: 4;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    resize: vertical;
}
.about-editor textarea:focus { outline: 1px solid var(--gold-dark); outline-offset: 2px; }
.about-editor-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 1.25rem; }

/* Mobile layout: retain the dense old-game character without shrinking controls. */
@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    header {
        padding: 0.55rem 0 0;
    }

    .header-content {
        width: 100%;
        padding: 0 0.85rem;
        align-items: stretch;
        gap: 0.55rem;
    }

    .header-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .logo {
        flex: 0 0 auto;
        font-size: 1.55rem;
    }

    .header-subtitle {
        min-width: 0;
        justify-content: flex-end;
        font-size: 0.78rem;
        letter-spacing: 0;
        text-align: right;
    }

    .campfire-mark {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }

    .header-right {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.55rem;
        align-items: center;
    }

    nav {
        min-width: 0;
        max-width: 100%;
        gap: 1.15rem;
        padding: 0.55rem 0 0.65rem;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a.nav-link {
        flex: 0 0 auto;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        font-size: 0.95rem;
        letter-spacing: 0.08em;
    }

    .user-menu {
        margin-left: 0;
    }

    .user-menu-trigger {
        min-height: 40px;
        padding: 0.25rem 0.4rem;
    }

    .user-menu-trigger .user-name {
        display: none;
    }

    .user-menu-dropdown {
        right: 0;
        left: auto;
        min-width: 150px;
    }

    .login-link {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    .notification-link {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .container {
        width: 100%;
        padding: 1.5rem 1rem 4.75rem;
    }

    .home-intro {
        padding-left: 0.85rem;
        margin-bottom: 2.25rem;
    }

    .archive-hero {
        margin: 0.5rem 0 3rem;
        padding-left: 0.85rem;
    }

    .archive-hero h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .home-intro h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .category-section {
        margin-bottom: 3rem;
    }

    .category-title,
    .gallery-section-heading h2 {
        min-width: 0;
        font-size: 1.3rem;
        overflow-wrap: anywhere;
    }

    .post-content-preview {
        padding: 1.25rem 1.15rem 1.4rem;
    }

    .post-meta,
    .post-card-stats {
        flex-wrap: wrap;
        row-gap: 0.45rem;
    }

    .post-detail,
    .profile-container,
    .site-comment-form,
    .gallery-upload-panel,
    .gallery-edit-panel {
        padding: 1.15rem;
    }

    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .gallery-thumb {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .gallery-dropzone,
    .gallery-dropzone label {
        min-height: 210px;
    }

    .gallery-detail-copy,
    .gallery-detail-media {
        min-width: 0;
    }

    .gallery-detail-title,
    .ambiance-detail-title {
        overflow-wrap: anywhere;
    }

    .gallery-comment-actions,
    .gallery-edit-actions,
    .form-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-comment-actions .btn,
    .gallery-edit-actions .btn,
    .form-actions .btn {
        width: 100%;
        min-height: 46px;
    }

    .guestbook-entry {
        padding: 1rem;
    }

    .guestbook-entry-header {
        align-items: flex-start;
    }

    .guestbook-avatar {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .global-ambiance-player {
        max-height: calc(100dvh - 20px);
    }

    #global-ambiance-player .ambiance-player-content {
        max-height: calc(100dvh - 76px);
        overflow-y: auto;
    }

    .ambiance-player-wrapper {
        grid-template-columns: 58px minmax(0, 1fr) 42px;
        gap: 0.75rem;
    }

    .ambiance-cover {
        width: 58px;
        height: 58px;
    }

    .ambiance-transport {
        grid-template-columns: 40px 38px minmax(70px, 1fr) 38px 40px;
        gap: 0.35rem;
    }

    .ambiance-time {
        font-size: 0.72rem;
    }

    .like-fab {
        position: static;
        width: 100%;
        margin: 1rem auto 0;
        text-align: center;
    }

    .comment-replies { margin-left: 0.25rem; padding-left: 0.75rem; }
    .comment-reply-head,
    .notification-copy { flex-direction: column; gap: 0.25rem; }
    .comment-reply-actions { align-items: stretch; flex-wrap: wrap; }
    .comment-reply-actions .btn { min-height: 42px; }
    .about-heading-row { align-items: stretch; flex-direction: column; }
    .about-heading-row .btn { width: 100%; }
    .about-editor textarea { height: 44vh; min-height: 280px; }
    .about-editor-actions { flex-direction: column; }
    .about-editor-actions .btn { width: 100%; }

    .like-fab .like-btn {
        width: min(100%, 180px);
        height: 46px;
        background: rgba(10, 9, 8, 0.94);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.72);
    }

    .post-detail-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .post-detail {
        width: 100%;
        min-width: 0;
    }

    .post-detail-content {
        width: 100%;
        min-width: 0;
        font-size: 1rem;
        line-height: 1.85;
        overflow-wrap: anywhere;
    }

    .post-detail-content pre,
    .post-detail-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .post-detail-content iframe,
    .post-detail-content video {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .header-content {
        padding-inline: 0.7rem;
    }

    .header-subtitle .online-status {
        max-width: 11rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .container {
        padding-inline: 0.75rem;
    }

    .post-image {
        height: 190px;
    }

    .post-detail,
    .profile-container,
    .site-comment-form,
    .gallery-upload-panel,
    .gallery-edit-panel {
        padding: 0.9rem;
    }

    .post-detail-header {
        margin-bottom: 1.35rem;
        padding-bottom: 1.35rem;
    }

    .post-detail-title {
        font-size: 1.65rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .post-author-info {
        gap: 0.85rem;
    }

    .author-avatar img,
    .author-avatar .avatar-placeholder {
        width: 72px;
        height: 72px;
    }

    .gallery-item-title {
        font-size: 1.05rem;
    }

    .ambiance-detail-container .ambiance-detail-image img {
        height: min(88vw, 340px);
    }
}

/* 稳定图片加载区域：暗色石板占位，资源完成后平滑显现。 */
img.lazy-media {
    background-color: #0c0b09;
    background-image:
        linear-gradient(120deg, rgba(154, 129, 76, 0.08), transparent 38%, rgba(66, 48, 32, 0.08)),
        url('/static/img/stone-texture.svg');
    background-size: auto, 420px 300px;
    opacity: 0.58;
    transition: opacity 0.28s ease, filter 0.28s ease;
}

img.lazy-media.is-loaded { opacity: 1; }
img.lazy-media.is-error { opacity: 0.35; filter: grayscale(1); }
[hidden] { display: none !important; }

/* 文章正文保持适合中文长读的行宽与段落节奏。 */
.post-article .post-detail-content {
    width: min(100%, 46rem);
    margin-inline: auto;
    line-height: 1.9;
    overflow-wrap: break-word;
    word-break: normal;
    text-wrap: pretty;
}

.post-article .post-detail-content p {
    margin-block: 0 1.35em;
}

.post-article .post-detail-content h2,
.post-article .post-detail-content h3 {
    margin-top: 2em;
    margin-bottom: 0.8em;
    line-height: 1.45;
}

.post-article .post-detail-content blockquote {
    margin-inline: 0;
    padding: 0.85rem 1.1rem;
    border-left: 2px solid rgba(154, 129, 76, 0.55);
}

@media (max-width: 768px) {
    /* 移动端触控目标至少保持 44px，图形尺寸仍维持克制。 */
    .site-header .nav-link,
    .site-header .login-link,
    .site-header .notification-link,
    .comment-action,
    .comment-reply-actions .btn,
    .entity-like-button,
    .gallery-lightbox-close,
    .comment-form-toggle,
    .gallery-detail-back,
    .ambiance-detail-back {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .comment-action { margin-block: -8px; padding: 8px 7px; }

    /* 手机端将浮动播放器收成紧凑的两层控制条。 */
    .global-ambiance-player {
        left: 8px;
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        width: auto;
    }

    #global-ambiance-player .ambiance-player-toggle {
        min-height: 42px;
        padding-inline: 11px;
    }

    #global-ambiance-player .ambiance-player-content {
        padding: 8px;
        max-height: none;
        overflow: visible;
    }

    #global-ambiance-player .ambiance-player-wrapper {
        gap: 0.65rem;
        margin-bottom: 7px;
    }

    #global-ambiance-player .ambiance-cover {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }

    #global-ambiance-player .ambiance-location,
    #global-ambiance-player #ambiance-listener-count {
        display: none;
    }

    #global-ambiance-player .ambiance-detail-link {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    #global-ambiance-player .ambiance-transport {
        grid-template-columns: 44px auto minmax(72px, 1fr) auto 44px 44px;
        gap: 3px;
        padding: 3px 4px;
    }

    #global-ambiance-player .ambiance-transport-btn {
        width: 44px;
        height: 44px;
    }

    #global-ambiance-player .ambiance-time { font-size: 0.66rem; }
    #global-ambiance-player .ambiance-progress { min-width: 0; }

    .post-article .post-detail-content {
        font-size: 1rem;
        line-height: 1.85;
    }
}

@media (max-width: 420px) {
    #global-ambiance-player .ambiance-transport {
        grid-template-columns: 44px auto minmax(58px, 1fr) 44px 44px;
    }

    #global-ambiance-player #ambiance-duration { display: none; }
}

@media (max-width: 768px) {
    .guestbook-page > .about-content {
        font-size: 1rem;
        line-height: 1.9;
    }

    .guestbook-page > .about-content > p:first-child { font-size: 1.05rem; }

    .guestbook-page > .about-content .creator-card {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        width: 100%;
        margin-top: 1.4rem;
    }
}

/* 最终级联保险：各页面旧样式不得覆盖统一按钮素材。 */
body :is(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button,
    .project-subscription-link
) {
    color: #d8c99f !important;
    font-family: var(--font-body) !important;
    font-weight: 900 !important;
    font-size: 1.06rem !important;
    letter-spacing: 0.085em;
    -webkit-text-stroke: 0.5px rgba(24, 17, 10, 0.96) !important;
    paint-order: stroke fill;
    text-shadow: 0 1px 1px #050403, 0 0 2px rgba(214, 194, 142, 0.16) !important;
    background-color: transparent !important;
    background-image: url('/static/img/button-blank.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
}

body :is(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button,
    .project-subscription-link
):hover {
    color: #ffc653 !important;
    background-image: url('/static/img/button-blank.png') !important;
    -webkit-text-stroke-color: rgba(71, 35, 10, 0.96) !important;
    text-shadow:
        0 1px 1px #160a03,
        0 0 4px rgba(255, 181, 48, 0.8),
        0 0 9px rgba(201, 78, 16, 0.42) !important;
}

body :is(
    .btn,
    .comment-compose-toggle,
    .ambiance-play-btn,
    .ambiance-file-trigger,
    .gallery-category-row button,
    .gallery-danger-button,
    .project-subscription-link
):active {
    color: #ff9f32 !important;
    text-shadow:
        0 1px 1px #160703,
        0 0 3px rgba(255, 139, 35, 0.78),
        0 0 7px rgba(159, 42, 10, 0.38) !important;
}

body :is(.btn-danger, .gallery-danger-button, .gallery-category-delete) {
    color: #e5a080 !important;
    background-color: rgba(114, 24, 19, 0.46) !important;
    background-blend-mode: multiply;
}

body .btn-secondary {
    color: #cfc3a5 !important;
    font-weight: 900 !important;
}

.guestbook-delete-button {
    min-width: 76px;
    min-height: 38px;
    padding: 0.48rem 1rem;
    font-size: 0.82rem;
}

/* Shared detail navigation: a route cue, not another stone action button. */
.detail-back-nav {
    width: 100%;
    margin: 0 0 1.25rem;
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.35rem 0.25rem;
    color: #b99a50;
    font-family: var(--font-body);
    font-size: 0.94rem;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.detail-back-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    transition: transform 0.18s ease;
}

.detail-back-link:hover { color: #e1c77f; }
.detail-back-link:hover svg { transform: translateX(-3px); }
.post-detail-wrapper > .detail-back-nav { grid-column: 1 / -1; }

.user-menu-trigger {
    appearance: none;
    -webkit-appearance: none;
    border: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit;
    font: inherit;
    text-align: left;
}

/* Control/status copy stays readable; display faces are reserved for major titles. */
:is(
    .detail-back-link, .post-meta, .post-card-stats, .category-count,
    .gallery-card-meta, .ambiance-card-location, .ambiance-card-listeners,
    .comment-meta, .comment-actions, .form-group label, .field-help,
    .player-time, .listener-count
) {
    font-family: var(--font-body) !important;
}

:is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #d0a94f;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .detail-back-nav { margin-bottom: 0.75rem; }
    .detail-back-link { min-width: 44px; min-height: 44px; }
}
