/* 暗黑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;
}

/* 隐藏下载管理器扩展注入的媒体下载浮层。 */
#IDM-VTON,
[id^="IDM-VTON"],
[id*="idm-video"],
.idm-video-panel,
.idm-download-panel,
[class*="idm-download"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@font-face {
    font-family: 'DYmingA';
    src: url('/static/fonts/DYmingA-site.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RogueTitle';
    src: url('/static/fonts/RogueTitle-site.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Han Sans CN';
    src: url('/static/fonts/SourceHanSansCN-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #111110;
    --bg-medium: #1b1a18;
    --bg-light: #2b2925;
    --surface-stone: #24231f;
    --surface-inset: #151411;
    --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: 'RogueTitle', 'Diablo2', 'DYmingA', 'Noto Serif SC', 'Songti SC', serif;
    --font-kicker: 'Diablo2', 'RogueTitle', 'DYmingA', serif;
    --font-body: 'DYmingA', 'Noto Serif SC', 'Songti SC', serif;
    --font-ui: system-ui, 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    --font-tag: 'Source Han Sans CN', 'Noto Sans CJK SC', sans-serif;
    --font-numeric: Georgia, 'Times New Roman', serif;
    --desktop-header-max: 1600px;
    --desktop-content-max: 1376px;
}

html {
    font-size: 110%;
}

.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;
    scrollbar-color: #75613b #100e0b;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #100e0b;
    border-left: 1px solid rgba(117, 97, 58, .18);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #806a40, #57482d);
    border: 2px solid #100e0b;
    border-radius: 6px;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a08750, #6a5735);
}

*::-webkit-scrollbar-corner {
    background: #100e0b;
}

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

#main-content.spa-loading {
    position: relative;
    min-height: 45vh;
    cursor: progress;
}

#main-content.spa-loading::after {
    content: '正在翻阅档案…';
    position: fixed;
    left: 50%;
    top: max(5.5rem, 14vh);
    z-index: 1200;
    transform: translateX(-50%);
    padding: 0.55rem 0.9rem;
    color: var(--gold-light);
    background: rgba(9, 8, 7, 0.96);
    border: 1px solid var(--gold-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    font: 600 0.86rem/1.2 var(--font-body);
    letter-spacing: 0.08em;
    pointer-events: none;
}

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: #b9b8b1;
    background-image:
        radial-gradient(ellipse at 50% 4%, rgba(255, 253, 245, 0.24), transparent 50%),
        linear-gradient(rgba(240, 239, 234, 0.22), rgba(218, 216, 207, 0.28)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, auto, 760px 760px;
    background-repeat: no-repeat, no-repeat, repeat;
    background-blend-mode: screen, normal, soft-light;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 石墙式内容底板：借鉴经典资料站的明暗分层，但使用本站自有纹理。 */
#main-content {
    background: transparent;
    box-shadow: inset 0 1px 0 rgba(190, 167, 115, 0.07);
    padding-bottom: 1rem;
}

/* 火星飘零效果 */
.ember-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    mix-blend-mode: screen;
    opacity: 1;
    visibility: visible;
    transition: opacity 320ms ease, visibility 0s linear 0s;
}

/* 管理员为当前乐曲选择雨幕时，以带风的斜雨替代篝火余烬。 */
.rain-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 420ms ease, visibility 0s linear 420ms;
}

.snow-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 520ms ease, visibility 0s linear 520ms;
}

.snow-flake {
    position: absolute;
    top: -12vh;
    left: var(--snow-left);
    width: var(--snow-size);
    height: var(--snow-size);
    border-radius: 50%;
    background: rgba(235, 241, 241, 0.94);
    box-shadow: 0 0 5px rgba(210, 226, 229, 0.48);
    filter: blur(var(--snow-blur));
    opacity: var(--snow-opacity);
    animation: ambiance-snow-fall var(--snow-speed) linear infinite;
    animation-delay: var(--snow-delay);
    transform-origin: center;
    will-change: transform;
}

.snow-flake.is-crystal {
    height: 1px;
    border-radius: 999px;
    background: rgba(230, 240, 242, 0.86);
    box-shadow: 0 0 3px rgba(210, 228, 232, 0.5);
}

.snow-flake.is-crystal::before,
.snow-flake.is-crystal::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    content: '';
    transform-origin: center;
}

.snow-flake.is-crystal::before { transform: rotate(60deg); }
.snow-flake.is-crystal::after { transform: rotate(120deg); }

@keyframes ambiance-snow-fall {
    0% { transform: translate3d(8vw, -14vh, 0) rotate(0deg); }
    22% { transform: translate3d(calc(3vw + var(--snow-sway-a)), 17vh, 0) rotate(var(--snow-turn-a)); }
    48% { transform: translate3d(calc(-3vw + var(--snow-sway-b)), 50vh, 0) rotate(var(--snow-turn-b)); }
    73% { transform: translate3d(calc(-9vw + var(--snow-sway-c)), 83vh, 0) rotate(var(--snow-turn-c)); }
    100% { transform: translate3d(var(--snow-wind-end), 124vh, 0) rotate(var(--snow-turn)); }
}

.rain-drop {
    position: absolute;
    top: -18vh;
    left: var(--rain-left);
    width: var(--rain-width);
    height: var(--rain-length);
    background: linear-gradient(180deg, transparent 0%, rgba(207, 222, 226, 0.24) 18%, rgba(188, 207, 212, 0.82) 100%);
    opacity: var(--rain-opacity);
    animation: rogue-rain-fall var(--rain-speed) linear infinite;
    animation-delay: var(--rain-delay);
    will-change: transform;
}

@keyframes rogue-rain-fall {
    from { transform: translate3d(10vw, -18vh, 0) rotate(11deg); }
    to { transform: translate3d(-12vw, 138vh, 0) rotate(11deg); }
}

body.rogue-camp-rain .ember-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms ease, visibility 0s linear 260ms;
}

body.ambiance-snow .ember-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms ease, visibility 0s linear 260ms;
}

body.rogue-camp-rain .rain-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 420ms ease, visibility 0s linear 0s;
}

body.ambiance-snow .snow-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 520ms ease, visibility 0s linear 0s;
}

.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,
    .rain-container,
    .snow-container { display: none; }
}

/* 头部导航 */
.site-header {
    background-color: #a9a79f;
    background-image:
        linear-gradient(180deg, rgba(255, 253, 245, 0.28), rgba(192, 188, 176, 0.32)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, 620px 620px;
    background-blend-mode: normal, multiply;
    border-bottom: 2px solid #8d846f;
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 250, 0.74),
        inset 0 -1px 0 rgba(119, 104, 75, 0.34),
        inset 0 -10px 24px rgba(73, 68, 58, 0.08),
        0 6px 18px rgba(44, 41, 35, 0.24);
}

.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: var(--desktop-header-max);
    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.1rem;
}

.header-subtitle {
    color: var(--gold);
    font-size: 1rem;
    font-family: var(--font-body);
    opacity: 0.8;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.online-status {
    color: var(--gold-light);
    white-space: nowrap;
}

.online-presence {
    position: relative;
}

.online-status-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
}

.online-status-trigger:not(:disabled) {
    cursor: pointer;
}

.online-status-trigger:not(:disabled):hover .online-status,
.online-status-trigger[aria-expanded="true"] .online-status {
    color: #e0c37a;
    text-shadow: 0 0 8px rgba(188, 144, 58, 0.26);
}

.online-status-trigger:disabled {
    opacity: 1;
}

.author-online-dot {
    position: relative;
    width: 0.48rem;
    height: 0.48rem;
    flex: 0 0 0.48rem;
    border-radius: 50%;
    background: #b32620;
    box-shadow: 0 0 5px rgba(202, 45, 35, 0.85);
}

.author-online-dot::after {
    position: absolute;
    inset: -0.26rem;
    border: 1px solid rgba(187, 39, 31, 0.65);
    border-radius: 50%;
    content: "";
    animation: author-online-breathe 2.2s ease-out infinite;
}

@keyframes author-online-breathe {
    0% { opacity: 0.8; transform: scale(0.55); }
    70%, 100% { opacity: 0; transform: scale(1.45); }
}

.online-roster {
    position: absolute;
    z-index: 1500;
    top: calc(100% + 0.7rem);
    left: 0;
    width: min(22rem, calc(100vw - 2rem));
    padding: 0.9rem;
    border: 1px solid #80683d;
    background:
        linear-gradient(180deg, rgba(20, 17, 14, .99), rgba(7, 6, 5, .995)),
        url('/static/img/stone-texture.svg');
    background-color: #080706;
    box-shadow: inset 0 0 0 2px #050403, 0 16px 38px rgba(0, 0, 0, 0.88);
    color: var(--text-primary);
    opacity: 1;
}

.online-roster-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.2rem 0.25rem 0.65rem;
    border-bottom: 1px solid rgba(139, 110, 55, 0.34);
    color: var(--gold-dark);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.online-roster-heading strong {
    color: var(--gold);
    font-weight: 400;
}

.online-roster-list {
    display: flex;
    max-height: 18rem;
    padding-top: 0.4rem;
    overflow-y: auto;
    flex-direction: column;
    scrollbar-color: #75613b #100e0b;
    scrollbar-width: thin;
}

.online-roster-list::-webkit-scrollbar {
    width: 8px;
}

.online-roster-list::-webkit-scrollbar-track {
    border-left: 1px solid rgba(107, 85, 48, 0.28);
    background: #100e0b;
}

.online-roster-list::-webkit-scrollbar-thumb {
    border: 2px solid #100e0b;
    border-radius: 6px;
    background: linear-gradient(180deg, #806a40, #57482d);
}

.online-roster-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a08750, #6a5735);
}

.online-roster-list::-webkit-scrollbar-corner {
    background: #100e0b;
}

.online-roster-person {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    min-width: 0;
    padding: 0.55rem 0.4rem;
    color: #c9bda5;
    font-family: var(--font-body);
    font-size: 1rem;
}

.online-roster-person + .online-roster-person {
    border-top: 1px solid rgba(113, 91, 52, 0.18);
}

.online-roster-person img {
    width: 34px;
    height: 34px;
    border: 1px solid #57472d;
    object-fit: cover;
}

.online-roster-identity {
    display: grid;
    min-width: 0;
    gap: 0.08rem;
}

.online-roster-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-roster-duration {
    overflow: hidden;
    color: #938876;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-roster-role {
    color: #a94b40;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.online-roster-person.is-author {
    color: #d6bd7d;
}

@media (prefers-reduced-motion: reduce) {
    .author-online-dot::after { animation: none; }
}

.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: 1.8rem;
    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;
}

.site-header nav .nav-update-dot {
    display: block;
    position: absolute;
    top: 2px;
    right: -11px;
    box-sizing: border-box;
    width: 9px;
    min-width: 9px;
    height: 9px;
    min-height: 9px;
    border: 0;
    border-radius: 999px;
    background: #c52f25;
    box-shadow: 0 0 3px rgba(197, 47, 37, .5);
    line-height: 0;
    font-size: 0;
}

.site-header .header-right > nav {
    padding-bottom: 13px;
    margin-bottom: -13px;
}

.site-header nav a.nav-link.active {
    color: var(--gold-light);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .95), 0 0 7px rgba(157, 34, 26, .38);
}

.site-header nav a.nav-link.active::before {
    position: absolute;
    bottom: -7px;
    left: 50%;
    width: 7px;
    height: 7px;
    content: '';
    background: #7c1f18;
    border: 1px solid #c39a4b;
    box-shadow: 0 0 0 1px #080605, 0 0 7px rgba(168, 44, 31, .72);
    transform: translateX(-50%) rotate(45deg);
}

.site-header nav a.nav-link.active::after {
    display: none;
}

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;
}

@media (hover: none), (pointer: coarse) {
    .user-menu:hover .user-menu-dropdown,
    .user-menu:focus-within .user-menu-dropdown {
        display: none;
    }

    .user-menu.is-open .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: var(--desktop-content-max);
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}

.home-intro {
    max-width: 650px;
    margin: 0.5rem 0 2.5rem;
    padding-left: 1.4rem;
    border-left: 2px solid var(--gold-dark);
}

.home-intro-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
    color: var(--gold);
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.home-intro-kicker .kicker-zh { font-family: var(--font-body); font-size: 1.05em; letter-spacing: 0.08em; }
.home-intro-kicker .kicker-en { font-family: var(--font-kicker); letter-spacing: 0.16em; }

.home-intro h1 {
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    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: '';
    order: 2;
    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: #c6b99f;
    font-size: 0.95rem;
    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;
    width: 100%;
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(260px, 36%) 1fr;
    min-height: 250px;
    max-height: 440px;
    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;
}

.category-more-link {
    order: 3;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0.5rem 1rem;
    color: #ead39a;
    background: rgba(38, 29, 16, 0.9);
    border: 1px solid #a38749;
    box-shadow: inset 0 0 0 1px rgba(216, 184, 108, 0.12), 0 2px 5px rgba(0, 0, 0, 0.35);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}
.category-footer { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin: 1.5rem auto 0; width: min(100%, 460px); }
.category-footer::before, .category-footer::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(160, 137, 83, 0.45)); }
.category-footer::after { order: 4; transform: scaleX(-1); }
.category-footer .category-more-link { margin: 0; min-height: 44px; padding: 0.45rem 0.65rem; color: #bda675; background: transparent; border: 0; box-shadow: none; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.12em; }
.category-footer .category-more-link::after { content: '›'; font-size: 1.3em; }
.category-footer .category-more-link:hover { color: #ead39a; background: transparent; text-shadow: 0 0 12px rgba(201, 169, 97, 0.3); }
.category-more-link::after { content: '\2192'; font-size: 1.15em; }
.category-more-link:hover { color: #fff0c5; border-color: #d4b66f; background: rgba(73, 52, 23, 0.95); }
.category-more-link:focus-visible { outline: 2px solid #ead39a; outline-offset: 3px; }
@media (max-width: 767px) {
    .category-more-link {
        min-height: 30px;
        padding: 0.25rem 0.55rem;
        gap: 0.3rem;
        font-size: 0.78rem;
        letter-spacing: 0;
    }
    .category-more-link::after { font-size: 1em; }
}
.category-order-number { color: var(--gold-dark); font-family: var(--font-numeric); font-size: 0.78rem; }
.category-order-actions { display: inline-flex; gap: 0.2rem; }
.category-order-actions form { display: inline-flex; }
.category-order-actions button { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0; color: var(--gold); background: #171410; border: 1px solid var(--border-color); font-family: var(--font-ui); font-size: 0.95rem; cursor: pointer; }
.category-order-actions button:hover:not(:disabled) { color: var(--gold-light); border-color: var(--gold-dark); background: rgba(105, 72, 30, 0.22); }
.category-order-actions button:disabled { opacity: 0.28; cursor: not-allowed; }
.archive-with-sidebar { display:block; }.archive-category-content { min-width:0; width:100%; }
.archive-category-nav { position:fixed; z-index:18; top:clamp(9rem,18vh,12rem); left:1.25rem; width:205px; max-height:calc(100vh - 14rem); overflow:auto; padding:1.15rem .95rem; font-family:var(--font-body); background:rgba(35,34,29,.95); border-left:1px solid #78612d; border-top:1px solid rgba(117,97,58,.25); box-shadow:0 8px 24px rgba(0,0,0,.28); }
.archive-category-nav { scrollbar-width:thin; scrollbar-color:#75613b #100e0b; }
.archive-category-nav::-webkit-scrollbar { width:8px; height:8px; }
.archive-category-nav::-webkit-scrollbar-track { background:#100e0b; border-left:1px solid rgba(117,97,58,.12); }
.archive-category-nav::-webkit-scrollbar-thumb { background:linear-gradient(180deg,#806a40,#57482d); border:2px solid #100e0b; border-radius:6px; }
.archive-category-nav::-webkit-scrollbar-thumb:hover { background:linear-gradient(180deg,#a0864e,#6d5935); }
.archive-category-nav::-webkit-scrollbar-corner { background:#100e0b; }
.archive-category-nav>span { display:block; margin:0 .5rem .8rem; color:#776541; font-family:var(--font-body); font-size:.8rem; letter-spacing:.18em; }.archive-category-nav nav { display:grid; font-family:var(--font-body); }
.archive-category-nav a { display:flex; align-items:flex-start; justify-content:space-between; gap:.65rem; padding:.72rem .5rem; color:#a0957d; border-bottom:1px solid rgba(117,97,58,.15); text-decoration:none; transition:color .16s ease,padding-left .16s ease,background .16s ease; }.archive-category-nav a:hover { padding-left:.7rem;color:var(--gold);background:rgba(117,97,58,.08); }.archive-category-nav b { min-width:0; overflow-wrap:anywhere; white-space:normal; font-family:var(--font-body);font-size:.98rem;font-weight:400;line-height:1.5; }.archive-category-nav small { flex:none;margin-top:.2rem;color:#756b59;font:400 .78rem var(--font-numeric); }
.archive-category-nav > span { color: #b69a61; }
.archive-category-nav a { color: #c6b99f; border-bottom-color: rgba(151, 124, 69, 0.28); }
.archive-category-nav a:hover,
.archive-category-nav a:focus-visible { color: #efd38f; background: rgba(135, 96, 38, 0.17); }
.archive-category-nav small { color: #a99a7d; }
.archive-category-nav a.recent-category-link,
.archive-category-nav a.recent-category-link b,
.archive-category-nav a.recent-category-link small,
.recent-category-title {
    color: var(--gold-light);
    text-shadow: 0 0 18px rgba(201, 169, 97, 0.25);
}
.archive-category-content>.category-section:first-child { margin-top:0; }.category-section[id] { scroll-margin-top:calc(var(--header-height,100px) + 1.25rem); }
@media(max-width:1439px){.archive-category-nav{position:relative;z-index:auto;top:auto;left:auto;width:100%;max-height:none;margin:0 0 1.4rem;padding:.7rem;overflow-x:auto;border-left:0;border-top:1px solid #78612d;border-bottom:1px solid rgba(117,97,58,.25);box-shadow:none}.archive-category-nav>span{display:none}.archive-category-nav nav{display:flex;gap:.35rem;width:max-content}.archive-category-nav a{min-width:max-content;padding:.48rem .65rem;align-items:center;border:1px solid rgba(117,97,58,.2)}.archive-category-nav a:hover{padding-left:.65rem}.archive-category-nav b{white-space:nowrap;overflow-wrap:normal}.archive-category-nav small{margin-top:0}}

/* 1080p 在 125% 系统缩放下约为 1536 CSS px：保留 2K 的左侧轨道结构。 */
@media (min-width: 1440px) and (max-width: 1819px) {
    .home-intro,
    .gallery-page .archive-hero,
    .archive-hero[aria-labelledby^="ambiance-page-title"] {
        margin-left: 132px;
    }

    .archive-category-content {
        width: calc(100% - 261px);
        margin-left: 132px;
    }

    .gallery-page .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.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: 650px;
    margin: 0.5rem 0 2.5rem;
    padding-left: 1.4rem;
    border-left: 2px solid var(--gold-dark);
}

.archive-hero-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
    color: var(--gold);
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.archive-hero-kicker .kicker-zh { font-family: var(--font-body); font-size: 1.05em; letter-spacing: 0.08em; }
.archive-hero-kicker .kicker-en { font-family: var(--font-kicker); letter-spacing: 0.16em; }

.archive-hero h1 {
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    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;
}

/* 中等桌面宽度保留左侧分类轨道时，所有页面大标题与废案研究院共用起点。 */
@media (min-width: 1440px) and (max-width: 1819px) {
    .archive-hero {
        margin-left: 132px;
    }
}

.ambiance-subnav {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(12rem, 15rem));
    gap: 0;
    margin: -2rem 0 2.5rem 1.4rem;
    background: rgba(8, 7, 6, 0.72);
    border-top: 1px solid rgba(126, 111, 78, 0.42);
    border-bottom: 1px solid rgba(126, 111, 78, 0.42);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.ambiance-subnav a {
    position: relative;
    display: grid;
    min-width: 0;
    margin: 0;
    gap: 0.15rem;
    padding: 0.8rem 1.4rem 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    text-decoration: none;
    border-right: 1px solid rgba(126, 111, 78, 0.32);
    transition: color 160ms ease, background-color 160ms ease;
}

.ambiance-subnav a:last-child { border-right: 0; }
.ambiance-subnav a:hover { color: var(--gold-light); background: rgba(0, 0, 0, 0.16); }
.ambiance-subnav a.active {
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 0 1px rgba(218, 195, 145, 0.07);
}
.ambiance-subnav a.active::after { position: absolute; right: 1.1rem; bottom: -1px; left: 1.1rem; height: 2px; content: ''; background: var(--gold); box-shadow: 0 0 10px rgba(201, 169, 97, 0.45); }
.ambiance-subnav span { font-family: var(--font-body); font-size: 1.05rem; letter-spacing: 0.12em; }
.ambiance-subnav small { color: var(--gold-dark); font-family: var(--font-kicker); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; }
.ambiance-subnav a.active small { color: #a88a4d; }

@media (min-width: 1440px) and (max-width: 1819px) {
    .ambiance-subnav {
        margin-left: calc(132px + 1.4rem);
    }
}

.ambiance-archive-with-sidebar { margin-top: 1rem; }
.ambiance-archive-with-sidebar .category-section + .category-section { margin-top: 3rem; }
.ambiance-archive-with-sidebar .category-title {
    font-family: 'RogueTitle', var(--font-body);
    font-weight: 400;
    letter-spacing: 0.08em;
}
@media (max-width: 620px) {
    .ambiance-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: -2rem 0 2rem; }
    .ambiance-subnav a { padding-inline: 0.7rem; }
    .ambiance-subnav span { font-size: 0.94rem; letter-spacing: 0.08em; }
    .ambiance-subnav small { font-size: 0.56rem; letter-spacing: 0.1em; }
}

.post-card:hover {
    filter: brightness(0.9);
    box-shadow:
        inset 0 0 30px rgba(33, 7, 5, 0.42),
        0 14px 32px rgba(12, 7, 4, 0.72);
    transform: translateY(-3px);
}

.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.32);
}

.post-image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    display: block;
}
.post-image.is-contain {
    max-height: 440px;
    object-fit: contain;
    background: transparent;
    background-image: none;
}

.post-content-preview {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    overflow: hidden;
    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-author {
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1.5;
}

.post-card-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.post-tags a,
.post-tags span,
.admin-post-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0.18rem 0.55rem;
    color: var(--tag-color, var(--gold));
    border: 1px solid rgba(126, 111, 78, 0.42);
    border-color: color-mix(in srgb, var(--tag-color, var(--gold)) 48%, #17130e);
    font: 400 0.72rem var(--font-tag);
    line-height: 1.3;
    text-decoration: none;
    background: rgba(20, 17, 12, 0.72);
}

.admin-post-table { width: 100%; table-layout: fixed; }
.admin-post-col-main { width: auto; }
.admin-post-col-category { width: 11%; }
.admin-post-col-status { width: 9%; }
.admin-post-col-time { width: 15%; }
.admin-post-col-actions { width: 220px; }
.admin-post-table th,
.admin-post-table td { padding: 1rem 1.05rem; vertical-align: middle; }
.admin-post-title-link { display: inline-block; max-width: 100%; overflow-wrap: anywhere; color: var(--gold); font-family: var(--font-body); font-size: 1rem; line-height: 1.45; text-decoration: none; }
.admin-post-title-link:hover { color: var(--gold-light); }
.admin-post-table .admin-post-tags { margin-top: .65rem; }
.admin-post-category-badge,
.admin-post-category-empty,
.admin-post-status-badge { display: inline-flex; min-height: 30px; padding: .3rem .55rem; align-items: center; color: var(--text-secondary); background: #0b0a08; border: 1px solid var(--border-color); font-family: var(--font-body); font-size: .8rem; line-height: 1.2; white-space: nowrap; }
.admin-post-status-badge.is-published { color: var(--gold); border-color: rgba(155, 122, 53, .48); }
.admin-post-status-badge.is-hidden { color: #81796c; }
.admin-post-status-badge.is-support { color: #c17a5a; border-color: rgba(193, 122, 90, .4); }
.admin-post-time time { color: var(--text-primary); font: 400 .86rem/1.35 var(--font-numeric); white-space: nowrap; }
.admin-post-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; white-space: nowrap; }
.admin-post-actions form { display: inline-flex; margin: 0; }
.admin-post-actions .btn { min-width: 62px; min-height: 38px; padding: .42rem .65rem; font-size: .8rem; }

@media (max-width: 900px) {
    .admin-post-table,
    .admin-post-table tbody,
    .admin-post-table tr,
    .admin-post-table td { display: block; width: 100%; }
    .admin-post-table colgroup,
    .admin-post-table thead { display: none; }
    .admin-post-table tr { margin-bottom: 1rem; padding: 1rem; background: rgba(10, 9, 7, .78); border: 1px solid var(--border-color); }
    .admin-post-table td { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: .75rem; padding: .55rem 0; border: 0; }
    .admin-post-table td::before { content: attr(data-label); color: var(--gold-dark); font-family: var(--font-body); font-size: .78rem; letter-spacing: .06em; }
    .admin-post-main { display: block !important; padding-top: 0 !important; }
    .admin-post-main::before { display: none; }
    .admin-post-actions { justify-content: flex-start; flex-wrap: wrap; }
}

.post-tags a:hover {
    color: var(--gold-light);
    border-color: var(--gold-dark);
    background: rgba(116, 78, 18, 0.16);
}

.post-card-tags {
    flex: 0 0 auto;
    min-height: 30px;
    margin: -0.2rem 0 1rem;
    gap: 0.45rem;
    overflow: visible;
}
.post-card-tags a,
.post-detail-tags a,
.gallery-card-tags a,
.gallery-detail-tags a {
    min-height: 30px;
    padding: 0.25rem 0.68rem;
    font-family: var(--font-body);
    font-size: 0.84rem;
    line-height: 1.35;
}
.post-detail-tags { justify-content: center; margin-top: 1rem; }

.entity-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.entity-stat,
.comment-count-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.gallery-card-like.liked,
.card-like.liked {
    color: #bd4b43;
    text-shadow: 0 0 8px rgba(151, 35, 29, 0.28);
}

.comment-count-icon {
    display: block;
    width: 1.08rem;
    height: 1.08rem;
    aspect-ratio: 1;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translateY(-0.02em);
}

.comment-count-stat {
    min-height: 1.2rem;
    line-height: 1;
}

.comment-count-stat.commented {
    color: #c4473e;
    text-shadow: 0 0 8px rgba(151, 35, 29, 0.32);
}

.comment-count-stat.commented .comment-count-icon {
    fill: #c4473e;
    stroke: #c4473e;
}

.gallery-detail-stats {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.post-excerpt {
    position: relative;
    color: var(--text-secondary);
    max-width: 58rem;
    max-height: 7.8rem;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.8;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
}

.post-excerpt > :first-child { margin-top: 0; }
.post-excerpt > :last-child { margin-bottom: 0; }
.post-excerpt p { margin: 0 0 0.62rem; }
.post-excerpt h2,
.post-excerpt h3,
.post-excerpt h4 { margin: 0.7rem 0 0.35rem; color: #b9aa8c; font: 600 1em/1.55 var(--font-body); }
.post-excerpt ul,
.post-excerpt ol { margin: 0.25rem 0 0.65rem; padding-left: 1.35rem; }
.post-excerpt li { margin: 0.08rem 0; }
.post-excerpt blockquote { margin: 0.5rem 0; padding-left: 0.75rem; border-left: 2px solid rgba(255, 115, 83, 0.7); }
.post-excerpt strong,
.post-excerpt b { color: #c6b99f; font-weight: 600; }
.post-excerpt code { padding: 0.05rem 0.22rem; color: #c8b995; background: rgba(255,255,255,.04); }

.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, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: none;
    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;
}

.post-card-time {
    margin-left: auto;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    white-space: nowrap;
}

.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: var(--font-body);
    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;
    white-space: nowrap;
    word-break: keep-all;
}

.recent-edit-badge {
    background: linear-gradient(135deg, rgba(55, 91, 126, 0.92), rgba(27, 52, 79, 0.96));
    color: #b9d7ff;
    box-shadow: 0 2px 8px rgba(20, 48, 76, 0.42);
}

@media (max-width: 700px) {
    .recent-edit-badge {
        margin-left: 0.32rem;
        padding: 0.18rem 0.4rem;
        font-size: 0.7rem;
        letter-spacing: 0.03em;
    }
}

.post-detail-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(201, 169, 97, 0.3);
}

.post-detail-image {
    display: block;
    width: min(100%, 760px);
    height: auto;
    max-height: min(58vh, 460px);
    object-fit: cover;
    border-radius: 4px;
    margin: 0 auto 2rem;
    border: 1px solid var(--border-color);
}
.post-detail-image.is-cover {
    object-fit: cover;
}
.post-detail-image.is-contain {
    width: min(100%, 560px);
    max-height: min(54vh, 420px);
    margin: 0 auto 2rem;
    object-fit: contain;
    background: #0a0907;
}

.post-toc {
    display: none;
}

.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3 {
    scroll-margin-top: 90px;
}

/* 1024px 低分辨率桌面仍保留可收起目录；平板及手机自动隐藏。 */
@media (min-width: 960px) {
    .post-toc {
        display: block;
        position: fixed;
        left: 1.25rem;
        top: calc(100px + 3.25rem);
        z-index: 60;
        width: 300px;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 12rem);
        overflow-y: auto;
        padding: 1rem 1.1rem;
        background-color: var(--surface-stone);
        background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 30%);
        border: 1px solid var(--border-color);
        box-shadow: inset 0 0 0 1px rgba(126, 111, 78, 0.18), 0 10px 28px rgba(0, 0, 0, 0.38);
        scrollbar-color: #75613b #100e0b;
        scrollbar-width: thin;
    }

    .post-toc::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .post-toc::-webkit-scrollbar-track {
        background: #100e0b;
        border-left: 1px solid rgba(107, 85, 48, 0.28);
    }

    .post-toc::-webkit-scrollbar-thumb {
        border: 2px solid #100e0b;
        border-radius: 6px;
        background: linear-gradient(180deg, #806a40, #57482d);
    }

    .post-toc::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #a08750, #6a5735);
    }

    .post-toc-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 0.7rem;
        padding-bottom: 0.55rem;
        border-bottom: 1px solid var(--border-color);
        color: var(--gold);
        font-family: var(--font-body);
        font-weight: 400;
        letter-spacing: 0.06em;
        font-size: 1.05rem;
    }

    .post-toc-toggle {
        flex: none;
        padding: 0.16rem 0.35rem;
        color: var(--text-secondary);
        background: transparent;
        border: 0;
        font-family: var(--font-body);
        font-size: 0.72rem;
        white-space: nowrap;
        cursor: pointer;
    }

    .post-toc-toggle:hover,
    .post-toc-toggle:focus-visible {
        color: var(--gold-light);
        outline: 1px solid rgba(154, 129, 76, 0.42);
        outline-offset: 2px;
    }

    .post-toc.is-collapsed {
        width: auto;
        max-height: none;
        overflow: visible;
        padding: 0.48rem 0.58rem;
    }

    .post-toc.is-collapsed .post-toc-heading {
        margin: 0;
        padding: 0;
        border: 0;
    }

    .post-toc.is-collapsed .post-toc-heading-title,
    .post-toc.is-collapsed .post-toc-list {
        display: none;
    }

    .post-toc-list {
        display: grid;
        gap: 0.2rem;
    }

    .post-toc-link {
        display: block;
        padding: 0.32rem 0.4rem;
        color: var(--text-secondary);
        font-family: var(--font-body);
        font-size: 0.84rem;
        line-height: 1.45;
        overflow-wrap: anywhere;
        text-decoration: none;
        border-left: 2px solid transparent;
        transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
    }

    .post-toc-link:hover {
        color: var(--gold-light);
        border-left-color: var(--gold-dark);
        background: rgba(117, 97, 58, 0.12);
    }

    .post-toc-link.is-active {
        color: #e2bd63;
        border-left-color: #c49a45;
        background: linear-gradient(90deg, rgba(151, 105, 31, 0.2), transparent 88%);
        text-shadow: 0 0 10px rgba(205, 157, 61, 0.22);
    }

    .post-toc-level-3 {
        padding-left: 1.1rem;
    }

    .post-toc-level-1 {
        margin-top: 0.3rem;
        color: var(--gold-light);
        font-size: 0.92rem;
        border-left-color: rgba(164, 45, 34, 0.72);
    }

    .post-toc-level-1:first-child {
        margin-top: 0;
    }
}

.post-reading-progress {
    position: fixed;
    z-index: 1200;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
    background: rgba(73, 56, 30, 0.28);
}

.post-reading-progress > span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #765323, #d6ae58 72%, #f0d285);
    box-shadow: 0 0 7px rgba(214, 174, 88, 0.55);
    transition: transform 0.08s linear;
}

.post-current-section {
    display: none;
}

@media (max-width: 1139px) {
    .post-current-section:not([hidden]) {
        position: fixed;
        z-index: 1190;
        top: 8px;
        right: 0.8rem;
        display: block;
        max-width: min(76vw, 22rem);
        padding: 0.28rem 0.55rem;
        overflow: hidden;
        color: #c9ad70;
        font: 0.76rem/1.35 var(--font-body);
        white-space: nowrap;
        text-overflow: ellipsis;
        pointer-events: none;
        background: rgba(12, 10, 8, 0.88);
        border: 1px solid rgba(132, 101, 49, 0.42);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
    }
}

.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: var(--font-ui);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.creator-card-title {
    color: var(--gold-light);
    font-family: var(--font-ui);
    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 {
    display: block;
    width: auto;
    max-width: min(100%, 760px);
    max-height: 70vh;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem auto;
    object-fit: contain;
    cursor: zoom-in;
}

/* 正文内嵌的图册引用图：居中卡片 + 外框隔离 + 标题/作者 */
.post-detail-content figure.gallery-inline-ref {
    display: block;
    max-width: min(100%, 460px);
    margin: 2.5rem auto;
    padding: 0;
    text-align: center;
    border: 1px solid #6b5a38;
    background: #000;
    box-shadow:
        inset 0 0 0 1px rgba(200, 175, 120, 0.16),
        0 0 0 1px rgba(0, 0, 0, 0.55),
        0 6px 20px rgba(0, 0, 0, 0.5);
}

.post-detail-content figure.gallery-inline-ref a {
    display: block;
    max-width: 100%;
    line-height: 0;
}

.post-detail-content figure.gallery-inline-ref a:hover {
    opacity: 0.92;
}

.post-detail-content figure.gallery-inline-ref img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 40vh;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 0;
    border: 0;
}

.post-detail-content figure.gallery-inline-ref figcaption {
    margin: 0;
    padding: 0.75rem 1rem 0.9rem;
    line-height: 1.5;
}

.post-detail-content figure.gallery-inline-ref .gallery-inline-caption-title {
    display: block;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
}

.post-detail-content figure.gallery-inline-ref .gallery-inline-caption-author {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

/* 文章正文表格 */
.post-detail-content table {
    display: table;
    width: auto;
    max-width: 100%;
    margin: 1.5rem auto;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.6;
}
.post-detail-content th,
.post-detail-content td {
    border: 1px solid #6b5a38;
    padding: 0.5rem 0.85rem;
    vertical-align: top;
    text-align: left;
}
.post-detail-content th {
    color: var(--gold-light);
    background: rgba(117, 97, 58, 0.16);
    font-weight: 600;
}
.post-detail-content table.ql-table {
    border-collapse: collapse;
}
.post-detail-content .table-scroll {
    max-width: 100%;
    margin: 1.5rem auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #75613b #100e0b;
    scrollbar-width: thin;
}
.post-detail-content .table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.post-detail-content .table-scroll::-webkit-scrollbar-track {
    background: #100e0b;
    border-top: 1px solid rgba(107, 85, 48, 0.28);
}
.post-detail-content .table-scroll::-webkit-scrollbar-thumb {
    border: 2px solid #100e0b;
    border-radius: 6px;
    background: linear-gradient(180deg, #806a40, #57482d);
}
.post-detail-content .table-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a08750, #6a5735);
}
.post-detail-content .table-scroll::-webkit-scrollbar-corner {
    background: #100e0b;
}
.post-detail-content .table-scroll table {
    display: table;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
    margin: 0;
}
.post-detail-content .table-scroll th,
.post-detail-content .table-scroll td {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.post-detail-content hr.post-divider {
    border: 0;
    height: 2px;
    max-width: 70%;
    margin: 2.2rem auto;
    background: linear-gradient(90deg, transparent, #6b5a38 18%, #a98e59 50%, #6b5a38 82%, transparent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
@media (max-width: 700px) {
    .post-detail-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Keep published Quill lists aligned with their editor preview. */
.post-detail-content ul,
.post-detail-content ol {
    margin: 0;
    padding-left: 1.4em;
}

.post-detail-content li {
    margin: 0;
    padding-left: 0;
}

.post-detail-content li > ul,
.post-detail-content li > ol {
    margin: 0;
    padding-left: 1.4em;
}

.media-new-badge {
    padding: .12rem .38rem;
    margin-left: .38rem;
    font-size: .62rem;
    letter-spacing: .06em;
    vertical-align: .16em;
    box-shadow: 0 1px 5px rgba(90, 8, 5, .42);
}

.recent-content-section {
    border-top-color: rgba(139, 44, 34, .55);
}

/* 新内容速递分类标题：与 Hero 主标题一致的浅亮米金 */
.recent-category-title {
    color: var(--gold-light) !important;
    text-shadow: 0 0 18px rgba(201, 169, 97, 0.25);
}
.gallery-section-heading .recent-category-title {
    color: var(--gold-light) !important;
}

.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;
    height: 100%;
    max-height: 440px;
    overflow: hidden;
    background-color: transparent;
    background-image: none;
    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 .post-image.is-contain {
    max-height: 440px;
    object-fit: contain;
    background: transparent;
    background-image: none;
}

.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;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0.7rem;
    overflow: hidden;
    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 {
    position: fixed;
    z-index: 10020;
    top: 50%;
    left: 50%;
    width: min(38rem, calc(100vw - 2rem));
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.flash {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) 2rem;
    gap: 0.85rem;
    align-items: center;
    min-height: 4.5rem;
    padding: 0.85rem 0.9rem;
    margin-bottom: 0.65rem;
    color: #eee4d0;
    background: rgba(19, 17, 14, 0.98);
    border: 1px solid var(--gold-dark);
    border-left: 5px solid var(--gold);
    border-radius: 2px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.72), inset 0 0 24px rgba(201, 169, 97, 0.05);
    pointer-events: auto;
    animation: flash-enter 240ms ease-out both;
    font-family: var(--font-ui);
}

.flash.error {
    border-color: #b83c35;
    border-left-color: #e14c43;
    background: linear-gradient(90deg, rgba(90, 18, 16, 0.98), rgba(24, 17, 15, 0.98) 42%);
}

.flash.success {
    border-color: #427d45;
    border-left-color: #62c96a;
    background: linear-gradient(90deg, rgba(24, 72, 31, 0.98), rgba(20, 19, 15, 0.98) 42%);
}

.flash.warning { border-left-color: #e0a72e; background: linear-gradient(90deg, rgba(91, 59, 13, 0.98), rgba(22, 18, 14, 0.98) 42%); }
.flash.info { border-left-color: var(--gold); }
.flash-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; color: #fff4d2; border: 1px solid currentColor; border-radius: 50%; font-family: var(--font-ui); font-size: 1.15rem; font-weight: 700; }
.flash-copy { display: grid; min-width: 0; gap: 0.1rem; }
.flash-copy strong { color: #fff3d2; font-size: 0.92rem; letter-spacing: 0.08em; }
.flash-copy > span { color: #ded3bf; font-size: 0.9rem; overflow-wrap: anywhere; }
.flash-close { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; color: #cdbfA6; background: transparent; border: 0; font-size: 1.45rem; line-height: 1; }
.flash-close:hover { color: #fff4d7; background: rgba(255, 255, 255, 0.08); }
.flash.is-leaving { animation: flash-leave 260ms ease-in both; }
@keyframes flash-enter { from { opacity: 0; transform: translateY(-1rem) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes flash-leave { to { opacity: 0; transform: translateY(-0.75rem) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .flash, .flash.is-leaving { animation: none; } }
@media (max-width: 560px) { .flash-messages { width: calc(100vw - 1rem); } .flash { grid-template-columns: 2rem minmax(0, 1fr) 1.8rem; gap: 0.6rem; min-height: 4rem; padding: 0.7rem; } .flash-icon { width: 2rem; height: 2rem; } }

/* 登录框 */
.login-box {
    position: relative;
    width: min(100%, 580px);
    max-width: 580px;
    margin: clamp(2.5rem, 7vh, 4.5rem) auto;
    padding: clamp(2.25rem, 5vw, 3.5rem);
    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: var(--font-kicker);
    font-size: .74rem;
    letter-spacing: .2em;
    text-align: center;
    text-transform: uppercase;
}

.login-title {
    text-align: center;
    font-family: 'Diablo2', cursive;
    color: var(--gold);
    font-size: 2.1rem;
    margin-bottom: 2.6rem;
    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: .96rem;
}

.login-box .form-control {
    min-height: 58px;
    padding: .95rem 1.15rem;
    font-size: 1.05rem;
    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 input.form-control,
.login-box input.form-control:focus,
.login-box input.form-control:-webkit-autofill,
.login-box input.form-control:-webkit-autofill:hover,
.login-box input.form-control:-webkit-autofill:focus {
    font-family: var(--font-ui) !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

.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: 58px;
    margin-top: .25rem;
    font-size: 1.08rem;
    letter-spacing: .12em;
}

.auth-guidance {
    max-width: 30rem;
    margin: -1.55rem auto 2rem;
    color: #a39a89;
    font-family: var(--font-body);
    font-size: .96rem;
    line-height: 1.75;
    text-align: center;
}

.auth-secondary-link {
    display: block;
    width: fit-content;
    margin: 1.15rem auto 0;
    color: #b29555;
    font-family: var(--font-body);
    text-decoration: underline;
    text-decoration-color: rgba(178, 149, 85, .45);
    text-underline-offset: .25em;
}

.auth-secondary-link:hover,
.auth-secondary-link:focus-visible { color: var(--gold-light); }

.auth-field-hint {
    display: block;
    margin-top: .55rem;
    color: #817969;
    font-family: var(--font-ui);
    font-size: .84rem;
    line-height: 1.5;
}

.auth-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 9.5rem;
    gap: .7rem;
}

.auth-code-button {
    min-height: 58px;
    padding-inline: .8rem;
    color: #c7b27d;
    background: #1a1510;
    border-color: #574729;
    border-radius: 0;
    font-family: var(--font-body);
}

.auth-code-button:hover:not(:disabled) { color: #ead39a; border-color: #8a6d37; }
.auth-code-button:disabled { cursor: wait; opacity: .62; }

.avatar-category-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 0 0 1rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid rgba(126, 111, 78, .28);
}

.avatar-category-tab {
    min-height: 2.65rem;
    color: #95886c;
    background: #11100e;
    border: 1px solid #403826;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: .96rem;
    cursor: pointer;
}

.avatar-category-tab span {
    margin-left: .25rem;
    color: #6f6655;
    font-family: var(--font-ui);
    font-size: .78rem;
}

.avatar-category-tab:hover,
.avatar-category-tab.active {
    color: var(--gold-light);
    background: #1a1711;
    border-color: #8b713c;
    box-shadow: inset 0 0 12px rgba(166, 126, 48, .08);
}

.avatar-category-panel.is-hidden { display: none; }

/* 原始动画画布留白较多的怪物，在头像格中适度放大主体。 */
.preset-avatar-option[data-avatar="baal-minion.webp"],
.preset-avatar-option[data-avatar="claw-viper.webp"],
.preset-avatar-option[data-avatar="corrupt-rogue.webp"],
.preset-avatar-option[data-avatar="hollow-one.webp"],
.preset-avatar-option[data-avatar="moon-lord.webp"],
.preset-avatar-option[data-avatar="undead-fighter.webp"],
.preset-avatar-option[data-avatar="zombie.webp"] {
    overflow: hidden;
    aspect-ratio: 1;
    background: #030303;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.preset-avatar-option[data-avatar="baal-minion.webp"] img,
.preset-avatar-option[data-avatar="claw-viper.webp"] img,
.preset-avatar-option[data-avatar="corrupt-rogue.webp"] img,
.preset-avatar-option[data-avatar="hollow-one.webp"] img,
.preset-avatar-option[data-avatar="moon-lord.webp"] img,
.preset-avatar-option[data-avatar="undead-fighter.webp"] img,
.preset-avatar-option[data-avatar="zombie.webp"] img {
    border: 0;
    border-radius: 0;
    transform: scale(1.14);
    transform-origin: center;
}

.preset-avatar-option[data-avatar="corrupt-rogue.webp"] img,
.preset-avatar-option[data-avatar="zombie.webp"] img {
    transform: scale(1.24);
}

.preset-avatar-option[data-avatar="baal-minion.webp"]:hover,
.preset-avatar-option[data-avatar="claw-viper.webp"]:hover,
.preset-avatar-option[data-avatar="corrupt-rogue.webp"]:hover,
.preset-avatar-option[data-avatar="hollow-one.webp"]:hover,
.preset-avatar-option[data-avatar="moon-lord.webp"]:hover,
.preset-avatar-option[data-avatar="undead-fighter.webp"]:hover,
.preset-avatar-option[data-avatar="zombie.webp"]:hover,
.preset-avatar-option[data-avatar="baal-minion.webp"].selected,
.preset-avatar-option[data-avatar="claw-viper.webp"].selected,
.preset-avatar-option[data-avatar="corrupt-rogue.webp"].selected,
.preset-avatar-option[data-avatar="hollow-one.webp"].selected,
.preset-avatar-option[data-avatar="moon-lord.webp"].selected,
.preset-avatar-option[data-avatar="undead-fighter.webp"].selected,
.preset-avatar-option[data-avatar="zombie.webp"].selected {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(196, 164, 68, .5);
}

@media (max-width: 520px) {
    .auth-code-row { grid-template-columns: 1fr; }
    .auth-code-button { min-height: 50px; }
}

.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: .5rem 1rem .65rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.76rem;
    position: relative;
    z-index: 2;
    margin-top: .5rem;
    line-height: 1.4;
    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: 1rem 1.15rem;
    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.95rem;
    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;
        max-height: none;
    }

    .post-image {
        height: 210px;
        min-height: 0;
    }

    .post-image-link {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .post-image-link .post-image {
        height: 210px;
        min-height: 0;
    }

    .post-detail {
        padding: 1.5rem;
    }

    .post-detail-title {
        font-size: 1.8rem;
    }
}

/* 放在全部文章响应式规则之后，保证 1080p 桌面左轨不会被后续通用宽度覆盖。 */
@media (min-width: 1440px) and (max-width: 1819px) {
    .post-detail-wrapper {
        width: calc(100% - 261px);
        margin-left: 132px;
    }
}

@media (min-width: 1440px) and (max-width: 2040px) {
    .post-toc {
        width: 260px;
    }
}

@media (min-width: 1440px) and (max-width: 1819px) {
    .post-toc {
        width: 208px;
    }
}

/* 空状态 */
.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;
    position: relative;
    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;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.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[id] {
    scroll-margin-top: 1rem;
}

.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;
}

.guestbook-list-heading .guestbook-count {
    display: inline-block;
    margin-left: .65rem;
    color: var(--text-secondary);
    font: 400 .75rem/1.2 var(--font-body) !important;
    letter-spacing: .04em;
    vertical-align: middle;
}

.guestbook-entry-number {
    position: absolute;
    top: 1.2rem;
    left: -3.4rem;
    width: 2.8rem;
    color: var(--gold-dark);
    font: 400 .88rem/1 var(--font-numeric);
    text-align: right;
    letter-spacing: .03em;
}

.guestbook-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    margin: 2rem 0 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(126, 111, 78, .24);
}

.guestbook-pagination-controls .guestbook-pagination {
    margin: 0;
}

.guestbook-page-jump {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .55rem;
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: .88rem;
}

.guestbook-page-jump input[type='number'] {
    width: 76px;
    height: 42px;
    min-height: 42px;
    padding: .45rem .6rem;
    color: var(--text-primary) !important;
    background: rgba(19, 16, 13, .92) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0;
    font: 400 .9rem/1 var(--font-numeric);
    text-align: center;
}

.guestbook-page-jump input[type='number']::-webkit-inner-spin-button,
.guestbook-page-jump input[type='number']::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.guestbook-page-jump input[type='number'] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.guestbook-page-jump .btn { min-height: 42px; }

@media (max-width: 900px) {
    .guestbook-pagination-controls {
        align-items: center;
        flex-direction: column;
        gap: 0.9rem;
    }

    .guestbook-pagination-controls .guestbook-pagination {
        width: 100%;
        flex-wrap: nowrap;
        gap: 0.35rem;
    }

    .guestbook-pagination .ellipsis { display: none; }

    .guestbook-pagination a,
    .guestbook-pagination span {
        min-width: 40px;
        min-height: 42px;
        padding: 0.55rem 0.7rem;
    }

    .guestbook-page-jump {
        width: 100%;
        flex-wrap: 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);
}

.gallery-referencing-posts {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid #4f442f;
    background: rgba(18, 17, 16, 0.6);
}

.gallery-referencing-heading {
    margin-bottom: 0.9rem;
    text-align: center;
}

.gallery-refs-kicker {
    display: block;
    margin-bottom: 0.25rem;
    color: #8f7749;
    font-family: var(--font-kicker);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
}

.gallery-referencing-heading h3 {
    margin: 0;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.12em;
}

.gallery-referencing-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.gallery-referencing-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    color: var(--text-primary);
    background: #121110;
    border: 1px solid #3a3123;
    text-decoration: none;
    transition: border-color 160ms ease;
}

.gallery-referencing-item:hover {
    border-color: #8e2c22;
}

.gallery-referencing-item img {
    width: 56px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
    background: #060505;
    border: 1px solid #4f442f;
}

.gallery-referencing-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--gold);
}

.gallery-referencing-date {
    flex-shrink: 0;
    color: var(--text-secondary);
    font: 400 0.8rem/1 var(--font-numeric);
}

@media (max-width: 700px) {
    .gallery-referencing-posts { padding: 1rem 0.9rem; }
}

.post-gallery-refs {
    margin: 2.5rem auto 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(126, 111, 78, 0.25);
}

.post-gallery-refs-heading {
    margin-bottom: 1.1rem;
    text-align: center;
}

.post-gallery-refs-kicker {
    display: block;
    margin-bottom: 0.3rem;
    color: #8f7749;
    font-family: var(--font-kicker);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
}

.post-gallery-refs-heading h2 {
    margin: 0;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.12em;
}

.post-gallery-refs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
}

.post-gallery-ref-card {
    display: block;
    overflow: hidden;
    border: 1px solid #4f442f;
    background: #121110;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.post-gallery-ref-card:hover {
    border-color: #8e2c22;
    transform: translateY(-2px);
}

.post-gallery-ref-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #060505;
}

.gallery-referencing-item img.is-contain {
    object-fit: contain;
}

.gallery-referencing-item img.is-cover {
    object-fit: cover;
}

.post-gallery-ref-card img.is-contain {
    object-fit: contain;
}

.post-gallery-ref-card img.is-cover {
    object-fit: cover;
}

.post-gallery-ref-caption {
    display: block;
    padding: 0.55rem 0.65rem 0.6rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.4;
}

.post-gallery-ref-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.post-gallery-ref-author {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 700px) {
    .post-gallery-refs-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
    }
}

/* 文章详情内的赞赏入口：与正文或关联图册保持间距 */
.post-support-wrap {
    margin: 2.75rem 0 0;
}
.post-support-wrap .about-action-row { margin-top: 0; }
.post-support-wrap .guestbook-support-entry {
    margin-bottom: 0;
}

.guestbook-support-entry {
    display: flex;
    justify-content: center;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

.guestbook-support-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 1.45rem;
    border: 1px solid #6f5b34;
    background:
        linear-gradient(180deg, rgba(119, 33, 25, 0.42), rgba(37, 16, 13, 0.8)),
        #171311;
    box-shadow:
        inset 0 0 0 1px rgba(202, 169, 101, 0.1),
        0 4px 14px rgba(0, 0, 0, 0.45);
    color: #d8bd80;
    font-family: var(--font-body);
    font-size: 1.06rem;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.guestbook-support-button:hover,
.guestbook-support-button:focus-visible {
    border-color: #a38448;
    color: #f0d59b;
    transform: translateY(-1px);
}

.guestbook-support-mark {
    color: #8e2c22;
    font-size: 0.75rem;
    text-shadow: 0 0 8px rgba(143, 36, 27, 0.65);
}

.guestbook-support-overlay[hidden] {
    display: none;
}

.guestbook-support-overlay {
    position: fixed;
    z-index: 1800;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    overflow: auto;
    background: rgba(3, 3, 3, 0.76);
    backdrop-filter: blur(2px);
}

.guestbook-support-dialog {
    position: relative;
    box-sizing: border-box;
    width: min(100%, 920px);
    max-width: 920px;
    max-height: min(92dvh, 860px);
    padding: 0;
    overflow: auto;
    border: 1px solid #68583a;
    background-color: #1a1a19;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(126, 101, 55, 0.09), transparent 48%),
        linear-gradient(rgba(4, 4, 4, 0.48), rgba(8, 7, 6, 0.6)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, auto, 640px auto;
    background-position: center, center, center top;
    background-blend-mode: normal, normal, normal;
    box-shadow:
        inset 0 0 0 3px #0a0a09,
        inset 0 0 0 4px rgba(185, 151, 84, 0.14),
        0 20px 55px rgba(0, 0, 0, 0.78);
    color: var(--text-primary);
    scrollbar-color: #75613b #100e0b;
    scrollbar-width: thin;
}

.guestbook-support-dialog::-webkit-scrollbar {
    width: 8px;
}

.guestbook-support-dialog::-webkit-scrollbar-track {
    background: #100e0b;
    border-left: 1px solid rgba(107, 85, 48, 0.28);
}

.guestbook-support-dialog::-webkit-scrollbar-thumb {
    border: 2px solid #100e0b;
    border-radius: 6px;
    background: linear-gradient(180deg, #806a40, #57482d);
}

.guestbook-support-dialog::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a08750, #6a5735);
}

.guestbook-support-dialog::-webkit-scrollbar-corner {
    background: #100e0b;
}

.guestbook-support-dialog {
    padding: clamp(1.5rem, 3.5vw, 2.25rem);
}

.guestbook-support-dialog h2 {
    margin: 0 0 1.1rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.2rem);
    font-weight: 400;
    text-align: center;
    letter-spacing: 0.12em;
}

.guestbook-support-dialog h2::after {
    display: block;
    width: min(220px, 52%);
    height: 1px;
    margin: 0.75rem auto 0;
    background: linear-gradient(90deg, transparent, #6f5a32, transparent);
    content: "";
}

.guestbook-support-kicker {
    margin: 0 0 0.4rem;
    color: #8f7749;
    font-family: var(--font-kicker);
    font-size: 0.76rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.22em;
}

.guestbook-support-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: center;
}

.guestbook-support-copy {
    color: #d8cfbd;
    font-family: var(--font-body);
    font-size: 1.07rem;
    line-height: 1.82;
}

.guestbook-support-copy p {
    margin: 0 0 1.1rem;
}

.guestbook-support-copy ul {
    margin: -0.25rem 0 1.2rem;
    padding: 0;
    list-style: none;
}

.guestbook-support-copy li {
    position: relative;
    margin: 0.4rem 0;
    padding-left: 1.5rem;
}

.guestbook-support-copy li::before {
    position: absolute;
    left: 0;
    color: #9b7c43;
    content: "·";
}

.guestbook-support-code {
    width: 100%;
    margin: 0;
    padding: 0.6rem;
    border: 1px solid #4f442f;
    background: rgba(5, 5, 4, 0.55);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.guestbook-support-code img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #6b5a38;
    background: #fff;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.48);
}

.guestbook-support-code figcaption {
    margin-top: 0.65rem;
    color: #a99670;
    font-family: var(--font-body);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
}

.guestbook-support-close {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    background: transparent;
    color: #9e8f72;
    font: 1.8rem/1 var(--font-ui);
    cursor: pointer;
}

.guestbook-support-close:hover,
.guestbook-support-close:focus-visible {
    color: #d8bd80;
}

.guestbook-support-dismiss {
    display: block;
    margin: 1.3rem auto 0;
    padding: 0.55rem 1.5rem;
    font-size: 0.92rem;
}

@media (max-width: 700px) {
    .guestbook-support-dialog {
        max-height: calc(100dvh - 2rem);
    }

    .guestbook-support-overlay {
        padding: 1rem;
    }

    .guestbook-support-body {
        grid-template-columns: 1fr;
    }

    .guestbook-support-code {
        width: min(100%, 260px);
        margin-inline: auto;
    }
}

.guestbook-image {
    max-width: 100%;
    max-height: 400px;
    margin-bottom: 0.8rem;
    object-fit: contain;
    border: 1px solid var(--border-color);
}

.guestbook-content,
.ambiance-comment-content,
.comment-entry > .guestbook-content {
    color: var(--text-primary);
    font-size: 1.15rem !important;
    line-height: 1.8 !important;
    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-current-work {
    position: relative;
    display: grid;
    grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    margin: 0 0 clamp(2rem, 5vw, 3.25rem);
    padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.25rem, 4vw, 2.25rem);
    background:
        linear-gradient(90deg, rgba(100, 18, 12, 0.2), transparent 58%),
        rgba(6, 6, 5, 0.34);
    border: 0;
    border-left: 3px solid #6f241b;
    border-top: 1px solid rgba(151, 125, 77, 0.28);
    border-bottom: 1px solid rgba(0, 0, 0, 0.72);
    outline: 0;
    box-shadow: inset 12px 0 24px rgba(53, 9, 6, 0.14);
    transform: none;
}

.project-current-work::before {
    position: absolute;
    top: 50%;
    left: -7px;
    width: 11px;
    height: 11px;
    content: '';
    background: #9a3827;
    border: 2px solid #2a0c08;
    border-radius: 0;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 10px rgba(133, 38, 25, 0.45);
}

.project-current-work::after {
    content: none;
}

.project-current-work h2 {
    margin: 0;
    padding-right: clamp(1.25rem, 3vw, 2.5rem);
    color: var(--gold);
    border-right: 1px solid rgba(151, 125, 77, 0.32);
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
}

.project-current-work p {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.05rem, 2vw, 1.16rem);
    line-height: 1.8;
    white-space: pre-wrap;
    text-shadow: none;
}

.project-current-work-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.28rem;
    min-width: 0;
}

.project-current-work-copy small {
    display: block;
    margin: 0;
    color: #756b5e;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    line-height: 1.5;
    text-align: left;
    white-space: nowrap;
}

.project-current-work-like {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-width: 2.8rem;
    min-height: 2.8rem;
    padding: 0.2rem 0.35rem;
    color: #763028;
    font: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    justify-content: center;
    transition: color 0.18s ease, text-shadow 0.18s ease, transform 0.18s ease;
}

.project-current-work-like span {
    font-size: 1.15rem;
    line-height: 1;
}

.project-current-work-like b {
    color: #84766a;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.project-current-work-like:hover,
.project-current-work-like.is-liked {
    color: #bd4435;
    text-shadow: 0 0 8px rgba(157, 42, 31, 0.5);
}

.project-current-work-like:active {
    transform: scale(0.92);
}

.project-current-work-like:disabled {
    cursor: wait;
    opacity: 0.65;
}

.project-current-work.has-history {
    margin-bottom: 0.9rem;
}

.project-work-history {
    margin: 0 0 clamp(2rem, 5vw, 3.25rem);
    color: var(--text-secondary);
    background: rgba(5, 5, 4, 0.24);
    border-top: 1px solid rgba(151, 125, 77, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
    font-family: var(--font-body);
}

.project-work-history summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.25rem;
    padding: 0.65rem clamp(1.25rem, 4vw, 2.25rem);
    color: #a9966e;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    cursor: pointer;
    list-style: none;
}

.project-work-history summary::-webkit-details-marker { display: none; }
.project-work-history summary::after {
    content: '展开';
    color: #756b5e;
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}
.project-work-history[open] summary::after { content: '收起'; }
.project-work-history summary:hover { color: var(--gold-light); }
.project-work-history summary small {
    margin-left: auto;
    color: #756b5e;
    font: 0.78rem/1.4 var(--font-body);
    letter-spacing: 0.04em;
}

.project-work-history-list {
    margin: 0;
    padding: 0 clamp(1.25rem, 4vw, 2.25rem) 1.25rem;
    list-style: none;
}

.project-work-history-list li {
    display: grid;
    grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: 1rem 0;
    border-top: 1px solid rgba(117, 97, 58, 0.24);
}

.project-work-history-list time {
    color: #756b5e;
    font: 0.82rem/1.7 var(--font-body);
    font-variant-numeric: tabular-nums;
}

.project-work-history-list p {
    margin: 0;
    color: #b5aa95;
    font-size: 1rem;
    font-family: var(--font-body);
    line-height: 1.75;
    white-space: pre-wrap;
}

.project-work-history-empty {
    margin: 0;
    padding: 1rem clamp(1.25rem, 4vw, 2.25rem) 1.25rem;
    color: #756b5e;
    border-top: 1px solid rgba(117, 97, 58, 0.24);
    font-size: 0.92rem;
    font-family: var(--font-body);
    line-height: 1.7;
}

.progress-admin-history {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(5, 5, 4, 0.28);
    border: 1px solid var(--border-color);
}
.progress-admin-history summary { color: var(--gold); font-family: var(--font-body); cursor: pointer; }
.progress-admin-history ol { margin: 1rem 0 0; padding-left: 1.25rem; }
.progress-admin-history li { padding: 0.75rem 0; border-top: 1px solid rgba(117, 97, 58, 0.22); }
.progress-admin-history time { color: var(--text-secondary); font: 0.8rem var(--font-body); }
.progress-admin-history p { margin: 0.35rem 0 0; font-family: var(--font-body); white-space: pre-wrap; }

@media (max-width: 768px) {
    .project-work-history-list li { grid-template-columns: 1fr; gap: 0.25rem; }
}

.project-restoration-scope {
    display: grid;
    grid-template-columns: minmax(20rem, 0.9fr) minmax(24rem, 1.1fr);
    column-gap: clamp(2rem, 5vw, 4.5rem);
    row-gap: clamp(1.5rem, 3vw, 2.25rem);
    margin: 0 0 clamp(2.5rem, 6vw, 4rem);
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2.75rem);
    background: rgba(7, 7, 6, 0.3);
    border-top: 1px solid rgba(151, 125, 77, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.72);
    box-shadow: inset 10px 0 28px rgba(45, 8, 5, 0.1);
}

.project-restoration-scope > .project-progress-overview,
.project-restoration-scope > .project-countdown-section,
.project-restoration-scope > .project-progress-pending,
.project-restoration-scope > .project-subscription,
.project-restoration-scope > .project-progress-footer {
    grid-column: 1 / -1;
}

.project-restoration-scope > .project-progress-pending {
    display: grid;
    grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: clamp(1.25rem, 4vw, 3rem);
    width: auto;
    margin: 0;
    padding: clamp(1.35rem, 3vw, 2rem) 0 0;
    text-align: left;
    background: transparent;
    border-top: 1px solid rgba(111, 36, 27, 0.58);
    border-bottom: 0;
    box-shadow: none;
}

.project-restoration-scope > .project-progress-pending h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    line-height: 1.5;
    letter-spacing: 0.05em;
}

.project-restoration-scope > .project-progress-pending p {
    max-width: none;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.75;
}

.project-restoration-scope > .project-subscription {
    margin-top: 0;
    padding: clamp(1.15rem, 2.5vw, 1.6rem) 0 0;
    padding-right: clamp(0.85rem, 2vw, 1.35rem);
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(126, 111, 78, 0.24);
    outline: 0;
    box-shadow: none;
}

.project-restoration-scope-heading h2 {
    margin: 0.65rem 0 0.9rem;
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 400;
    line-height: 1.35;
    text-wrap: balance;
}

.project-restoration-scope-heading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.85;
}

.project-restoration-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(126, 111, 78, 0.28);
}

.project-restoration-list li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.9rem;
    min-height: 3.35rem;
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid rgba(126, 111, 78, 0.2);
}

.project-restoration-index {
    color: #7f6b43;
    font-family: var(--font-kicker);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-align: center;
}

.project-restoration-list strong {
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.project-restoration-promise {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: clamp(1.2rem, 3vw, 2rem);
    color: var(--gold);
    border-top: 1px solid rgba(111, 36, 27, 0.55);
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.6vw, 1.55rem);
    line-height: 1.75;
    text-align: center;
    letter-spacing: 0.06em;
}

.project-progress-pending {
    width: 100%;
    max-width: none;
    margin: 0 0 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: 52rem;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.04rem;
    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-width: 142px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.25rem;
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.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-current-work {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.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-restoration-scope {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-restoration-promise {
        grid-column: auto;
        text-align: left;
    }

    .project-restoration-scope > .project-progress-pending {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .project-current-work {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .project-current-work h2 {
        padding: 0 0 0.65rem;
        border-right: 0;
        border-bottom: 1px solid rgba(151, 125, 77, 0.32);
        white-space: normal;
    }

    .project-current-work-copy {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
    }

    .project-current-work-copy small {
        justify-self: start;
    }

    .project-current-work-like {
        justify-self: end;
    }

    .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-copy {
        display: contents;
    }

    .project-subscription-copy h2 {
        grid-column: 2;
        align-self: center;
    }

    .project-subscription-copy p {
        grid-column: 1 / -1;
        margin-top: 0.35rem;
    }

    .project-subscription-action {
        grid-column: 1 / -1;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

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

/* 氛围音详情：首屏负责播放，长说明独立为阅读区。 */
body .ambiance-detail-container {
    width: 100%;
    max-width: none;
    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(300px, 420px) 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: 420px;
    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-family: 'DYmingA', 'LXGW WenKai Lite', 'KaiTi', 'STKaiti', serif;
    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: min(100%, 420px);
    align-items: center;
    justify-content: flex-start;
    margin-top: 1rem;
    padding: 0;
    text-align: left;
    background: transparent;
    border: 0;
    box-shadow: none;
    flex-wrap: wrap;
}

.soundscape-config-button {
    display: inline-flex;
    min-width: 116px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-left: 0.65rem;
    padding: 0.65rem 1.25rem;
    color: var(--gold-light);
    background: linear-gradient(180deg, #26231f 0%, #151311 100%);
    border: 2px solid var(--border-deep);
    box-shadow: inset 0 1px 0 rgba(211, 174, 102, 0.14), 0 3px 7px rgba(12, 7, 4, 0.45);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.soundscape-config-button:hover,
.soundscape-config-button[aria-expanded="true"] {
    border-color: var(--gold-dark);
    background: rgba(40, 31, 19, 0.9);
}

.soundscape-config[hidden] { display: none; }

.soundscape-config {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 1rem auto 0;
    padding: 1rem;
    background: rgba(8, 7, 6, 0.92);
    border: 1px solid var(--gold-dark);
    text-align: left;
}

.soundscape-period,
.soundscape-weather {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 0.85rem;
}

.soundscape-period button,
.soundscape-weather button,
.soundscape-apply {
    padding: 0.55rem 0.8rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.soundscape-period button.active,
.soundscape-weather button.active {
    color: var(--gold);
    border-color: var(--gold-dark);
    background: rgba(130, 92, 24, 0.16);
}

.soundscape-channel {
    display: grid;
    grid-template-columns: 7rem 1fr 3rem;
    gap: 0.65rem;
    align-items: center;
    margin: 0.7rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.soundscape-channel label { white-space: nowrap; }
.soundscape-channel input[type="range"] { min-width: 0; width: 100%; accent-color: var(--gold-dark); }
.soundscape-channel output { color: var(--text-secondary); font-size: 0.78rem; text-align: right; }

.soundscape-apply {
    width: 100%;
    margin-top: 0.7rem;
    color: var(--gold);
}

@media (max-width: 520px) {
    .soundscape-config-button { margin: 0.65rem 0 0; }
    .ambiance-detail-container .ambiance-detail-play-hint {
        min-width: 0;
        width: 100%;
        max-width: calc(100vw - 2rem);
    }
    .soundscape-config {
        flex-basis: auto;
        width: 100%;
        margin-inline: 0;
        padding: 0.8rem;
        overflow-x: hidden;
    }
    .soundscape-period,
    .soundscape-weather { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .soundscape-period button,
    .soundscape-weather button { min-width: 0; padding-inline: 0.35rem; }
    .soundscape-channel { grid-template-columns: minmax(5.4rem, auto) minmax(0, 1fr) 2.5rem; gap: 0.35rem; }
}

.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%, 56rem);
    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: 0;
    border-left: 2px solid var(--gold-dark);
    background: rgba(24, 20, 16, 0.52);
}

.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: rgba(24, 18, 12, 0.34);
}

.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.14rem;
    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;
    width: 100%;
    max-width: none;
    margin: 0 0 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 img.ost-zoomable-artwork {
    cursor: zoom-in !important;
}

.ost-piece img.ost-zoomable-artwork:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
    filter: brightness(0.9);
}

.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-audio.native-playback-required {
    display: block;
    width: 100%;
    height: 38px;
    margin: 0 0 6px;
    accent-color: var(--gold-dark);
}

#global-ambiance-player .native-audio-notice {
    margin: 0 0 5px;
    color: #b8a787;
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

#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(min(340px, 100%), 1fr));
    gap: 1.75rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    background: #090908;
    border: 1px solid #6b5a38;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow:
        inset 0 0 0 1px rgba(200, 175, 120, 0.14),
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 9px 20px var(--shadow-color);
}

.gallery-item:hover {
    transform: translateY(-3px);
    border-color: var(--gold-dark);
    filter: brightness(1.08);
    box-shadow:
        inset 0 0 0 1px rgba(200, 175, 120, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 14px 28px rgba(12, 7, 4, 0.72);
}

/* 宽屏（PC）上卡片外框调暗，避免在桌面大屏上显得太跳 */
@media (min-width: 1024px) {
    .gallery-item {
        border-color: rgba(107, 90, 56, 0.45);
        box-shadow:
            inset 0 0 0 1px rgba(200, 175, 120, 0.08),
            0 0 0 1px rgba(0, 0, 0, 0.35),
            0 9px 20px var(--shadow-color);
    }
    .gallery-item:hover {
        border-color: var(--gold-dark);
        filter: brightness(1.08);
        box-shadow:
            inset 0 0 0 1px rgba(200, 175, 120, 0.16),
            0 0 0 1px rgba(0, 0, 0, 0.4),
            0 14px 28px rgba(12, 7, 4, 0.68);
    }
}

.gallery-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

/* 管理员设置的封面显示模式 */
.gallery-thumb.is-contain {
    object-fit: contain;
    background: transparent;
}
.gallery-thumb.is-cover {
    object-fit: cover;
}
.gallery-thumb.is-portrait {
    object-fit: contain;
    background: transparent;
    padding: 0.25rem 0;
}

.gallery-item-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    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);
}

/* 氛围音列表沿用艺术图册的卡片尺度与文字层级 */
.ambiance-grid .ambiance-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    background: #090908;
    border: 1px solid #4f442f;
    border-radius: 2px;
    box-shadow:
        inset 0 0 0 1px rgba(200, 175, 120, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.45),
        0 9px 20px var(--shadow-color);
}

.ambiance-grid .ambiance-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-dark);
    box-shadow:
        inset 0 0 0 1px rgba(200, 175, 120, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.45),
        0 12px 26px rgba(0, 0, 0, 0.55);
}

.ambiance-grid .ambiance-card-image {
    display: flex;
    width: 100%;
    height: 250px;
    flex: 0 0 220px;
    object-fit: cover;
    filter: none;
}

.ambiance-grid .ambiance-card-content {
    display: flex;
    min-height: 136px;
    flex: 1;
    flex-direction: column;
    padding: 1.15rem 1.2rem 1.2rem;
    background: linear-gradient(180deg, rgba(21, 18, 14, .5), rgba(9, 9, 8, .94));
    border-top: 1px solid rgba(117, 97, 58, .2);
}

.ambiance-grid .ambiance-card-title {
    min-height: 2.7em;
    margin-bottom: .3rem;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1.18rem;
    font-weight: 400;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.ambiance-grid .ambiance-card-location {
    color: var(--gold-dark);
    font-size: .8rem;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
}

.ambiance-grid .ambiance-card-listeners {
    margin-top: auto !important;
    padding-top: .8rem;
    color: var(--gold) !important;
    font-size: .86rem !important;
    font-weight: 600;
}

.ambiance-grid .listener-stat,
.post-card-stats .reading-indicator,
.post-stats #reading-count,
.section-presence,
.gallery-presence,
.ambiance-detail-listeners {
    color: var(--gold-light);
    font-size: 0.86rem;
    font-weight: 600;
    text-shadow: 0 1px 8px rgba(197, 156, 67, 0.16);
}

.ambiance-grid .listener-stat::before,
.post-card-stats .reading-indicator::before,
.post-stats #reading-count::before,
.section-presence::before,
.gallery-presence::before,
.ambiance-detail-listeners::before {
    content: '';
    display: inline-block;
    flex: 0 0 auto;
    width: 0.42rem;
    height: 0.42rem;
    margin-right: 0.38rem;
    border-radius: 50%;
    background: var(--red-light);
    box-shadow: 0 0 7px rgba(191, 47, 37, 0.55);
}

.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-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    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-presence { display:inline-flex; align-items:center; gap:.35rem; margin-top:.65rem; padding:.28rem .58rem; color:#8d816b; background:rgba(7,7,6,.36); font:400 .82rem/1.2 var(--font-body); letter-spacing:.06em; }.gallery-presence[hidden] { display:none; }.gallery-presence b { color:var(--gold);font:inherit;letter-spacing:0; }
.section-presence { display:inline-flex; align-items:center; gap:.35rem; margin-top:.65rem; padding:.28rem .58rem; color:#8d816b; background:rgba(7,7,6,.36); font:400 .82rem/1.2 var(--font-body); letter-spacing:.06em; }
.section-presence[hidden] { display:none; }
.section-presence b { color:var(--gold); font:inherit; letter-spacing:0; }
.post-research-presence { margin: 0.45rem auto 0; }

.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: var(--font-kicker);
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    letter-spacing: 0.08em;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.gallery-card-link { position: relative; display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.gallery-card-hitbox { position: absolute; inset: 0; z-index: 1; }
.gallery-page .gallery-item-title,
.tag-gallery-section .gallery-item-title {
    min-height: 2.7em;
    color: var(--gold);
    font-family: var(--font-body);
    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: auto; padding-top: 0.8rem; color: var(--gold-dark); font-size: 0.85rem; }
.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.25fr) minmax(360px, 0.75fr); background: transparent; border: 2px solid var(--border-deep); box-shadow: inset 0 0 0 1px rgba(181,147,76,.12); }
.gallery-sequence-nav { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1rem; margin:1rem 0 2rem; overflow:visible; white-space:normal; }
.gallery-sequence-link { display:flex; min-width:0; min-height:64px; padding:.7rem 1rem; align-items:center; gap:.8rem; color:#8f826b; background:rgba(12,11,9,.72); border:1px solid rgba(117,97,58,.3); font-family:var(--font-body); font-weight:400; text-decoration:none; transition:color .18s ease,border-color .18s ease,background .18s ease; }
.gallery-sequence-link:hover { color:var(--gold-light); background:rgba(24,20,14,.86); border-color:var(--gold-dark); }
.gallery-sequence-link > span:not([aria-hidden]) { min-width:0; display:flex; flex-direction:column; }
.gallery-sequence-link small { color:#8f826b; font-family:var(--font-body); font-size:.86rem; font-weight:400; letter-spacing:.06em; line-height:1.4; }
.gallery-sequence-link b { overflow:hidden; color:inherit; font-family:var(--font-body); font-size:.86rem; font-weight:400; text-overflow:ellipsis; white-space:nowrap; }
.gallery-sequence-next { justify-content:flex-end; text-align:right; }
.gallery-sequence-link > span[aria-hidden] { flex:none; color:var(--gold-dark); font-size:1.25rem; }
.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-tag-panel { margin-bottom: 2rem; padding: 1.5rem; }
.admin-tag-panel h3 { margin: 0 0 0.35rem; color: var(--gold); font: 400 1.2rem var(--font-display); }
.admin-panel-note { margin: 0 0 1rem; color: var(--text-secondary); font-size: 0.88rem; }
.admin-inline-form { display: flex; gap: 0.8rem; margin-bottom: 1rem; }
.admin-inline-form .form-control { max-width: 420px; }
.admin-category-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-category-item { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.65rem; background: var(--bg-dark); border: 1px solid var(--border-color); }
.admin-category-name { color: var(--text-primary); font-size: 0.9rem; }
.admin-tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-tag-item { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.55rem; color: var(--text-primary); border: 1px solid var(--border-color); background: var(--bg-dark); }
.admin-tag-item a { color: var(--gold); text-decoration: none; }
.admin-tag-item small { color: var(--text-secondary); }
.admin-tag-item form { display: inline; }
.admin-tag-item button { padding: 0; color: var(--red-light); background: none; border: 0; cursor: pointer; }
.admin-rename-control { position: relative; }
.admin-rename-control > summary { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; color: #9f8b59; background: #11100e; border: 1px solid rgba(117, 97, 58, 0.55); list-style: none; cursor: pointer; }
.admin-rename-control > summary::-webkit-details-marker { display: none; }
.admin-rename-control > summary:hover { color: var(--gold-light); border-color: var(--gold-dark); }
.admin-rename-form,
.admin-tag-item .admin-rename-form { position: absolute; z-index: 35; top: calc(100% + 7px); left: 0; display: flex; width: min(320px, calc(100vw - 3rem)); padding: 0.75rem; gap: 0.5rem; align-items: end; background: #11100e; border: 1px solid #5d4c2d; box-shadow: 0 10px 24px rgba(0,0,0,.68); }
.admin-rename-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-rename-form input { min-width: 0; flex: 1; padding: 0.5rem 0.6rem; color: var(--text-primary); font: 400 0.86rem var(--font-ui); background: #090807; border: 1px solid var(--border-color); }
.admin-rename-form button,
.admin-tag-item .admin-rename-form button { flex: 0 0 auto; padding: 0.5rem 0.75rem; color: var(--gold-light); font: 400 0.8rem var(--font-ui); background: #211b13; border: 1px solid var(--gold-dark); cursor: pointer; }
.setting-state { display: inline-flex; align-items: center; min-height: 38px; color: #83796a; font-family: var(--font-ui); font-size: .82rem; }
.setting-state.is-enabled { color: #a89761; }
.gallery-card-tags { position: relative; z-index: 2; margin: .55rem 0 .85rem; gap: .45rem; }

.user-menu-dropdown a > span:last-child {
    white-space: nowrap;
    word-break: keep-all;
}
.gallery-detail-tags { margin: .35rem 0 .75rem; }
.tag-gallery-section { margin-top: 2.5rem; }
.admin-post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.admin-post-tags span {
    min-height: 28px;
    padding: 0.22rem 0.62rem;
    color: var(--tag-color, var(--gold));
    border-color: color-mix(in srgb, var(--tag-color, var(--gold)) 48%, #17130e);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    line-height: 1.35;
}

.editor-tag-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    padding: 1rem 1.25rem 1.15rem;
    background: rgba(8, 7, 6, 0.32);
    border: 1px solid rgba(126, 111, 78, 0.28);
    border-left: 3px solid rgba(126, 91, 35, 0.7);
    flex-shrink: 0;
}
.editor-tag-label { color: var(--gold); font: 500 0.86rem var(--font-ui); letter-spacing: 0.06em; }
.editor-tag-options { display: flex; flex-wrap: wrap; gap: 0.45rem; max-height: 132px; overflow-y: auto; padding-right: 0.35rem; scrollbar-color: #6d5730 #11100e; scrollbar-width: thin; }
.editor-tag-options label { cursor: pointer; }
.editor-tag-options input { position: absolute; opacity: 0; pointer-events: none; }
.editor-tag-options span { display: inline-flex; padding: 0.32rem 0.65rem; color: var(--text-secondary); font: 400 0.76rem var(--font-tag); border: 1px solid var(--border-color); background: var(--bg-dark); transition: color .16s ease, border-color .16s ease, background .16s ease; }
.editor-tag-options input:checked + span { color: var(--tag-color, var(--gold-light)); border-color: var(--tag-color, var(--gold-dark)); background: rgba(117, 80, 20, 0.18); box-shadow: inset 0 0 0 1px rgba(181, 143, 69, 0.12); }
.editor-new-tags { width: 100%; min-width: 0; padding: 0.62rem 0.75rem; color: var(--text-primary); font: 400 0.82rem var(--font-ui); border: 1px solid rgba(126, 111, 78, 0.38); background: #090908; }
.tag-preset-select { max-width: 130px !important; }
.tag-color-picker { position: relative; }
.tag-color-picker summary { display: grid; width: 34px; height: 30px; padding: 3px; place-items: center; list-style: none; background: #0a0908; border: 1px solid var(--border-color); cursor: pointer; }
.tag-color-picker summary::-webkit-details-marker { display: none; }
.tag-color-picker summary > span { display: block; width: 100%; height: 100%; }
.tag-color-popover { position: absolute; z-index: 30; top: calc(100% + 7px); right: 0; width: 210px; padding: .75rem; background: #11100e; border: 1px solid #5d4c2d; box-shadow: 0 10px 24px rgba(0,0,0,.65); }
.tag-color-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-bottom: .7rem; }
.admin-tag-item .tag-color-presets button { width: 36px; height: 28px; padding: 0; background: var(--swatch); border: 2px solid #080706; outline: 1px solid rgba(200,184,145,.28); cursor: pointer; }
.admin-tag-item .tag-color-presets button:hover { outline-color: #d0bd83; transform: translateY(-1px); }
.tag-color-popover label { display: flex; align-items: center; justify-content: space-between; gap: .7rem; color: #857a68; font: 400 .75rem var(--font-ui); }
.tag-color-popover input[type="color"] { width: 70px; height: 30px; padding: 2px; background: #090807; border: 1px solid var(--border-color); cursor: pointer; }

.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);
}

.admin-content-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; margin:0 0 1.6rem; overflow:visible; border:1px solid rgba(126,111,78,.3); background:rgba(7,7,6,.48); }
.admin-content-tabs a { position:relative; display:grid; gap:.12rem; min-width:0; margin:0; padding:.78rem 1rem .68rem; color:#8f846e; text-align:center; text-decoration:none; border-right:1px solid rgba(126,111,78,.25); }
.admin-content-tabs a:last-child { border-right:0; }
.admin-content-tabs a:hover,.admin-content-tabs a.active { color:var(--gold-light); background:rgba(130,92,24,.12); }
.admin-content-tabs a.active::after { right:1rem; bottom:-1px; left:1rem; width:auto; height:2px; background:var(--gold-dark); }
.admin-content-tabs span { font-family:var(--font-body); font-size:1rem; letter-spacing:.12em; }
.admin-content-tabs small { color:#75613b; font:400 .58rem var(--font-kicker); letter-spacing:.18em; }
.admin-page-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.admin-page-heading h2 { margin:.2rem 0 0; color:var(--gold); font-family:var(--font-body); font-size:1.55rem; font-weight:400; letter-spacing:.12em; }
.admin-page-kicker { color:#76613a; font:400 .62rem var(--font-kicker); letter-spacing:.22em; }
.admin-tool-links { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin:0 0 1.6rem; padding:.8rem 0; overflow:visible; white-space:normal; border-top:1px solid rgba(126,111,78,.18); border-bottom:1px solid rgba(126,111,78,.18); }
.admin-tool-links .btn { flex:0 0 auto; }

@media (max-width: 720px) {
    .admin-page-heading { align-items:flex-start; flex-direction:column; }
    .admin-content-tabs span { font-size:.9rem; }
    .admin-tool-links { flex-wrap:nowrap; overflow-x:auto; }
}

.analytics-panel { margin: 0 0 2.2rem; padding: 1.6rem; border: 1px solid rgba(174,137,58,.34); background: linear-gradient(145deg,rgba(23,20,16,.96),rgba(7,7,7,.94)); box-shadow: inset 0 1px rgba(220,188,111,.08); }
.analytics-heading { display:flex; justify-content:space-between; align-items:end; gap:1rem; padding-bottom:1rem; border-bottom:1px solid rgba(174,137,58,.25); }
.analytics-heading h3,.analytics-subsection h4,.analytics-list h4 { margin:.25rem 0 0; color:var(--gold); font-family:'Diablo2',serif; font-weight:400; }
.analytics-heading p,.analytics-list p,.analytics-empty { margin:0; color:var(--text-secondary); font-size:.82rem; }
.analytics-kicker { color:#78643a; font-size:.66rem; letter-spacing:.28em; }
.analytics-metric-group { margin-top: 1.15rem; }
.analytics-metric-group + .analytics-metric-group { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(174,137,58,.18); }
.analytics-metric-group > h4 { display:flex; align-items:baseline; gap:.75rem; margin:0 0 .7rem; color:var(--gold); font:400 .95rem var(--font-body); letter-spacing:.08em; }
.analytics-metric-group > h4 small { color:#706553; font:400 .6rem var(--font-ui); letter-spacing:.18em; }
.analytics-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.8rem; }
.metric-card { display:flex; flex-direction:column; min-height:116px; padding:1rem 1.1rem; border:1px solid rgba(174,137,58,.22); background:rgba(0,0,0,.28); }
.metric-card>span { color:#b8a787; font-size:.82rem; }
.metric-card>strong { margin:.3rem 0; color:#d6b45e; font-size:2rem; line-height:1; font-weight:400; }
.metric-card>small { color:#776f62; font-size:.72rem; }
.metric-card-button { width:100%; text-align:left; cursor:pointer; font-family:inherit; transition:border-color .18s ease,background-color .18s ease; }.metric-card-button:hover { border-color:rgba(201,169,97,.55); background:rgba(174,137,58,.09); }.metric-card-button:focus-visible { outline:1px solid var(--gold); outline-offset:2px; }
.analytics-people-panels { margin-top:1rem; }.analytics-people-panel { padding:1rem; border:1px solid rgba(174,137,58,.3); background:rgba(0,0,0,.3); }.analytics-people-panel[hidden] { display:none; }
.people-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.7rem; }.people-panel-heading h4 { margin:0;color:var(--gold);font-weight:400; }.people-panel-heading button { color:#897b62;background:none;border:0;cursor:pointer;font-family:var(--font-ui); }.people-panel-heading button:hover { color:var(--gold); }
.people-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; max-height:420px; overflow:auto; }.person-row { display:flex; align-items:center; gap:.75rem; padding:.65rem .75rem; background:rgba(17,15,12,.72); border:1px solid rgba(117,97,58,.2); }.person-row img,.visitor-avatar { width:40px;height:40px;flex:0 0 40px;object-fit:cover;border:1px solid #755f2f;background:#080706; }.visitor-avatar { display:grid;place-items:center;color:#a78948;font-size:.8rem; }.person-row div { min-width:0; }.person-row strong,.person-row small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.person-row strong { color:#c4b89f;font-size:.84rem;font-weight:400; }.person-row small { margin-top:.18rem;color:#776f62;font-size:.68rem; }
@media(max-width:700px){.people-list{grid-template-columns:1fr}}
.metric-live>strong { color:#bd9d4c; }
.metric-live>strong::before { content:''; display:inline-block; width:7px; height:7px; margin-right:.45rem; border-radius:50%; background:#9eaf57; box-shadow:0 0 8px #9eaf57; vertical-align:middle; }
.analytics-subsection { margin-top:1.25rem; }
.comment-module-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.65rem; margin-top:.7rem; }
.comment-module-grid>div { display:grid; grid-template-columns:1fr auto; gap:.12rem .6rem; padding:.75rem .9rem; border-left:2px solid #806828; background:rgba(0,0,0,.22); }
.comment-module-grid span { color:#b8a787; }.comment-module-grid strong { color:var(--gold); font-weight:400; }.comment-module-grid small { grid-column:1/-1;color:#746d61;font-size:.68rem; }
.analytics-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin-top:1.25rem; }
.analytics-list { padding:1rem; border:1px solid rgba(174,137,58,.2); background:rgba(0,0,0,.2); }
.analytics-list h4 { margin-bottom:.65rem; }
.analytics-list a { display:flex; justify-content:space-between; gap:1rem; padding:.48rem 0; color:#aaa08e; text-decoration:none; border-top:1px solid rgba(174,137,58,.12); font-size:.8rem; }
.analytics-list a:hover span { color:var(--gold); }.analytics-list b { flex:none;color:#8d7742;font-weight:400; }
.recent-comment-row { display:grid; grid-template-columns:76px 100px minmax(0,1fr) 84px; align-items:center; gap:.7rem; padding:.62rem .25rem; border-top:1px solid rgba(174,137,58,.14); color:#9e9688; text-decoration:none; font-size:.78rem; }
.recent-comment-row:hover { background:rgba(174,137,58,.05); }.module-tag { color:#b99a4d; }.recent-comment-row strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c1b59e;font-weight:400; }.comment-preview { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.recent-comment-row time { text-align:right;color:#70695e; }
.comment-origin { grid-column:2/-1; color:#675f52; font:400 .68rem/1.3 var(--font-ui); }
.support-click-ledger-heading { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; margin-bottom:.65rem; }
.support-click-ledger-heading small { color:#70695e; font-size:.72rem; }
.support-click-list { border-bottom:1px solid rgba(174,137,58,.14); }
.support-click-row { display:grid; grid-template-columns:64px minmax(220px,1.5fr) minmax(150px,.75fr) 150px; align-items:center; gap:.8rem; padding:.68rem .25rem; border-top:1px solid rgba(174,137,58,.14); color:#9e9688; font-size:.78rem; }
.support-click-row:hover { background:rgba(174,137,58,.05); }
.support-click-source { min-width:0; }
.support-click-source a { display:block; overflow:hidden; color:#c1b59e; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }
.support-click-source a:hover { color:var(--gold); }
.support-click-user { display:grid; min-width:0; gap:.08rem; }
.support-click-user strong { overflow:hidden; color:#b8aa91; font-weight:400; text-overflow:ellipsis; white-space:nowrap; }
.support-click-user small { color:#675f52; font:400 .66rem/1.25 var(--font-ui); }
.support-click-row time { color:#70695e; font:400 .72rem/1.3 var(--font-numeric); text-align:right; white-space:nowrap; }
@media(max-width:1050px){.analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.comment-module-grid{grid-template-columns:repeat(2,1fr)}.analytics-columns{grid-template-columns:1fr}.analytics-heading{align-items:start;flex-direction:column}.recent-comment-row{grid-template-columns:62px 80px minmax(0,1fr)}.recent-comment-row time{display:none}.support-click-row{grid-template-columns:58px minmax(0,1fr) 135px}.support-click-row time{display:none}}
@media(max-width:520px){.analytics-panel{padding:1rem}.analytics-grid{grid-template-columns:1fr}.comment-module-grid{grid-template-columns:1fr}.recent-comment-row{grid-template-columns:58px minmax(0,1fr)}.comment-preview{grid-column:1/-1}.recent-comment-row strong{display:none}.support-click-ledger-heading{align-items:flex-start;flex-direction:column}.support-click-row{grid-template-columns:54px minmax(0,1fr)}.support-click-user{grid-column:2}}
.gallery-detail-image-wrap { position: relative; display: flex; width: 100%; height: min(72vh, 720px); min-height: 480px; padding: 0; align-items: center; justify-content: center; background: transparent; border: 0; cursor: zoom-in; overflow: hidden; }
.gallery-detail-image { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-detail-image.is-cover { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.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.75rem, 3vw, 2.5rem); flex-direction: column; justify-content: flex-start; border-left: 1px solid var(--border-color); }
.gallery-detail-copy > .gallery-panel-kicker {
    font-family: var(--font-kicker);
    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: var(--font-body);
    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-description {
    max-width: 44ch;
    color: #c8bda9;
    font-size: 1.08rem;
    line-height: 1.75;
    letter-spacing: 0.012em;
    white-space: pre-line;
    overflow-wrap: break-word;
    hyphens: auto;
    text-wrap: pretty;
}
.gallery-detail-copy .gallery-detail-author {
    display: flex;
    margin: -0.5rem 0 1rem;
    align-items: baseline;
    gap: 0.65rem;
    color: var(--gold-light);
    font-family: var(--font-body);
    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: 132px; min-height: 48px; margin-top: 1.25rem; padding: .65rem 1rem; align-items: center; justify-content: center; gap: .5rem; color: var(--gold-dark); background: #12100d; border: 1px solid var(--border-color); font-family: var(--font-body); font-size: .95rem; line-height: 1; 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: zoom-in; transform-origin:center; transition:transform .12s ease-out; touch-action:none; user-select:none; }
.gallery-image-lightbox img.is-zoomed,
.post-image-lightbox img.is-zoomed { cursor:grab; }
.gallery-image-lightbox img.is-dragging,
.post-image-lightbox img.is-dragging { cursor:grabbing; transition:none; }
.gallery-image-lightbox > span,
.post-image-lightbox > span { color: var(--gold-dark); font-family: var(--font-body); 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; }
.post-lightbox-link { position: absolute; top: 1.25rem; right: 5.25rem; display: flex; align-items: center; gap: .45rem; padding: .5rem .85rem; color: var(--gold); background: #11100e; border: 1px solid var(--border-color); text-decoration: none; font-family: var(--font-body); font-size: .85rem; line-height: 1; cursor: pointer; transition: border-color 160ms ease, color 160ms ease; }
.post-lightbox-link[hidden] { display: none; }
.post-lightbox-link:hover { border-color: var(--gold); color: var(--gold-light); }
.post-lightbox-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-zoom-controls { position:absolute; z-index:2; left:50%; bottom:1.25rem; display:flex; align-items:center; gap:.35rem; padding:.35rem; color:var(--gold-light); background:rgba(17,16,14,.94); border:1px solid var(--border-color); box-shadow:0 8px 22px rgba(0,0,0,.6); transform:translateX(-50%); cursor:default; }
.lightbox-zoom-controls button { min-width:38px; height:36px; padding:0 .65rem; color:var(--gold); background:#16130f; border:1px solid rgba(117,97,58,.55); font-family:var(--font-body); font-size:1rem; cursor:pointer; }
.lightbox-zoom-controls button:hover { color:var(--gold-light); border-color:var(--gold); background:#211b12; }
.lightbox-zoom-value { min-width:58px; color:var(--text-primary); font:400 .78rem var(--font-numeric); text-align:center; }
.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-sequence-nav { gap:.5rem; }
    .gallery-sequence-link { min-height:54px; padding:.55rem .7rem; }
    .gallery-sequence-link b { max-width:32vw; }
    .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: fixed;
    top: 38vh;
    left: calc(50% + min(34vw, 688px) + 0.5rem);
    flex-shrink: 0;
    z-index: 100;
    margin-left: 0;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    width: 132px;
    min-width: 132px;
    min-height: 48px;
    height: auto;
    padding: .65rem 1rem;
    font-family: var(--font-body);
    font-size: .95rem;
    line-height: 1;
    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: 1px solid var(--border-color);
    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: #c4473e;
    text-shadow: 0 0 8px rgba(151, 35, 29, 0.32);
}

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

.like-label {
    color: currentColor;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: .06em;
    white-space: nowrap;
}

.like-btn { white-space: nowrap; }

.ambiance-sequence-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.25rem;
}

.ambiance-sequence-link {
    display: flex;
    min-width: 0;
    min-height: 62px;
    padding: .7rem 1rem;
    align-items: center;
    gap: .8rem;
    color: #94866c;
    background: #171717;
    border: 1px solid var(--border-deep);
    box-shadow: inset 0 0 0 1px var(--metal-highlight), 0 8px 18px rgba(0, 0, 0, .28);
    font-family: var(--font-body);
    text-decoration: none;
}

.ambiance-sequence-link:hover { color: var(--gold-light); border-color: var(--gold-dark); background: rgba(24, 20, 15, 0.9); }
.ambiance-sequence-link > span:not([aria-hidden]) { display: flex; min-width: 0; flex-direction: column; }
.ambiance-sequence-link small { color: var(--gold-dark); font-size: .76rem; letter-spacing: .08em; }
.ambiance-sequence-link b { overflow: hidden; font-size: .92rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.ambiance-sequence-next { justify-content: flex-end; text-align: right; }
.ambiance-sequence-link > span[aria-hidden] { flex: none; color: var(--gold-dark); font-size: 1.2rem; }

@media (max-width: 600px) {
    .ambiance-sequence-nav { gap: .5rem; }
    .ambiance-sequence-link { min-height: 56px; padding: .55rem .65rem; gap: .45rem; }
    .ambiance-sequence-link b { max-width: 30vw; font-size: .82rem; }
}

.like-count {
    min-width: 1ch;
    font-size: .9rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1;
}

.nickname-generator-row {
    position: relative;
}

.nickname-generator-row .form-control {
    padding-right: 3.25rem;
}

.nickname-random-button {
    position: absolute;
    top: 50%;
    right: .38rem;
    display: inline-flex;
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    background: rgba(8, 7, 6, .52);
    border: 0;
    border-left: 1px solid rgba(126, 111, 78, .32);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .18s ease, background-color .18s ease;
}

.nickname-random-button svg {
    width: 22px;
    height: 22px;
    overflow: visible;
    fill: currentColor;
}

.nickname-random-button svg path { fill: none; stroke: currentColor; stroke-width: 1.45; }

.nickname-random-button:hover {
    color: var(--gold-light);
    background-color: rgba(126, 111, 78, .14);
}

.nickname-random-button:focus-visible {
    outline: 1px solid var(--gold);
    outline-offset: 1px;
}

.nickname-random-button.is-rolling svg { animation: nickname-dice-roll .34s ease-out; }

@keyframes nickname-dice-roll {
    0% { transform: rotate(0deg) scale(1); }
    45% { transform: rotate(115deg) scale(.86); }
    100% { transform: rotate(180deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .nickname-random-button.is-rolling svg { animation: none; }
}

/* 卡片点赞数 */
.post-card-likes {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.card-like .like-icon-small {
    display: inline-block;
    color: var(--gold);
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
}

.post-card-likes.card-like.liked,
.post-card-likes.card-like.liked .like-icon-small,
.post-card-likes.card-like.liked .like-num,
.gallery-card-like.card-like.liked,
.gallery-card-like.card-like.liked .like-icon-small,
.gallery-card-like.card-like.liked .stat-value,
.card-like.liked .like-icon-small {
    color: #c4473e;
    text-shadow: 0 0 8px rgba(151, 35, 29, 0.32);
}

/* 留言互动与站内通知 */
.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.8rem;
    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 {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 0.85rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(121, 99, 58, 0.24);
}
.comment-reply:last-child { border-bottom: 0; }
.comment-reply-avatar {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 44px;
    height: 44px;
    object-fit: cover;
    background: var(--bg-dark);
    border: 1px solid var(--gold-dark);
}
.comment-reply-avatar-placeholder {
    display: grid;
    place-items: center;
    color: var(--bg-dark);
    background: var(--gold-dark);
    font-family: var(--font-ui);
    font-size: 0.82rem;
}
.comment-reply-head {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--gold-dark);
    font-size: 0.88rem;
}
.comment-reply-author { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; }
.comment-reply-author .admin-badge { margin-left: 0; }
.comment-reply p { grid-column: 2; margin: 0.4rem 0 0; color: var(--text-primary); font-size: 1.08rem; line-height: 1.72; }
.comment-reply .comment-interactions { grid-column: 2; margin-top: 0.2rem; }

.comment-reply-form {
    margin-top: 0.8rem;
    padding: 0.85rem;
    background: #0d0c0a;
    border: 1px solid var(--border-color);
    cursor: zoom-in;
}
.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; }
.section-subnav { display:flex; width:100%; margin:0 0 1.5rem; gap:.5rem; overflow-x:auto; white-space:nowrap; border-bottom:1px solid rgba(117,97,58,.32); }
.section-subnav a { flex:0 0 auto; padding:.72rem 1.1rem; color:#887b64; font-family:var(--font-body); font-size:.92rem; text-decoration:none; border:1px solid transparent; border-bottom:0; }
.section-subnav a:hover { color:var(--gold-light); background:rgba(117,97,58,.08); }
.section-subnav a.active { color:var(--gold-light); background:rgba(24,20,14,.9); border-color:rgba(117,97,58,.42); box-shadow:inset 0 2px 0 var(--gold-dark); }
.notification-tab-count { display:inline-grid; min-width:18px; height:18px; place-items:center; margin-left:.42rem; padding:0 .3rem; vertical-align:.08em; color:#f0d7ae; background:#9c2821; border:1px solid rgba(218,92,72,.48); border-radius:9px; box-shadow:0 0 7px rgba(201,51,42,.62); font-family:var(--font-ui); font-size:.68rem; line-height:1; }
.notification-tab-count[hidden] { display:none; }
.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-day-list { display: grid; gap: 1.35rem; }
.notification-day { min-width: 0; }
.notification-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0.25rem 0.55rem; }
.notification-day-heading h3 { margin: 0; color: var(--gold); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.12em; }
.notification-day-heading span { color: var(--text-secondary); font-family: var(--font-ui); font-size: 0.75rem; }
.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; }
.private-compose { margin-bottom:1.25rem; padding:clamp(1.25rem,3vw,2rem); }
.private-author-card { display:flex; align-items:center; gap:1.25rem; margin-bottom:1.25rem; }
.private-author-card img { flex:0 0 100px; width:100px; height:100px; object-fit:cover; border:1px solid #806a36; background:#080706; box-shadow:0 3px 12px rgba(0,0,0,.45); }
.private-author-card span { color:#7f6c43; font-size:.78rem; letter-spacing:.18em; }.private-author-card h2 { margin:.12rem 0;color:var(--gold);font-size:1.3rem;font-weight:400; }.private-author-card p { margin:0;color:var(--text-secondary);font-size:.9rem; }
.private-compose textarea,.private-message textarea { width:100%; padding:.9rem 1rem; resize:vertical; color:var(--text-primary); background:#0b0a08; border:1px solid rgba(154,129,76,.48); font:400 1rem/1.75 var(--font-body); }
.private-compose textarea:focus,.private-message textarea:focus { outline:1px solid var(--gold-dark); border-color:var(--gold-dark); }
.private-compose-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:.7rem; }.private-compose-actions small { color:#71695c; font-size:.82rem; }
.private-messages-board { margin-top:1.25rem; }.private-message-list { display:flex; flex-direction:column-reverse; gap:1.15rem; padding:.4rem 0; }
.private-message { display:flex; width:min(86%,860px); align-items:flex-start; gap:1rem; }.private-message.incoming { align-self:flex-start; }.private-message.outgoing { align-self:flex-end; flex-direction:row-reverse; }
.private-message-avatar { flex:0 0 100px; width:100px; height:100px; object-fit:cover; border:1px solid #745f2f; background:#080706; box-shadow:0 3px 12px rgba(0,0,0,.45); }
.private-message-body { min-width:0; max-width:calc(100% - 116px); }.private-message.outgoing .private-message-body { display:flex; flex-direction:column; align-items:flex-end; }
.private-message header { display:flex; align-items:center; gap:.7rem; margin:0 .25rem .35rem; color:#a58b4d; font-size:.86rem; }.private-message.outgoing header { flex-direction:row-reverse; }.private-message header strong { font-weight:400; }.private-message time { color:#746d61; font-size:.74rem; }
.private-message-bubble { position:relative; padding:.72rem 1rem; color:#c5baa5; background:#12100d; border:1px solid rgba(117,97,58,.42); box-shadow:0 3px 10px rgba(0,0,0,.2); }
.private-message.incoming .private-message-bubble { border-left:2px solid #94783b; }.private-message.outgoing .private-message-bubble { background:#211c12; border-right:2px solid #aa8942; }
.private-message-bubble::before { content:''; position:absolute; top:12px; width:8px; height:8px; background:inherit; transform:rotate(45deg); }.private-message.incoming .private-message-bubble::before { left:-5px; border-left:1px solid rgba(117,97,58,.42); border-bottom:1px solid rgba(117,97,58,.42); }.private-message.outgoing .private-message-bubble::before { right:-5px; border-right:1px solid rgba(117,97,58,.42); border-top:1px solid rgba(117,97,58,.42); }
.private-message p { margin:0; color:inherit; font-size:1rem; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.private-message details { width:100%; margin-top:.65rem; }.private-message summary { color:#9d854c; cursor:pointer;font-size:.88rem; }.private-message details form { display:grid; gap:.6rem; margin-top:.65rem; }.private-message details .btn { justify-self:end; }

.conversation-back { display:inline-flex; margin:0 0 1rem; color:var(--gold); font-family:var(--font-body); font-size:.92rem; text-decoration:none; }
.conversation-back:hover { color:var(--gold-light); }
.private-conversation-list { display:grid; gap:.7rem; }
.private-conversation { display:grid; grid-template-columns:100px minmax(0,1fr) auto; align-items:center; gap:1.25rem; min-height:126px; padding:.8rem 1rem; color:var(--text-primary); text-decoration:none; background:rgba(7,7,6,.42); border:1px solid rgba(117,97,58,.34); transition:background-color .18s ease,border-color .18s ease; }
.private-conversation:hover,.private-conversation.unread { background:rgba(41,32,19,.52); border-color:rgba(154,129,76,.62); }
.private-conversation img { width:100px; height:100px; object-fit:cover; background:#080706; border:1px solid #745f2f; box-shadow:0 3px 12px rgba(0,0,0,.4); }
.private-conversation-copy { display:grid; min-width:0; gap:.35rem; }
.private-conversation-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.private-conversation-heading strong { overflow:hidden; color:var(--gold-light); font-weight:400; text-overflow:ellipsis; white-space:nowrap; }
.private-conversation-heading time { flex:0 0 auto; color:#746d61; font-family:var(--font-ui); font-size:.78rem; }
.private-conversation-preview { overflow:hidden; color:var(--text-secondary); font-size:.92rem; text-overflow:ellipsis; white-space:nowrap; }
.private-conversation-meta { display:grid; justify-items:end; gap:.35rem; min-width:42px; color:var(--text-secondary); }
.private-conversation-meta b { display:grid; min-width:22px; height:22px; place-items:center; padding:0 .35rem; color:#e5d3a2; background:#79221b; font-family:var(--font-ui); font-size:.75rem; font-weight:400; border-radius:50%; }
.private-conversation-meta small { white-space:nowrap; font-size:.75rem; }
@media(max-width:600px){.private-author-card{align-items:flex-start;gap:.8rem}.private-author-card img{width:72px;height:72px;flex-basis:72px}.private-message{width:100%;gap:.7rem}.private-message-avatar{width:72px;height:72px;flex-basis:72px}.private-message-body{max-width:calc(100% - 82px)}.private-message header{align-items:flex-start;flex-direction:column;gap:.08rem}.private-message.outgoing header{align-items:flex-end;flex-direction:column}.private-message-bubble{padding:.65rem .8rem}}

@media (max-width: 600px) {
    .private-message,
    .private-message.outgoing {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-rows: auto auto;
        width: 100%;
        gap: .55rem .7rem;
    }

    .private-message.outgoing {
        grid-template-columns: minmax(0, 1fr) 72px;
    }

    .private-message.incoming .private-message-avatar { grid-column: 1; grid-row: 1; }
    .private-message.outgoing .private-message-avatar { grid-column: 2; grid-row: 1; }

    .private-message-body,
    .private-message.outgoing .private-message-body {
        display: contents;
        max-width: none;
    }

    .private-message header {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin: 0;
    }

    .private-message.outgoing header {
        grid-column: 1;
        align-items: flex-end;
        text-align: right;
    }

    .private-message-bubble {
        grid-column: 1 / -1;
        grid-row: 2;
        width: min(88%, 520px);
        padding: .75rem .85rem;
    }

    .private-message.incoming .private-message-bubble { justify-self: start; }
    .private-message.outgoing .private-message-bubble { justify-self: end; }

    .private-message-bubble::before { display: none; }
    .private-message-body > details { grid-column: 1 / -1; }
}
@media(max-width:600px){.private-conversation{grid-template-columns:72px minmax(0,1fr) auto;min-height:96px;gap:.8rem;padding:.7rem}.private-conversation img{width:72px;height:72px}.private-conversation-heading time{display:none}}

.about-heading-row {
    display: flex;
    width: min(100%, 68rem);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3.5rem);
    text-align: left;
}
.about-heading-row .post-detail-title { margin-bottom: 0; }
.guestbook-page > .about-content {
    width: min(100%, 68rem);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3.5rem);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.14rem;
    line-height: 1.92;
    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.17rem;
    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 var(--font-kicker); 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-mode { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.about-mode-button { padding: 0.48rem 0.85rem; color: var(--text-secondary); background: #11100e; border: 1px solid var(--border-color); cursor: pointer; }
.about-mode-button.is-active { color: var(--gold); border-color: var(--gold-dark); background: rgba(154, 129, 76, 0.12); }
.about-visual-editor {
    width: 100%;
    min-height: 460px;
    max-height: 62vh;
    overflow: auto;
    padding: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-primary);
    background: #151310;
    border: 1px solid var(--border-color);
    font: 400 1rem/1.85 var(--font-body);
}
.about-visual-editor:focus { outline: 1px solid var(--gold-dark); outline-offset: 2px; }
.about-visual-editor[hidden], .about-editor textarea[hidden] { display: none !important; }
.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;
    }

    .online-roster {
        position: fixed;
        z-index: 5000;
        top: 5.25rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 6.25rem);
        padding: 1rem;
        border-color: #8b7040;
        background: #060504 !important;
        box-shadow: inset 0 0 0 2px #020201, 0 22px 52px #000;
        opacity: 1 !important;
        isolation: isolate;
        text-align: left;
    }

    .online-roster-list {
        max-height: calc(100dvh - 11rem);
    }

    .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;
    }

    body .ambiance-detail-container {
        padding-right: 0;
        padding-left: 0;
    }

    .ambiance-detail-container .ambiance-detail-player {
        padding-right: 0.625rem;
        padding-left: 0.625rem;
        border-width: 1px;
    }

    .about-page {
        padding-right: 0.4rem;
        padding-left: 0.4rem;
    }

    .about-page .about-heading-row,
    .about-page > .about-content {
        padding-right: 0;
        padding-left: 0;
    }

    .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;
    }

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

    .ambiance-grid .ambiance-card-image {
        height: auto;
        flex-basis: 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-number {
        top: .75rem;
        right: .75rem;
        left: auto;
        width: auto;
    }

    .guestbook-pagination-controls {
        align-items: center;
        flex-direction: column;
    }

    .guestbook-page-jump { flex-wrap: wrap; }

    .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: fixed;
        top: 62%;
        left: auto;
        right: 0;
        width: auto;
        margin: 0;
        z-index: 350;
        transform: translateY(-50%);
    }

    .comment-replies { margin-left: 0.25rem; padding-left: 0.75rem; }
    .comment-reply { grid-template-columns: 38px minmax(0, 1fr); column-gap: 0.65rem; }
    .comment-reply-avatar { width: 38px; height: 38px; }
    .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: 82px;
        min-width: 82px;
        height: 46px;
        padding: 0 .55rem;
        border-right: 0;
        background: rgba(10, 9, 8, 0.94);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.72);
    }

    .like-fab .like-label {
        display: none;
    }

    .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%;
    }
}

.global-ambiance-player.is-loading .ambiance-progress {
    cursor: wait;
    opacity: 0.48;
}

.global-ambiance-player.is-loading .ambiance-play-btn {
    opacity: 0.72;
}

@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);
    }
}

/* Mobile reading width: keep the metal frame, but give the text more of the screen. */
@media (max-width: 768px) {
    .container {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .posts-grid,
    .post-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .post-card {
        border-width: 2px;
        border-image-width: 3px;
        border-image-outset: 1px;
    }

    .post-card > .post-image-link,
    .post-card > .post-content-preview,
    .post-title,
    .post-meta,
    .post-card-stats,
    .post-excerpt-link,
    .post-excerpt {
        min-width: 0;
        max-width: 100%;
    }

    .post-title {
        flex-wrap: wrap;
        overflow-wrap: anywhere;
    }

    .post-excerpt,
    .post-excerpt * {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .post-detail,
    .profile-container,
    .site-comment-form,
    .gallery-upload-panel,
    .gallery-edit-panel,
    .notifications-board {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .post-detail,
    .post-article,
    .gallery-detail-hero {
        border-width: 1px;
    }

    .post-article {
        outline-offset: -2px;
    }

    .post-article .post-detail-content {
        padding-right: 0.45rem;
        padding-left: 0.45rem;
    }

    .post-detail-image,
    .post-detail-image.is-contain {
        width: min(100%, 460px);
        max-height: min(50vh, 380px);
    }

    .gallery-detail-copy {
        padding-right: 0.8rem;
        padding-left: 0.8rem;
    }

    .guestbook-entry {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .post-excerpt {
        display: block;
        max-height: 9.4rem;
        overflow: hidden;
        -webkit-line-clamp: unset;
    }
}

@media (max-width: 420px) {
    .container {
        padding-right: 0.375rem;
        padding-left: 0.375rem;
    }

    .post-detail,
    .profile-container,
    .site-comment-form,
    .gallery-upload-panel,
    .gallery-edit-panel,
    .notifications-board {
        padding-right: 0.625rem;
        padding-left: 0.625rem;
    }
}

/* 稳定图片加载区域：暗色石板占位，资源完成后平滑显现。 */
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%, 56rem);
    margin-inline: auto;
    font-size: 1.16rem;
    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 h1,
.post-article .post-detail-content h2,
.post-article .post-detail-content h3,
.post-article .post-detail-content h4 {
    line-height: 1.45;
    text-wrap: balance;
}

.post-article .post-detail-content h1 {
    margin: 2.7em 0 1em;
    padding: 0 0 0.55em;
    color: #d9bd78;
    font: 400 clamp(1.75rem, 2.65vw, 2.12rem)/1.35 var(--font-display);
    letter-spacing: 0.065em;
    border-bottom: 1px solid rgba(151, 43, 34, 0.72);
    text-shadow: 0 0 16px rgba(181, 134, 47, 0.14);
}

.post-article .post-detail-content h2 {
    margin: 2.25em 0 0.9em;
    padding: 0 0 0.48em;
    color: #e1c177;
    font: 400 clamp(1.45rem, 2.1vw, 1.72rem)/1.42 var(--font-display);
    letter-spacing: 0.055em;
    border-bottom: 1px solid rgba(156, 123, 59, 0.46);
    text-shadow: 0 0 14px rgba(181, 134, 47, 0.12);
}

.post-article .post-detail-content h3 {
    position: relative;
    margin: 1.85em 0 0.72em;
    padding-left: 1.05em;
    color: #d0b476;
    font: 500 clamp(1.17rem, 1.65vw, 1.32rem)/1.5 var(--font-body);
    letter-spacing: 0.035em;
}

.post-article .post-detail-content h3::before {
    content: '';
    position: absolute;
    top: 0.58em;
    left: 0.1em;
    width: 0.38em;
    height: 0.38em;
    background: #9c7435;
    border: 1px solid #c7a358;
    transform: rotate(45deg);
    box-shadow: 0 0 6px rgba(189, 142, 54, 0.28);
}

.post-article .post-detail-content h4 {
    margin: 1.55em 0 0.58em;
    color: #c3b38f;
    font: 600 1.08rem/1.55 var(--font-body);
    letter-spacing: 0.025em;
}

.post-article .post-detail-content p,
.post-article .post-detail-content li {
    color: #c4baa7;
}

.post-article .post-detail-content strong,
.post-article .post-detail-content b {
    color: #84b7ff;
}

@media (max-width: 700px) {
    .post-article .post-detail-content h1 {
        font-size: 1.55rem;
        letter-spacing: 0.045em;
    }

    .post-article .post-detail-content h2 {
        font-size: 1.36rem;
        letter-spacing: 0.035em;
    }

    .post-article .post-detail-content h3 {
        font-size: 1.14rem;
    }

    .post-article .post-detail-content h4 {
        font-size: 1.02rem;
    }
}

.post-article .post-detail-content blockquote {
    margin-inline: 0;
    padding: 0.85rem 1.1rem;
    border-left: 2px solid rgba(255, 115, 83, 0.78);
}

@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;
    }

    /* Keep every primary navigation destination reachable while making the
       horizontal continuation obvious on narrow screens. */
    .site-header .header-right {
        position: relative;
    }

    .site-header nav {
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
    }

    .site-header nav::after {
        position: sticky;
        right: 0;
        display: grid;
        width: 28px;
        min-width: 28px;
        height: 44px;
        place-items: center;
        content: '›';
        color: var(--gold-light);
        background: linear-gradient(90deg, transparent, #15120f 55%);
        font-size: 1.35rem;
        pointer-events: none;
    }

    .site-header nav .nav-link {
        scroll-snap-align: start;
    }

    .archive-category-nav {
        position: relative;
        padding-right: 2rem;
        scrollbar-width: thin;
        scrollbar-color: rgba(161, 133, 73, .65) transparent;
        mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 1.75rem), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 1.75rem), transparent 100%);
    }

    .archive-category-nav nav {
        scroll-snap-type: x proximity;
    }

    .archive-category-nav nav::after {
        position: sticky;
        right: 0;
        display: grid;
        width: 28px;
        min-width: 28px;
        height: 44px;
        place-items: center;
        content: '›';
        color: var(--gold-light);
        background: linear-gradient(90deg, transparent, #100e0b 58%);
        font-size: 1.35rem;
        pointer-events: none;
    }

    .archive-category-nav a {
        min-height: 44px;
        scroll-snap-align: start;
    }

    .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: 44px;
        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 {
        display: none;
    }

    #global-ambiance-player #ambiance-listener-count {
        display: block;
        margin-top: 0.18rem !important;
        color: var(--gold-light) !important;
        font-size: 0.8rem !important;
        line-height: 1.25;
        white-space: nowrap;
    }

    #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;
    }

    /* The collapsed fixed player must not cover the final action or footer. */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    .comment-compose-toggle,
    .comment-compose-slot .comment-compose-toggle,
    .post-excerpt-link,
    .post-title {
        min-height: 44px;
    }

    .post-title {
        display: flex;
        align-items: center;
    }

    .comment-compose-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Keep formatted previews compact without flattening their paragraph/list structure. */
    .post-excerpt {
        display: block;
        max-height: 9.4rem;
        overflow: hidden;
        -webkit-line-clamp: unset;
    }
}

@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;
    }

    /* 留言在手机上改为“紧凑作者栏 + 全宽正文”，避免头像列挤窄长文本。 */
    .guestbook-entry,
    .unified-comment-entry,
    .ambiance-comment-item.unified-comment-entry {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 0.9rem !important;
    }

    .guestbook-entry-header,
    .unified-comment-entry .guestbook-entry-header {
        grid-template-columns: 52px minmax(0, 1fr) !important;
        column-gap: 0.7rem !important;
        row-gap: 0.12rem;
        margin-bottom: 0.8rem !important;
    }

    .guestbook-avatar {
        width: 52px !important;
        height: 52px !important;
        grid-row: 1 / span 2;
    }

    .guestbook-author-name {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 1.02rem;
        line-height: 1.35;
        flex-wrap: wrap;
        overflow: hidden;
        overflow-wrap: anywhere;
    }

    .guestbook-time {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        margin-top: 0;
        font-size: 0.72rem;
    }

    .guestbook-entry > .guestbook-content,
    .guestbook-entry > .guestbook-image,
    .guestbook-entry > .guestbook-actions,
    .guestbook-entry > .comment-interactions,
    .guestbook-entry > .comment-replies,
    .guestbook-entry > .comment-reply-form,
    .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: 1 / -1 !important;
    }

    .guestbook-content,
    .unified-comment-entry > .guestbook-content {
        font-size: 1.12rem;
        line-height: 1.75 !important;
    }

    .comment-interactions {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .comment-replies {
        margin-left: 0;
        padding-left: 0.65rem;
    }

    .comment-reply {
        grid-template-columns: 34px minmax(0, 1fr);
        column-gap: 0.55rem;
    }

    .comment-reply-avatar {
        width: 34px;
        height: 34px;
    }

    .comment-reply p {
        margin-top: 0.25rem;
        font-size: 1.08rem;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    .guestbook-entry,
    .unified-comment-entry,
    .ambiance-comment-item.unified-comment-entry {
        padding: 0.72rem !important;
    }

    .guestbook-entry-header,
    .unified-comment-entry .guestbook-entry-header {
        grid-template-columns: 46px minmax(0, 1fr) !important;
        column-gap: 0.6rem !important;
    }

    .guestbook-avatar {
        width: 46px !important;
        height: 46px !important;
    }

    .comment-replies {
        padding-left: 0.5rem;
    }
}

/* 最终级联保险：各页面旧样式不得覆盖统一按钮素材。 */
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;
}

/* 登录主按钮保留完整石质纹理，并限制宽度，避免素材被拉满整栏。 */
body button.login-submit {
    display: block;
    box-sizing: border-box;
    width: min(100%, 240px);
    min-height: 54px;
    margin: .65rem auto 0;
    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-image: none !important;
    image-rendering: auto;
}

/* 登录与注册：暗黑 II BIGMENU/gamebuttonblank.dc6 原生中长按钮。 */
body button.game-menu-button {
    width: min(100%, 258px);
    height: 48px;
    min-height: 48px;
    padding: 0.4rem 1rem;
    background-image: url('/static/img/auth-button-medium-act1.png') !important;
    background-size: 100% 100% !important;
    image-rendering: pixelated;
}

body button.game-menu-button:hover,
body button.game-menu-button:focus-visible {
    background-image: url('/static/img/auth-button-medium-act1.png') !important;
}

body button.game-menu-button:active {
    background-image: url('/static/img/auth-button-medium-act1-hover.png') !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; }
.post-detail-wrapper > .post-preview-notice {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    text-align: center;
}

.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;
}

@media (max-width: 760px) {
    .editor-tag-row {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        padding: 10px 18px 12px;
    }
    .editor-tag-label { padding-top: 0; }
    .editor-tag-options { max-height: 92px; }
    .admin-inline-form { align-items: stretch; flex-direction: column; }
    .admin-inline-form .form-control { max-width: none; }
    .post-detail-tags { justify-content: flex-start; }
}

: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; }
}
:root { --category-archive-control-bg: rgba(19, 16, 13, 0.92); }

.category-sort a,
.archive-pagination a,
.archive-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 1rem;
    color: var(--text-secondary);
    background: var(--category-archive-control-bg);
    border: 1px solid var(--border-color);
    text-decoration: none;
}
.category-sort a:hover,
.category-sort a.active,
.archive-pagination a:hover,
.archive-pagination .current { color: var(--gold-light); border-color: var(--gold-dark); background: rgba(105, 72, 30, 0.22); }
.category-archive-hero { margin: 1rem 0 2rem; padding-left: clamp(1rem, 3vw, 2rem); border-left: 2px solid var(--gold-dark); }
.category-archive-hero h1 { margin: 0.35rem 0; color: var(--gold); font: 400 clamp(2rem, 5vw, 3.8rem)/1.2 var(--font-display); }
.category-archive-hero > p:last-child { color: var(--text-secondary); }
.category-back { display: inline-block; margin-bottom: 1.25rem; color: var(--gold); text-decoration: none; }
.category-sort { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1.5rem; }
.category-sort a,
.archive-pagination a,
.archive-pagination span { font-family: var(--font-body); font-size: 1rem; font-weight: 400; letter-spacing: 0.04em; }
.category-archive-grid { margin-top: 0; }
.archive-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; margin: 2rem 0; }
.archive-pagination .current { min-width: 42px; }
.archive-pagination .disabled { opacity: 0.38; cursor: not-allowed; }
.archive-pagination .ellipsis { min-width: 34px; padding-inline: 0.4rem; border-color: transparent; background: transparent; }

/* Final mobile override: the generic post panel must not widen the About page again. */
@media (max-width: 768px) {
    body .post-detail.about-page {
        padding-right: 0.3rem;
        padding-left: 0.3rem;
    }

    body .post-detail.guestbook-page {
        padding-right: 0.3rem;
        padding-left: 0.3rem;
    }

    .guestbook-page .about-heading-row,
    .guestbook-page > .about-content {
        padding-right: 0;
        padding-left: 0;
    }
}

/* 图册列表和详情页允许透明图片露出石材底纹；文章内嵌图仍保留黑底。 */
.gallery-detail-hero,
.gallery-detail-image-wrap {
    background: transparent !important;
}

.post-detail-content figure.gallery-inline-ref {
    background: #000 !important;
}

.gallery-detail-hero,
.post-detail-content figure.gallery-inline-ref {
    background-image: none !important;
}
.gallery-detail-page .gallery-detail-copy {
    background-image: none !important;
}
.gallery-detail-image-wrap .gallery-detail-image {
    background: transparent !important;
}

/* 图册引用可能是透明 GIF；加载占位纹理不能残留在透明像素后方。 */
.post-detail-content figure.gallery-inline-ref img.lazy-media {
    background: transparent !important;
}

/* Quill 用 <p><br></p> 表示一个空行；正文中也按单行高度显示，
   不再叠加普通段落的下外边距。兼容旧内容中的真正空 <p>。 */
.post-article .post-detail-content p:empty,
.post-article .post-detail-content p:has(> br:only-child) {
    min-height: 1.9em;
    margin-block: 0;
}

/* 编辑器中的显式空行负责段落间隔：清除空行两侧自动排版边距，
   避免“段落下边距 + 空行 + 标题上边距”被重复累计。 */
.post-article .post-detail-content > *:has(+ p:empty),
.post-article .post-detail-content > *:has(+ p > br:only-child) {
    margin-bottom: 0;
}

.post-article .post-detail-content > p:empty + *,
.post-article .post-detail-content > p:has(> br:only-child) + * {
    margin-top: 0;
}

/* 本地石墙主题预览：内容卡片从近黑提升为深石板灰褐。 */
.post-card,
.gallery-item,
.ambiance-grid .ambiance-card,
.guestbook-entry,
.unified-comment-entry,
.project-current-work,
.project-progress-panel,
.project-progress-pending,
.project-subscription,
.post-detail.about-page,
.post-detail.guestbook-page,
.notifications-board,
.private-compose {
    background: rgba(0, 0, 0, 0.58);
}

.post-card:hover {
    filter: brightness(1.035);
    box-shadow:
        inset 0 0 26px rgba(68, 57, 40, 0.16),
        0 13px 28px rgba(7, 6, 5, 0.5);
}

.post-content-preview,
.gallery-item-info,
.ambiance-grid .ambiance-card-content {
    background: transparent;
}

/* 昼夜切换：两套主题共用石材底纹，黑夜以透明黑表面保留纹理层次。 */
html[data-theme='day'] {
    --gold: #735726;
    --gold-light: #8b692e;
    --gold-dark: #57451f;
    --text-primary: #2e2c27;
    --text-secondary: #625e55;
    --border-color: #8f846e;
    --border-deep: #5f5748;
    --shadow-color: rgba(52, 47, 39, 0.34);
}

html[data-theme='day'] :is(
    .post-card,
    .gallery-item,
    .ambiance-grid .ambiance-card,
    .guestbook-entry,
    .unified-comment-entry,
    .project-current-work,
    .project-progress-panel,
    .project-progress-pending,
    .project-subscription,
    .post-detail.about-page,
    .post-detail.guestbook-page,
    .notifications-board,
    .private-compose,
    .archive-category-nav
) {
    --gold: #c5a35f;
    --gold-light: #dfcb99;
    --gold-dark: #9a824f;
    --text-primary: #d8d0c1;
    --text-secondary: #aca291;
    --border-color: #5f5542;
}

.theme-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin-left: 0.35rem;
    padding: 0;
    border: 1px solid rgba(137, 113, 67, 0.58);
    border-radius: 50%;
    color: var(--gold-light);
    background: rgba(13, 12, 10, 0.42);
    box-shadow: inset 0 0 0 1px rgba(213, 192, 142, 0.05);
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--gold-dark);
    background: rgba(44, 39, 30, 0.72);
}

.theme-toggle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 1px solid #d6c28e;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset -5px -2px 0 #d6c28e;
}

html[data-theme='night'] .theme-toggle-icon {
    border: 0;
    background: #d6c28e;
    box-shadow: 0 0 8px rgba(214, 194, 142, 0.48);
}

html[data-theme='night'] {
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --bg-light: #2a2a2a;
    --surface-stone: #201c17;
    --surface-inset: #15120f;
}

html[data-theme='night'] body {
    background-color: #1a1a19;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(126, 101, 55, 0.09), transparent 48%),
        linear-gradient(rgba(4, 4, 4, 0.52), rgba(8, 7, 6, 0.62)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, auto, 760px 760px;
    background-repeat: no-repeat, no-repeat, repeat;
    background-blend-mode: screen, multiply, luminosity;
    background-attachment: scroll, scroll, fixed;
}

html[data-theme='night'] .site-header {
    background-color: #242320;
    background-image:
        linear-gradient(180deg, rgba(11, 10, 8, 0.62), rgba(4, 4, 3, 0.74)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, 620px 620px;
    background-repeat: no-repeat, repeat;
    background-blend-mode: multiply, luminosity;
    border-bottom-color: #070605;
    box-shadow:
        inset 0 1px 0 rgba(208, 190, 151, 0.06),
        inset 0 -1px 0 rgba(126, 105, 62, 0.38),
        inset 0 -10px 24px rgba(0, 0, 0, 0.16),
        0 8px 24px rgba(7, 4, 2, 0.62);
}

html[data-theme='night'] .archive-category-nav {
    background: rgba(5, 5, 4, 0.64);
}

html[data-theme='night'] .post-card,
html[data-theme='night'] .gallery-item,
html[data-theme='night'] .ambiance-grid .ambiance-card,
html[data-theme='night'] .post-detail,
html[data-theme='night'] .guestbook-entry,
html[data-theme='night'] .unified-comment-entry,
html[data-theme='night'] .project-current-work,
html[data-theme='night'] .project-progress-panel,
html[data-theme='night'] .project-progress-pending,
html[data-theme='night'] .project-subscription,
html[data-theme='night'] .post-detail.about-page,
html[data-theme='night'] .post-detail.guestbook-page,
html[data-theme='night'] .notifications-board,
html[data-theme='night'] .private-compose {
    background: rgba(0, 0, 0, 0.58);
}

html[data-theme='night'] .post-article {
    background: rgba(0, 0, 0, 0.5);
}

html[data-theme='night'] .post-toc {
    background: rgba(0, 0, 0, 0.5);
}

/* 黑夜主题统一透明层级：页面面板 < 内容卡片 < 表单控件。 */
html[data-theme='night'] :is(
    .login-box,
    .profile-container,
    .post-detail,
    .project-progress-panel,
    .ost-archive,
    .gallery-detail-page,
    .ambiance-detail-container .ambiance-detail-player,
    .notifications-board,
    .admin-page-stone,
    .about-editor
) {
    background: rgba(0, 0, 0, 0.5);
}

html[data-theme='night'] :is(
    .post-card,
    .gallery-item,
    .ambiance-grid .ambiance-card,
    .guestbook-entry,
    .unified-comment-entry,
    .project-current-work,
    .project-progress-pending,
    .project-subscription,
    .admin-category-panel,
    .gallery-upload-panel,
    .private-compose,
    .private-conversation,
    .table
) {
    background: rgba(0, 0, 0, 0.58) !important;
}

html[data-theme='night'] :is(
    .site-comment-form,
    .post-article .site-comment-form,
    .guestbook-page .site-comment-form,
    .comment-board > .site-comment-form
) {
    background: rgba(0, 0, 0, 0.66);
}

html[data-theme='night'] :is(
    .post-content-preview,
    .gallery-item-info,
    .ambiance-grid .ambiance-card-content
) {
    background: transparent;
}

/* 嵌套在透明大面板中的子卡片要更轻，避免透明度叠加后重新变成实黑。 */
html[data-theme='night'] .project-progress-panel :is(
    .project-current-work,
    .project-progress-pending,
    .project-subscription
),
html[data-theme='night'] .guestbook-page :is(
    .guestbook-entry,
    .unified-comment-entry
) {
    background: rgba(0, 0, 0, 0.36) !important;
}

html[data-theme='night'] .post-detail.guestbook-page {
    background: rgba(0, 0, 0, 0.22) !important;
}

html[data-theme='night'] .guestbook-page :is(
    .guestbook-entry,
    .unified-comment-entry,
    .comment-replies
) {
    background: rgba(0, 0, 0, 0.12) !important;
}

/* 文章、图片、氛围音和留言簿共用同一套留言透明度。 */
html[data-theme='night'] :is(
    .comment-entry.guestbook-entry,
    .unified-comment-entry,
    .ambiance-comment-item.unified-comment-entry
) {
    background: rgba(0, 0, 0, 0.12) !important;
    background-image: none !important;
}

html[data-theme='night'] :is(
    .comment-replies,
    .comment-reply
) {
    background: transparent !important;
}

/* 私信列表和会话同样避免父子面板叠黑。 */
html[data-theme='night'] .notifications-board {
    background: rgba(0, 0, 0, 0.24) !important;
}

html[data-theme='night'] :is(
    .private-conversation,
    .private-compose,
    .private-message-bubble
) {
    background: rgba(0, 0, 0, 0.12) !important;
}

html[data-theme='night'] .private-message.outgoing .private-message-bubble {
    background: rgba(74, 56, 25, 0.18) !important;
}

html[data-theme='night'] .post-detail-content .creator-card,
html[data-theme='night'] .post-detail-content .creator-card:visited {
    background: rgba(0, 0, 0, 0.12);
}

html[data-theme='night'] .post-detail-content .creator-card:hover {
    background: rgba(65, 35, 24, 0.18);
}

/* 头像选择弹窗：保持可读性，同时让后方石材页面轻微可感知。 */
html[data-theme='night'] .avatar-modal-overlay {
    background: rgba(0, 0, 0, 0.32) !important;
    backdrop-filter: blur(6px) brightness(0.72);
}

html[data-theme='night'] .avatar-modal {
    background: rgba(0, 0, 0, 0.74) !important;
}

html[data-theme='night'] .avatar-category-tab {
    background: rgba(0, 0, 0, 0.16) !important;
}

html[data-theme='night'] .avatar-category-tab:is(:hover, .active) {
    background: rgba(82, 61, 25, 0.2) !important;
}

html[data-theme='night'] .ambiance-sequence-link {
    background: rgba(0, 0, 0, 0.5);
}

html[data-theme='night'] .ambiance-sequence-link:hover {
    background: rgba(24, 20, 15, 0.9);
}

/* 手机端：收起时只显示右下角圆形氛围音浮球，展开后恢复完整控制面板。 */
@media (max-width: 768px) {
    .global-ambiance-player:not(.is-open) {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        left: auto;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 50%;
        background: transparent !important;
        box-shadow: none;
        overflow: visible;
    }

    .global-ambiance-player:not(.is-open) .ambiance-player-toggle {
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        justify-content: center;
        gap: 0;
        border-radius: 50%;
        background: transparent !important;
    }

    .global-ambiance-player:not(.is-open) :is(#ambiance-status, #ambiance-listeners) {
        display: none !important;
    }

    .global-ambiance-player:not(.is-open) #ambiance-icon {
        display: block;
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
        background: var(--gold-dark) !important;
        border: 0;
        border-radius: 50%;
        box-shadow: 0 0 0 2px rgba(117, 97, 58, 0.2);
    }

    .global-ambiance-player:not(.is-open) #ambiance-icon::before {
        content: none;
    }

    .global-ambiance-player.is-playing:not(.is-open) {
        border: 0;
        box-shadow: none;
    }

    .global-ambiance-player.is-playing:not(.is-open) #ambiance-icon {
        background: #b32620 !important;
        animation: ambiance-dot-breathe 1.8s ease-in-out infinite;
    }

    .global-ambiance-player.is-open {
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
        width: auto;
        height: auto;
        border-radius: 2px;
    }

    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

@keyframes ambiance-dot-breathe {
    0%, 100% { box-shadow: 0 0 0 2px rgba(179, 38, 32, 0.2), 0 0 4px rgba(179, 38, 32, 0.42); transform: scale(0.9); }
    50% { box-shadow: 0 0 0 4px rgba(179, 38, 32, 0.12), 0 0 11px rgba(211, 56, 45, 0.86); transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .global-ambiance-player.is-playing:not(.is-open) #ambiance-icon { animation: none; }
}

html[data-theme='night'] :is(
    .site-comment-form,
    .guestbook-comment-form,
    .gallery-comment-form,
    .ambiance-comment-form
) {
    background: rgba(0, 0, 0, 0.22) !important;
    background-image: none !important;
}

html[data-theme='night'] .project-progress-panel {
    background: rgba(0, 0, 0, 0.3) !important;
}

html[data-theme='night'] .project-progress-panel :is(
    .project-current-work,
    .project-progress-pending,
    .project-subscription
) {
    background: rgba(0, 0, 0, 0.16) !important;
}

/* 关于页：旅人名录 */
.about-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .8rem .75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(151, 124, 69, .3);
}
.patron-directory-entry { display: contents; }
.patron-directory-entry p { order: 3; flex: 0 0 100%; margin: .1rem 0 0; color: var(--text-secondary); font-size: .88rem; text-align: center; }
.about-action-row > .guestbook-support-entry { justify-content: center; margin: 0; }
.about-action-row-single .patron-directory-entry p { flex-basis: auto; }
.patron-directory-trigger {
    border-color: #66577e;
    background:
        linear-gradient(180deg, rgba(78, 55, 104, .5), rgba(29, 21, 39, .86)),
        #16121c;
    box-shadow:
        inset 0 0 0 1px rgba(184, 157, 213, .11),
        0 4px 14px rgba(0, 0, 0, .45);
    color: #c0afd2;
}
.patron-directory-trigger:hover,
.patron-directory-trigger:focus-visible { border-color: #917bad; color: #e0d2ec; }
.patron-directory-mark { color: #8c69aa; font-size: .75rem; text-shadow: 0 0 8px rgba(122, 79, 158, .68); }
.patron-directory-overlay {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(3, 3, 3, .84);
    backdrop-filter: blur(4px);
}
.patron-directory-overlay[hidden] { display: none; }
.patron-directory-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(78vh, 760px);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    overflow: auto;
    color: var(--text-primary);
    background-color: #1a1a19;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(126, 101, 55, .09), transparent 48%),
        linear-gradient(rgba(4, 4, 4, .48), rgba(8, 7, 6, .6)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, auto, 640px auto;
    background-position: center, center, center top;
    background-blend-mode: normal, normal, normal;
    border: 1px solid #68583a;
    box-shadow: inset 0 0 0 3px #0a0a09, inset 0 0 0 4px rgba(185, 151, 84, .14), 0 24px 80px rgba(0, 0, 0, .72);
}
.patron-directory-dialog::before { position: absolute; inset: 8px; border: 1px solid rgba(151, 124, 69, .18); content: ''; pointer-events: none; }
.patron-directory-close { position: absolute; z-index: 1; top: .8rem; right: .9rem; width: 38px; height: 38px; color: var(--gold); background: #0d0c0a; border: 1px solid var(--border-color); font-size: 1.5rem; cursor: pointer; }
.patron-directory-kicker { margin: 0 0 .4rem; color: #8f7749; font: .76rem var(--font-kicker); text-align: center; letter-spacing: .22em; }
.patron-directory-dialog h2 { margin: 0 0 .75rem; color: var(--gold); font: 400 clamp(1.75rem, 4vw, 2.2rem) var(--font-display); text-align: center; letter-spacing: .12em; }
.patron-directory-dialog h2::after { display: block; width: min(220px, 52%); height: 1px; margin: .75rem auto 0; background: linear-gradient(90deg, transparent, #6f5a32, transparent); content: ''; }
.patron-directory-intro { margin: 0; color: var(--text-secondary); text-align: center; }
.patron-directory-updated { margin: .45rem 0 1.8rem; color: #756b59; font: 400 .78rem var(--font-body); text-align: center; letter-spacing: .08em; }
.patron-directory-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 124px)); justify-content: center; gap: 1rem; }
.patron-directory-card { display: grid; min-width: 0; padding: 0; overflow: hidden; background-color: rgba(14, 13, 11, .72); background-image: url('/static/img/stone-texture.svg'); background-size: 300px 225px; background-blend-mode: soft-light; border: 1px solid rgba(151, 124, 69, .38); }
.patron-directory-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 0; border-bottom: 1px solid rgba(151, 124, 69, .32); border-radius: 0; background: #090807; }
.patron-directory-card strong { display: block; max-width: 100%; padding: .7rem .55rem .78rem; overflow: hidden; color: #d8c99f; font: 400 1rem var(--font-body); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.patron-directory-empty { padding: 2rem 1rem; color: var(--text-secondary); text-align: center; border-block: 1px solid rgba(151, 124, 69, .2); }

/* 后台：旅人名录维护 */
.patron-admin-page { max-width: 1180px; margin: 0 auto; }
.patron-admin-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.patron-admin-header p { margin: 0 0 .25rem; color: var(--gold-dark); font: .76rem var(--font-kicker); letter-spacing: .18em; }
.patron-admin-header h1 { margin: 0; color: var(--gold-light); font: 400 clamp(2.2rem, 5vw, 3.5rem) var(--font-display); }
.patron-admin-create { margin-bottom: 2rem; padding: 1.4rem; border: 1px solid var(--border-color); background: rgba(0, 0, 0, .24); }
.patron-admin-create h2 { grid-column: 1 / -1; margin: 0; color: var(--gold); font-weight: 400; }
.patron-admin-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.25fr) 100px auto auto; align-items: end; gap: .85rem; }
.patron-admin-form label { display: grid; gap: .35rem; color: var(--text-secondary); font-size: .8rem; }
.patron-admin-check { display: flex !important; align-items: center; min-height: 44px; white-space: nowrap; }
.patron-admin-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem; border-top: 1px solid rgba(151, 124, 69, .28); }
.patron-admin-row > img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--gold-dark); border-radius: 0; }
@media (max-width: 900px) {
    .patron-admin-form { grid-template-columns: 1fr 1fr; }
    .patron-admin-row { grid-template-columns: 64px minmax(0, 1fr); }
    .patron-admin-row > form:last-child { grid-column: 2; }
}
@media (max-width: 560px) {
    .about-action-row > .guestbook-support-entry { width: auto; }
    .about-action-row :is(.patron-directory-trigger, .guestbook-support-button) { width: auto; justify-content: center; }
    .patron-directory-grid { grid-template-columns: repeat(2, minmax(0, 96px)); }
    .patron-admin-header { align-items: flex-start; flex-direction: column; }
    .patron-admin-form, .patron-admin-row { grid-template-columns: 1fr; }
    .patron-admin-row > form:last-child { grid-column: 1; }
}

/* 图片详情与列表封面共用透明画布；灯箱放大层继续保持纯黑。 */
html[data-theme='night'] .gallery-detail-hero {
    background: rgba(0, 0, 0, 0.12) !important;
}

html[data-theme='night'] .gallery-detail-page {
    background: rgba(0, 0, 0, 0.2) !important;
}

html[data-theme='night'] .gallery-detail-page :is(
    .gallery-detail-copy,
    .gallery-edit-panel,
    .gallery-comment-form
) {
    background: rgba(0, 0, 0, 0.12) !important;
    background-image: none !important;
}

html[data-theme='night'] .gallery-detail-image-wrap {
    background: transparent !important;
}

/* 新建/编辑文章是全屏界面，必须分别放开页面、工具栏与正文卡片。 */
html[data-theme='night'] .editor-page,
html[data-theme='night'] .editor-body {
    background: transparent !important;
}

html[data-theme='night'] :is(
    .editor-toolbar,
    .editor-bottombar,
    .editor-card,
    .editor-gallery-panel,
    .editor-gallery-item
) {
    background-color: rgba(0, 0, 0, 0.42) !important;
    background-image: none !important;
}

/* 全局氛围音浮窗的外壳、标题条和展开内容都显示后方石纹。 */
html[data-theme='night'] .global-ambiance-player {
    background: rgba(0, 0, 0, 0.36);
}

html[data-theme='night'] #global-ambiance-player .ambiance-player-toggle {
    background: rgba(0, 0, 0, 0.24);
}

html[data-theme='night'] #global-ambiance-player .ambiance-player-toggle:hover {
    background: rgba(54, 19, 15, 0.62);
}

html[data-theme='night'] #global-ambiance-player :is(
    .ambiance-player-content,
    .ambiance-transport
) {
    background: rgba(0, 0, 0, 0.32);
}

@media (max-width: 768px) {
    html[data-theme='night'] .global-ambiance-player.is-open {
        background: rgba(5, 5, 4, 0.9);
    }

    html[data-theme='night'] #global-ambiance-player.is-open .ambiance-player-toggle {
        background: rgba(14, 12, 10, 0.92);
    }

    html[data-theme='night'] #global-ambiance-player.is-open :is(
        .ambiance-player-content,
        .ambiance-transport
    ) {
        background: rgba(8, 7, 6, 0.88);
    }
}

/* 赞赏窗口沿用透明黑玻璃层，二维码自身保持白底以保证扫码识别。 */
html[data-theme='night'] .guestbook-support-dialog {
    background-color: #1a1a19;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(126, 101, 55, 0.09), transparent 48%),
        linear-gradient(rgba(4, 4, 4, 0.5), rgba(8, 7, 6, 0.62)),
        url('/static/img/d2-gray-stone-day.webp');
    background-size: auto, auto, 640px auto;
    background-position: center, center, center top;
    background-blend-mode: normal, normal, normal;
}

html[data-theme='night'] .guestbook-support-code {
    background: rgba(0, 0, 0, 0.34);
}

html[data-theme='night'] .guestbook-support-overlay {
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(6px) brightness(0.72);
}

html[data-theme='night'] .post-content-preview,
html[data-theme='night'] .gallery-item-info {
    background: transparent;
}

html[data-theme='night'] .ambiance-grid .ambiance-card-content {
    background: transparent;
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        margin-left: 0.1rem;
    }
}

/* 与废案研究院相同：中等桌面宽度为左侧轨道预留空间，题头与主体成套移动。 */
@media (min-width: 1440px) and (max-width: 1819px) {
    .project-progress-panel,
    .post-detail.guestbook-page {
        width: calc(100% - 261px);
        margin-left: 132px;
    }

    .notifications-page {
        width: calc(100% - 261px);
        max-width: none;
        margin-right: 0;
        margin-left: 132px;
    }

    .notifications-page .archive-hero {
        margin-left: 0;
    }
}

/* Shared identity above comment and reply composers. */
.comment-identity { display:flex; align-items:center; gap:14px; width:100%; box-sizing:border-box; margin:0 0 22px; padding:0 0 18px; border-bottom:1px solid rgba(171,148,95,.25); }
.comment-identity-avatar { flex:0 0 48px; width:48px; height:48px; object-fit:cover; border:1px solid #796b49; border-radius:0; }
.comment-identity-copy { display:flex; flex-direction:column; gap:5px; min-width:0; font-family:var(--font-body); }
.comment-identity-copy strong { color:#d4c49e; font-size:1.1rem; font-weight:400; overflow-wrap:anywhere; }
.comment-identity-copy span { color:#b2a68e; font-size:.95rem; line-height:1.6; }
.comment-identity-copy .comment-identity-label { color:#a99978; font-size:.85rem; }
.comment-identity-copy .comment-identity-anonymous-note { display:none; }
form:has(input[name="anonymous"]:checked) .comment-identity-anonymous-note { display:block; }
.comment-identity-login { margin-left:auto; flex-shrink:0; padding:10px 0 10px 12px; color:#d0b77b; font-family:var(--font-body); font-size:1rem; white-space:nowrap; }
.comment-identity-login:hover { color:#f0d797; }
.comment-identity-login:focus-visible { outline:1px solid #d0b77b; outline-offset:4px; }
.comment-reply-form .comment-identity { grid-column:1 / -1; margin-bottom:12px; }
@media(max-width:600px) {
 .comment-identity { flex-wrap:wrap; gap:12px; }
 .comment-identity-copy { flex:1; }
 .comment-identity-login { margin-left:60px; padding:0; min-height:32px; }
}
