/*
Theme Name: Destined
Theme URI: https://lifeng888.cn
Author: LIFENG
Author URI: https://lifeng.hk
Description: 缘来有你 · 情侣博客主题。Hero 大图双头像、恋爱计时器、纪念日倒计时、随机情话、祝福墙、点点滴滴、随笔说说、恋爱清单、自研相册、Pjax 无刷新、图片懒加载、多种可控特效、公告弹窗、用户中心（UID/积分/等级/签到）、全站弹窗登录、多语言、SMTP 邮箱验证、本地 IP 属地库（纯真格式全递归解析、历史快照回填）、前台隐藏管理栏、登录态免填祝福表单、后台一键审批、全站 SEO。原创代码，PHP 8.2 兼容。
Version: 2.6.18
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: destined
Tags: blog, custom-colors, custom-menu, featured-images, responsive-layout, threaded-comments, translation-ready
*/

/* ===== 设计变量 ===== */
:root {
    --ln-accent: #ff6b81;
    --ln-accent-deep: #ff5162;
    --ln-bg: #fdf7f8;
    --ln-surface: #ffffff;
    --ln-text: #2b2730;
    --ln-muted: #8b8494;
    --ln-border: #f3e3e7;
    --ln-shadow: 0 10px 32px rgba(255, 107, 129, 0.1);
    --ln-shadow-hover: 0 16px 44px rgba(255, 107, 129, 0.18);
    --ln-radius: 16px;
    --ln-max: 780px;
    --ln-num-days: #ff4d4f;
    --ln-num-hours: #fa8c16;
    --ln-num-mins: #1677ff;
    --ln-num-secs: #722ed1;
}

html.destined-dark {
    --ln-bg: #16151a;
    --ln-surface: #221f27;
    --ln-text: #ece8f0;
    --ln-muted: #9a93a6;
    --ln-border: #34303d;
    --ln-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
    --ln-shadow-hover: 0 16px 44px rgba(0, 0, 0, 0.55);
}

/* ===== 基础 ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
    background: var(--ln-bg);
    color: var(--ln-text);
    line-height: 1.7;
    font-size: 15px;
}

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

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

ol,
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    line-height: 1.4;
}

p {
    margin: 0 0 1em;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

::selection {
    background: rgba(255, 107, 129, 0.25);
}

/* 懒加载淡入 */
img.lazy,
img[loading="lazy"] {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

img.lazy.is-loaded,
img[loading="lazy"].is-loaded {
    opacity: 1;
    transform: none;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 129, 0.35);
    border-radius: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== 无障碍 ===== */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 10000;
    width: auto;
    height: auto;
    clip: auto;
    padding: 8px 16px;
    background: var(--ln-surface);
    border-radius: 8px;
    box-shadow: var(--ln-shadow);
}

/* ===== 顶部进度条 ===== */
.destined-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1001;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.destined-progress.is-active {
    opacity: 1;
}

.destined-progress__bar {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--ln-accent), #ffb199);
    box-shadow: 0 0 10px rgba(255, 107, 129, 0.8);
    transition: width 0.35s ease;
}

/* ===== 站点头部 ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(1.6) blur(12px);
    -webkit-backdrop-filter: saturate(1.6) blur(12px);
    border-bottom: 1px solid var(--ln-border);
}

html.destined-dark .site-header {
    background: rgba(34, 31, 39, 0.9);
}

.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.site-title a {
    background: linear-gradient(90deg, var(--ln-accent-deep), #b96bff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-nav {
    margin-left: auto;
}

.site-nav__list {
    display: flex;
    gap: 1.4rem;
    align-items: center;
}

.site-nav__list a {
    font-size: 0.92rem;
    color: var(--ln-muted);
    transition: color 0.2s;
    position: relative;
}

.site-nav__list a:hover {
    color: var(--ln-accent-deep);
}

.site-nav__list a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--ln-accent-deep);
    border-radius: 2px;
    transition: all 0.25s;
    transform: translateX(-50%);
}

.site-nav__list a:hover::after {
    width: 100%;
}

.site-nav__list .current-menu-item > a {
    color: var(--ln-accent-deep);
    font-weight: 600;
}

.site-nav__list ul {
    display: none;
}

/* 阿里云 iconfont 导航图标（symbol 引用，随文字色） */
.site-nav__list a {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.site-nav__list .icon--nav {
    width: 1.05em;
    height: 1.05em;
    fill: currentColor;
    flex: none;
}

.site-nav__toggle {
    display: none;
    background: none;
    border: 1px solid var(--ln-border);
    border-radius: 8px;
    font-size: 1.1rem;
    padding: 0.15rem 0.55rem;
    color: var(--ln-text);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    padding: 0.2rem;
    line-height: 1;
    border-radius: 50%;
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
}

/* ===== Hero 区 ===== */
.destined-hero {
    position: relative;
    min-height: 420px;
    height: 52vh;
    max-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f6d5d9 0%, #e8d5f2 55%, #d5e3f6 100%);
    background-size: cover;
    background-position: center 30%;
}

.destined-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 16, 24, 0.12), rgba(20, 16, 24, 0.28));
}

.destined-hero__people {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 5vw, 3.2rem);
}

.destined-hero__person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.destined-hero__avatar {
    width: clamp(84px, 12vw, 120px);
    height: clamp(84px, 12vw, 120px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    background: #fff;
}

.destined-hero__name {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.1em;
}

.destined-hero__heart {
    width: 30px;
    height: 30px;
    background: var(--ln-accent-deep);
    position: relative;
    transform: rotate(-45deg);
    box-shadow: 0 4px 16px rgba(255, 81, 98, 0.6);
    animation: ln-heartbeat 1.6s infinite;
}

.destined-hero__heart::before,
.destined-hero__heart::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--ln-accent-deep);
    border-radius: 50%;
}

.destined-hero__heart::before {
    top: -15px;
    left: 0;
}

.destined-hero__heart::after {
    left: 15px;
    top: 0;
}

@keyframes ln-heartbeat {
    0%, 100% { transform: scale(1) rotate(-45deg); }
    25% { transform: scale(1.22) rotate(-45deg); }
    45% { transform: scale(1.4) rotate(-45deg); }
}

.destined-hero__waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    z-index: 2;
    line-height: 0;
}

.destined-hero__waves svg {
    width: 100%;
    height: 5rem;
}

.destined-hero__parallax > use {
    animation: ln-move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.destined-hero__parallax > use:nth-child(1) {
    fill: rgba(255, 255, 255, 0.7);
    animation-delay: -2s;
    animation-duration: 7s;
}

.destined-hero__parallax > use:nth-child(2) {
    fill: rgba(255, 255, 255, 0.5);
    animation-delay: -3s;
    animation-duration: 10s;
}

.destined-hero__parallax > use:nth-child(3) {
    fill: rgba(255, 255, 255, 0.3);
    animation-delay: -4s;
    animation-duration: 13s;
}

.destined-hero__parallax > use:nth-child(4) {
    fill: var(--ln-bg);
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes ln-move-forever {
    0% { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

/* ===== 内容容器 ===== */
.destined-wrap {
    max-width: var(--ln-max);
    margin: 0 auto;
    padding: 1.6rem 1.25rem 3rem;
}

/* ===== 计时器 / 倒计时 ===== */
.destined-stats {
    text-align: center;
    margin-bottom: 1.2rem;
}

.destined-stat {
    margin-bottom: 0.6rem;
}

.destined-stat__title {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    color: var(--ln-muted);
    letter-spacing: 0.08em;
}

.destined-stat__num {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.destined-num {
    font-size: 2rem;
    font-weight: 800;
    font-family: Georgia, "Times New Roman", serif;
    margin: 0 0.1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.destined-num--days { color: var(--ln-num-days); }
.destined-num--hours { color: var(--ln-num-hours); }
.destined-num--mins { color: var(--ln-num-mins); }
.destined-num--secs { color: var(--ln-num-secs); }

/* ===== 情话横幅 ===== */
.destined-banner {
    display: block;
    text-align: center;
    padding: 0.75rem 1.4rem;
    margin: 0 auto 1.8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffd1dc, #ffc4d6, #e5c9ff);
    color: #8a2c4a;
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    box-shadow: 0 6px 20px rgba(255, 150, 180, 0.35);
    animation: ln-banner-in 0.6s ease;
}

html.destined-dark .destined-banner {
    color: #5c1d33;
}

@keyframes ln-banner-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ===== 首页组件卡片 ===== */
.destined-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.destined-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--ln-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.destined-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ln-shadow-hover);
}

.destined-card__icon {
    flex: none;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffe3ea, #f3e0ff);
}

html.destined-dark .destined-card__icon {
    background: linear-gradient(135deg, #3a2c38, #322a42);
}

.destined-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.destined-card__title {
    font-weight: 700;
    font-size: 1.02rem;
}

.destined-card__desc {
    font-size: 0.8rem;
    color: var(--ln-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 区块通用 ===== */
.destined-section {
    margin-bottom: 2rem;
}

.destined-section__title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.04em;
}

.destined-section__meta {
    text-align: center;
    color: var(--ln-muted);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.destined-section__meta strong {
    color: var(--ln-accent-deep);
    font-size: 1.1rem;
}

.destined-list-heading {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1.2rem;
}

.destined-empty,
.destined-tip {
    text-align: center;
    color: var(--ln-muted);
    background: var(--ln-surface);
    border: 1px dashed var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.6rem;
    font-size: 0.92rem;
}

.destined-tip {
    margin-top: 1.2rem;
}

/* ===== 按钮 ===== */
.destined-btn {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.25s;
    text-align: center;
}

.destined-btn--primary {
    background: linear-gradient(90deg, var(--ln-accent-deep), #ff8ba0);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 81, 98, 0.35);
}

.destined-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 81, 98, 0.45);
}

.destined-btn--load {
    display: block;
    margin: 1.2rem auto 0;
    background: var(--ln-surface);
    color: var(--ln-accent-deep);
    border: 1px solid var(--ln-accent);
}

.destined-btn--load:hover {
    background: var(--ln-accent);
    color: #fff;
}

.destined-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== 点点滴滴（文章列表） ===== */
.destined-moments {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.destined-moment {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-left: 4px solid var(--ln-accent);
    border-radius: var(--ln-radius);
    padding: 1rem 1.3rem;
    box-shadow: var(--ln-shadow);
}

html.js-fade .destined-moment {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js-fade .destined-moment.is-in {
    opacity: 1;
    transform: none;
}

.destined-moment__title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.destined-moment__title a:hover {
    color: var(--ln-accent-deep);
}

.destined-moment__meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--ln-muted);
}

/* ===== 分页 ===== */
.destined-pagination,
.pagination {
    margin-top: 1.6rem;
    text-align: center;
}

.destined-pagination .page-numbers,
.pagination .page-numbers {
    display: inline-block;
    min-width: 36px;
    padding: 0.35rem 0.7rem;
    margin: 0 3px;
    border-radius: 10px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    font-size: 0.88rem;
    color: var(--ln-muted);
    transition: all 0.2s;
}

.destined-pagination .page-numbers.current,
.pagination .page-numbers.current {
    background: var(--ln-accent-deep);
    border-color: var(--ln-accent-deep);
    color: #fff;
    font-weight: 600;
}

.destined-pagination .page-numbers:hover:not(.current),
.pagination .page-numbers:hover:not(.current) {
    border-color: var(--ln-accent);
    color: var(--ln-accent-deep);
}

/* ===== 祝福墙 ===== */
.destined-blessing-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.destined-blessing {
    display: flex;
    gap: 0.9rem;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-left: 4px solid #4aa3ff;
    border-radius: var(--ln-radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--ln-shadow);
    animation: ln-fade-up 0.5s ease;
}

@keyframes ln-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.destined-blessing__avatar {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffe3ea;
}

.destined-blessing__body {
    min-width: 0;
    flex: 1;
}

.destined-blessing__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 0.25rem;
}

.destined-blessing__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ln-accent-deep);
}

.destined-blessing__time {
    font-size: 0.76rem;
    color: var(--ln-muted);
}

.destined-blessing__ip {
    font-size: 0.72rem;
    color: var(--ln-muted);
    background: var(--ln-bg);
    border-radius: 6px;
    padding: 0 0.4rem;
}

.destined-blessing__content {
    font-size: 0.93rem;
    word-break: break-word;
}

/* 祝福表单 */
.destined-form {
    margin-top: 1.6rem;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--ln-shadow);
}

.destined-form__title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.destined-form__row {
    margin-bottom: 0.9rem;
}

.destined-form__identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--ln-bg);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
}

.destined-form__identity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.destined-form__identity-body {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.destined-form__identity-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ln-text);
}

.destined-form__identity-tip {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: var(--ln-muted);
}

.destined-form__row label {
    display: block;
    font-size: 0.85rem;
    color: var(--ln-muted);
    margin-bottom: 0.3rem;
}

.destined-form__row input,
.destined-form__row textarea {
    width: 100%;
    border: 1px solid var(--ln-border);
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    background: var(--ln-bg);
    color: var(--ln-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.destined-form__row input:focus,
.destined-form__row textarea:focus {
    outline: none;
    border-color: var(--ln-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.15);
}

.destined-form__actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.destined-form__tip {
    font-size: 0.78rem;
    color: var(--ln-muted);
}

.destined-form__msg {
    margin: 0.8rem 0 0;
    font-size: 0.88rem;
    color: var(--ln-accent-deep);
    min-height: 1.2em;
}

/* ===== 随笔说说 ===== */
.destined-shuoshuo-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.destined-shuoshuo {
    display: flex;
    gap: 0.9rem;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.1rem 1.3rem;
    box-shadow: var(--ln-shadow);
    animation: ln-fade-up 0.5s ease;
}

.destined-shuoshuo__avatar {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffe3ea;
}

.destined-shuoshuo__body {
    min-width: 0;
    flex: 1;
}

.destined-shuoshuo__meta {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    margin-bottom: 0.25rem;
}

.destined-shuoshuo__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ln-accent-deep);
}

.destined-shuoshuo__time {
    font-size: 0.76rem;
    color: var(--ln-muted);
}

.destined-shuoshuo__content {
    font-size: 0.93rem;
    word-break: break-word;
}

.destined-shuoshuo__content p {
    margin: 0 0 0.4rem;
}

/* ===== 关于我们 ===== */
.destined-about {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.6rem 1.8rem;
    box-shadow: var(--ln-shadow);
}

.destined-about img {
    border-radius: 12px;
    margin: 0 auto 1rem;
}

/* ===== 恋爱清单 ===== */
.destined-lovelist {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.destined-lovelist__item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: 12px;
    padding: 0.8rem 1.1rem;
    box-shadow: var(--ln-shadow);
    transition: transform 0.2s;
}

.destined-lovelist__item:hover {
    transform: translateX(4px);
}

.destined-lovelist__icon {
    flex: none;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 0.8rem;
    color: #fff;
    background: #d8d3e0;
}

.destined-lovelist__item.is-done .destined-lovelist__icon {
    background: #52c41a;
}

.destined-lovelist__item.is-done .destined-lovelist__text {
    color: var(--ln-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(82, 196, 26, 0.6);
}

/* ===== 相册 ===== */
.destined-album {
    margin-bottom: 2rem;
}

.destined-album__title {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.destined-album__count {
    font-size: 0.8rem;
    color: var(--ln-muted);
    font-weight: 400;
}

.destined-album__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
}

.destined-photo {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    box-shadow: var(--ln-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.destined-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.destined-photo:hover {
    transform: translateY(-4px);
    box-shadow: var(--ln-shadow-hover);
}

.destined-photo:hover img {
    transform: scale(1.06);
}

/* 灯箱 */
.fx-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fx-lightbox[hidden] {
    display: none;
}

.fx-lightbox__mask {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 14, 0.88);
    backdrop-filter: blur(6px);
}

.fx-lightbox__figure {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: min(86vw, 900px);
}

.fx-lightbox__img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.fx-lightbox__caption {
    color: #fff;
    text-align: center;
    padding-top: 0.8rem;
    font-size: 0.9rem;
}

.fx-lightbox__nav,
.fx-lightbox__close {
    position: absolute;
    z-index: 2;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    transition: background 0.2s;
}

.fx-lightbox__nav:hover,
.fx-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fx-lightbox__nav--prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.fx-lightbox__nav--next { right: 3vw; top: 50%; transform: translateY(-50%); }
.fx-lightbox__close { top: 3vh; right: 3vw; }

/* ===== 文章详情 ===== */
.destined-post {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.8rem 2rem;
    box-shadow: var(--ln-shadow);
    margin-bottom: 1.6rem;
}

.destined-post__title {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.6rem;
}

.destined-post__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--ln-muted);
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px dashed var(--ln-border);
}

.destined-post__meta a:hover {
    color: var(--ln-accent-deep);
}

.destined-post__thumb {
    margin: 0 0 1.4rem;
}

.destined-post__thumb img {
    border-radius: 12px;
    width: 100%;
}

.destined-post__content {
    font-size: 1rem;
}

.destined-post__content img {
    border-radius: 10px;
}

.destined-post__content a {
    color: var(--ln-accent-deep);
    text-decoration: underline;
    text-decoration-color: rgba(255, 81, 98, 0.4);
    text-underline-offset: 3px;
}

.destined-post__content blockquote {
    margin: 1.2rem 0;
    padding: 0.9rem 1.2rem;
    border-left: 4px solid var(--ln-accent);
    background: var(--ln-bg);
    border-radius: 0 10px 10px 0;
    color: var(--ln-muted);
}

.destined-post__content pre {
    background: #26222e;
    color: #f5f2fa;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    overflow: auto;
    font-size: 0.88rem;
}

.destined-post__content code {
    font-family: "Cascadia Code", Consolas, monospace;
}

.destined-post__tags {
    margin-top: 1.2rem;
    font-size: 0.82rem;
    color: var(--ln-muted);
}

.destined-post__tags a {
    display: inline-block;
    background: var(--ln-bg);
    border: 1px solid var(--ln-border);
    border-radius: 999px;
    padding: 0.1rem 0.7rem;
    margin-right: 0.4rem;
    transition: all 0.2s;
}

.destined-post__tags a::before {
    content: "#";
    opacity: 0.5;
}

.destined-post__tags a:hover {
    border-color: var(--ln-accent);
    color: var(--ln-accent-deep);
}

.destined-post__nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--ln-border);
    font-size: 0.88rem;
}

.destined-post__nav a {
    color: var(--ln-muted);
    max-width: 48%;
}

.destined-post__nav a:hover {
    color: var(--ln-accent-deep);
}

.destined-post__nav-label {
    color: var(--ln-accent-deep);
    font-weight: 700;
}

/* ===== 评论 ===== */
.comments-area {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--ln-shadow);
}

.comments-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-list .children {
    margin-top: 1rem;
    padding-left: 1.2rem;
    border-left: 2px dashed var(--ln-border);
}

.destined-comment__inner {
    display: flex;
    gap: 0.9rem;
}

.destined-comment__avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.destined-comment__body {
    flex: 1;
    min-width: 0;
    background: var(--ln-bg);
    border: 1px solid #fedcc2;
    border-radius: 4px 16px 16px 16px;
    padding: 0.7rem 1.1rem;
    box-shadow: 1px 1px 2px rgba(255, 222, 200, 0.5);
}

html.destined-dark .destined-comment__body {
    border-color: #4a3a30;
}

.destined-comment__meta {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.2rem;
}

.destined-comment__author {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ln-accent-deep);
}

.destined-comment__time {
    font-size: 0.74rem;
    color: var(--ln-muted);
}

.destined-comment__text {
    font-size: 0.93rem;
    word-break: break-word;
}

.destined-comment__text p {
    margin: 0 0 0.4rem;
}

.destined-comment__awaiting {
    color: #fa8c16;
    font-size: 0.82rem;
}

.destined-comment-ip {
    font-size: 0.74rem;
    color: var(--ln-muted);
    margin-left: 0.4rem;
}

.destined-comment__actions {
    font-size: 0.8rem;
}

.destined-comment__actions a {
    color: var(--ln-muted);
}

.destined-comment__actions a:hover {
    color: var(--ln-accent-deep);
}

.comment-respond {
    margin-top: 1.4rem;
}

.comment-reply-title {
    font-size: 1rem;
    font-weight: 700;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.comment-form p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.comment-form label {
    font-size: 0.82rem;
    color: var(--ln-muted);
}

.comment-form input,
.comment-form textarea {
    border: 1px solid var(--ln-border);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    background: var(--ln-bg);
    color: var(--ln-text);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--ln-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.15);
}

.comment-form .submit {
    align-self: flex-start;
}

.comment-form-cookies-consent {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem !important;
    font-size: 0.82rem;
    color: var(--ln-muted);
}

.comment-form-cookies-consent input {
    width: auto;
}

.no-comments {
    color: var(--ln-muted);
    font-size: 0.88rem;
}

/* ===== 小工具 ===== */
.destined-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.destined-widgets .widget {
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--ln-shadow);
}

.widget-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-left: 0.6rem;
    border-left: 3px solid var(--ln-accent);
}

.destined-timer {
    text-align: center;
    font-size: 0.95rem;
}

.destined-lovetext {
    margin: 0;
    color: var(--ln-muted);
    font-size: 0.92rem;
}

.destined-mini-list li {
    padding: 0.35rem 0;
    font-size: 0.88rem;
    border-bottom: 1px dashed var(--ln-border);
}

.destined-mini-list li:last-child {
    border-bottom: none;
}

.destined-mini-list a:hover {
    color: var(--ln-accent-deep);
}

/* ===== 归档头 / 404 ===== */
.destined-archive-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.destined-archive-title {
    font-size: 1.3rem;
    font-weight: 800;
}

.destined-archive-desc {
    color: var(--ln-muted);
    font-size: 0.9rem;
}

.destined-404 {
    text-align: center;
    padding: 3rem 1rem;
}

.destined-404__code {
    font-size: 5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    background: linear-gradient(90deg, var(--ln-accent-deep), #b96bff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.destined-404__title {
    font-size: 1.3rem;
    margin: 0.8rem 0 0.4rem;
}

.destined-404__text {
    color: var(--ln-muted);
    margin-bottom: 1.4rem;
}

/* ===== 页脚 ===== */
.site-footer {
    background: var(--ln-surface);
    border-top: 1px solid var(--ln-border);
    padding: 2.2rem 1.25rem 2.6rem;
    text-align: center;
}

.site-footer__inner {
    max-width: var(--ln-max);
    margin: 0 auto;
}

.site-footer__list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1rem;
    font-size: 0.86rem;
    color: var(--ln-muted);
}

.site-footer__list a:hover {
    color: var(--ln-accent-deep);
}

.site-footer__copy {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 0.3rem;
}

.site-footer__icp {
    margin: 0 0 0.3rem;
    font-size: 0.78rem;
    color: var(--ln-muted);
}

.site-footer__icp a:hover {
    color: var(--ln-accent-deep);
}

.site-footer__credit {
    margin: 0.8rem 0 0;
    font-size: 0.78rem;
    color: var(--ln-muted);
}

.site-footer__credit a {
    color: var(--ln-accent-deep);
    font-weight: 600;
}

/* ===== 回到顶部 ===== */
.destined-backtop {
    position: fixed;
    right: 1.4rem;
    bottom: 1.6rem;
    z-index: 90;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--ln-surface);
    color: var(--ln-accent-deep);
    font-size: 1.2rem;
    box-shadow: var(--ln-shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.destined-backtop.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.destined-backtop:hover {
    background: var(--ln-accent-deep);
    color: #fff;
}

/* ===== 公告弹窗 ===== */
.destined-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.destined-modal[hidden] {
    display: none;
}

.destined-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 20, 0.5);
    backdrop-filter: blur(3px);
}

.destined-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    background: var(--ln-surface);
    border-radius: var(--ln-radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    animation: ln-modal-in 0.35s ease;
    overflow: hidden;
}

@keyframes ln-modal-in {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

.destined-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid var(--ln-border);
    font-size: 1rem;
}

.destined-modal__close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--ln-muted);
    line-height: 1;
}

.destined-modal__body {
    padding: 1.2rem 1.3rem;
    font-size: 0.93rem;
    color: var(--ln-text);
    max-height: 60vh;
    overflow: auto;
}

.destined-modal__footer {
    padding: 0.9rem 1.3rem;
    border-top: 1px solid var(--ln-border);
    text-align: right;
}

.destined-modal__dismiss {
    background: none;
    border: 1px solid var(--ln-border);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
    color: var(--ln-muted);
}

.destined-modal__dismiss:hover {
    border-color: var(--ln-accent);
    color: var(--ln-accent-deep);
}

/* ===== 特效：灯笼 ===== */
.fx-destined-host {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    z-index: 999;
    pointer-events: none;
    user-select: none;
}

.fx-destined {
    position: absolute;
    top: 10px;
    width: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: 50% -70px;
    animation: ln-swing 3s ease-in-out infinite alternate-reverse;
}

.fx-destined--left { left: 42px; }
.fx-destined--right { right: 42px; }

.fx-destined__line {
    width: 2px;
    height: 26px;
    background: #dc8f03;
    margin-top: -10px;
}

.fx-destined__cap {
    width: 40px;
    height: 8px;
    border: 1px solid #dc8f03;
    background: linear-gradient(90deg, #dc8f03, orange, #dc8f03, orange, #dc8f03);
    border-radius: 4px;
}

.fx-destined__cap--top {
    margin-top: -4px;
}

.fx-destined__cap--bottom {
    margin-top: -2px;
}

.fx-destined__body {
    position: relative;
    width: 78px;
    height: 62px;
    margin: 1px 0;
    border-radius: 50%;
    background: rgba(216, 0, 15, 0.85);
    box-shadow: -4px 4px 42px 3px rgba(250, 108, 0, 0.75);
    display: grid;
    place-items: center;
    animation: ln-destined-glow 2.4s ease-in-out infinite alternate;
}

.fx-destined__ring {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(220, 143, 3, 0.9);
}

.fx-destined__ring::after {
    content: "";
    position: absolute;
    inset: 22% 34%;
    border-radius: 50%;
    border: 2px solid rgba(220, 143, 3, 0.9);
}

.fx-destined__char {
    position: relative;
    font-family: "STXingkai", "KaiTi", "楷体", serif;
    font-size: 1.5rem;
    color: #ffe9a8;
    text-shadow: 0 0 8px rgba(255, 220, 120, 0.9);
}

.fx-destined__tail {
    width: 14px;
    height: 12px;
    background: #dc8f03;
    border-radius: 0 0 4px 4px;
    margin-top: -2px;
}

.fx-destined__tassel {
    display: block;
    width: 4px;
    height: 16px;
    margin: 0 auto;
    background: linear-gradient(180deg, #dc8f03, #ff5162);
    border-radius: 2px;
}

@keyframes ln-swing {
    from { transform: rotate(6deg); }
    to { transform: rotate(-6deg); }
}

@keyframes ln-destined-glow {
    from { box-shadow: -4px 4px 34px 2px rgba(250, 108, 0, 0.55); }
    to { box-shadow: -4px 4px 48px 6px rgba(250, 108, 0, 0.9); }
}

/* ===== 特效：樱花 / 下雪 ===== */
.fx-sakura-host,
.fx-snow-host {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    z-index: 998;
}

.fx-sakura,
.fx-snow {
    position: absolute;
    top: -24px;
    display: inline-block;
    animation-name: ln-fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    will-change: transform;
}

.fx-sakura {
    animation-name: ln-fall-sway;
}

@keyframes ln-fall {
    to { transform: translateY(110vh); rotate: 360deg; }
}

@keyframes ln-fall-sway {
    0% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(3vw, 28vh) rotate(90deg); }
    50% { transform: translate(-2vw, 55vh) rotate(180deg); }
    75% { transform: translate(3vw, 82vh) rotate(270deg); }
    100% { transform: translate(0, 110vh) rotate(360deg); }
}

/* ===== 特效：点击爱心 ===== */
.fx-heart {
    position: absolute;
    z-index: 9999;
    font-size: 1.1rem;
    pointer-events: none;
    user-select: none;
    animation: ln-heart-float 1.4s ease-out forwards;
}

@keyframes ln-heart-float {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-140px) scale(1.5); }
}

/* ===== 入场淡入（仅 JS 可用时启用初始态，避免无 JS 内容隐身） ===== */
html.js-fade .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js-fade .fade-in.is-in {
    opacity: 1;
    transform: none;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .destined-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .site-header__inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
    }

    .site-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    /* v2.6.7（P0 修复）：toggle 按钮已移出 nav（header.php）。
       旧写法 .site-nav{display:none} 会把按钮一并隐藏 → 移动端导航完全打不开；
       现在只收起列表，由 .is-open 展开。 */
    .site-nav__list {
        display: none;
    }

    .site-nav.is-open .site-nav__list {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.5rem 0 0.8rem;
    }

    .site-nav__toggle {
        display: inline-block;
        order: 2;
        margin-left: auto;
        min-width: 44px;
        min-height: 44px;
    }

    .theme-toggle {
        order: 0;
    }

    .site-nav__list a {
        display: flex;
        align-items: center;
        min-height: 44px; /* 触控目标下限（v2.6.7） */
        padding: 0.45rem 0;
    }

    .site-nav__list a::after {
        display: none;
    }

    .destined-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
    }

    .destined-card {
        padding: 0.8rem 0.9rem;
        gap: 0.6rem;
    }

    .destined-card__icon {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
        border-radius: 12px;
    }

    .destined-card__title {
        font-size: 0.9rem;
    }

    .destined-card__desc {
        font-size: 0.72rem;
    }

    .destined-hero {
        height: 44vh;
        min-height: 320px;
    }

    .destined-num {
        font-size: 1.5rem;
    }

    .destined-post {
        padding: 1.3rem 1.2rem;
    }

    .destined-post__title {
        font-size: 1.3rem;
    }

    .comments-area {
        padding: 1.2rem 1.1rem;
    }

    .destined-form {
        padding: 1.1rem 1.2rem;
    }

    .destined-album__grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
    }

    .fx-destined {
        width: 56px;
    }

    .fx-destined__body {
        width: 56px;
        height: 44px;
    }

    .fx-destined__char {
        font-size: 1.1rem;
    }

    .fx-destined--left { left: 14px; }
    .fx-destined--right { right: 14px; }

    .fx-lightbox__nav--prev { left: 2vw; }
    .fx-lightbox__nav--next { right: 2vw; }
}

/* ===== 减弱动态效果 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fx-sakura-host,
    .fx-snow-host,
    .fx-destined-host {
        display: none;
    }
}

/* ============================================================
   v2.1.0 用户系统 / 弹窗登录 / 用户中心 / 多语言
   ============================================================ */

/* ----- 头部品牌区（logo） ----- */
.site-logo img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

/* ----- 头部动作区（语言 + 登录/用户 + 暗色） ----- */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.site-login {
    border: none;
    border-radius: 999px;
    padding: 0.38rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, var(--ln-accent-deep), #ff8ba0);
    box-shadow: 0 4px 14px rgba(255, 81, 98, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.site-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 81, 98, 0.42);
}

.site-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.22rem 0.7rem 0.22rem 0.25rem;
    border-radius: 999px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    box-shadow: var(--ln-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 200px;
}

.site-user:hover {
    transform: translateY(-1px);
    box-shadow: var(--ln-shadow-hover);
}

.site-user__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ln-bg);
}

.site-user__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ln-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

/* ----- 等级徽章（Lv.1 ~ Lv.10 灰→蓝→紫→金→红） ----- */
.destined-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2em;
    padding: 0.05em 0.45em;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    background: #8b8494;
    color: #fff;
}

.destined-level--1 { background: #a8a3b3; }
.destined-level--2 { background: #8b8494; }
.destined-level--3 { background: #52c41a; }
.destined-level--4 { background: #13c2c2; }
.destined-level--5 { background: #1677ff; }
.destined-level--6 { background: #2f54eb; }
.destined-level--7 { background: #722ed1; }
.destined-level--8 { background: #9254de; }
.destined-level--9 { background: linear-gradient(90deg, #d4a017, #faad14); }
.destined-level--10 { background: linear-gradient(90deg, #ff4d4f, #ff5162); box-shadow: 0 0 8px rgba(255, 77, 79, 0.5); }

html.destined-dark .destined-level--1 { background: #6f6a78; }
html.destined-dark .destined-level--2 { background: #57525f; }
html.destined-dark .destined-level--3 { background: #3c8a12; }
html.destined-dark .destined-level--4 { background: #0d8a8a; }
html.destined-dark .destined-level--5 { background: #0f5ec2; }
html.destined-dark .destined-level--6 { background: #2039a8; }
html.destined-dark .destined-level--7 { background: #531aa8; }
html.destined-dark .destined-level--8 { background: #6c30ad; }

/* ----- 语言切换下拉 ----- */
.destined-lang {
    position: relative;
    flex-shrink: 0;
}

.destined-lang__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    border: 1px solid var(--ln-border);
    border-radius: 999px;
    background: var(--ln-surface);
    color: var(--ln-muted);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.destined-lang__toggle:hover {
    color: var(--ln-accent-deep);
    border-color: var(--ln-accent);
}

.destined-lang__icon {
    font-weight: 700;
    font-size: 0.8rem;
}

.destined-lang__caret {
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.destined-lang.is-open .destined-lang__caret {
    transform: rotate(180deg);
}

.destined-lang__list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 120px;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: 12px;
    box-shadow: var(--ln-shadow-hover);
    z-index: 120;
}

.destined-lang__list[hidden] {
    display: none;
}

.destined-lang__list a {
    display: block;
    padding: 0.42rem 0.7rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--ln-text);
    white-space: nowrap;
}

.destined-lang__list a:hover {
    background: var(--ln-bg);
    color: var(--ln-accent-deep);
}

.destined-lang__list a.is-active {
    color: var(--ln-accent-deep);
    font-weight: 600;
    background: rgba(255, 107, 129, 0.1);
}

/* ----- 全站弹窗登录 ----- */
#destined-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

#destined-auth-modal[hidden] {
    display: none;
}

.destined-auth__mask {
    position: absolute;
    inset: 0;
    background: rgba(28, 22, 30, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: destined-auth-fade 0.25s ease;
}

.destined-auth__dialog {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    background: var(--ln-surface);
    border-radius: var(--ln-radius);
    border: 1px solid var(--ln-border);
    box-shadow: 0 24px 64px rgba(28, 22, 30, 0.35);
    padding: 1.6rem 1.5rem 1.4rem;
    animation: destined-auth-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes destined-auth-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes destined-auth-pop {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.destined-auth__close {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    border: none;
    background: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--ln-muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.destined-auth__close:hover {
    color: var(--ln-text);
    background: var(--ln-bg);
}

.destined-auth__tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.1rem;
    background: var(--ln-bg);
    border-radius: 999px;
    padding: 0.22rem;
}

.destined-auth__tabs button {
    flex: 1;
    border: none;
    background: none;
    border-radius: 999px;
    padding: 0.42rem 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ln-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.destined-auth__tabs button:hover {
    color: var(--ln-text);
}

.destined-auth__tabs button.is-active {
    background: var(--ln-surface);
    color: var(--ln-accent-deep);
    box-shadow: 0 2px 8px rgba(28, 22, 30, 0.1);
}

.destined-auth__pane {
    display: none;
    flex-direction: column;
    gap: 0.7rem;
}

.destined-auth__pane.is-active {
    display: flex;
}

.destined-auth__pane input[type="text"],
.destined-auth__pane input[type="email"],
.destined-auth__pane input[type="password"] {
    width: 100%;
    border: 1px solid var(--ln-border);
    border-radius: 10px;
    background: var(--ln-bg);
    color: var(--ln-text);
    font-size: 0.92rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.destined-auth__pane input:focus {
    outline: none;
    border-color: var(--ln-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.18);
}

.destined-auth__remember {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--ln-muted);
    cursor: pointer;
}

.destined-auth__remember input {
    accent-color: var(--ln-accent-deep);
}

.destined-auth__pane .destined-btn--primary {
    width: 100%;
    margin-top: 0.15rem;
}

.destined-auth__msg {
    min-height: 1.2em;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
    color: var(--ln-muted);
}

.destined-auth__msg.is-error {
    color: #ff4d4f;
}

.destined-auth__msg.is-ok {
    color: #52c41a;
}

body.destined-auth-open {
    overflow: hidden;
}

/* /login 兜底页 */
.destined-login-page {
    text-align: center;
    padding: 3rem 1.25rem;
}

.destined-login-page .destined-empty {
    margin-bottom: 1.2rem;
}

/* ----- 用户中心（子比风格） ----- */
.destined-profile {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.destined-profile__nav {
    position: sticky;
    top: 84px;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    box-shadow: var(--ln-shadow);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.destined-profile__me {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--ln-border);
}

.destined-profile__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ln-bg);
    border: 2px solid var(--ln-accent);
}

.destined-profile__me > div {
    min-width: 0;
}

.destined-profile__name {
    margin: 0 0 0.15rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ln-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.destined-profile__uid {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    color: var(--ln-muted);
    letter-spacing: 0.04em;
}

.destined-profile__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.destined-profile__menu button {
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ln-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.destined-profile__menu button:hover {
    background: var(--ln-bg);
    color: var(--ln-text);
}

.destined-profile__menu a.destined-profile__admin-link {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ln-muted);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.destined-profile__menu a.destined-profile__admin-link:hover {
    background: var(--ln-bg);
    color: var(--ln-text);
}

.destined-profile__menu button.is-active {
    background: linear-gradient(90deg, rgba(255, 107, 129, 0.14), rgba(185, 107, 255, 0.1));
    color: var(--ln-accent-deep);
    font-weight: 600;
}

#destined-profile-logout {
    margin-top: 0.4rem;
    color: #ff4d4f;
}

#destined-profile-logout:hover {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
}

.destined-profile__main {
    min-width: 0;
    background: var(--ln-surface);
    border: 1px solid var(--ln-border);
    border-radius: var(--ln-radius);
    box-shadow: var(--ln-shadow);
    padding: 1.5rem;
}

.destined-profile__pane {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
}

.destined-profile__pane.is-active {
    display: flex;
}

.destined-profile__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.destined-profile__stat {
    text-align: center;
    background: var(--ln-bg);
    border: 1px solid var(--ln-border);
    border-radius: 12px;
    padding: 0.85rem 0.5rem;
}

.destined-profile__stat-label {
    margin: 0 0 0.3rem;
    font-size: 0.75rem;
    color: var(--ln-muted);
}

.destined-profile__stat-num {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ln-accent-deep);
    font-variant-numeric: tabular-nums;
}

.destined-profile__bar {
    height: 10px;
    border-radius: 999px;
    background: var(--ln-bg);
    border: 1px solid var(--ln-border);
    overflow: hidden;
}

.destined-profile__bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ln-accent-deep), #b96bff);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.destined-profile__bar-text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ln-muted);
    text-align: center;
}

.destined-profile__h3 {
    margin: 0.4rem 0 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ln-text);
    padding-left: 0.6rem;
    border-left: 3px solid var(--ln-accent);
    line-height: 1.3;
}

.destined-profile__h3--danger {
    border-left-color: #ff4d4f;
    color: #ff4d4f;
}

.destined-profile__h4 {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ln-muted);
}

.destined-profile__form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.destined-profile__form--danger {
    padding: 1rem;
    border: 1px dashed rgba(255, 77, 79, 0.45);
    border-radius: 12px;
    background: rgba(255, 77, 79, 0.05);
}

.destined-profile__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.destined-profile__field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ln-text);
}

.destined-profile__field input[type="text"],
.destined-profile__field input[type="email"],
.destined-profile__field input[type="password"] {
    width: 100%;
    border: 1px solid var(--ln-border);
    border-radius: 10px;
    background: var(--ln-bg);
    color: var(--ln-text);
    font-size: 0.9rem;
    padding: 0.55rem 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.destined-profile__field input:focus {
    outline: none;
    border-color: var(--ln-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.18);
}

.destined-profile__field input[type="file"] {
    font-size: 0.82rem;
    color: var(--ln-muted);
}

.destined-profile__field input[type="file"]::file-selector-button {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    margin-right: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ln-accent-deep);
    background: rgba(255, 107, 129, 0.12);
    cursor: pointer;
    transition: background 0.2s;
}

.destined-profile__field input[type="file"]::file-selector-button:hover {
    background: rgba(255, 107, 129, 0.22);
}

.destined-profile__hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--ln-muted);
    line-height: 1.5;
}

.destined-profile__msg {
    margin: 0;
    font-size: 0.82rem;
    min-height: 1.2em;
}

.destined-profile__msg.is-error { color: #ff4d4f; }
.destined-profile__msg.is-ok { color: #52c41a; }

.destined-profile__avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.destined-profile__avatar-opt {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.destined-profile__avatar-opt img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--ln-bg);
}

.destined-profile__avatar-opt:hover {
    transform: scale(1.06);
}

.destined-profile__avatar-opt.is-active {
    border-color: var(--ln-accent-deep);
    box-shadow: 0 0 0 3px rgba(255, 81, 98, 0.2);
}

.destined-profile__avatar-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.destined-profile__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.destined-profile__list li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ln-text);
    background: var(--ln-bg);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    line-height: 1.5;
}

.destined-profile__list-status {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}

.destined-profile__list-status.is-ok {
    color: #389e0d;
    background: rgba(82, 196, 26, 0.14);
}

.destined-profile__list-status.is-wait {
    color: #d48806;
    background: rgba(250, 173, 20, 0.16);
}

html.destined-dark .destined-profile__list-status.is-ok {
    color: #95de64;
}

html.destined-dark .destined-profile__list-status.is-wait {
    color: #ffc53d;
}

.destined-profile__log {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.destined-profile__log th,
.destined-profile__log td {
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--ln-border);
    color: var(--ln-text);
    white-space: nowrap;
}

.destined-profile__log th {
    font-size: 0.75rem;
    color: var(--ln-muted);
    font-weight: 600;
}

.destined-profile__log td.is-plus { color: #389e0d; font-weight: 600; }
.destined-profile__log td.is-minus { color: #ff4d4f; font-weight: 600; }

html.destined-dark .destined-profile__log td.is-plus { color: #95de64; }

/* 危险按钮 */
.destined-btn--danger {
    background: linear-gradient(90deg, #ff4d4f, #ff7875);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 77, 79, 0.32);
}

.destined-btn--danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 77, 79, 0.45);
}

/* 未登录访问用户中心 */
.destined-profile-login {
    text-align: center;
    padding: 3.5rem 1.25rem;
}

.destined-profile-login .destined-empty {
    margin-bottom: 1.2rem;
}

/* ----- v2.1.0 暗色适配 ----- */
html.destined-dark .site-user {
    background: var(--ln-surface);
}

html.destined-dark .destined-lang__list {
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6);
}

html.destined-dark .destined-auth__dialog {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

html.destined-dark .destined-auth__tabs button.is-active {
    background: #35313f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

html.destined-dark .destined-auth__msg.is-error { color: #ff7875; }
html.destined-dark .destined-auth__msg.is-ok { color: #95de64; }
html.destined-dark .destined-profile__msg.is-error { color: #ff7875; }
html.destined-dark .destined-profile__msg.is-ok { color: #95de64; }
html.destined-dark .destined-profile__stat-num { color: #ff8ba0; }
html.destined-dark .destined-profile__h3--danger { color: #ff7875; border-left-color: #ff7875; }
html.destined-dark .destined-profile__form--danger {
    border-color: rgba(255, 120, 117, 0.4);
    background: rgba(255, 77, 79, 0.08);
}
html.destined-dark .destined-profile__log td.is-minus { color: #ff7875; }

/* ----- v2.1.0 响应式 ----- */
@media (max-width: 860px) {
    .destined-profile {
        grid-template-columns: 1fr;
    }

    .destined-profile__nav {
        position: static;
    }

    .destined-profile__me {
        justify-content: center;
        text-align: center;
    }

    .destined-profile__me > div {
        text-align: left;
    }

    .destined-profile__menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .destined-profile__menu button {
        width: auto;
    }
}

@media (max-width: 640px) {
    .site-user__name {
        display: none;
    }

    .site-user {
        padding: 0.22rem;
    }

    .site-login {
        padding: 0.34rem 0.8rem;
        font-size: 0.82rem;
    }

    .site-logo img {
        height: 30px;
    }

    .destined-profile__stats {
        grid-template-columns: 1fr 1fr;
    }

    .destined-profile__main {
        padding: 1.1rem;
    }

    .destined-profile__log th,
    .destined-profile__log td {
        padding: 0.4rem 0.45rem;
        font-size: 0.78rem;
    }
}

/* =========================================================================
   v2.5.0 多语言切换器（子比风格）+ 移动端体验优化
   ========================================================================= */

/* ----- 切换器按钮：地球图标 + 当前语言名 ----- */
.destined-lang__toggle {
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    font-weight: 500;
}

.destined-lang__icon {
    display: inline-flex;
    align-items: center;
    color: var(--ln-accent-deep);
}

.destined-lang__name {
    display: none; /* v2.6.7：≤640px 只留地球图标，给站点名/登录/主题按钮让位（当前语言以下拉列表内的对勾标示） */
}

/* ----- 下拉列表：旗标 + 原生语言名 + 当前项对勾 ----- */
.destined-lang__list {
    min-width: 168px;
    max-height: min(60vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.destined-lang__list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    min-height: 44px; /* 触控目标下限 */
    box-sizing: border-box;
}

.destined-lang__flag {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}

.destined-lang__label {
    flex: 1;
    min-width: 0;
}

.destined-lang__check {
    color: var(--ln-accent-deep);
    font-weight: 700;
    flex-shrink: 0;
}

/* ----- 移动端（≤640px）----- */
@media (max-width: 640px) {
    /* 切换器只留地球图标，省出导航空间 */
    .destined-lang__name {
        display: none;
    }

    .destined-lang__toggle {
        padding: 0.35rem 0.55rem;
        min-height: 44px;
        min-width: 44px;
        justify-content: center;
    }

    /* 下拉改为贴边全宽面板，避免被右侧裁切 */
    .destined-lang__list {
        position: fixed;
        top: 56px;
        left: 0.75rem;
        right: 0.75rem;
        min-width: 0;
        width: auto;
        z-index: 220;
    }

    .destined-lang__list a {
        min-height: 48px; /* 移动端触控目标再抬一档 */
        font-size: 0.95rem;
    }
}

/* ----- iOS 防聚焦缩放：聚焦时 Safari 会对 <16px 的输入框自动放大页面 ----- */
/* v2.6.7：补 .destined-form__row（祝福墙实际 class）——此前只写了并不存在的
   .blessing-form，祝福墙在 iOS 上聚焦输入框仍会触发页面自动放大 */
@media (max-width: 640px) {
    .destined-auth__pane input[type="text"],
    .destined-auth__pane input[type="email"],
    .destined-auth__pane input[type="password"],
    .destined-profile__field input[type="text"],
    .destined-profile__field input[type="email"],
    .destined-profile__field input[type="password"],
    .destined-form__row input,
    .destined-form__row textarea,
    .blessing-form input[type="text"],
    .blessing-form input[type="email"],
    .blessing-form textarea,
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea,
    .search-form input[type="search"] {
        font-size: 16px;
    }
}

/* ----- 防横向溢出（长昵称 / 长代码块 / 负 margin 装饰）----- */
body {
    overflow-x: hidden;
}

/* ----- 长内容安全换行（评论、祝福昵称、说说）----- */
.comment-content,
.blessing-card__content,
.site-title,
.site-description {
    overflow-wrap: anywhere;
}

/* 移动端暗色下拉同步（跟随既有暗色变量即可，无需额外覆写） */

/* =========================================================================
   v2.5.1 头部布局修复：站点名折行 + 长语言导航溢出
   ========================================================================= */

/* 站点名永不折行（泰文等窄屏下 "Destined" 被挤成两行的根因） */
.site-branding {
    flex-shrink: 0;
}

.site-title {
    white-space: nowrap;
}

.site-title a {
    white-space: nowrap;
}

/* 桌面中段（641px~1280px）：日/韩/泰等长标签语言会把导航挤爆，
   收紧间距并允许换行到第二行，绝不横向溢出 */
@media (min-width: 641px) and (max-width: 1280px) {
    .site-header__inner {
        gap: 0.6rem;
    }

    .site-nav__list {
        flex-wrap: wrap;
        row-gap: 0.15rem;
        column-gap: 0.7rem;
    }

    .site-nav__list a {
        font-size: 0.85rem;
    }
}

/* =========================================================================
   v2.5.2 导航项自身禁止项内折行（v2.5.1 只允许了列表项之间换行，
   但泰/德等长标签仍在单个导航项内部断成两行——补 nowrap）
   ========================================================================= */
.site-nav__list a {
    white-space: nowrap;
}
